/* ============================================================
   Tomo Interactive LTD — tomointeractive.com
   Editorial/Swiss-influenced: paper, ink, hairline rules.
   No gradients, no glass, no decorative blur.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --paper:   #faf9f6;   /* warm off-white, not pure white */
  --band:    #f2f0ea;   /* alternating section tone */
  --ink:     #17171a;
  --ink-2:   #5e5c57;   /* secondary text — 6.3:1 on paper */
  --ink-3:   #6f6c64;   /* labels, meta — 5.0:1, AA at small sizes */
  --rule:    #e0dcd3;   /* hairlines — the main structural device */
  --rule-2:  #c9c4b8;   /* emphasised hairline */
  --accent:  #a93d26;   /* single warm accent, used sparingly */
  --accent-hover: #86301d;

  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1180px;
  --gutter: 28px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper:   #141310;
  --band:    #1b1a16;
  --ink:     #ece8e0;
  --ink-2:   #a29e94;
  --ink-3:   #948f85;   /* 5.8:1 on the dark paper — AA at small sizes */
  --rule:    #2b2924;
  --rule-2:  #423f38;
  --accent:  #e0714f;
  --accent-hover: #ef8460;
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.022em; line-height: 1.12; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

::selection { background: var(--accent); color: var(--paper); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 10px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
}
.skip-link:focus { left: var(--gutter); }

/* ---------- Shared type ---------- */

/* Small mono label — carries the technical character of the site. */
.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.label .num { color: var(--accent); }

.lede { color: var(--ink-2); font-size: 1.06rem; max-width: 46ch; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 24px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink); border-radius: 2px;
  font-size: 15px; font-weight: 500; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn-block { width: 100%; }

/* Understated secondary action — a rule, not a pill. */
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 500;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--rule-2);
  transition: border-color .15s ease, color .15s ease;
}
.link-arrow:hover { color: var(--accent); border-bottom-color: var(--accent); }
.link-arrow svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.6; fill: none; }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: 68px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.015em;
}
/* Flat accent square — no gradient, no rounded-app-icon look. */
.wordmark .mark { width: 11px; height: 11px; background: var(--accent); flex: none; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-family: var(--mono); font-size: 12.5px; font-weight: 400;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2);
  transition: color .15s ease;
}
.nav a:hover { color: var(--accent); }

.actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: none; border: 1px solid transparent; border-radius: 2px;
  cursor: pointer; color: var(--ink-2);
  transition: color .15s ease, border-color .15s ease;
}
.icon-btn:hover { color: var(--ink); border-color: var(--rule); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }

.menu-btn { display: none; }
.menu-btn .bar { display: block; width: 16px; height: 1.5px; background: currentColor; }
.menu-btn .bar + .bar { margin-top: 4px; }

/* ---------- Hero ---------- */
.hero { padding: 132px 0 108px; border-bottom: 1px solid var(--rule); }
.hero .label { display: block; margin-bottom: 34px; }
.hero h1 {
  font-size: clamp(2.7rem, 6.6vw, 5rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
  max-width: 16ch;
  margin-bottom: 34px;
}
.hero .lede { font-size: clamp(1.05rem, 1.7vw, 1.2rem); max-width: 52ch; }
.hero-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: 44px; }

/* ---------- Section shell ---------- */
.band { padding: 104px 0; border-bottom: 1px solid var(--rule); }
.band-tone { background: var(--band); }

.band-head { max-width: 62ch; margin-bottom: 68px; }
.band-head .label { display: block; margin-bottom: 22px; }
.band-head h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); margin-bottom: 20px; }

/* ---------- Editorial rows (Services, Values) ----------
   Hairline-separated rows instead of floating cards: term on the
   left, description on the right. */
.rows { border-top: 1px solid var(--rule-2); }
.rows .row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 20px 56px;
  padding: 34px 0;
  border-bottom: 1px solid var(--rule);
}
.rows dt { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; }
.rows dd { color: var(--ink-2); font-size: 1rem; max-width: 58ch; }

/* ---------- Process ---------- */
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
  border-top: 1px solid var(--rule-2);
  padding-top: 40px;
}
.steps .n {
  display: block; font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em; color: var(--accent); margin-bottom: 18px;
}
.steps h3 { font-size: 1.1rem; margin-bottom: 10px; }
.steps p { color: var(--ink-2); font-size: .96rem; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; }
.about .band-head { margin-bottom: 0; }
.about-copy p + p { margin-top: 18px; }
.about-copy .rows { margin-top: 44px; }
.about-copy .link-arrow { margin-top: 34px; }

/* ---------- Ethos ----------
   A pull quote: large type on a short measure, attribution below a rule.
   No quotation-mark ornament — the scale does the work. */
/* One shared measure in rem — `ch` here would resolve against the inherited
   17px body size, not the large quote size, and squeeze the line far too narrow. */
.ethos { margin: 44px 0 0; --measure: 34rem; }
.ethos blockquote { margin: 0; max-width: var(--measure); }
.ethos blockquote p {
  font-size: clamp(1.3rem, 2.7vw, 1.95rem);
  font-weight: 500;
  line-height: 1.34;
  letter-spacing: -0.022em;
}
.ethos blockquote p + p { margin-top: 0.8em; color: var(--ink-2); }
.ethos figcaption {
  max-width: var(--measure);
  margin-top: 40px; padding-top: 22px;
  border-top: 1px solid var(--rule-2);
  display: flex; flex-direction: column; gap: 4px;
}
.ethos-name { font-weight: 600; font-size: 1rem; }
.ethos-role {
  font-family: var(--mono); font-size: 11.5px; font-weight: 400;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3);
}

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px 72px; }
.contact-copy p { color: var(--ink-2); margin-top: 18px; max-width: 40ch; }
.contact-email {
  display: inline-block; margin-top: 30px;
  font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 500; letter-spacing: -0.02em;
  padding-bottom: 4px; border-bottom: 1px solid var(--rule-2);
  transition: color .15s ease, border-color .15s ease;
}
.contact-email:hover { color: var(--accent); border-bottom-color: var(--accent); }

.form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3);
}
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 0;
  background: none; border: none; border-bottom: 1px solid var(--rule-2);
  border-radius: 0; font-size: 16px; resize: vertical;
  transition: border-color .15s ease;
}
.field select { padding-left: 0; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-bottom-color: var(--accent);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-bottom-color: var(--accent); }
.form .btn { margin-top: 4px; justify-self: start; padding-inline: 34px; }
.form-note { font-family: var(--mono); font-size: 12px; color: var(--ink-3); min-height: 18px; }
.form-note.ok  { color: var(--ink-2); }
.form-note.err { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { padding: 72px 0 40px; }
.footer-top {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px; padding-bottom: 56px;
}
.footer-tagline { color: var(--ink-2); font-size: .96rem; margin-top: 16px; max-width: 34ch; }
.footer-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.footer-nav h3 {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 16px;
}
.footer-nav a {
  display: block; font-size: .96rem; color: var(--ink-2); margin-bottom: 10px;
  transition: color .15s ease;
}
.footer-nav a:hover { color: var(--accent); }

.footer-legal {
  border-top: 1px solid var(--rule);
  padding-top: 26px;
  display: grid; gap: 10px;
  font-size: .82rem; color: var(--ink-3);
}
.footer-legal .disclosure { max-width: 74ch; line-height: 1.6; }
.footer-legal a { border-bottom: 1px solid var(--rule-2); transition: color .15s ease, border-color .15s ease; }
.footer-legal a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- 404 ---------- */
.notfound { min-height: 74vh; display: flex; align-items: center; }
.notfound .code {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 22px;
}
.notfound h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); margin-bottom: 18px; max-width: 18ch; }
.notfound p { color: var(--ink-2); max-width: 44ch; margin-bottom: 34px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); gap: 36px 32px; }
  .about, .contact { grid-template-columns: 1fr; gap: 40px; }
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 700px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }
  .hero { padding: 76px 0 64px; }
  .hero .label { margin-bottom: 24px; }
  .band { padding: 68px 0; }
  .band-head { margin-bottom: 44px; }
  .rows .row { grid-template-columns: 1fr; gap: 10px; padding: 26px 0; }
  .steps { grid-template-columns: 1fr; gap: 30px; }
  .menu-btn { display: grid; }

  .nav {
    position: fixed; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; font-size: 13px; border-bottom: 1px solid var(--rule); }
  .nav a:last-child { border-bottom: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
