/* Saksama Advisory — demo by Rekarih Studio
   Colours, type and spacing live in the token block below. */

:root {
  --paper: #f5f1e8;
  --paper-2: #ece6d8;
  --paper-3: #e3dbc9;
  --ink: #17221d;
  --muted: #565f59;
  --rule: #d6cdb9;
  --green: #1e4636;
  --green-deep: #132b21;
  --green-soft: #2c5c48;
  --brass: #a07e3e;
  --brass-hi: #c9a866;
  --on-green: #f1ece0;
  --on-green-muted: #b9c4b6;

  --display: "Libre Caslon Display", "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4.5vw, 48px);
  --section: clamp(80px, 11vw, 160px);
  --ease: cubic-bezier(0.22, 0.65, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; line-height: 1.06; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 5.8vw, 5.2rem); }
h2 { font-size: clamp(2rem, 3.8vw, 3.3rem); }
h3 { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; line-height: 1.3; }
.lead { font-size: clamp(1.1rem, 1.4vw, 1.25rem); line-height: 1.6; max-width: 34em; color: var(--muted); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 3px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--green); color: var(--on-green); padding: 10px 16px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Studio strip */
.strip {
  display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; align-items: center;
  padding: 9px var(--gutter);
  background: var(--green-deep); color: var(--on-green);
  font-size: 0.875rem; line-height: 1.4; text-align: center;
}
.strip a { color: var(--brass-hi); }
.strip :focus-visible { outline-color: var(--brass-hi); }

/* Header: stays at the top, steps aside while reading down, returns on the way up */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 241, 232, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: transform 0.45s var(--ease), border-color 0.3s;
}
.header.is-scrolled { border-bottom-color: var(--rule); }
.header.is-hidden { transform: translateY(-100%); }
.header__bar { position: relative; display: flex; align-items: center; gap: 28px; height: 76px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--green); flex-shrink: 0; }
.logo svg { width: 34px; height: 34px; }
.logo__word { font-family: var(--display); font-size: 1.5rem; line-height: 1; color: var(--ink); }
.logo__word span { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-left: 4px; vertical-align: 0.25em; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  text-decoration: none; padding: 8px 12px; font-size: 0.95rem;
  background-image: linear-gradient(var(--brass), var(--brass));
  background-size: 0 1px; background-position: 12px calc(100% - 6px); background-repeat: no-repeat;
  transition: background-size 0.35s var(--ease);
}
.nav a:hover { background-size: calc(100% - 24px) 1px; }
.nav a.nav__cta {
  margin-left: 10px; padding: 10px 18px; background: var(--green); color: var(--on-green); border-radius: 999px;
  transition: background-color 0.25s;
}
.nav a.nav__cta:hover { background: var(--green-soft); }
.header__tools { display: flex; align-items: center; gap: 8px; }
.lang {
  background: none; border: 0; cursor: pointer; padding: 8px 4px; font-size: 0.9rem; color: var(--muted);
  text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 5px;
}
.lang:hover { color: var(--ink); text-decoration-color: var(--brass); }
.menu { display: none; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--green); color: var(--on-green); border: 0; cursor: pointer;
  font-weight: 500; text-decoration: none;
  transition: background-color 0.25s;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.btn:hover { background: var(--green-soft); }
.btn:hover svg { transform: translateX(4px); }
.btn--light { background: var(--on-green); color: var(--green-deep); }
.btn--light:hover { background: #fff; }
.textlink { text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 6px; font-weight: 500; }
.textlink:hover { text-decoration-thickness: 2px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }

/* Hero */
.hero { padding: clamp(48px, 7vw, 96px) 0 0; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(55% 60% at 80% 35%, rgba(201, 168, 102, 0.22), transparent 70%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__copy .lead { margin-top: 28px; }
.hero__copy .actions { margin-top: 40px; }
.hero h1 { max-width: 11em; }

.seal { position: relative; aspect-ratio: 1; width: 100%; max-width: 500px; justify-self: end; }
.seal__layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; will-change: transform; }
.seal__layer--a { animation: turn 240s linear infinite; }
.seal__layer--b { animation: turn 180s linear infinite reverse; }
@keyframes turn { to { transform: rotate(360deg); } }
.seal__mark {
  position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; transform: translate(-50%, -50%);
  color: var(--green); background: var(--paper); border-radius: 50%; padding: 3%;
  box-shadow: 0 0 0 1px var(--rule), 0 20px 40px rgba(30, 70, 54, 0.12);
}

.facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(48px, 7vw, 88px); border-top: 1px solid var(--rule);
}
.facts li { padding: 28px 28px 36px 0; color: var(--muted); font-size: 0.98rem; }
.facts li + li { padding-left: 28px; border-left: 1px solid var(--rule); }
.facts__big { display: block; font-family: var(--serif); font-size: 1.3rem; color: var(--ink); margin-bottom: 6px; }

/* Practice */
.practice { padding: var(--section) 0; background: var(--paper-2); }
.practice__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(40px, 7vw, 112px); align-items: start; }
.practice__intro { position: sticky; top: 120px; }
.practice__intro p { margin-top: 22px; color: var(--muted); max-width: 26em; }
.areas { border-top: 1px solid var(--ink); }
.area { border-bottom: 1px solid var(--rule); }
.area summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 26px 0; cursor: pointer; list-style: none;
}
.area summary::-webkit-details-marker { display: none; }
.area__title { font-family: var(--display); font-size: clamp(1.45rem, 2.4vw, 2rem); line-height: 1.15; transition: color 0.25s; }
.area summary:hover .area__title { color: var(--green-soft); }
.area__icon { position: relative; width: 36px; height: 36px; flex-shrink: 0; border: 1px solid var(--rule); border-radius: 50%; transition: background-color 0.25s, border-color 0.25s; }
.area__icon::before, .area__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.4px; background: var(--ink); transform: translate(-50%, -50%); transition: transform 0.35s var(--ease); }
.area__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.area[open] .area__icon { background: var(--green); border-color: var(--green); }
.area[open] .area__icon::before, .area[open] .area__icon::after { background: var(--on-green); }
.area[open] .area__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.area__body { padding: 0 64px 30px 0; color: var(--muted); }
.area__body p + p { margin-top: 14px; }
.area__matters { font-family: var(--serif); font-style: italic; color: var(--ink); }

/* Approach */
.approach { padding: var(--section) 0; }
.timeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 64px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 1px; background: var(--rule); }
.timeline li { position: relative; padding-top: 44px; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 0; width: 19px; height: 19px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--brass); box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 10px var(--brass);
}
.timeline p { margin-top: 12px; color: var(--muted); max-width: 22em; }

/* Principle band */
.principle {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--green); color: var(--on-green);
  padding: clamp(80px, 12vw, 168px) 0;
}
.principle__waves { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.5; }
.principle blockquote p {
  font-family: var(--serif); font-style: italic; font-size: clamp(2rem, 4.6vw, 4rem); line-height: 1.15;
  max-width: 16em; text-wrap: balance;
}
.principle blockquote p::before { content: "“"; color: var(--brass-hi); margin-left: -0.45em; padding-right: 0.05em; }
.principle blockquote p::after { content: "”"; color: var(--brass-hi); }
.principle__note { margin-top: 28px; color: var(--on-green-muted); max-width: 32em; }

/* Insights */
.insights { padding: var(--section) 0; }
.insights__head { display: flex; justify-content: space-between; align-items: end; gap: 16px 40px; flex-wrap: wrap; }
.insights__head p { color: var(--muted); max-width: 26em; }
.insights__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: 56px; }
.note { border-top: 1px solid var(--ink); padding-top: 20px; }
.note__art { width: 100%; height: auto; aspect-ratio: 20 / 9; background: var(--paper-2); margin-bottom: 22px; }
.note__meta { display: flex; justify-content: space-between; gap: 12px; font-size: 0.85rem; color: var(--muted); }
.note__meta span { color: var(--green); font-weight: 500; }
.note h3 { margin-top: 12px; font-size: 1.4rem; }
.note p:last-child { margin-top: 10px; color: var(--muted); }

/* Firm and contact */
.firm { padding: var(--section) 0; background: var(--paper-2); border-top: 1px solid var(--rule); }
.firm__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(48px, 7vw, 112px); align-items: start; }
.firm__about > p { margin-top: 24px; color: var(--muted); max-width: 30em; }
.values { margin-top: 44px; border-top: 1px solid var(--rule); }
.values div { display: grid; grid-template-columns: 11em 1fr; gap: 6px 24px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.values dt { font-family: var(--serif); font-size: 1.15rem; }
.values dd { color: var(--muted); }

.contact { background: var(--paper); border: 1px solid var(--rule); padding: clamp(24px, 4vw, 48px); box-shadow: 0 30px 60px -30px rgba(30, 70, 54, 0.25); }
.contact > p { margin-top: 16px; color: var(--muted); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; margin-top: 32px; }
.field { display: grid; gap: 4px; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: 0.88rem; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--ink);
  background: transparent; border-radius: 0; transition: border-color 0.2s, background-color 0.2s;
}
.field select {
  appearance: none; padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%; background-size: 5px 5px; background-repeat: no-repeat;
}
.field textarea { resize: vertical; min-height: 104px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--green); outline-offset: 4px; border-bottom-color: var(--green);
}
.field [aria-invalid="true"] { border-bottom: 2px solid #9b3b2a; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 6px; }
.form__note { font-size: 0.92rem; color: var(--green); }
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px 32px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 0.95rem; }
.details dt { font-size: 0.8rem; color: var(--muted); }
.details a { text-decoration-color: var(--brass); text-underline-offset: 4px; white-space: nowrap; }

/* Footer */
.footer { padding: 56px 0 0; background: var(--paper); border-top: 1px solid var(--rule); }
.footer__grid { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.footer__small { font-size: 0.85rem; color: var(--muted); margin-top: 16px; max-width: 48em; }
.credit { margin-top: 48px; background: var(--green-deep); color: var(--on-green); }
.credit__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 44px; padding-bottom: 48px; }
.credit h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.credit p { margin-top: 8px; color: var(--on-green-muted); }
.credit :focus-visible { outline-color: var(--brass-hi); }

/* Scroll reveals (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* Medium screens */
@media (max-width: 1000px) {
  .menu {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; cursor: pointer;
    background: var(--green); color: var(--on-green); border: 0; border-radius: 999px; font-size: 0.95rem;
  }
  .header__tools { margin-left: auto; }
  .nav {
    position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 1px);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 20px;
    background: var(--paper); border: 1px solid var(--rule); border-top: 0;
    box-shadow: 0 30px 50px -20px rgba(23, 34, 29, 0.25);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 16px 0; font-family: var(--display); font-size: 1.5rem; border-bottom: 1px solid var(--rule); background-image: none; }
  .nav a.nav__cta { margin: 18px 0 0; text-align: center; font-family: var(--sans); font-size: 1rem; border: 0; }

  .hero__grid, .practice__grid, .firm__grid { grid-template-columns: 1fr; }
  .seal { max-width: 380px; justify-self: center; order: -1; margin-top: -8px; }
  .practice__intro { position: static; }
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline::before { left: 9px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .timeline li { padding: 0 0 40px 48px; }
  .insights__grid { grid-template-columns: 1fr; max-width: 560px; }
}

/* Phones */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .header__bar { height: 64px; gap: 12px; }
  .logo svg { width: 30px; height: 30px; }
  .logo__word { font-size: 1.3rem; }
  .logo__word span { display: none; }
  .seal { max-width: 260px; }
  .facts { grid-template-columns: 1fr; }
  .facts li, .facts li + li { padding: 20px 0; border-left: 0; }
  .facts li + li { border-top: 1px solid var(--rule); }
  .area__body { padding-right: 0; }
  .values div { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .details { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .actions .textlink { margin-inline: auto; }
  .principle blockquote p::before { margin-left: 0; }
}
@media (max-width: 380px) {
  .lang { font-size: 0.82rem; }
  .menu { padding: 0 14px; }
}

/* Reduced motion: still page, no reveals */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .header.is-hidden { transform: none; }
}
