/* Atelier: Kabir Deshmukh, architect. Demo portfolio theme by Spectrix Creations. */

:root {
  --paper: #f3eee6;
  --paper-hi: #f8f4ee;
  --band: #ebe3d6;
  --ink: #1f1c18;
  --ink-soft: #3a342d;
  --muted: #6f665b;
  --muted-dk: #5c544a;
  --terra: #b5552f;
  --terra-dk: #9a4424;
  --sage: #8a9a7b;
  --sand: #d9cbb4;
  --line: rgba(31, 28, 24, .15);
  --line-strong: rgba(31, 28, 24, .32);
  --serif: "Cormorant Garamond", "Cormorant", Garamond, "EB Garamond", "Hoefler Text", "Times New Roman", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);      /* ease-out-expo-like */
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --gutter: clamp(16px, 5vw, 72px);
  --max: 1260px;
  --header-h: 68px;
  --section: clamp(88px, 12vw, 176px);
}
@media (min-width: 900px) { :root { --header-h: 80px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.menu-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, .96rem + .18vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
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 { font: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--terra); color: var(--paper); }
:focus-visible { outline: 2px solid var(--terra-dk); outline-offset: 4px; }
main:focus, section[tabindex="-1"]:focus { outline: none; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 100;
  padding: 12px 18px; background: var(--ink); color: var(--paper);
  font-weight: 600; font-size: .9rem; text-decoration: none;
  transform: translateY(-180%); transition: transform .4s var(--ease);
}
.skip-link:focus { transform: none; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

.eyebrow {
  font-size: .7rem; font-weight: 600; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted);
}

/* Underline link that draws in on hover */
.link-u {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--ink); font-weight: 600; font-size: .8rem; letter-spacing: .16em;
  text-transform: uppercase; text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat; background-position: 0 calc(50% + .85em);
  background-size: 100% 1px;
  transition: background-size .8s var(--ease), color .4s;
}
.link-u:hover { background-size: 0 1px; background-position: 100% calc(50% + .85em); color: var(--terra-dk); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .8rem;
  min-height: 52px; padding: 0 1.6rem;
  border: 1px solid var(--ink); border-radius: 0;
  background: var(--ink); color: var(--paper);
  font: 600 .76rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color .5s var(--ease), border-color .5s var(--ease), color .5s var(--ease);
}
.btn:hover { background: var(--terra-dk); border-color: var(--terra-dk); color: #fff; }
.btn .arr { display: inline-block; transition: transform .6s var(--ease); }
.btn:hover .arr { transform: translateX(5px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- Header & navigation ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 40; }
.site-header::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(243, 238, 230, .9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
  opacity: 0; transition: opacity .5s ease;
}
.site-header.is-scrolled::before { opacity: 1; }
.nav { position: relative; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: .7rem; min-height: 44px; text-decoration: none; }
.brand-name { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; line-height: 1; letter-spacing: .005em; white-space: nowrap; }
.brand-tag {
  padding-left: .7rem; border-left: 1px solid var(--line-strong);
  font-size: .62rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); line-height: 1.3;
}
@media (max-width: 440px) { .brand-tag { display: none; } }

.nav-toggle {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 44px; min-width: 44px; padding: 0 2px;
  background: none; border: 0; color: var(--ink); cursor: pointer;
  font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
}
.nav-toggle-icon { position: relative; width: 26px; height: 10px; }
.nav-toggle-icon::before, .nav-toggle-icon::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform .6s var(--ease), top .6s var(--ease);
}
.nav-toggle-icon::before { top: 0; }
.nav-toggle-icon::after { top: 8.5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { top: 4.25px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { top: 4.25px; transform: rotate(-45deg); }

/* Mobile: full-screen panel that wipes down */
.nav-panel {
  position: fixed; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: calc(var(--header-h) + 16px) var(--gutter) 28px;
  background: var(--paper); overflow-y: auto;
  visibility: hidden; clip-path: inset(0 0 100% 0);
  transition: clip-path .9s var(--ease), visibility 0s linear .9s;
}
.nav-panel.is-open { visibility: visible; clip-path: inset(0); transition: clip-path .9s var(--ease), visibility 0s; }
.nav-list a {
  display: flex; align-items: baseline; gap: 1rem; min-height: 44px;
  padding: .55rem 0; border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: clamp(2rem, 1.5rem + 3vw, 2.8rem); font-weight: 500; line-height: 1.15;
  text-decoration: none;
}
.nav-list a .n { font-family: var(--sans); font-size: .7rem; font-weight: 600; letter-spacing: .14em; color: var(--muted); }
.nav-list a.is-active { color: var(--terra-dk); }
.nav-panel li { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .9s var(--ease); }
.nav-panel.is-open li { opacity: 1; transform: none; transition-delay: calc(.18s + var(--i) * .06s); }
.nav-panel-foot { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.nav-panel-foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; text-decoration: none; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav-panel {
    position: static; display: block; padding: 0; background: none; overflow: visible;
    visibility: visible; clip-path: none; transition: none;
  }
  .nav-panel li { opacity: 1; transform: none; transition: none; }
  .nav-list { display: flex; gap: clamp(1.4rem, 2.4vw, 2.6rem); }
  .nav-list a {
    position: relative; padding: .6rem 0; border: 0;
    font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
    align-items: center;
  }
  .nav-list a .n { display: none; }
  .nav-list a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: .55rem; height: 1px; background: currentColor;
    transform: scaleX(0); transform-origin: right; transition: transform .8s var(--ease);
  }
  .nav-list a:hover::after, .nav-list a.is-active::after { transform: scaleX(1); transform-origin: left; }
  .nav-list a.is-active { color: var(--ink); }
  .nav-panel-foot { display: none; }
}

/* ---------- Side rail (wide desktop only) ---------- */
.rail { display: none; }
@media (min-width: 1360px) {
  .rail {
    position: fixed; left: 28px; top: 50%; z-index: 30;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    transform: translateY(-50%); color: var(--muted); pointer-events: none;
  }
  .rail-num { font-family: var(--serif); font-style: italic; font-size: 1.35rem; line-height: 1; color: var(--terra-dk); }
  .rail-track { position: relative; width: 1px; height: 110px; background: var(--line); overflow: hidden; }
  .rail-track i { position: absolute; inset: 0; background: var(--ink); transform-origin: top; transform: scaleY(var(--p, 0)); }
  .rail-label {
    writing-mode: vertical-rl; transform: rotate(180deg);
    font-size: .62rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase;
  }
  .rail-num, .rail-label { transition: opacity .3s ease; }
  .rail.is-swap .rail-num, .rail.is-swap .rail-label { opacity: 0; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: calc(var(--header-h) + clamp(24px, 5vw, 64px)) 0 clamp(24px, 4vw, 48px); }
.hero-grid { display: grid; gap: clamp(44px, 7vw, 64px); }
@media (min-width: 720px) {
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; column-gap: clamp(28px, 5vw, 96px); }
}
.hero-kicker { display: flex; align-items: center; gap: .8rem; }
.hero-kicker::before { content: ""; flex: none; width: 32px; height: 1px; background: var(--ink); }
.hero-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(3.4rem, 1.5rem + 7.1vw, 8.25rem);
  line-height: .96; letter-spacing: -.018em;
  margin: clamp(18px, 3vw, 30px) 0 clamp(22px, 3vw, 36px);
}
.hero-title em { font-style: italic; color: var(--terra); }
/* each word rises from behind its own mask */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .04em .1em .16em 0; margin: -.04em -.1em -.16em 0; }
.w > * { display: inline-block; }
.hero-intro { max-width: 32em; font-size: clamp(1.04rem, .98rem + .3vw, 1.2rem); line-height: 1.6; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: clamp(26px, 3.5vw, 36px); }
.status { display: inline-flex; align-items: center; gap: .7rem; margin-top: 22px; font-size: .84rem; color: var(--muted); }
.status::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 4px rgba(138, 154, 123, .25); }
.hero-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  margin-top: clamp(36px, 5vw, 64px); padding-top: 20px; border-top: 1px solid var(--line);
  max-width: 34rem;
}
.hero-facts strong { display: block; font-family: var(--serif); font-size: clamp(2rem, 1.6rem + 1.4vw, 2.8rem); font-weight: 500; line-height: 1; }
.hero-facts span { display: block; margin-top: .45rem; font-size: .78rem; line-height: 1.35; color: var(--muted); }

.hero-figure { position: relative; width: 100%; max-width: 560px; justify-self: end; }
@media (max-width: 719px) { .hero-figure { justify-self: center; max-width: 480px; } }
.hero-figure .frame { position: relative; overflow: hidden; background: #e8dcc9; box-shadow: 0 40px 70px -50px rgba(31, 28, 24, .45); }
.hero-art { width: 100%; height: auto; transform-origin: 50% 60%; }
.hero-art .sway { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 9s ease-in-out infinite alternate; }
.is-paused .sway, .is-hidden .sway { animation-play-state: paused; }
@keyframes sway { from { transform: rotate(-1.2deg); } to { transform: rotate(1.2deg); } }
.hero-figure figcaption, .project-media figcaption, .about-figure figcaption {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px;
  margin-top: .9rem; font-size: .74rem; letter-spacing: .03em; color: var(--muted);
}

/* Short landscape phones: tighter hero so the headline and intro fit the first screen */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding-top: calc(var(--header-h) + 12px); }
  .hero-title { font-size: clamp(2.6rem, 15vh, 4.6rem); margin: 14px 0 18px; }
  .hero-figure { max-width: 340px; }
}

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
section[id] { scroll-margin-top: calc(var(--header-h) - 1px); }
.sec-head { display: grid; gap: clamp(18px, 2.4vw, 28px); margin-bottom: clamp(44px, 6.5vw, 88px); }
.sec-index {
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--sans); font-size: .7rem; font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--muted);
}
.sec-index span { font-family: var(--serif); font-size: 1.55rem; font-style: italic; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--terra); }
.sec-index::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sec-title { font-family: var(--serif); font-weight: 500; font-size: clamp(2.35rem, 1.5rem + 3.8vw, 5.2rem); line-height: 1.02; letter-spacing: -.012em; max-width: 13em; }
.sec-title em { font-style: italic; color: var(--terra); }
.sec-lede { max-width: 32em; color: var(--muted); font-size: 1.04rem; }
@media (min-width: 900px) {
  .sec-head-split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; column-gap: clamp(32px, 6vw, 96px); }
  .sec-head-split .sec-index { grid-column: 1 / -1; }
  .sec-head-split .sec-lede { padding-bottom: .5rem; }
}

/* ---------- Projects ---------- */
.projects { display: grid; gap: clamp(96px, 13vw, 200px); }
.project { display: grid; gap: clamp(28px, 4vw, 40px); }
.frame { position: relative; overflow: hidden; background: var(--band); }
.frame svg { width: 100%; height: auto; }
.project-media figcaption { justify-content: flex-start; align-items: center; }
.project-media figcaption::before { content: ""; flex: none; width: 24px; height: 1px; background: currentColor; }
.project-no { display: flex; align-items: baseline; gap: .5rem; font-family: var(--serif); font-size: 1.05rem; color: var(--muted); }
.project-no span { font-size: clamp(2.6rem, 2rem + 1.6vw, 3.6rem); font-style: italic; line-height: 1; color: var(--terra); }
.project-body .eyebrow { margin-top: 1.1rem; }
.project h3 { margin: .55rem 0 1rem; font-family: var(--serif); font-weight: 500; font-size: clamp(1.95rem, 1.5rem + 1.5vw, 2.8rem); line-height: 1.05; }
.desc { max-width: 34em; color: var(--ink-soft); }
.meta { margin-top: 1.8rem; border-top: 1px solid var(--line); }
.meta div { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr); gap: 1rem; padding: .68rem 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.meta dt { padding-top: .22em; font-size: .66rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

@media (min-width: 900px) {
  .project { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 2.6vw, 40px); align-items: center; }
  .project-media { grid-column: 1 / span 7; }
  .project-body { grid-column: 8 / -1; padding-left: clamp(0px, 2.4vw, 40px); }
  .project:nth-child(even) .project-media { grid-column: 6 / -1; order: 2; }
  .project:nth-child(even) .project-body { grid-column: 1 / span 5; padding: 0 clamp(0px, 2.4vw, 40px) 0 0; order: 1; }
}

/* ---------- About ---------- */
.about-grid { display: grid; gap: clamp(48px, 7vw, 72px); }
.about-lead { margin-bottom: 1.6rem; font-family: var(--serif); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem); font-weight: 500; line-height: 1.18; max-width: 20em; }
.about-copy > p:not(.about-lead) { max-width: 36em; color: var(--ink-soft); }
.about-copy > p + p { margin-top: 1rem; }
.facts { display: grid; gap: 0 32px; margin-top: 2.4rem; border-top: 1px solid var(--line); }
.facts div { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: .66rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin-top: .25rem; font-size: .96rem; }
.about-figure { width: 100%; max-width: 440px; }
@media (min-width: 600px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); column-gap: clamp(40px, 7vw, 120px); align-items: start; }
  .about-figure { justify-self: end; margin-top: .5rem; }
}

/* ---------- Philosophy ---------- */
.philosophy { position: relative; overflow: hidden; background: var(--band); }
.philosophy .sec-index, .philosophy figcaption { color: var(--muted-dk); }
.philo-arch { position: absolute; left: 50%; top: 50%; width: min(86%, 560px); height: auto; transform: translate(-50%, -46%); pointer-events: none; }
.philosophy .wrap { position: relative; }
.quote { max-width: 1000px; margin: clamp(56px, 8vw, 96px) auto 0; text-align: center; }
.quote p { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.9rem, 1.1rem + 3.3vw, 4.25rem); line-height: 1.13; letter-spacing: -.006em; text-wrap: balance; }
.quote em { font-style: normal; color: var(--terra-dk); }
.quote figcaption { margin-top: 2rem; font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.principles { display: grid; margin-top: clamp(64px, 9vw, 120px); border-top: 1px solid var(--line-strong); }
.principles li { padding: 28px 0 32px; border-bottom: 1px solid var(--line); }
.pr-no { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--terra-dk); }
.principles h3 { margin: .3rem 0 .6rem; font-family: var(--serif); font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); font-weight: 500; line-height: 1.1; }
.principles p { max-width: 30em; color: var(--muted-dk); font-size: .98rem; }
@media (min-width: 900px) {
  .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .principles li { padding: 36px clamp(20px, 3vw, 44px) 8px; border-bottom: 0; }
  .principles li:first-child { padding-left: 0; }
  .principles li + li { border-left: 1px solid var(--line); }
}

/* ---------- Services ---------- */
.services-list { border-top: 1px solid var(--line-strong); }
.service {
  display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) 44px;
  grid-template-areas: "no main arrow" ". meta .";
  gap: 0 1rem; align-items: start;
  padding: clamp(24px, 3vw, 36px) 0; border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.s-no { grid-area: no; padding-top: .5em; font-family: var(--serif); font-style: italic; font-size: 1.15rem; line-height: 1; color: var(--terra-dk); }
.s-main { grid-area: main; }
.s-title {
  display: inline; padding-bottom: 3px;
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.7rem, 1.25rem + 1.7vw, 2.75rem); line-height: 1.12;
  background-image: linear-gradient(var(--terra), var(--terra)); background-repeat: no-repeat;
  background-position: 0 100%; background-size: 0 1px;
  transition: background-size 1s var(--ease);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.service:hover .s-title, .service:focus-visible .s-title { background-size: 100% 1px; }
.s-desc { display: block; max-width: 38em; margin-top: .55rem; font-size: .97rem; color: var(--muted); }
.s-meta { grid-area: meta; margin-top: .8rem; font-size: .68rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
.s-arrow {
  grid-area: arrow; align-self: center;
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line-strong); border-radius: 50%;
  transition: background-color .5s var(--ease), color .5s var(--ease), transform .7s var(--ease), border-color .5s;
}
.service:hover .s-arrow, .service:focus-visible .s-arrow { background: var(--ink); border-color: var(--ink); color: var(--paper); transform: rotate(-45deg); }
@media (min-width: 900px) {
  .service { grid-template-columns: 4.5rem minmax(0, 1fr) 11rem 48px; grid-template-areas: "no main meta arrow"; align-items: center; }
  .s-no { padding-top: 0; font-size: 1.3rem; }
  .s-meta { margin-top: 0; text-align: right; padding-right: 1rem; }
}

/* ---------- Recognition ---------- */
.rec-grid { display: grid; gap: clamp(56px, 7vw, 72px); }
@media (min-width: 900px) { .rec-grid { grid-template-columns: 1fr 1fr; column-gap: clamp(48px, 7vw, 112px); } }
.rec-h { padding-bottom: 1rem; border-bottom: 1px solid var(--line-strong); font-size: .7rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.rec-list li { display: grid; grid-template-columns: 3.8rem minmax(0, 1fr); gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.rec-year { font-family: var(--serif); font-style: italic; font-size: 1.3rem; line-height: 1.25; color: var(--terra-dk); }
.rec-title { font-family: var(--serif); font-size: clamp(1.3rem, 1.15rem + .5vw, 1.55rem); font-weight: 500; line-height: 1.2; }
.rec-src { margin-top: .3rem; font-size: .88rem; color: var(--muted); }

/* ---------- Contact ---------- */
.contact .sec-index { margin-bottom: clamp(40px, 6vw, 72px); }
.contact-grid { display: grid; gap: clamp(64px, 9vw, 80px); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(48px, 7vw, 120px); } }
.contact-lede { max-width: 30em; margin-top: 1.6rem; color: var(--ink-soft); }
.contact-lines { margin-top: 2.2rem; border-top: 1px solid var(--line); }
.contact-lines li { display: grid; grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr); gap: .3rem 1rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.contact-lines .k { font-size: .66rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.contact-lines a, .contact-lines .v { font-family: var(--serif); font-size: clamp(1.2rem, 1.05rem + .5vw, 1.45rem); font-weight: 500; overflow-wrap: anywhere; }
.contact-lines a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; justify-self: start;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 calc(100% - 8px) / 0 1px; transition: background-size .8s var(--ease), color .4s; }
.contact-lines a:hover { background-size: 100% 1px; color: var(--terra-dk); }
@media (max-width: 380px) { .contact-lines li { grid-template-columns: minmax(0, 1fr); padding: .8rem 0 .3rem; } }
.studios { display: grid; gap: 1.6rem 2rem; margin-top: 2.2rem; }
@media (min-width: 520px) { .studios { grid-template-columns: 1fr 1fr; } }
.studios address { margin-top: .5rem; font-style: normal; font-size: .95rem; line-height: 1.6; color: var(--ink-soft); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2.4rem; }
.contact-actions .btn { flex: 1 1 auto; padding: 0 1.3rem; letter-spacing: .13em; white-space: nowrap; }

.form { display: grid; gap: clamp(26px, 3vw, 34px); }
.form-row { display: grid; gap: inherit; }
@media (min-width: 600px) { .form-row.two { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: .66rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); transition: color .4s; }
.field label .opt { font-weight: 500; letter-spacing: .04em; text-transform: none; }
.field:focus-within label { color: var(--terra-dk); }
.control { position: relative; }
.control::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--terra);
  transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease); pointer-events: none;
}
.control:focus-within::after { transform: scaleX(1); }
.field input, .field select, .field textarea {
  display: block; width: 100%; min-height: 50px; margin: 0; padding: .55rem 0 .6rem;
  border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  background-color: transparent; color: var(--ink);
  font: 500 1.05rem/1.4 var(--sans);
  -webkit-appearance: none; appearance: none; outline: none;
}
.field textarea { min-height: 120px; resize: vertical; }
.field select {
  padding-right: 28px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231f1c18' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 4px center;
}
.field ::placeholder { color: #968c80; opacity: 1; }
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: var(--terra-dk); }
.err { margin-top: .45rem; font-size: .8rem; font-weight: 500; color: #8f3a1a; }
.err:empty { display: none; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 6px; }
.form-note { flex: 1 1 14rem; font-size: .82rem; color: var(--muted); }
.form-success { padding: clamp(28px, 4vw, 48px); border: 1px solid var(--line); background: var(--paper-hi); }
.form-success svg { width: 56px; height: 56px; }
.form-success h3 { margin: 1.2rem 0 .6rem; font-family: var(--serif); font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.6rem); font-weight: 500; line-height: 1.1; }
.form-success p { max-width: 32em; color: var(--ink-soft); }
.form-success .again { margin-top: 1.2rem; }
.form-success:focus { outline: none; }

/* ---------- Footer ---------- */
.site-footer { padding: clamp(64px, 9vw, 112px) 0 28px; border-top: 1px solid var(--line); }
.foot-top { display: grid; gap: 24px; align-items: end; }
@media (min-width: 900px) { .foot-top { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 56px; } }
.foot-name { font-family: var(--serif); font-size: clamp(2.6rem, 1.4rem + 5.4vw, 6.4rem); font-weight: 500; line-height: .95; letter-spacing: -.015em; }
.foot-name em { color: var(--terra); }
.socials { display: flex; flex-wrap: wrap; gap: 0 24px; }
.socials a, .to-top {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
}
.socials a { background: linear-gradient(currentColor, currentColor) no-repeat 0 calc(50% + .9em) / 0 1px; transition: background-size .8s var(--ease); }
.socials a:hover { background-size: 100% 1px; }
.to-top { justify-self: start; }
.foot-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px;
  margin-top: clamp(44px, 6vw, 72px); padding-top: 20px; border-top: 1px solid var(--line);
  font-size: .78rem; color: var(--muted);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 0; right: 0; bottom: 20px; z-index: 60;
  width: fit-content; max-width: calc(100% - 32px); margin-inline: auto;
  padding: 14px 20px; background: var(--ink); color: var(--paper);
  font-size: .88rem; line-height: 1.45; box-shadow: 0 18px 40px -18px rgba(31, 28, 24, .6);
  opacity: 0; transform: translateY(150%); pointer-events: none;
  transition: transform .7s var(--ease), opacity .4s ease;
}
.toast.is-on { opacity: 1; transform: none; }

/* ---------- Motion (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1.1s var(--ease), transform 1.2s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* headline words rise on load */
.js .w > * { transform: translateY(112%); transition: transform 1.25s var(--ease); transition-delay: var(--d, 0s); }
.js.is-loaded .w > * { transform: none; }
.js .hero-figure .frame { clip-path: inset(100% 0 0 0); transition: clip-path 1.6s var(--ease) .2s; }
.js .hero-art { transform: scale(1.08); transition: transform 2.2s var(--ease) .2s; }
.js.is-loaded .hero-figure .frame { clip-path: inset(0 0 0 0); }
.js.is-loaded .hero-art { transform: none; }
.js .hero-figure figcaption { opacity: 0; transition: opacity 1s ease 1.2s; }
.js.is-loaded .hero-figure figcaption { opacity: 1; }

/* curtain wipe for project renders (alternating direction) */
.curtain { --from: inset(0 100% 0 0); }
.project:nth-child(even) .curtain { --from: inset(0 0 0 100%); }
.js .curtain .frame { clip-path: var(--from); transition: clip-path 1.4s var(--ease); }
.js .curtain .frame > svg { transform: scale(1.1); transition: transform 2s var(--ease); }
.js .curtain.is-in .frame { clip-path: inset(0 0 0 0); }
.js .curtain.is-in .frame > svg { transform: none; }

/* floor plan / sketch drawn line by line (armed by script.js) */
.plan.is-armed .d { stroke-dasharray: 1 2; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s var(--ease-io); }
.plan.is-armed.is-in .d { stroke-dashoffset: 0; }
.plan.is-armed .pf, .plan.is-armed .pt { opacity: 0; transition: opacity 1.2s ease; }
.plan.is-armed.is-in .pf, .plan.is-armed.is-in .pt { opacity: 1; transition-delay: 1.4s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
  }
  .js .reveal, .js .w > *, .js .hero-figure .frame, .js .hero-art, .js .hero-figure figcaption,
  .js .curtain .frame, .js .curtain .frame > svg {
    opacity: 1 !important; transform: none !important; clip-path: none !important;
  }
  .hero-art .sway { animation: none !important; }
}


/* ===== Demo chrome: "All themes" link back to the Spectrix gallery =====
   Not part of the portfolio design itself. Sits under the header/menu and toasts;
   hidden (via the inline script next to it) when the page runs inside the gallery's device preview. */
.demo-back {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px 0 14px;
  text-decoration: none;
  white-space: nowrap;
  animation: demo-back-in .6s .8s backwards cubic-bezier(.2, .8, .2, 1);
  background: var(--ink);
  border-radius: 0;
  color: var(--paper);
  font: 600 11.5px/1 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 0 20px 0 16px;
  box-shadow: 0 14px 30px -12px rgba(31, 28, 24, .45);
  transition: background .3s ease;
}
.demo-back[hidden] { display: none; }
.demo-back svg { width: 18px; height: 18px; flex: none; transition: transform .25s ease; }
.demo-back:hover svg,
.demo-back:focus-visible svg { transform: translateX(-3px); }
.demo-back svg { width: 16px; height: 16px; }
.demo-back:hover,
.demo-back:focus-visible { background: var(--terra-dk); }

@keyframes demo-back-in { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) {
  .demo-back { animation: none; transition: none; }
  .demo-back svg { transition: none; }
}
