/* ==========================================================================
   Monolith — architecture studio template · archesign.studio
   1. Tokens  2. Base  3. Layout  4. Header  5. Components  6. Pages  7. Footer
   ========================================================================== */

/* 1. Tokens — change colours and fonts here ------------------------------- */
:root {
  --bg: #f2f1ee;
  --ink: #111111;
  --accent: #ff4d1a;
  --muted: #6b6964;
  --rule: #d6d3cc;
  --panel: #e7e5e0;

  --font-display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --gutter: clamp(16px, 3vw, 40px);
  --max: 1440px;
  --space: clamp(72px, 10vw, 160px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* 2. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font-display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

.label, .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.label { margin: 0 0 12px; }
.accent { color: var(--accent); }

/* 3. Layout --------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space) 0; }
.section--tight { padding: calc(var(--space) * .6) 0; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.rule { border-top: 1px solid var(--ink); }
.rule-soft { border-top: 1px solid var(--rule); }

.section-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: end;
  padding-top: 16px;
  margin-bottom: clamp(32px, 5vw, 72px);
}
.section-head .label { grid-column: 1 / 4; margin: 0; }
.section-head h2 { grid-column: 4 / 13; font-size: clamp(36px, 5.4vw, 84px); }

/* 4. Header --------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.scrolled .site-header { border-bottom-color: var(--rule); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; display: inline-flex; align-items: baseline; gap: 3px; }
.logo .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; }
.site-nav { display: flex; gap: clamp(20px, 3vw, 44px); }
.site-nav a {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  position: relative; padding: 6px 0;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--accent);
  transition: right .35s var(--ease);
}
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { right: 0; }
.menu-btn { display: none; }

@media (max-width: 760px) {
  /* no backdrop-filter here: it would trap the fixed full-screen menu inside the header */
  .site-header { backdrop-filter: none; background: var(--bg); }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--ink);
    padding: 8px 14px; font: 500 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
    cursor: pointer; position: relative; z-index: 60;
  }
  .site-nav {
    position: fixed; inset: 0; background: var(--ink); color: var(--bg);
    flex-direction: column; justify-content: center; padding: 0 var(--gutter); gap: 8px;
    transform: translateY(-100%); transition: transform .5s var(--ease); visibility: hidden;
  }
  .site-nav a { font-family: var(--font-display); font-size: 44px; letter-spacing: -0.03em; text-transform: none; font-weight: 600; }
  .menu-open .site-nav { transform: none; visibility: visible; }
  .menu-open .menu-btn { color: var(--bg); border-color: var(--bg); }
  .menu-open { overflow: hidden; }
}

/* 5. Components ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 24px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  font: 500 13px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); }

.link-arrow { display: inline-flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--ink); padding-bottom: 4px; font-weight: 500; }
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }

.figure { margin: 0; }
.figure img { width: 100%; aspect-ratio: var(--ratio, 4 / 3); object-fit: cover; background: var(--panel); }
.figure figcaption { display: flex; justify-content: space-between; gap: 16px; padding-top: 10px; }

/* project card */
.card { display: block; }
.card .figure img { transition: transform .8s var(--ease), filter .4s; }
.card .img-clip { overflow: hidden; background: var(--panel); }
.card:hover .figure img { transform: scale(1.035); }
.card h3 { font-size: clamp(22px, 2.2vw, 30px); margin-top: 14px; display: flex; justify-content: space-between; gap: 12px; }
.card h3 .arrow { color: var(--accent); opacity: 0; transform: translateX(-8px); transition: .35s var(--ease); }
.card:hover h3 .arrow { opacity: 1; transform: none; }
.card .meta { margin-top: 6px; }

/* numbered rows (services, awards) */
.rows { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--ink); }
.row {
  display: grid; grid-template-columns: 80px 1fr 1.2fr 40px; gap: var(--gutter); align-items: baseline;
  padding: 28px 0; border-top: 1px solid var(--ink); transition: background .3s, padding .3s var(--ease);
}
.row:hover { background: var(--panel); padding-left: 12px; padding-right: 12px; }
.row .num { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.row h3 { font-size: clamp(26px, 3vw, 44px); }
.row p { margin: 0; color: var(--muted); max-width: 46ch; }
.row .go { color: var(--accent); font-size: 22px; text-align: right; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.stat { padding: 20px 20px 0 0; }
.stat + .stat { border-left: 1px solid var(--rule); padding-left: 20px; }
.stat b { display: block; font-size: clamp(40px, 5vw, 76px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }

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

/* 6. Pages ---------------------------------------------------------------- */
/* hero */
.hero { padding-top: clamp(40px, 7vw, 110px); }
.hero h1 {
  font-size: clamp(52px, 11.2vw, 184px); line-height: .9; letter-spacing: -0.055em; font-weight: 600;
}
.hero h1 .accent-dot { color: var(--accent); }
.hero-sub { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); margin-top: clamp(28px, 4vw, 56px); align-items: end; }
.hero-sub p { grid-column: 1 / 6; font-size: clamp(18px, 1.6vw, 22px); margin: 0; }
.hero-sub .actions { grid-column: 9 / 13; display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.hero-figure { margin-top: clamp(40px, 6vw, 88px); --ratio: 16 / 9; }

/* intro */
.intro p.lead { font-size: clamp(24px, 2.7vw, 40px); line-height: 1.2; letter-spacing: -0.02em; grid-column: 4 / 12; margin: 0 0 40px; }
.intro .stats { grid-column: 1 / 13; margin-top: 40px; }

/* selected work: asymmetric grid */
.work { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(40px, 6vw, 96px) var(--gutter); }
.work .card:nth-child(1) { grid-column: 1 / 8; }
.work .card:nth-child(2) { grid-column: 9 / 13; margin-top: 30%; }
.work .card:nth-child(3) { grid-column: 2 / 6; }
.work .card:nth-child(4) { grid-column: 7 / 13; margin-top: 12%; }
.work-more { margin-top: 64px; display: flex; justify-content: center; }

/* press strip */
.press { display: flex; flex-wrap: wrap; gap: 20px 56px; align-items: center; justify-content: space-between; padding: 36px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.press span { font-size: clamp(18px, 2vw, 26px); font-weight: 500; color: var(--muted); letter-spacing: -0.02em; }
.press span:nth-child(2n) { font-style: italic; font-weight: 400; }

/* quote */
.quote blockquote { margin: 0; grid-column: 3 / 12; font-size: clamp(28px, 3.6vw, 56px); line-height: 1.1; letter-spacing: -0.03em; }
.quote cite { display: block; margin-top: 28px; font-style: normal; }

/* page title */
.page-head { padding: clamp(48px, 8vw, 120px) 0 clamp(32px, 5vw, 64px); }
.page-head h1 { font-size: clamp(56px, 10vw, 160px); letter-spacing: -0.055em; line-height: .9; }
.page-head .intro-text { margin-top: 28px; max-width: 52ch; font-size: clamp(18px, 1.6vw, 22px); color: var(--muted); }

/* filter */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 48px; }
.filters button {
  font: 500 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  padding: 10px 16px; border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer;
  transition: .2s;
}
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px var(--gutter); }
.project-grid .card[hidden] { display: none; }

/* case study */
.case-meta { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--ink); margin-top: 40px; }
.case-meta div { padding: 16px 16px 0 0; }
.case-meta div + div { border-left: 1px solid var(--rule); padding-left: 16px; }
.case-meta dd { margin: 4px 0 0; font-weight: 500; }
.case-meta dt { margin: 0; }
.case-text { grid-column: 4 / 11; font-size: 19px; }
.case-text h2 { font-size: clamp(28px, 3vw, 44px); margin: 0 0 24px; }
.case-pair { display: grid; grid-template-columns: 7fr 5fr; gap: var(--gutter); align-items: end; }
.next-project { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding: 40px 0; border-top: 1px solid var(--ink); }
.next-project b { font-size: clamp(40px, 7vw, 112px); letter-spacing: -0.05em; line-height: .9; font-weight: 600; }
.next-project:hover b { color: var(--accent); }

/* team */
.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px var(--gutter); }
.team .figure img { --ratio: 4 / 5; aspect-ratio: 4 / 5; filter: grayscale(1); transition: filter .5s; }
.team .person:hover img { filter: none; }
.team h3 { font-size: 22px; margin-top: 14px; }

.manifesto { grid-column: 1 / 13; }
.manifesto ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); counter-reset: m; }
.manifesto li { border-top: 1px solid var(--ink); padding-top: 18px; counter-increment: m; }
.manifesto li::before { content: "(0" counter(m) ")"; font-family: var(--font-mono); font-size: 12px; color: var(--accent); display: block; margin-bottom: 18px; }
.manifesto h3 { font-size: 28px; margin-bottom: 12px; }

/* process */
.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 1px solid var(--ink); }
.process li { list-style: none; padding: 20px 20px 0 0; }
.process li + li { border-left: 1px solid var(--rule); padding-left: 20px; }
.process h3 { font-size: 22px; margin: 28px 0 10px; }
.process p { color: var(--muted); font-size: 15px; }
.process { padding: 0; margin: 0; }

/* faq */
.faq details { border-top: 1px solid var(--ink); padding: 22px 0; }
.faq details:last-child { border-bottom: 1px solid var(--ink); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 24px; font-size: clamp(20px, 2vw, 28px); font-weight: 500; letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 400; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 16px 0 0; max-width: 64ch; color: var(--muted); }

/* contact */
.contact-big { font-size: clamp(36px, 7vw, 112px); letter-spacing: -0.05em; font-weight: 600; line-height: 1; display: inline-block; border-bottom: 3px solid var(--accent); }
.contact-big:hover { color: var(--accent); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px var(--gutter); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font: 500 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  font: 400 18px var(--font-display); color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--ink); padding: 10px 0; border-radius: 0; appearance: none;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom: 2px solid var(--accent); }
.form-note { grid-column: 1 / -1; padding: 16px; background: var(--panel); border-left: 3px solid var(--accent); margin: 0; }
.office { display: grid; grid-template-columns: 5fr 7fr; gap: var(--gutter); align-items: start; }

/* 7. Footer --------------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--bg); padding: clamp(64px, 9vw, 140px) 0 28px; margin-top: var(--space); }
.site-footer .label { color: #8f8c86; }
.footer-cta { display: inline-flex; gap: .3em; font-size: clamp(44px, 9vw, 148px); font-weight: 600; letter-spacing: -0.055em; line-height: .9; }
.footer-cta span { color: var(--accent); transition: transform .4s var(--ease); }
.footer-cta:hover span { transform: translateX(16px); }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); margin-top: clamp(56px, 7vw, 110px); padding-top: 28px; border-top: 1px solid #3a3936; }
.footer-grid a:hover { color: var(--accent); }
.footer-base { display: flex; justify-content: space-between; margin-top: 64px; font: 12px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: #8f8c86; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1024px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .process li + li { border-left: 0; padding-left: 0; }
  .process li { border-top: 1px solid var(--rule); }
  .case-meta { grid-template-columns: repeat(3, 1fr); row-gap: 20px; }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .section-head { grid-template-columns: 1fr; }
  .section-head .label, .section-head h2 { grid-column: 1 / -1; }
  .hero-sub, .grid, .work { grid-template-columns: 1fr; }
  .hero-sub > *, .grid > *, .work .card { grid-column: 1 / -1 !important; margin-top: 0 !important; }
  .hero-sub .actions { justify-content: flex-start; }
  .intro p.lead { margin-bottom: 24px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat { padding-bottom: 20px; }
  .row { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; }
  .row .go { display: none; }
  .project-grid { grid-template-columns: 1fr; }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
  .team h3 { font-size: 18px; }
  .manifesto ol { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .case-meta { grid-template-columns: repeat(2, 1fr); }
  .case-meta div + div { border-left: 0; padding-left: 0; }
  .case-pair, .office, .form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .footer-base { flex-direction: column; gap: 10px; }
  .next-project { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
