/* ==========================================================================
   Wireframe — line-art visualization studio template · archesign.studio
   1. Tokens  2. Base  3. Header  4. Components  5. Pages  6. Footer  7. Responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --paper: #fafaf8;
  --ink: #0a0a0a;
  --grey: #8a8a86;
  --line: #d9d9d4;
  --soft: #f0f0ec;

  --font-sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Fragment Mono", ui-monospace, Menlo, Consolas, monospace;

  --gutter: clamp(18px, 3vw, 44px);
  --max: 1440px;
  --space: clamp(90px, 12vw, 170px);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--font-sans); -webkit-font-smoothing: antialiased; }
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; line-height: 1; letter-spacing: -.04em; }
:focus-visible { outline: 1px dashed var(--ink); outline-offset: 4px; }
::selection { background: var(--ink); color: var(--paper); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space) 0; }
.mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0; }
.dim { color: var(--grey); }
.tag { font: 400 12px var(--font-mono); color: var(--grey); display: inline-flex; gap: 10px; align-items: center; margin: 0 0 18px; }
.tag::before { content: ""; width: 9px; height: 9px; border: 1px solid var(--ink); transform: rotate(45deg); }
.outline { color: transparent; -webkit-text-stroke: 1px var(--ink); }

/* 3. Header ---------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--ink); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: -.02em; }
.logo .mono { font-weight: 400; color: var(--grey); }
.logo .cube { width: 20px; height: 20px; border: 1.5px solid var(--ink); position: relative; transform: rotate(45deg) skew(-8deg, -8deg); }
.logo .cube::after { content: ""; position: absolute; inset: 3px; border: 1px dashed var(--ink); }
.site-nav { display: flex; gap: 0; border-left: 1px solid var(--ink); height: 68px; }
.site-nav a { display: flex; align-items: center; padding: 0 26px; border-right: 1px solid var(--ink); font-size: 15px; font-weight: 500; transition: background .2s, color .2s; }
.site-nav a:hover { background: var(--soft); }
.site-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.menu-btn { display: none; }

/* 4. Components ------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 15px 26px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font: 500 15px var(--font-sans); cursor: pointer; transition: background .2s, color .2s; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--paper); color: var(--ink); }
.box { border: 1px solid var(--ink); background: var(--paper); }
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* compare */
.compare { --pos: 50%; position: relative; overflow: hidden; border: 1px solid var(--ink); user-select: none; background: var(--paper); }
.compare > img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.compare .top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); background: var(--paper); }
.compare .top img { width: 100%; height: 100%; object-fit: cover; }
.compare .bar { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 1px; background: var(--ink); pointer-events: none; }
.compare .bar::after { content: "↔"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 52px; height: 52px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--ink); font-size: 20px; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: ew-resize; }
.compare .lbl { position: absolute; bottom: 14px; font: 400 12px var(--font-mono); background: var(--paper); border: 1px solid var(--ink); padding: 5px 10px; pointer-events: none; }
.compare .lbl--l { left: 14px; }
.compare .lbl--r { right: 14px; background: var(--ink); color: var(--paper); }

/* 5. Pages ----------------------------------------------------------------- */
/* hero */
.hero { padding: clamp(40px, 6vw, 90px) 0 0; }
.hero-top { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 30px; margin-bottom: clamp(30px, 4vw, 50px); }
.hero h1 { font-size: clamp(52px, 9.4vw, 152px); letter-spacing: -.06em; line-height: .88; }
.hero-side { max-width: 34ch; }
.hero-side p { color: #3a3a38; }
.dims { display: flex; justify-content: space-between; margin-top: 10px; font: 400 12px var(--font-mono); color: var(--grey); position: relative; }
.dims::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); z-index: -1; }
.dims span { background: var(--paper); padding: 0 8px; }

/* stages */
.stages-head { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: end; margin-bottom: 40px; }
.stages-head h2 { font-size: clamp(40px, 5.6vw, 88px); letter-spacing: -.05em; }
.stages-head p { color: #3a3a38; max-width: 46ch; justify-self: end; margin: 0; }
.stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.stage { border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.stage .n { font: 400 12px var(--font-mono); display: flex; justify-content: space-between; color: var(--grey); }
.stage img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); }
.stage h3 { font-size: 24px; }
.stage p { margin: 0; font-size: 14px; color: #4a4a48; }

/* statement */
.statement { font-size: clamp(30px, 3.6vw, 56px); line-height: 1.12; letter-spacing: -.035em; max-width: 24ch; }
.statement .outline { -webkit-text-stroke: 1px var(--ink); }

/* project index */
.page-head { padding: clamp(56px, 8vw, 120px) 0 clamp(30px, 4vw, 60px); border-bottom: 1px solid var(--ink); margin-bottom: clamp(30px, 4vw, 50px); }
.page-head h1 { font-size: clamp(54px, 10vw, 160px); letter-spacing: -.065em; line-height: .86; }
.page-head p { max-width: 52ch; color: #3a3a38; font-size: 19px; margin: 26px 0 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.filters button { font: 400 13px var(--font-mono); background: var(--paper); color: var(--ink); border: 1px solid var(--ink); padding: 8px 14px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.pairs { border-top: 1px solid var(--ink); }
.pair { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr) 260px; gap: 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--ink); }
.pair .num { font: 500 64px var(--font-sans); letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px var(--ink); line-height: 1; }
.pair figure { margin: 0; position: relative; }
.pair img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border: 1px solid var(--line); }
.pair figcaption { position: absolute; left: 8px; top: 8px; font: 400 11px var(--font-mono); background: var(--paper); border: 1px solid var(--ink); padding: 2px 6px; }
.pair figure:nth-of-type(2) figcaption { background: var(--ink); color: var(--paper); }
.pair h3 { font-size: 30px; margin-bottom: 8px; }
.pair p { margin: 0; font: 400 13px var(--font-mono); color: var(--grey); }
.pair:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

/* case */
.case-meta { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--ink); margin: 0; }
.case-meta div { padding: 18px 20px; border-right: 1px solid var(--ink); }
.case-meta div:last-child { border-right: 0; }
.case-meta dt { font: 400 12px var(--font-mono); color: var(--grey); }
.case-meta dd { margin: 6px 0 0; font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.steps { display: grid; gap: clamp(50px, 7vw, 100px); }
.step { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(24px, 4vw, 60px); align-items: start; }
.step-text { position: sticky; top: 100px; }
.step-text .big { font: 500 clamp(64px, 8vw, 120px) var(--font-sans); letter-spacing: -.07em; line-height: .8; color: transparent; -webkit-text-stroke: 1px var(--ink); margin-bottom: 18px; }
.step-text h3 { font-size: 30px; margin-bottom: 10px; }
.step-text p { color: #3a3a38; }
.step img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--ink); }

/* studio */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 100px); align-items: start; }
.rules { counter-reset: r; border-top: 1px solid var(--ink); }
.rules li { list-style: none; counter-increment: r; display: grid; grid-template-columns: 60px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--ink); }
.rules li::before { content: counter(r, decimal-leading-zero); font: 400 13px var(--font-mono); color: var(--grey); padding-top: 4px; }
.rules ol { padding: 0; margin: 0; }
.rules b { display: block; font-size: 22px; font-weight: 500; letter-spacing: -.02em; margin-bottom: 4px; }
.rules span { color: #4a4a48; }
.people { border-top: 1px solid var(--ink); }
.people div { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.people b { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.people span { color: var(--grey); font: 400 13px var(--font-mono); }

/* services */
.price-table { width: 100%; border-collapse: collapse; }
.price-table th { text-align: left; font: 400 12px var(--font-mono); color: var(--grey); padding: 12px 16px 12px 0; border-bottom: 1px solid var(--ink); font-weight: 400; }
.price-table td { padding: 22px 16px 22px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table td:first-child { font-size: 26px; font-weight: 500; letter-spacing: -.03em; white-space: nowrap; }
.price-table td:last-child { text-align: right; font: 400 15px var(--font-mono); white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.faq { max-width: 900px; border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--ink); }
.faq summary { display: block; position: relative; padding: 22px 50px 22px 0; cursor: pointer; list-style: none; font-size: 21px; font-weight: 500; letter-spacing: -.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border: 1px solid var(--ink); background: linear-gradient(var(--ink), var(--ink)) center / 8px 1px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 1px 8px no-repeat; }
.faq details[open] summary::after { background: linear-gradient(var(--ink), var(--ink)) center / 8px 1px no-repeat; }
.faq details p { margin: 0 0 22px; color: #3a3a38; max-width: 70ch; }

/* contact */
.contact { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(30px, 6vw, 100px); align-items: start; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.form > *, .field { min-width: 0; }
.field { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.field--full, .actions, .form-note { grid-column: 1 / -1; }
.field label { font: 400 12px var(--font-mono); color: var(--grey); }
.field input, .field select, .field textarea { font: 400 18px var(--font-sans); color: var(--ink); background: transparent; border: 0; padding: 6px 0; border-radius: 0; min-width: 0; max-width: 100%; }
.field textarea { min-height: 130px; resize: vertical; }
.field:focus-within { background: var(--soft); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; }
.actions { padding: 16px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.form-note { margin: 0; padding: 14px 16px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--soft); font: 400 13px var(--font-mono); }
.card { padding: 24px; }
.card h3 { font-size: 28px; margin-bottom: 12px; }
.card dl { margin: 18px 0 0; border-top: 1px solid var(--ink); }
.card dl div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.card dt { font: 400 12px var(--font-mono); color: var(--grey); }
.card dd { margin: 0; text-align: right; }

/* 6. Footer ---------------------------------------------------------------- */
.site-footer { margin-top: var(--space); border-top: 1px solid var(--ink); padding: clamp(70px, 9vw, 130px) 0 26px; }
.f-big { display: flex; justify-content: space-between; align-items: end; gap: 30px; flex-wrap: wrap; padding-bottom: 50px; border-bottom: 1px solid var(--ink); }
.f-big h2 { font-size: clamp(46px, 7.6vw, 124px); letter-spacing: -.065em; line-height: .88; }
.f-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--gutter); padding: 36px 0; font-size: 15px; }
.f-grid .mono { margin-bottom: 8px; }
.f-logo { font-weight: 600; font-size: 20px; margin: 0 0 8px; }
.f-grid a:hover { text-decoration: underline; }
.f-base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 18px; margin: 0; color: var(--grey); font-size: 12px; }

/* 7. Responsive ------------------------------------------------------------ */
@media (max-width: 1100px) {
  .stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pair { grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr); }
  .pair .info { grid-column: 2 / -1; }
  .pair .num { font-size: 46px; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .header-row { height: 60px; }
  .menu-btn { display: inline-flex; align-items: center; gap: 10px; position: relative; z-index: 60; background: var(--paper); border: 1px solid var(--ink); padding: 8px 12px; cursor: pointer; color: var(--ink); }
  .menu-btn i { width: 16px; height: 9px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
  .site-nav { position: fixed; inset: 0; z-index: 55; height: auto; flex-direction: column; justify-content: center; border: 0; padding: 0 var(--gutter); background: var(--paper); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
  .site-nav a { font-size: 46px; font-weight: 500; letter-spacing: -.05em; padding: 12px 0; border: 0; border-bottom: 1px solid var(--ink); }
  .site-nav a[aria-current="page"] { background: transparent; color: transparent; -webkit-text-stroke: 1px var(--ink); }
  .menu-open .site-nav { opacity: 1; visibility: visible; }
  .menu-open { overflow: hidden; }
  .hero-top, .stages-head, .split, .contact, .step { grid-template-columns: 1fr; }
  .stages-head p { justify-self: start; }
  .step-text { position: static; }
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage:last-child { grid-column: 1 / -1; }
  .compare > img { aspect-ratio: 4 / 3; }
  .case-meta { grid-template-columns: 1fr 1fr; }
  .case-meta div:nth-child(2) { border-right: 0; }
  .case-meta div:nth-child(-n + 2) { border-bottom: 1px solid var(--ink); }
  .f-grid { grid-template-columns: 1fr 1fr; }
  .f-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .stages { grid-template-columns: 1fr; }
  .stage:last-child { grid-column: auto; }
  .pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .pair .num { grid-column: 1 / -1; font-size: 40px; }
  .pair .info { grid-column: 1 / -1; }
  .form { grid-template-columns: 1fr; }
  .people div { grid-template-columns: 1fr; gap: 2px; }
  .hero h1 { font-size: 52px; }
  .page-head h1 { font-size: 54px; }
  .compare .bar::after { width: 40px; height: 40px; }
  .price-table thead { display: none; }
  .price-table tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 18px 0; border-bottom: 1px solid var(--line); }
  .price-table td { padding: 0; border: 0; }
  .price-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; color: #3a3a38; }
  .price-table td:nth-child(3) { grid-row: 3; }
  .price-table td:last-child { grid-row: 3; }
  .price-table td:first-child { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
