/* Y3 Studio "impeccable" theme: Direction A "Studio Feed", refined. Same world as base; tighter measure, larger
   Garamond body, equal-weight doors, brand-only form states. Two widths govern every page: --content (images) and --measure (text). */
@font-face { font-family: "EB Garamond"; src: url("/assets/fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/assets/fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond Fallback"; src: local("Times New Roman"); size-adjust: 93%; ascent-override: 100%; }
@font-face { font-family: "Inter Fallback"; src: local("Arial"); size-adjust: 107%; ascent-override: 90%; }

:root {
  --ink: #1B1B1B; --white: #FFFFFF; --navy: #39487C; --grey: #5C5C5C; --hair: #C9C9C6;
  --serif: "EB Garamond", "EB Garamond Fallback", Garamond, serif;
  --sans: "Inter", "Inter Fallback", system-ui, sans-serif;
  --margin: 120px; --gutter: 24px;
  --content: 1200px;   /* every project image and drawing */
  --measure: 580px;    /* every text block: about 72ch of 19px Garamond */
  --rhythm: 120px;
  --cols: 12;          /* model-hero.css control grid */
  --fade: 150ms ease-out;
}
@media (max-width: 1279px) { :root { --margin: 64px; --gutter: 20px; } }
@media (max-width: 767px)  { :root { --margin: 20px; --gutter: 16px; --rhythm: 96px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 19px/1.6 var(--serif); font-kerning: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg, picture { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
::selection { background: var(--navy); color: var(--white); }
html { accent-color: var(--ink); caret-color: var(--ink); }
h1, h2, .door-title, .feed-title, .adv-title { text-wrap: balance; }
p, li { text-wrap: pretty; }
main:focus { outline: none; }

.skip { position: absolute; left: var(--margin); top: -100px; z-index: 100; background: var(--white); padding: 12px 16px; font: 400 13px/1 var(--sans); }
.skip:focus { top: 12px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { padding-left: var(--margin); padding-right: var(--margin); }
.rule { border: 0; border-top: 1px solid var(--hair); margin: 0; }

/* Type */
h1 { font: 400 56px/1.08 var(--serif); letter-spacing: -0.01em; }
h2 { font: 400 32px/1.15 var(--serif); }
h3 { font: 500 18px/1.35 var(--sans); }
.lead { font-size: 23px; line-height: 1.42; max-width: var(--measure); }
.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1em; }
.meta { font: 400 13px/1.4 var(--sans); color: var(--grey); }
.caption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 0; font: 400 12.5px/1.4 var(--sans); color: var(--grey); margin-top: 12px; max-width: var(--measure); }
.caption .sheet { text-transform: uppercase; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; color: var(--ink); }
.caption .sep { width: 24px; height: 1px; background: var(--hair); margin: 0 12px; align-self: center; }
@media (max-width: 1279px) { body { font-size: 18px; } .lead { font-size: 22px; } }
@media (max-width: 767px) { body { font-size: 17px; } h1 { font-size: 40px; } h2 { font-size: 26px; } .lead { font-size: 19px; } }

/* Links and actions: underline, never colour change only */
.link { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.link:hover { color: var(--grey); }
.action { display: inline-flex; align-items: center; min-height: 48px; padding: 11px 18px; border: 1px solid var(--ink); border-radius: 0; background: var(--white); cursor: pointer; font: 400 13px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.10em; transition: background var(--fade), color var(--fade); }
.action:hover { background: var(--ink); color: var(--white); }
.action:disabled { opacity: 0.6; cursor: progress; }
.textaction { display: inline-flex; align-items: center; min-height: 48px; font: 400 13px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.10em; text-decoration: underline; text-underline-offset: 5px; }
.tl { display: inline-flex; align-items: center; min-height: 48px; }

/* Lists: proper <ul>, dash drawn in CSS (Shane, round 2) */
.dashes { max-width: var(--measure); }
.dashes li { position: relative; padding: 3px 0 3px 26px; }
.dashes li::before { content: ""; position: absolute; left: 0; top: 0.85em; width: 12px; height: 1px; background: currentColor; }
.prose + .dashes, .dashes + .prose, .lead + .prose, .prose + .prose { margin-top: 32px; }
.sub { font: 400 12.5px/1.4 var(--sans); text-transform: uppercase; letter-spacing: 0.10em; color: var(--grey); margin: 56px 0 16px; }

/* Masthead */
.mast { display: grid; grid-template-columns: 120px 1fr auto; grid-template-areas: "logo nav action" "logo row row"; grid-template-rows: 1fr auto; column-gap: 48px; align-items: end; padding: 20px var(--margin); border-bottom: 1px solid var(--hair); }
.mast-logo { grid-area: logo; grid-row: 1 / 3; display: block; width: 120px; height: 145px; }
.mast-logo img { width: 120px; height: 145px; }
.mast-nav { grid-area: nav; display: flex; gap: 32px; align-self: end; }
.mast-action { grid-area: action; align-self: end; white-space: nowrap; }
.mast-row { grid-area: row; min-width: 0; margin-top: 8px; }
.mast-menu { display: none; grid-area: action; justify-self: end; }
.nl, .mp { display: inline-flex; align-items: center; min-height: 48px; font: 400 13px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.10em; color: var(--grey); transition: color var(--fade); }
.nl:hover, .nl[aria-current="page"], .mp[aria-current="page"] { color: var(--ink); }
.nl[aria-current="page"], .mp[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.projects-row { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; padding: 6px; margin: -6px; scroll-padding: 6px; } /* room for the focus ring */
.projects-row::-webkit-scrollbar { display: none; }
.projects-row a { display: inline-flex; align-items: center; min-height: 48px; white-space: nowrap; font: 400 13px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.10em; color: var(--grey); transition: color var(--fade); }
.projects-row a:hover, .projects-row a[aria-current="page"] { color: var(--ink); }
.projects-row a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.compact { position: fixed; inset: 0 0 auto 0; z-index: 50; height: 56px; display: flex; align-items: center; gap: 32px; padding: 0 var(--margin); background: var(--white); border-bottom: 1px solid var(--hair); transform: translateY(-100%); transition: transform 180ms ease-out; }
.compact.on { transform: none; }
.compact:not(.on) { visibility: hidden; }
.compact nav { display: flex; gap: 32px; }
.menu-toggle { min-height: 48px; min-width: 48px; background: none; border: 0; padding: 0; font: 400 13px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.10em; cursor: pointer; }
.menu-panel { position: fixed; inset: 0; z-index: 60; background: var(--white); padding: 20px var(--margin) 48px; overflow-y: auto; }
.mp-top { display: flex; justify-content: space-between; align-items: center; } /* Close sits in the Menu control's corner */
.mp-home { display: inline-flex; align-items: center; min-height: 48px; font: 400 24px/1 var(--serif); }
.menu-panel[hidden] { display: none; }
.mp-nav, .mp-proj { display: flex; flex-direction: column; margin-top: 24px; }
.mp-nav .mp { font: 400 34px/1.15 var(--serif); text-transform: none; letter-spacing: 0; color: var(--ink); min-height: 56px; }
.mp-nav .mp[aria-current="page"] { text-underline-offset: 8px; text-decoration-thickness: 1px; }
.mp-proj .mp { font-size: 12.5px; }
.mp-proj { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--hair); }
@media (max-width: 1279px) { .mast { column-gap: 32px; } .mast-nav { gap: 24px; } .projects-row { gap: 16px; } .projects-row a { font-size: 12.5px; letter-spacing: 0.08em; } }
/* Tablet and desktop: the projects row wraps rather than clipping a name at the edge (Market Street at 1280-1390, Shane V.3); phones keep the horizontal scroll */
@media (min-width: 768px) { .projects-row { flex-wrap: wrap; row-gap: 0; overflow: visible; } }
@media (min-width: 768px) and (max-width: 1279px) { .projects-row { column-gap: 24px; } }
@media (min-width: 1280px) and (max-width: 1439px) { .projects-row { gap: 16px; } .projects-row a { font-size: 12.5px; letter-spacing: 0.08em; } }
@media (max-width: 899px) { .mast-nav, .mast-action, .compact { display: none; } .mast-menu { display: inline-block; } .mast { grid-template-columns: 120px 1fr; } }
@media (max-width: 767px) { .projects-row { margin-right: calc(var(--margin) * -1); padding-right: var(--margin); } }
@media (max-width: 767px) { .mast { grid-template-areas: "logo action" "row row"; align-items: start; padding-bottom: 8px; } .mast-logo { grid-row: 1; } .mast-menu { align-self: start; } .mast-row { margin-top: 12px; } }

/* Page rhythm */
main { padding-bottom: var(--rhythm); }
.sec { margin-top: var(--rhythm); }
.sec.pagehead { margin-top: 64px; }
.sec.first { margin-top: 72px; }
.sec.tight { margin-top: 48px; }
.sec h2 { margin-bottom: 32px; }
.pagehead h1 { margin-bottom: 24px; }
.pm { margin-bottom: 16px; }
.after { margin-top: 32px; }
.acts { display: flex; gap: 40px; flex-wrap: wrap; }
.doors-foot .acts { margin-top: 24px; }
.stack > * + * { margin-top: 48px; }
.stack p:not(.meta) { max-width: var(--measure); }
.adv .meta { margin-bottom: 8px; }
.adv-title { font: 400 28px/1.2 var(--serif); margin-bottom: 10px; }
@media (max-width: 767px) { .adv-title { font-size: 24px; } }
.rel .link { display: inline-block; padding: 10px 0; } /* 48px rows */
.dashes.rel li::before { top: 1.45em; }

/* Home: three doors, equal weight */
.doors { margin-top: 40px; }
.doors-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: calc(var(--gutter) * 2); }
.door { display: flex; flex-direction: column; position: relative; }
/* Service separation (Shane, V.3): pale hairline between columns, as on the Services page */
.door + .door::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--gutter) * -1); border-left: 1px solid var(--hair); }
.door-media { aspect-ratio: 4 / 3; overflow: hidden; }
.door-poster { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; transform: scale(1.25); } /* crop only: A has no hover zoom */
/* Project Delivery: editorial 60/40 split with a narrow white margin; stacks on phones */
.split { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; height: 100%; }
.split-i { overflow: hidden; min-width: 0; }
.split-i picture, .split-i img { width: 100%; height: 100%; }
.split-i img { object-fit: cover; }
.split-i:first-child img { object-position: 42% 62%; }
.split-i:last-child img { object-position: 36% 86%; } /* pendants and white brick, not the busy planted ceiling */
.door-quote { height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; border-top: 1px solid var(--ink); padding-top: 20px; }
.door-quote p { font: italic 400 32px/1.22 var(--serif); }
.door-title { font: 400 44px/1.1 var(--serif); margin-top: 24px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 6px; text-decoration-thickness: 1px; transition: text-decoration-color 120ms ease-out; }
.door:hover .door-title, .door:focus-visible .door-title { text-decoration-color: currentColor; }
.door-sum { font: 400 15px/1.5 var(--sans); color: var(--grey); margin-top: 10px; max-width: 34em; }
.doors-foot { margin-top: 56px; }
@media (max-width: 1279px) { .door-title { font-size: 36px; } .door-quote p { font-size: 25px; } .split { gap: 10px; } }
/* Narrow three-column doors: the Advisory quote and its label must fit the 4:3 box */
@media (min-width: 768px) and (max-width: 1023px) { .door-quote { padding-top: 14px; gap: 12px; } }
@media (max-width: 899px) { .door-quote p { font-size: 20px; } .door-title { font-size: 30px; } }
@media (min-width: 768px) and (max-width: 899px) { .door-quote p { font-size: 17px; } }
@media (max-width: 767px) {
  .doors { margin-top: 24px; }
  .doors-grid { grid-template-columns: 1fr; row-gap: 0; }
  .door + .door::before { content: none; }
  .door + .door { margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--hair); }
  .door-media { aspect-ratio: auto; }
  .door-architecture .door-media { aspect-ratio: 16 / 10; }
  .door-quote { border-top: 0; padding-top: 0; gap: 20px; } /* the hairline divider replaces the ink rule on phones */
  .door-quote p { font-size: 24px; }
  .split { grid-template-columns: 1fr; gap: 8px; }
  .split-i { aspect-ratio: 2 / 1; }
  .door-quote { height: auto; }
  .door-title { margin-top: 16px; font-size: 36px; }
  .door-sum { margin-top: 4px; }
  .doors-foot { margin-top: 48px; }
}

/* Feed */
.feedsec h2 { margin-bottom: 64px; }
.feed { max-width: var(--content); }
.feed-item + .feed-item { margin-top: 160px; }
.feed-img img { width: 100%; }
.feed-meta { font: 400 13px/1.4 var(--sans); color: var(--grey); margin-top: 20px; transition: color 120ms ease-out; }
.feed-item.text-only .feed-meta { margin-top: 0; }
.feed-title { font: 400 28px/1.2 var(--serif); margin-top: 6px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px; text-decoration-thickness: 1px; transition: text-decoration-color 120ms ease-out; }
.feed-line { margin-top: 10px; max-width: var(--measure); }
.feed-item a { display: block; }
.feed-item a:hover .feed-meta, .feed-item a:focus-visible .feed-meta { color: var(--ink); }
.feed-item a:hover .feed-title, .feed-item a:focus-visible .feed-title { text-decoration-color: currentColor; }
@media (max-width: 767px) { .feed-item + .feed-item { margin-top: 112px; } .feed-title { font-size: 24px; } }

/* Project page: one content width for all images and drawings; heights follow each image's own proportions */
.fig { max-width: var(--content); }
.fig img { width: 100%; }
.phero { margin-top: 56px; max-width: var(--content); }
.phero .mh-fallback { width: 100%; }
.pfacts { margin-top: 56px; max-width: var(--measure); }
.facts { display: grid; grid-template-columns: max-content 1fr; column-gap: 32px; row-gap: 10px; font: 400 14px/1.45 var(--sans); }
.facts dt { color: var(--grey); text-transform: uppercase; letter-spacing: 0.08em; font-size: 12.5px; padding-top: 2px; }
.seq { margin-top: var(--rhythm); }
.blk { margin: 0 0 var(--rhythm); }
.seq > :last-child { margin-bottom: 0; }
.seq > .prose.blk { margin-bottom: 64px; }
.seq > .prose.blk:has(+ .prose.blk) { margin-bottom: 1em; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); max-width: var(--content); align-items: end; } /* shared ground line, shared caption baseline */
.pair .fig { min-width: 0; }
.close-links { margin-top: 96px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 40px; }
@media (max-width: 767px) { .pair { grid-template-columns: 1fr; row-gap: 48px; } .facts { grid-template-columns: 1fr; row-gap: 2px; } .facts dd { margin-bottom: 14px; } }

/* Services: serif title, larger overview, more space, then a fine rule before the services */
.serif-title { font-family: var(--serif); font-weight: 400; }
.overview { font-size: 25px; line-height: 1.4; max-width: var(--measure); }
.svc-head { margin-bottom: 96px; }
.svc-rule { max-width: var(--content); }
.svc-head + .svc-rule + .sec { margin-top: 72px; }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); max-width: var(--content); }
.pillar p + p { margin-top: 8px; }
.h3x { font: 400 28px/1.2 var(--serif); margin: 0 0 14px; }
.pillar .meta { margin-top: 12px; }
.svc-headline { font-size: 21px; font-style: italic; color: var(--grey); margin: -16px 0 28px; max-width: var(--measure); }
.ask { margin-top: 56px; max-width: var(--measure); font-size: 23px; line-height: 1.42; }
.ask-q { display: block; }
.ask .link { white-space: nowrap; }
@media (max-width: 899px) { .pillars { grid-template-columns: 1fr; row-gap: 40px; } }
@media (max-width: 767px) { .overview { font-size: 20px; } .svc-head { margin-bottom: 64px; } .ask { font-size: 19px; } .ask .link { white-space: normal; } }

/* About */
.disclaimer { max-width: var(--measure); padding-left: 16px; border-left: 1px solid var(--ink); margin-bottom: 32px; }
.prev .meta { display: block; }
.portrait { max-width: 200px; margin-bottom: 24px; } /* 400px source: 200 CSS px keeps it sharp at 2x */
.arb { margin: -8px 0 24px; }

/* Legal pages */
.legal h2 { font-size: 24px; margin: 48px 0 16px; }
.legal ul { margin: 12px 0; }
.legal li { position: relative; padding: 3px 0 3px 26px; }
.legal li::before { content: ""; position: absolute; left: 0; top: 0.85em; width: 12px; height: 1px; background: currentColor; }
.legal p + p { margin-top: 1em; }
.legal a { text-decoration: underline; text-underline-offset: 4px; }
.legal strong { font: 500 15px/1.6 var(--sans); } /* no bold Garamond is loaded: avoid faux bold */

/* Form */
.formcol { max-width: var(--measure); }
.form { display: grid; gap: 40px; }
.field { display: grid; gap: 8px; }
.field label { font: 400 12.5px/1.4 var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: var(--grey); }
.field .opt { text-transform: none; letter-spacing: 0; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 0; font: 400 16px/1.4 var(--sans); border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; appearance: none; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 4px; }
.field select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M.5.5 6 6 11.5.5' fill='none' stroke='%231B1B1B'/%3E%3C/svg%3E") right 2px center / 12px 7px no-repeat; padding-right: 28px; cursor: pointer; }
.field textarea { min-height: 140px; resize: vertical; }
.field input[type="file"] { border-bottom: 0; }
.field input[type="file"]::file-selector-button { background: none; border: 0; padding: 0; margin-right: 16px; font: 400 13px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.10em; text-decoration: underline; text-underline-offset: 5px; color: var(--ink); cursor: pointer; }
.field .hint { font: 400 12.5px/1.4 var(--sans); color: var(--grey); margin-top: 8px; }
/* Errors stay in brand ink: weight, a heavier rule and a drawn dash carry the state, not a new colour */
.field .err { position: relative; padding-left: 20px; margin-top: 8px; font: 500 13px/1.4 var(--sans); color: var(--ink); }
.field .err::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 12px; height: 1px; background: currentColor; }
.field .err:empty { display: none; }
.field [aria-invalid="true"] { border-bottom: 2px solid var(--ink); }
.field:has([aria-invalid="true"]) label { color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { font: 400 14px/1.6 var(--sans); max-width: 34rem; }
.form-status { font: 500 14px/1.5 var(--sans); }
.form-status:focus { outline: none; }
.form-status:empty { display: none; }
.form-status.ok { padding: 24px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font: 400 23px/1.42 var(--serif); }

/* Footer: Y3 Studio in EB Garamond, everything else in Inter */
.site-footer { font: 400 13px/1.7 var(--sans); color: var(--grey); padding: 0 0 56px; }
.site-footer .wrap { border-top: 1px solid var(--hair); padding-top: 48px; }
.site-footer .f-name { font: 400 28px/1.2 var(--serif); color: var(--ink); margin-bottom: 10px; }
/* Round 3: only "Y3 Studio" is Garamond; everything else in the footer is the sans */
.site-footer .f-mark { display: block; width: 40px; height: auto; margin-bottom: 16px; }
.site-footer .f-strap { margin: 8px 0 16px; }
.site-footer .f-arb { margin-bottom: 8px; }
.site-footer .f-legal { margin-top: 16px; display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.site-footer .link { display: inline-flex; align-items: center; min-height: 48px; margin: -12px 0; }
.site-footer .link:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Anchored service sections (/services/#architecture etc.) land with breathing room */
.svc { scroll-margin-top: 48px; }
