/* =========================================================
   Zhakfar — styles
   Palette drawn from the logo navy, paired with warm stone
   and a restrained brass accent.
   ========================================================= */
:root {
  --navy: #043e5c;
  --navy-deep: #022a3f;
  --navy-ink: #01192a;
  --paper: #f6f3ec;
  --stone: #ebe5d9;
  --line: rgba(4, 62, 92, 0.16);
  --ink: #0d2230;
  --muted: #56656e;
  --brass: #b08a57;
  --brass-soft: #d8bf96;
  --white: #ffffff;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
em { font-style: italic; }
::selection { background: var(--brass-soft); color: var(--navy-ink); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--white); padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 4px; }

/* ---------- Type ---------- */
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--navy); display: flex; align-items: center; gap: 12px; margin-bottom: 28px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.eyebrow--light { color: var(--brass-soft); }

.section-title, .statement, .hero__title {
  font-family: var(--serif); font-variation-settings: "opsz" 144; letter-spacing: -0.02em; line-height: 1.04;
}
.section-title { font-size: clamp(36px, 5vw, 64px); font-weight: 340; }
.section-title em, .statement em, .hero__title em { font-weight: 300; color: var(--brass); }
.section-lede { font-size: 18px; color: var(--muted); max-width: 46ch; margin-top: 24px; }
.section-lede--light { color: rgba(255,255,255,.66); }

.section { padding: clamp(88px, 12vw, 160px) 0; position: relative; }
.section--stone { background: var(--stone); }
.section--dark { background: var(--navy-deep); color: var(--white); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 26px;
  border-radius: 999px; font-weight: 500; font-size: 15px; letter-spacing: .01em;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
  white-space: nowrap;
}
.btn--solid { background: var(--brass); color: var(--navy-ink); }
.btn--solid:hover { background: var(--brass-soft); }
.btn--dark { background: var(--navy); color: var(--white); }
.btn--dark:hover { background: var(--navy-ink); }
.btn--ghost { color: var(--white); padding: 0 6px; }
.btn--ghost span { transition: transform .3s var(--ease); }
.btn--ghost:hover span { transform: translateX(4px); }
.btn--line { height: 42px; padding: 0 20px; border: 1px solid rgba(255,255,255,.35); color: var(--white); font-size: 14px; }
.btn--line:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .4s var(--ease), box-shadow .4s var(--ease); }
.nav__inner { max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter); display: flex; align-items: center; gap: 32px; }
.nav.is-scrolled { background: rgba(2, 42, 63, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand__mark { width: 36px; height: auto; }
.brand__word { width: 104px; height: auto; }
.nav__links { display: flex; gap: 30px; }
.nav__links a { color: rgba(255,255,255,.78); font-size: 15px; position: relative; padding: 6px 0; transition: color .3s; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav__links a:hover, .nav__links a.is-current { color: var(--white); }
.nav__links a:hover::after, .nav__links a.is-current::after { transform: scaleX(1); }
.nav__toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav__toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--white); transition: transform .3s var(--ease); }
.nav__toggle span:first-child { top: 18px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.mobile-menu { background: var(--navy-deep); padding: 8px var(--gutter) 28px; display: grid; }
.mobile-menu[hidden], [hidden] { display: none !important; }
@media (min-width: 901px) { .mobile-menu { display: none !important; } }
.mobile-menu a { color: var(--white); font-family: var(--serif); font-size: 28px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  background: radial-gradient(120% 90% at 75% 20%, #06506f 0%, var(--navy-deep) 55%, var(--navy-ink) 100%);
  color: var(--white); overflow: hidden; isolation: isolate;
}
.hero__terrain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; cursor: crosshair; }
.hero__veil { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(1,25,42,.55) 0%, rgba(1,25,42,0) 30%, rgba(1,25,42,0) 55%, rgba(1,25,42,.85) 100%),
              linear-gradient(90deg, rgba(1,25,42,.7) 0%, rgba(1,25,42,0) 60%); }
.hero__content { padding-top: 160px; padding-bottom: 72px; pointer-events: none; }
.hero__content a { pointer-events: auto; }
.hero__title { font-size: clamp(48px, 9vw, 128px); font-weight: 320; max-width: 12ch; }
.hero__title em { color: var(--brass-soft); }
.hero__lede { font-size: clamp(17px, 1.6vw, 20px); color: rgba(255,255,255,.74); max-width: 46ch; margin-top: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 40px; }
.hero__readout {
  display: flex; gap: 36px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 28px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55);
  border-top: 1px solid rgba(255,255,255,.1); font-variant-numeric: tabular-nums;
}
.readout__label { color: var(--brass-soft); margin-right: 6px; }
.readout__hint { margin-left: auto; }

/* ---------- Approach ---------- */
.statement { font-size: clamp(32px, 4.6vw, 62px); font-weight: 320; max-width: 22ch; }

/* ---------- Capabilities ---------- */
.cap-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
.cap-intro { position: sticky; top: 120px; }
.cap-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cap { border-bottom: 1px solid var(--line); }
.cap__head { width: 100%; display: grid; grid-template-columns: 56px 1fr 28px; align-items: center; gap: 12px; padding: 28px 0; text-align: left; }
.cap__num { font-size: 13px; letter-spacing: .12em; color: var(--brass); font-weight: 600; }
.cap__name { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -0.015em; transition: color .3s, transform .4s var(--ease); }
.cap__head:hover .cap__name { transform: translateX(6px); color: var(--navy); }
.cap__icon { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; position: relative; transition: background .3s, border-color .3s; }
.cap__icon::before, .cap__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: var(--navy); transform: translate(-50%, -50%); transition: transform .35s var(--ease), background .3s; }
.cap__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.cap.is-open .cap__icon { background: var(--navy); border-color: var(--navy); }
.cap.is-open .cap__icon::before, .cap.is-open .cap__icon::after { background: var(--white); }
.cap.is-open .cap__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.cap__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.cap__inner { overflow: hidden; min-height: 0; }
.cap.is-open .cap__body { grid-template-rows: 1fr; }
.cap__body p { padding-left: 68px; color: var(--muted); max-width: 58ch; min-height: 0; }
.cap__body .tags { padding-left: 68px; }
.cap.is-open .cap__body .tags { padding-bottom: 30px; }
.tags { list-style: none; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 18px; min-height: 0; }
.tags li { font-size: 13px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--navy); background: rgba(255,255,255,.4); }

/* ---------- Licensed partner note ---------- */
.partners-note { display: grid; grid-template-columns: 40px 1fr; gap: 18px; margin-top: 36px; padding: 24px 26px; background: rgba(255,255,255,.55); border: 1px solid var(--line); border-left: 3px solid var(--brass); border-radius: 4px; }
.partners-note svg { width: 34px; height: 34px; fill: none; stroke: var(--navy); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.partners-note__title { font-family: var(--serif); font-size: 20px; color: var(--navy); margin-bottom: 6px; }
.partners-note p:not(.partners-note__title) { color: var(--muted); font-size: 15.5px; }

/* ---------- Current projects ---------- */
.proj-head { display: flex; justify-content: space-between; align-items: end; gap: 40px; flex-wrap: wrap; }
.proj-head .section-title { max-width: 14ch; }
.proj-head .section-lede { max-width: 40ch; }
.proj-grid { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.proj { border: 1px solid rgba(255,255,255,.12); border-radius: 6px; overflow: hidden; background: rgba(255,255,255,.02); transition: border-color .4s var(--ease), background .4s var(--ease), transform .5s var(--ease); display: flex; flex-direction: column; }
.proj:hover { border-color: rgba(216,191,150,.55); background: rgba(255,255,255,.05); }
.proj:hover { transform: translateY(-4px); }
.proj__plan { position: relative; aspect-ratio: 16 / 10; background: var(--navy-ink); border-bottom: 1px solid rgba(255,255,255,.08);
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 20px 20px; }
.proj__plan svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.proj__plan--photo { overflow: hidden; }
.proj__tag--top { top: 12px; bottom: auto; }
.elev { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.elev__label { fill: rgba(216,191,150,.6); stroke: none; font-size: 7px; letter-spacing: .18em; font-family: var(--sans); }
.elev__label--r { text-anchor: end; }
.elev__ghost { stroke: rgba(255,255,255,.22); stroke-width: 1; stroke-dasharray: 3 4; }
.elev__tree { stroke: rgba(255,255,255,.45); stroke-width: 1; }
.elev__new { stroke: var(--brass-soft); stroke-width: 1.3; }
.elev__new .win { fill: rgba(216,191,150,0); transition: fill .6s var(--ease); }
.proj:hover .elev__new .win { fill: rgba(216,191,150,.22); }
.elev__ground { stroke: rgba(255,255,255,.5); stroke-width: 1; }
.elev__dim { stroke: rgba(255,255,255,.35); stroke-width: .8; }
.elev__dim text { fill: rgba(255,255,255,.5); stroke: none; font-size: 8px; text-anchor: middle; font-family: var(--sans); }
.elev__new > *, .elev__tree > * { stroke-dasharray: 1; stroke-dashoffset: 1; }
.proj.is-in .elev__new > *, .proj.is-in .elev__tree > *, .no-js .elev__new > *, .no-js .elev__tree > * { stroke-dashoffset: 0; transition: stroke-dashoffset 2.4s var(--ease) .3s; }
.proj__plan--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.proj:hover .proj__plan--photo img { transform: scale(1.04); }
.proj__plan--photo img.proj__img--full { object-fit: contain; }
.proj:hover .proj__plan--photo img.proj__img--full { transform: none; }
.proj__tag { z-index: 1; position: absolute; left: 14px; bottom: 12px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.75); background: rgba(1,25,42,.8); padding: 5px 10px; border-radius: 999px; }
.proj__body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.proj__kind { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass-soft); }
.proj h3 { font-family: var(--serif); font-size: 26px; font-weight: 400; line-height: 1.15; margin: 10px 0 12px; letter-spacing: -0.01em; }
.proj__desc { color: rgba(255,255,255,.7); font-size: 15.5px; }
.proj__meta { margin: auto 0 0; padding-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.proj__meta div { border-top: 1px solid rgba(255,255,255,.1); padding-top: 10px; }
.proj__meta dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.proj__meta dd { margin: 4px 0 0; font-size: 14.5px; color: rgba(255,255,255,.85); }

/* ---------- Focus ---------- */
.focus-head { display: grid; grid-template-columns: 1fr; margin-bottom: clamp(48px, 6vw, 80px); }
.focus-head .section-title { max-width: 18ch; }
.focus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tile { position: relative; padding: 32px 28px 40px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; isolation: isolate; transition: color .45s var(--ease); min-height: 420px; display: flex; flex-direction: column; }
.tile::before { content: ""; position: absolute; inset: 0; background: var(--navy); z-index: -1; transform: translateY(101%); transition: transform .6s var(--ease); }
.tile:hover, .tile:focus-visible { color: var(--white); }
.tile:hover::before, .tile:focus-visible::before { transform: translateY(0); }
.tile__art { width: 100%; height: auto; margin-bottom: auto; fill: none; stroke: var(--navy); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .45s var(--ease), transform .6s var(--ease); }
.tile:hover .tile__art, .tile:focus-visible .tile__art { stroke: var(--brass-soft); transform: translateY(-6px); }
.tile__num { font-size: 12px; letter-spacing: .14em; color: var(--brass); font-weight: 600; margin-top: 36px; }
.tile h3 { font-family: var(--serif); font-size: 26px; line-height: 1.15; margin: 10px 0 12px; letter-spacing: -0.01em; }
.tile p { color: var(--muted); font-size: 15.5px; transition: color .45s var(--ease); }
.tile:hover p, .tile:focus-visible p { color: rgba(255,255,255,.75); }

/* ---------- Partner / form ---------- */
.partner-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
.partner-points { list-style: none; padding: 0; margin: 40px 0 0; }
.partner-points li { padding: 14px 0 14px 30px; border-top: 1px solid var(--line); position: relative; }
.partner-points li::before { content: ""; position: absolute; left: 0; top: 26px; width: 14px; height: 1px; background: var(--brass); }
.form { background: var(--paper); border-radius: 20px; padding: clamp(24px, 4vw, 48px); box-shadow: 0 30px 60px -30px rgba(1,25,42,.25); }
.form fieldset { border: 0; padding: 0; margin: 0 0 28px; }
.form legend { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-block; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); font-size: 14.5px; cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.pill span:hover { border-color: var(--navy); }
.pill input:checked + span { background: var(--navy); color: var(--white); border-color: var(--navy); }
.pill input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.field { display: block; margin-bottom: 22px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field em { font-style: normal; opacity: .7; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid rgba(4,62,92,.28); padding: 10px 0; border-radius: 0; transition: border-color .3s;
  -webkit-appearance: none; appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%); background-position: right 6px center, right 1px center; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 20px; }
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 1px 0 var(--navy); }
.field.is-invalid input { border-color: #a2412f; }
.form__cond { animation: fadeIn .45s var(--ease); }
.form__foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.form__status { font-size: 14.5px; color: var(--muted); }
.form__status.is-ok { color: var(--navy); }
.form__status.is-err { color: #a2412f; }
.hp { position: absolute; left: -9999px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Footer ---------- */
.footer { background: var(--navy-ink); color: rgba(255,255,255,.7); padding: 96px 0 0; font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; padding-bottom: 72px; }
.footer__brand img { width: 180px; height: auto; opacity: .95; }
.footer__col { display: grid; gap: 10px; align-content: start; }
.footer__col a:hover { color: var(--white); }
.footer__label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass-soft); margin-bottom: 8px; }
.footer__todo { opacity: .55; }
.footer__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 32px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: rgba(255,255,255,.5); }
.footer__base a:hover { color: var(--white); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .tile { min-height: 360px; }
  .proj-grid { gap: 16px; }
}
@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: block; }
  .cap-grid, .partner-grid, .proj-grid { grid-template-columns: 1fr; }
  .cap-intro { position: static; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .readout__hint { display: none; }
  .hero__readout { gap: 20px; }
  .focus-grid, .proj-grid { grid-template-columns: 1fr; }
  .tile { min-height: 0; }
  .tile__art { max-width: 220px; margin-bottom: 8px; }
  .form__row { grid-template-columns: 1fr; }
  .cap__head { grid-template-columns: 40px 1fr 28px; }
  .cap__body p, .cap__body .tags { padding-left: 52px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
