/* Rohida: the shared system. Builds on tokens.css (link tokens.css first). */

:root {
  --pad: max(16px, 4vw);
  --gap: clamp(16px, 2vw, 32px);
  --header-h: 72px;
  --radius-control: 2px;
  --dur-swap: var(--dur-quick);
  --ease-land: var(--ease-settle);
  --shade: linear-gradient(to top, rgba(90, 58, 38, .72) 0%, rgba(90, 58, 38, .38) 38%, rgba(90, 58, 38, 0) 70%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text), system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
p { margin: 0; }

/* ---------- Type ---------- */
h1, h2, h3, .display {
  font-family: var(--font-display), Georgia, serif;
  font-weight: 300;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 0;
  letter-spacing: -0.01em;
  line-height: 1.04;
  margin: 0;
  overflow-wrap: normal; word-break: normal; hyphens: none;
  text-wrap: balance;
}
.h1 { font-size: clamp(44px, 6.4vw, 104px); }
.h2 { font-size: clamp(36px, 4.4vw, 68px); }
.h2-s { font-size: clamp(32px, 3.4vw, 52px); }
.h3 { font-family: var(--font-display), Georgia, serif; font-weight: 300; letter-spacing: -0.01em; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.12; overflow-wrap: normal; word-break: normal; hyphens: none; }
.figure {
  font-family: var(--font-display), Georgia, serif;
  font-weight: 300;
  font-size: clamp(32px, 3.7vw, 58px);
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums;
  overflow-wrap: normal; word-break: normal; hyphens: none;
}
.label {
  font-family: var(--font-label), ui-monospace, monospace;
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.lede { font-size: clamp(18px, 1.35vw, 20px); line-height: 1.55; max-width: 44ch; }
.body { font-size: 17px; line-height: 1.6; max-width: 46ch; }
.small { font-size: 15px; line-height: 1.5; }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Grounds ---------- */
.ground-sand { background: var(--bg); color: var(--ink); }
.ground-chalk { background: var(--surface); color: var(--ink); }
.ground-dark { background: var(--ground-dark); color: var(--on-dark); --rule: var(--kiln); }
.ground-dark .label { color: color-mix(in srgb, var(--on-dark) 72%, transparent); }
.ground-indigo { background: var(--accent); color: var(--accent-ink); }

/* ---------- Grid ---------- */
.wrap { padding-inline: var(--pad); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 40px; }
.grid > * { grid-column: 1 / -1; min-width: 0; }
@media (min-width: 900px) {
  .c1-4 { grid-column: 1 / 5; } .c1-5 { grid-column: 1 / 6; } .c1-6 { grid-column: 1 / 7; } .c1-7 { grid-column: 1 / 8; }
  .c5-13 { grid-column: 5 / 13; } .c6-13 { grid-column: 6 / 13; } .c7-13 { grid-column: 7 / 13; }
  .c8-13 { grid-column: 8 / 13; } .c9-13 { grid-column: 9 / 13; }
}
.section { padding-block: clamp(88px, 12vw, 184px); }
.stack-s > * + * { margin-top: 16px; }
.stack > * + * { margin-top: 28px; }
.stack-l > * + * { margin-top: 44px; }

/* ---------- Rules ---------- */
.rule { display: block; height: 1px; background: var(--rule); border: 0; margin: 0; }
.hair { display: block; height: 1px; background: var(--hairline); }
.ground-dark .hair { background: color-mix(in srgb, var(--on-dark) 22%, transparent); }

/* ---------- Controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 52px; padding: 14px 22px;
  background: var(--accent); color: var(--accent-ink);
  font: 500 16px/1.2 var(--font-text), system-ui, sans-serif;
  text-decoration: none; border: 0; border-radius: var(--radius-control);
  cursor: pointer;
  transition: background-color var(--dur-quick) var(--ease-settle);
}
.btn:hover { background: color-mix(in srgb, var(--accent) 86%, #000); }
.btn .arrow { width: 18px; height: 18px; flex: none; transition: transform var(--dur-quick) var(--ease-settle); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-s { min-height: 44px; padding: 10px 16px; font-size: 15px; gap: 10px; }
.ground-indigo .btn { background: var(--accent-ink); color: var(--accent); }
.textlink {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-weight: 500; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 8px) / 100% 1px no-repeat;
  transition: background-size var(--dur-standard) var(--ease-line);
}
.textlink:hover { background-size: 0 1px; background-position: 100% calc(100% - 8px); }
.textlink .arrow { width: 16px; height: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-control); }
.ground-indigo :focus-visible, .ground-dark :focus-visible { outline-color: var(--accent-ink); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 12px 16px; border-radius: var(--radius-control); }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: var(--pad);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.brand { display: flex; align-items: center; min-height: 44px; }
.brand img { width: 128px; height: auto; }
.nav-inline { display: none; gap: 32px; }
.nav-inline a {
  font: 400 12.5px/1 var(--font-label), monospace; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; padding: 16px 0; color: var(--ink);
}
.nav-inline a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--kiln); }
.header-end { display: flex; align-items: center; gap: 12px; }
.menu { position: relative; }
.menu summary {
  list-style: none; cursor: pointer; min-height: 44px; min-width: 44px; padding: 0 12px;
  display: flex; align-items: center;
  font: 400 12.5px/1 var(--font-label), monospace; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--hairline); border-radius: var(--radius-control);
}
.menu summary::-webkit-details-marker { display: none; }
.menu:not([open]) .menu-panel { display: none; }
.menu[open] summary { background: var(--ink); color: var(--bg); }
.menu-panel {
  position: fixed; left: 0; right: 0; top: var(--header-h);
  background: var(--bg); border-bottom: 1px solid var(--hairline);
  padding: 12px var(--pad) 28px;
}
.menu-panel a {
  display: flex; align-items: center; justify-content: space-between; min-height: 56px;
  font-family: var(--font-display), serif; font-weight: 300; font-size: 30px; text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}
@media (max-width: 520px) {
  .brand img { width: 104px; }
  .header-end .btn-s { padding: 10px 12px; font-size: 14px; }
  .header-end .btn-s .arrow { display: none; }
}
@media (min-width: 1000px) {
  .nav-inline { display: flex; }
  .menu { display: none; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); color: var(--ink); padding: clamp(72px, 9vw, 128px) var(--pad) 28px; }
.footer-top { align-items: end; }
.footer-brand img { width: clamp(200px, 26vw, 360px); height: auto; }
.footer-cols { margin-top: clamp(56px, 7vw, 96px); padding-top: 28px; border-top: 1px solid var(--rule); row-gap: 36px; }
.footer-cols h2 { font-family: var(--font-label), monospace; font-size: 12.5px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; }
.footer-cols li a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-cols address { font-style: normal; }
.footer-cols .c-a, .footer-cols .c-b, .footer-cols .c-c, .footer-cols .c-d { grid-column: span 12; }
@media (min-width: 600px) { .footer-cols .c-a, .footer-cols .c-b, .footer-cols .c-c, .footer-cols .c-d { grid-column: span 6; } }
@media (min-width: 1000px) {
  .footer-cols .c-a { grid-column: 1 / 5; } .footer-cols .c-b { grid-column: 5 / 8; }
  .footer-cols .c-c { grid-column: 8 / 11; } .footer-cols .c-d { grid-column: 11 / 13; }
}
.footer-base { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; }

/* ---------- Media ---------- */
.frame { position: relative; overflow: hidden; border-radius: 0; background: var(--ground-dark); }
.frame > img, .frame > video { width: 100%; height: 100%; object-fit: cover; }
.r-21x9 { aspect-ratio: 21 / 9; } .r-4x5 { aspect-ratio: 4 / 5; } .r-3x4 { aspect-ratio: 3 / 4; } .r-16x9 { aspect-ratio: 16 / 9; }
@media (max-width: 899px) { .r-21x9 { aspect-ratio: 4 / 3; } }
.drift-img { height: 116% !important; margin-top: -8%; }
.cap { margin-top: 12px; }

/* ---------- Spec table (the cutting list) ---------- */
.spec { margin: 0; }
.spec-row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 22px 0 24px; position: relative; }
.spec-row dt { margin: 0; }
.spec-row dd { margin: 0; font-size: clamp(18px, 1.4vw, 20px); line-height: 1.45; }
.spec-row > [data-fx] { position: absolute; left: 0; right: 0; top: 0; }
@media (min-width: 700px) { .spec-row { grid-template-columns: minmax(150px, 34%) 1fr; gap: 24px; align-items: baseline; } }

/* ---------- Forms ---------- */
.field { display: grid; gap: 8px; }
.field label { font: 400 12.5px/1.4 var(--font-label), monospace; letter-spacing: .08em; text-transform: uppercase; }
.field input, .field textarea, .field select {
  font: 400 17px/1.4 var(--font-text), sans-serif; color: inherit;
  background: transparent; border: 0; border-bottom: 1px solid currentColor; border-radius: 0;
  padding: 12px 0; min-height: 48px; width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-width: 2px; }
.hp { position: absolute; left: -9999px; }

/* ---------- Motion support ---------- */
.mask-line { display: block; overflow: clip; padding-bottom: .06em; margin-bottom: -.06em; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
@media print {
  .site-header, .menu { display: none; }
  [data-rise], .mask-line > * { opacity: 1 !important; transform: none !important; }
}
