/* ==========================================================================
   Mullion — facade engineering template · archesign.studio
   1. Tokens  2. Base  3. Layout  4. Header  5. Components  6. Pages  7. Footer
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --bg: #0b1d36;
  --bg-2: #0f2645;
  --line: #7cc8f5;
  --line-soft: rgba(124, 200, 245, .22);
  --text: #eaf4fb;
  --muted: #8fa9c2;
  --accent: #ffb020;

  --font-sans: "Space Grotesk", "Segoe UI", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --gutter: clamp(16px, 3vw, 36px);
  --max: 1360px;
  --space: clamp(64px, 9vw, 128px);
  --grid: 24px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  font: 400 17px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  /* blueprint drawing grid */
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px),
    linear-gradient(rgba(124, 200, 245, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 200, 245, .07) 1px, transparent 1px);
  background-size: calc(var(--grid) * 5) calc(var(--grid) * 5), calc(var(--grid) * 5) calc(var(--grid) * 5), var(--grid) var(--grid), var(--grid) var(--grid);
  background-position: -1px -1px;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.025em; line-height: 1.05; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--bg); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--bg); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.mono, .tag, .k {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
}
.tag { color: var(--line); display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; }
.tag::before { content: ""; width: 18px; height: 1px; background: var(--line); }
.muted { color: var(--muted); }
.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; }
.cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }

/* drawing sheet frame with registration ticks */
.sheet { position: relative; border: 1px solid var(--line-soft); background: rgba(11, 29, 54, .72); padding: clamp(20px, 3.5vw, 48px); }
.sheet::before, .sheet::after {
  content: ""; position: absolute; width: 14px; height: 14px; border-color: var(--line); border-style: solid;
}
.sheet::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.sheet::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.sheet-no {
  position: absolute; top: 0; right: 0; transform: translateY(-100%);
  font: 500 11px var(--font-mono); letter-spacing: .12em; color: var(--muted); padding: 0 0 6px;
}

.head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(28px, 4vw, 52px); flex-wrap: wrap; }
.head h2 { font-size: clamp(32px, 4.6vw, 64px); max-width: 18ch; }

/* 4. Header ---------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line-soft); }
.header-row { display: flex; align-items: center; gap: 32px; height: 76px; }
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--text); margin-right: auto; }
.logo-mark { width: 30px; height: 30px; color: var(--line); }
.logo b { display: block; font-size: 19px; letter-spacing: .18em; font-weight: 600; line-height: 1; }
.logo small { display: block; font: 400 10px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.site-nav { display: flex; gap: 6px; }
.site-nav a { padding: 8px 14px; border: 1px solid transparent; font-weight: 500; font-size: 15px; display: inline-flex; gap: 8px; align-items: baseline; transition: border-color .2s, color .2s; }
.site-nav a i { font: normal 10px var(--font-mono); color: var(--line); }
.site-nav a:hover { border-color: var(--line-soft); }
.site-nav a[aria-current="page"] { border-color: var(--line); }
.status { font: 400 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 0 rgba(61, 220, 151, .6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(61, 220, 151, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); } }
.menu-btn { display: none; }

@media (max-width: 1080px) { .status { display: none; } }
@media (max-width: 820px) {
  .menu-btn {
    display: inline-grid; place-items: center; width: 46px; height: 46px; background: transparent;
    border: 1px solid var(--line); color: var(--text); cursor: pointer; position: relative; z-index: 60;
  }
  .bars, .bars::before, .bars::after { display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: .3s var(--ease); }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -6px; } .bars::after { top: 6px; }
  .menu-open .bars { background: transparent; }
  .menu-open .bars::before { top: 0; transform: rotate(45deg); }
  .menu-open .bars::after { top: 0; transform: rotate(-45deg); }
  .site-nav {
    position: fixed; inset: 0; z-index: 55; background: var(--bg); flex-direction: column; justify-content: center;
    padding: 0 var(--gutter); gap: 0; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .site-nav a { font-size: 34px; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line-soft); }
  .site-nav a i { font-size: 12px; }
  .site-nav a[aria-current="page"] { color: var(--accent); }
  .menu-open .site-nav { opacity: 1; visibility: visible; }
  .menu-open { overflow: hidden; }
}

/* 5. Components ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 22px;
  border: 1px solid var(--line); color: var(--text); font: 500 13px var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--line); color: var(--bg); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn--accent:hover { background: var(--text); border-color: var(--text); }

.figure { margin: 0; position: relative; }
.figure img { width: 100%; aspect-ratio: var(--ratio, 4 / 3); object-fit: cover; border: 1px solid var(--line-soft); background: var(--bg-2); }
.figure figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; font: 400 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* key data list (spec sheet) */
.spec { display: grid; grid-template-columns: repeat(var(--spec-cols, 4), minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line-soft); }
.spec > div { padding: 16px 18px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.spec .k { color: var(--muted); font-size: 11px; display: block; margin-bottom: 8px; }
.spec .v { font-size: clamp(22px, 2.4vw, 34px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.spec .v small { font-size: 14px; color: var(--muted); margin-left: 4px; font-weight: 400; }

/* project card */
.card { display: block; position: relative; }
.card .figure img { transition: border-color .3s, filter .4s; }
.card:hover .figure img { border-color: var(--accent); }
.card-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.card h3 { font-size: 22px; margin-top: 8px; }
.card .code { position: absolute; top: 10px; left: 10px; background: var(--bg); border: 1px solid var(--line); padding: 3px 8px; font: 500 11px var(--font-mono); letter-spacing: .1em; color: var(--line); }
.card[hidden] { display: none; }

/* table */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 18px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table th { font: 500 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--line); }
.table td:first-child { font-family: var(--font-mono); color: var(--accent); font-size: 13px; white-space: nowrap; }
.table td h3 { font-size: 22px; margin-bottom: 6px; }
.table td p { margin: 0; color: var(--muted); font-size: 15px; }
.table tr { transition: background .2s; }
.table tbody tr:hover { background: rgba(124, 200, 245, .06); }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* 6. Pages ----------------------------------------------------------------- */
/* hero */
.hero { padding: clamp(36px, 6vw, 80px) 0 var(--space); }
.hero-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(44px, 6.4vw, 96px); font-weight: 500; letter-spacing: -0.04em; line-height: .98; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin: 28px 0 32px; font-size: clamp(17px, 1.4vw, 20px); color: var(--muted); max-width: 44ch; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-drawing { --ratio: 7 / 5; }
.callout {
  position: absolute; display: flex; align-items: center; gap: 8px; font: 500 11px var(--font-mono); letter-spacing: .08em;
  text-transform: uppercase; background: var(--bg); border: 1px solid var(--accent); color: var(--accent); padding: 6px 10px;
}
.callout::before { content: ""; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.c1 { top: 18%; right: -12px; } .c2 { bottom: 22%; left: -12px; }

/* clients strip */
.clients { display: flex; flex-wrap: wrap; gap: 16px 48px; align-items: center; padding: 26px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.clients b { font-weight: 500; font-size: 20px; color: var(--muted); letter-spacing: -0.01em; }

/* capability tiles */
.caps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line-soft); }
.cap { padding: 28px 24px 32px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); transition: background .25s; }
.cap:hover { background: rgba(124, 200, 245, .06); }
.cap .mono { color: var(--accent); }
.cap h3 { font-size: 26px; margin: 22px 0 10px; }
.cap p { color: var(--muted); margin: 0; font-size: 15px; }

/* detail split */
.split { display: grid; grid-template-columns: 6fr 6fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.split h2 { font-size: clamp(30px, 3.8vw, 52px); margin-bottom: 20px; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; }
.checks li { padding: 12px 0 12px 30px; border-top: 1px solid var(--line-soft); position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 4px; color: var(--accent); font-family: var(--font-mono); }

/* project grid */
.page-head { padding: clamp(40px, 7vw, 96px) 0 clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: clamp(48px, 8vw, 120px); letter-spacing: -0.045em; line-height: .95; font-weight: 500; }
.page-head p.lede { margin-top: 22px; color: var(--muted); max-width: 56ch; font-size: clamp(17px, 1.4vw, 20px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filters button {
  font: 500 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text);
  background: transparent; border: 1px solid var(--line-soft); padding: 10px 14px; cursor: pointer;
}
.filters button:hover { border-color: var(--line); }
.filters button[aria-pressed="true"] { background: var(--line); color: var(--bg); border-color: var(--line); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px var(--gutter); }

/* case */
.case-hero { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.case-hero .figure { --ratio: 4 / 5; }
.prose { max-width: 64ch; }
.prose h2 { font-size: clamp(26px, 3vw, 40px); margin: 0 0 18px; }
.prose p { color: #c5d6e6; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); }
.timeline li { padding: 18px 16px 0 0; position: relative; }
.timeline li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; background: var(--accent); }
.timeline b { display: block; font-size: 20px; font-weight: 500; margin: 10px 0 4px; }
.timeline span { color: var(--muted); font-size: 14px; }

/* team */
.team { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.team .figure img { --ratio: 1 / 1; aspect-ratio: 1 / 1; filter: grayscale(.6) contrast(1.05); }
.team h3 { font-size: 20px; margin-top: 14px; }
.badges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.badge { border: 1px dashed var(--line); padding: 22px; display: flex; flex-direction: column; gap: 10px; min-height: 150px; }
.badge b { font-size: 22px; font-weight: 500; }

/* faq */
.faq details { border-top: 1px solid var(--line-soft); padding: 20px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line-soft); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; font-size: clamp(19px, 1.8vw, 24px); font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "[+]"; font-family: var(--font-mono); font-size: 14px; color: var(--line); }
.faq details[open] summary::after { content: "[–]"; color: var(--accent); }
.faq details p { margin: 14px 0 0; color: var(--muted); max-width: 70ch; }

/* contact */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px var(--gutter); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font: 500 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--line); }
.field input, .field select, .field textarea {
  font: 400 17px var(--font-sans); color: var(--text); background: rgba(15, 38, 69, .85);
  border: 1px solid var(--line-soft); padding: 14px 14px; border-radius: 0; appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--line) 50%), linear-gradient(135deg, var(--line) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field input[type="file"] { padding: 12px; font-size: 14px; overflow: hidden; }
.form > *, .field { min-width: 0; }
.field input, .field select, .field textarea { min-width: 0; max-width: 100%; }
.form-note { grid-column: 1 / -1; padding: 14px 16px; border: 1px solid var(--accent); color: var(--accent); margin: 0; font-family: var(--font-mono); font-size: 13px; }
.offices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.office h3 { font-size: 28px; margin: 10px 0 12px; }
.office p { color: var(--muted); margin: 0 0 6px; }
.coords { font-family: var(--font-mono); font-size: 12px; color: var(--line); }

/* 7. Footer ---------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg); padding: clamp(56px, 8vw, 110px) 0 32px; margin-top: var(--space); }
.footer-top { display: flex; justify-content: space-between; align-items: end; gap: 28px; flex-wrap: wrap; margin-bottom: clamp(40px, 6vw, 72px); }
.footer-top h2 { font-size: clamp(36px, 5.4vw, 76px); letter-spacing: -0.04em; }
.titleblock { display: grid; grid-template-columns: 2fr repeat(3, 1fr); border: 1px solid var(--line); }
.tb-cell { padding: 12px 14px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tb-wide { grid-row: span 2; justify-content: flex-end; }
.tb-wide .tb-v { font-size: clamp(20px, 2vw, 28px); font-weight: 500; }
.tb-k { font: 500 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tb-v { font-size: 14px; overflow-wrap: anywhere; }
.tb-v a:hover { color: var(--accent); }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1080px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team, .badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
  .spec { --spec-cols: 2 !important; }
}
@media (max-width: 820px) {
  body { font-size: 16px; }
  .hero-grid, .split, .case-hero, .form, .offices { grid-template-columns: 1fr; }
  .callout { display: none; }
  .grid-3, .caps { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .titleblock { grid-template-columns: 1fr 1fr; }
  .tb-wide { grid-column: 1 / -1; grid-row: auto; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
  .table td { border: 0; padding: 4px 0; }
  .cols > * { grid-column: 1 / -1 !important; }
}
@media (max-width: 480px) {
  .team, .badges, .timeline { grid-template-columns: 1fr 1fr; }
  .spec { --spec-cols: 1 !important; }
  .sheet { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
