/* Claycode Architects — photo-led, quiet, built on the portfolio's type and palette.
   Layout: full-bleed photography between generous off-white bands; one centred 1200px measure. */
:root {
  --paper: #FCFCFA;      /* page */
  --stone: #F2F0EC;      /* quiet band */
  --ink: #2A2826;        /* text */
  --muted: #6E6862;      /* secondary text */
  --line: #E3DFD9;       /* hairlines */
  --clay: #9C5235;       /* single accent: buttons, links */
  --clay-deep: #7F4029;
  --night: #1E1C1A;      /* footer, overlays */
  --on-night: #F4F1EC;
  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --measure: 1200px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --header-h: 76px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-weight: 300; font-size: 16px; line-height: 1.75;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--paper); }
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }

.wrap { width: 100%; max-width: calc(var(--measure) + 2 * 40px); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
@media (min-width: 900px) { .wrap { padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: max(40px, env(safe-area-inset-right, 0px)); } }

/* type */
.eyebrow { font-family: var(--sans); font-weight: 400; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
h1, h2, h3, .val, .nm, .steps li::before { font-variant-numeric: lining-nums; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); margin: 0; text-wrap: balance; }
.display { font-size: clamp(38px, 6.2vw, 76px); line-height: 1.04; letter-spacing: .01em; }
.h-caps { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: .2em; text-transform: uppercase; line-height: 1.3; }
.h-lg { font-size: clamp(30px, 4vw, 48px); line-height: 1.12; }
.h-md { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; }
.lede { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink); max-width: 62ch; }
.muted { color: var(--muted); }
.prose { max-width: 66ch; }
.prose p { text-align: left; }

/* header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: rgba(252,252,250,.94); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid transparent; transition: background .35s, border-color .35s, color .35s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand img { height: 40px; width: auto; }
.brand span { font-family: var(--serif); font-weight: 600; font-size: 17px; letter-spacing: .26em; text-transform: uppercase; white-space: nowrap; }
.brand .mark-light { display: none; }
.nav { display: flex; gap: 34px; align-items: center; }
.nav a { text-decoration: none; font-size: 12.5px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: currentColor; }
.menu-btn { display: none; background: none; border: 0; color: inherit; padding: 10px; margin-right: -10px; cursor: pointer; }
.menu-btn svg { width: 26px; height: 26px; }

/* header over the home hero */
.home .site-header:not(.scrolled) { position: fixed; left: 0; right: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; color: #fff; }
.home .site-header:not(.scrolled) .brand { color: #fff; }
.home .site-header:not(.scrolled) .mark-dark { display: none; }
.home .site-header:not(.scrolled) .mark-light { display: block; }
.home .site-header.scrolled { position: fixed; left: 0; right: 0; }
.home body::before, body.home::before { background: transparent; }

@media (max-width: 899px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .brand span { font-size: 14px; letter-spacing: .22em; }
  .brand img { height: 34px; }
  :root { --header-h: 64px; }
}

/* mobile menu */
.mobile-menu { position: fixed; inset: 0; z-index: 70; background: var(--night); color: var(--on-night); display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top, 0px) + 18px) var(--gutter-r) calc(env(safe-area-inset-bottom, 0px) + 28px) var(--gutter); }
.mobile-menu[hidden] { display: none !important; }
.mobile-menu .top { display: flex; justify-content: space-between; align-items: center; }
.mobile-menu .close { background: none; border: 0; color: inherit; padding: 10px; margin-right: -10px; cursor: pointer; }
.mobile-menu nav { margin-top: 8vh; display: flex; flex-direction: column; gap: 6px; }
.mobile-menu nav a { font-family: var(--serif); font-size: 40px; line-height: 1.25; text-decoration: none; letter-spacing: .02em; }
.mobile-menu .meta { margin-top: auto; font-size: 14px; color: #CFC9C1; display: grid; gap: 4px; }
.mobile-menu .meta a { text-decoration: none; }

/* buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px; font-family: var(--sans); font-size: 12.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--clay); background: var(--clay); color: #fff; transition: background .25s, color .25s, border-color .25s; }
.btn:hover { background: var(--clay-deep); border-color: var(--clay-deep); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.light { background: transparent; color: #fff; border-color: rgba(255,255,255,.8); }
.btn.light:hover { background: #fff; color: var(--ink); }
.btn svg { width: 18px; height: 18px; flex: none; }
.text-link { font-size: 12.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--clay); border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.text-link:hover { color: var(--clay-deep); }

/* hero */
.hero { position: relative; height: clamp(560px, 92svh, 980px); color: #fff; overflow: hidden; background: var(--night); }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,18,16,.45) 0%, rgba(20,18,16,0) 24%, rgba(20,18,16,.05) 45%, rgba(20,18,16,.7) 100%), linear-gradient(90deg, rgba(20,18,16,.45) 0%, rgba(20,18,16,0) 62%); }
.hero .inner { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding-bottom: calc(clamp(40px, 7vh, 80px) + env(safe-area-inset-bottom, 0px)); }
.hero .eyebrow { color: rgba(255,255,255,.85); }
.hero h1 { color: #fff; max-width: 19ch; text-shadow: 0 1px 24px rgba(0,0,0,.25); }
.hero .sub { margin: 18px 0 30px; font-size: clamp(16px, 1.5vw, 18px); max-width: 46ch; color: rgba(255,255,255,.9); }

/* page head (inner pages) */
.page-head { padding-block: clamp(56px, 9vw, 120px) clamp(32px, 5vw, 64px); }
.page-head .lede { margin-top: 22px; }

/* sections */
.section { padding-block: clamp(64px, 9vw, 128px); }
.section.tight { padding-block: clamp(48px, 6vw, 88px); }
.band { background: var(--stone); }
.split { display: grid; grid-template-columns: 1fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; } .split.even { grid-template-columns: 1fr 1fr; } .split.media-left { grid-template-columns: 6fr 6fr; align-items: center; } }
.split > * { min-width: 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 48px); }

/* project cards */
.grid { display: grid; gap: clamp(20px, 2.4vw, 32px); grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card { text-decoration: none; color: inherit; display: block; }
.card .ph { aspect-ratio: 4 / 5; overflow: hidden; background: var(--stone); }
.card.wide .ph { aspect-ratio: 3 / 2; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s cubic-bezier(.2,.7,.2,1); }
.card:hover img { transform: scale(1.035); }
.card .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 16px; }
.card h3 { font-size: clamp(22px, 2vw, 26px); letter-spacing: .02em; }
.card .tag { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

/* featured mosaic on home */
.mosaic { display: grid; gap: clamp(20px, 2.4vw, 32px); grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .mosaic { grid-template-columns: repeat(12, 1fr); }
  .mosaic .card:nth-child(1) { grid-column: span 7; }
  .mosaic .card:nth-child(2) { grid-column: span 5; }
  .mosaic .card:nth-child(3) { grid-column: span 4; }
  .mosaic .card:nth-child(4) { grid-column: span 8; }
  .mosaic .card:nth-child(5) { grid-column: span 6; }
  .mosaic .card:nth-child(6) { grid-column: span 6; }
  .mosaic .card:nth-child(1) .ph, .mosaic .card:nth-child(4) .ph { aspect-ratio: 3 / 2; }
  .mosaic .card:nth-child(2) .ph, .mosaic .card:nth-child(3) .ph { aspect-ratio: auto; height: 100%; }
  .mosaic .card:nth-child(2), .mosaic .card:nth-child(3) { display: grid; grid-template-rows: 1fr auto; }
  .mosaic .card:nth-child(5) .ph, .mosaic .card:nth-child(6) .ph { aspect-ratio: 4 / 3; }
}

/* clay / code */
.duo { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
@media (min-width: 760px) { .duo { grid-template-columns: 1fr 1fr; } }
.duo > div { background: var(--paper); padding: clamp(28px, 4vw, 56px) clamp(0px, 3vw, 48px) clamp(28px, 4vw, 56px) 0; }
@media (min-width: 760px) { .duo > div + div { padding-left: clamp(24px, 3vw, 48px); } }
.duo .word { font-family: var(--serif); font-size: clamp(44px, 6vw, 72px); letter-spacing: .14em; text-transform: uppercase; line-height: 1; margin-bottom: 18px; }

/* services list */
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.svc-list li { border-bottom: 1px solid var(--line); }
.svc-list a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; text-decoration: none; font-family: var(--serif); font-size: clamp(22px, 2.3vw, 28px); }
.svc-list a:hover { color: var(--clay); }
.svc-list svg { width: 20px; height: 20px; flex: none; opacity: .6; }
.svc { display: grid; grid-template-columns: 1fr; gap: 10px 48px; padding-block: clamp(26px, 3vw, 40px); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 20px); }
.svc:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .svc { grid-template-columns: 5fr 7fr; } }
.svc h2 { font-size: clamp(26px, 2.6vw, 34px); }
.svc p { margin: 0; max-width: 62ch; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; grid-template-columns: 1fr; counter-reset: s; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(5, 1fr); gap: 28px; } }
.steps li { counter-increment: s; padding: 22px 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(s, decimal-leading-zero); display: block; font-family: var(--serif); font-size: 30px; color: var(--clay); margin-bottom: 8px; }
.steps h3 { font-size: 22px; margin-bottom: 6px; }
.steps p { font-size: 14.5px; margin: 0; color: var(--muted); }

/* CTA band */
.cta { position: relative; color: #fff; background: var(--night); overflow: hidden; }
.cta img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.cta .inner { position: relative; padding-block: clamp(80px, 12vw, 160px); }
.cta h2 { color: #fff; max-width: 18ch; }
.cta p { color: rgba(255,255,255,.88); max-width: 48ch; margin: 18px 0 30px; }

/* about */
.figure { margin: 0; }
.figure img { width: 100%; height: auto; }
.figure figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; }
.approach { display: grid; grid-template-columns: 1fr; gap: 0 48px; }
@media (min-width: 760px) { .approach { grid-template-columns: 1fr 1fr; } }
.approach div { padding: 26px 0; border-top: 1px solid var(--line); }
.approach h3 { font-size: 26px; margin-bottom: 8px; }
.approach p { margin: 0; color: var(--muted); }
.team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
@media (min-width: 640px) { .team { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .team { grid-template-columns: repeat(5, 1fr); } }
.member { text-align: center; }
.member .avatar { width: min(140px, 100%); aspect-ratio: 1; margin: 0 auto 16px; border-radius: 50%; background: var(--stone); display: grid; place-items: center; font-family: var(--serif); font-size: 38px; letter-spacing: .08em; color: #8B847C; }
.member h3 { font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.member .role { font-size: 13.5px; color: var(--muted); margin: 4px 0 0; }
.member .note { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--clay); margin: 2px 0 0; }

/* project page */
.p-hero { position: relative; height: clamp(380px, 78svh, 900px); background: var(--night); overflow: hidden; }
.p-hero img { width: 100%; height: 100%; object-fit: cover; }
.p-intro { display: grid; grid-template-columns: 1fr; gap: 28px 64px; }
@media (min-width: 900px) { .p-intro { grid-template-columns: 5fr 7fr; } }
.p-intro > * { min-width: 0; }
.facts { list-style: none; margin: 26px 0 0; padding: 0; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts li span:first-child { letter-spacing: .16em; text-transform: uppercase; font-size: 11.5px; color: var(--muted); padding-top: 3px; }
.gallery { display: grid; grid-template-columns: 1fr; gap: clamp(14px, 2vw, 24px); }
@media (min-width: 640px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery .g:first-child:nth-last-child(odd) { grid-column: 1 / -1; } }
.gallery .g { padding: 0; border: 0; background: var(--stone); cursor: zoom-in; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; }
.gallery .g:first-child:nth-last-child(odd) { aspect-ratio: 16 / 9; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.gallery .g:hover img { transform: scale(1.03); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-top: 1px solid var(--line); padding-top: 28px; }
.pager a { text-decoration: none; display: grid; gap: 6px; }
.pager a:last-child { text-align: right; }
.pager .lbl { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.pager .nm { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 28px); }
.pager a:hover .nm { color: var(--clay); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(18,17,16,.96); display: flex; align-items: center; justify-content: center; padding: calc(env(safe-area-inset-top, 0px) + 56px) max(12px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 56px) max(12px, env(safe-area-inset-left, 0px)); }
.lightbox[hidden] { display: none !important; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; padding: 14px; opacity: .85; }
.lightbox button:hover { opacity: 1; }
.lightbox .lb-close { top: calc(env(safe-area-inset-top, 0px) + 6px); right: max(6px, env(safe-area-inset-right, 0px)); }
.lightbox .lb-prev { left: max(4px, env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: max(4px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); }
.lightbox svg { width: 30px; height: 30px; }
.lightbox .lb-count { position: absolute; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); left: 0; right: 0; text-align: center; color: rgba(255,255,255,.75); font-size: 12px; letter-spacing: .2em; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 0 48px; }
@media (min-width: 760px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.c-item { padding: 22px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.c-item .lbl { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.c-item .val { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.c-item a.val:hover { color: var(--clay); }
.map { position: relative; aspect-ratio: 16 / 9; min-height: 320px; max-width: 100%; background: var(--stone); overflow: hidden; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(.35) contrast(1.02); }
.map .fallback { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 14px; padding: 24px; }
.map .fallback p { margin: 0; font-family: var(--serif); font-size: 24px; }

/* footer */
.site-footer { background: var(--night); color: var(--on-night); padding-block: clamp(56px, 7vw, 96px) calc(32px + env(safe-area-inset-bottom, 0px)); font-size: 14.5px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.f-grid { display: grid; grid-template-columns: 1fr; gap: 36px; }
@media (min-width: 760px) { .f-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.f-grid h2 { font-family: var(--sans); font-size: 11.5px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; color: #A8A199; margin-bottom: 14px; }
.f-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.f-brand img { height: 52px; width: auto; margin-bottom: 18px; }
.f-brand p { color: #CFC9C1; max-width: 34ch; }
.f-base { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: #A8A199; font-size: 13px; }
address { font-style: normal; }

/* WhatsApp float */
.wa-float { position: fixed; z-index: 55; right: calc(max(16px, env(safe-area-inset-right, 0px)) + 4px); bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 22px rgba(0,0,0,.22); transition: transform .25s; }
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; }

/* reveal (resting state is visible) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
  .js .reveal.pre { opacity: 0; transform: translateY(18px); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
