/* Soft Futures design tokens */
:root {
  --paper: #F8F7F2;
  --ink: #1F3FD1;
  --pink: #F7B6CF;
  --yellow: #F2E24A;
  --red: #FB3640;
  --ice: #A3D9FF;
  --rule: 2px solid var(--ink);
  --pad-lg: clamp(24px, 4vw, 56px);
  --mono: 'Space Mono', ui-monospace, monospace;
  --serif: 'Instrument Serif', Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--red); outline-offset: -3px; }
input::placeholder { color: inherit; opacity: .6; }

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

/* Every cell draws its own right and bottom rule; the wrapper's negative
   margin pushes the outermost rules into the clipped overflow so the grid
   reads as edge-to-edge. */
.page { max-width: 1280px; margin: 0 auto; overflow: hidden; }
.grid { margin: 0 -2px -2px 0; }
.cell { border-right: var(--rule); border-bottom: var(--rule); }
.row { display: flex; flex-wrap: wrap; }

.serif { font-family: var(--serif); font-weight: 400; }

/* Nav */
.nav a {
  display: flex; align-items: center; min-height: 56px; padding: 0 24px; font-size: 15px;
}
.nav .brand { flex: 1 1 220px; font-weight: 700; font-size: 16px; }
.nav .cta { padding: 0 28px; background: var(--ink); color: var(--paper); }

/* Hero */
.hero-mark {
  flex: 1.3 1 min(480px, 100%); padding: var(--pad-lg);
  display: flex; align-items: center; justify-content: center;
}
.wordmark {
  width: 100%; max-width: 680px;
  display: grid; grid-template-columns: repeat(7, 1fr);
  border-left: var(--rule); border-top: var(--rule);
}
.wordmark > div {
  aspect-ratio: 13 / 15;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: clamp(22px, 5.6vw, 76px); line-height: 1;
}
.wordmark .pink { background: var(--pink); }
.wordmark .hatch { background: repeating-linear-gradient(45deg, var(--ink) 0 2px, transparent 2px 10px); }
.wordmark svg { display: block; flex: none; width: clamp(38px, 4vw, 57px); height: auto; }

.hero-copy {
  flex: 1 1 min(380px, 100%); padding: var(--pad-lg);
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
}
.hero-copy h1 { margin: 0; font-size: clamp(36px, 4.2vw, 60px); line-height: 1.04; }
.hero-copy p { margin: 0; font-size: 16px; line-height: 1.55; }
.btn-primary {
  align-self: flex-start; display: inline-flex; align-items: center;
  min-height: 60px; padding: 0 30px;
  background: var(--red); color: #FFFFFF; border: var(--rule);
  font-weight: 700; font-size: 20px;
}

/* Services */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 0; padding: 0; list-style: none; }
.services li { display: flex; }
.services a {
  position: relative; flex: 1; min-height: 190px; padding: 24px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  font-size: 34px; line-height: 1.05;
  transition: background-color .15s ease;
}
.services a span { position: absolute; top: 20px; right: 24px; font-family: var(--mono); font-size: 20px; opacity: 0; transform: translateX(-6px); transition: opacity .15s ease, transform .15s ease; }
.services a:hover, .services a:focus-visible { background: var(--yellow); text-decoration: none; }
.services a:hover span, .services a:focus-visible span { opacity: 1; transform: none; }
@media (hover: none) { .services a span { opacity: 1; transform: none; } }

/* Human natives */
.hn-art {
  flex: 1 1 min(280px, 100%); min-height: 280px; padding: 24px; background: var(--pink);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hn-art svg { display: block; flex: none; }
.hn-copy {
  flex: 2.4 1 min(420px, 100%); padding: var(--pad-lg);
  display: flex; flex-direction: column; gap: 20px;
}
.hn-copy h2 { margin: 0; font-size: clamp(40px, 5vw, 72px); line-height: 1; }
.hn-copy p { margin: 0; max-width: 620px; font-size: 16px; line-height: 1.55; }
.hn-copy .lede { font-size: 18px; }
.text-link {
  align-self: flex-start; display: inline-flex; align-items: center;
  min-height: 44px; font-size: 15px; text-decoration: underline;
}

/* Work */
.work { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.work article {
  min-height: 240px; padding: 24px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.work h3 { margin: 0; font-size: 30px; line-height: 1.1; }
.work p { margin: 10px 0 0; font-size: 15px; line-height: 1.5; }
.work .fill {
  min-height: 240px;
  background: repeating-linear-gradient(45deg, var(--ink) 0 2px, transparent 2px 10px), var(--ice);
}

/* Newsletter */
.nl-copy {
  flex: 1.6 1 min(420px, 100%); padding: var(--pad-lg); background: var(--yellow);
  display: flex; flex-direction: column; gap: 22px;
}
.nl-copy h2 { margin: 0; font-size: clamp(36px, 4.4vw, 60px); line-height: 1.02; }
.nl-copy p { margin: 0; font-size: 16px; line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 8px 14px; border: var(--rule); font-size: 14px; background: var(--paper); }

.nl-form {
  flex: 1 1 min(320px, 100%); margin: 0; padding: var(--pad-lg);
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
}
.nl-form label { font-size: 15px; }
.nl-form input, .nl-form button {
  min-height: 52px; border: var(--rule); border-radius: 0; font-family: var(--mono);
}
.nl-form input { padding: 0 16px; background: var(--paper); color: var(--ink); font-size: 16px; }
.nl-form button { padding: 0 26px; background: var(--ink); color: var(--paper); font-size: 15px; cursor: pointer; }
.nl-form button:hover { background: var(--red); }

/* Footer */
.footer > * { flex: 1 1 220px; min-height: 64px; padding: 20px 24px; font-size: 15px; }

/* Phones: the desktop cell heights stack into a very long scroll. */
@media (max-width: 600px) {
  .services a { min-height: 112px; font-size: 30px; }
  .work article, .work .fill { min-height: 168px; }
  .hn-art { min-height: 200px; }
}

/* Service landing pages */
.svc-hero-copy {
  flex: 2 1 min(520px, 100%); padding: var(--pad-lg);
  display: flex; flex-direction: column; gap: 24px;
}
.crumb { font-size: 15px; }
.svc-hero-copy h1 { margin: 0; font-size: clamp(48px, 7vw, 104px); line-height: .98; }
.svc-hero-copy p { margin: 0; max-width: 620px; font-size: 18px; line-height: 1.55; }
.svc-swatch {
  flex: 1 1 min(280px, 100%); min-height: 280px; padding: 24px;
  display: flex; align-items: flex-end;
}
.svc-swatch.hatch { background: repeating-linear-gradient(45deg, var(--ink) 0 2px, transparent 2px 10px), var(--ice); }
.svc-swatch svg { display: block; flex: none; }

.svc-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); margin: 0; padding: 0; list-style: none; }
.svc-list li { min-height: 200px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.svc-list .num { font-size: 14px; }
.svc-list h3 { margin: 0; font-size: 28px; line-height: 1.1; }
.svc-list p { margin: 8px 0 0; font-size: 15px; line-height: 1.5; }

.svc-cta { flex: 1 1 100%; padding: var(--pad-lg); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.svc-cta h2 { margin: 0; font-size: clamp(32px, 4vw, 52px); line-height: 1.05; }

.svc-others { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); margin: 0; padding: 0; list-style: none; }
.svc-others li { display: flex; }
.svc-others a { flex: 1; min-height: 96px; padding: 20px 24px; display: flex; align-items: flex-end; font-size: 24px; line-height: 1.1; }
.svc-others a:hover, .svc-others a:focus-visible { background: var(--yellow); text-decoration: none; }
.svc-others .label { grid-column: 1 / -1; padding: 16px 24px; font-size: 15px; }

/* Contact */
.contact-intro {
  flex: 1 1 min(380px, 100%); padding: var(--pad-lg); background: var(--pink);
  display: flex; flex-direction: column; gap: 22px;
}
.contact-intro h1 { margin: 0; font-size: clamp(44px, 6vw, 88px); line-height: 1; }
.contact-intro p { margin: 0; font-size: 16px; line-height: 1.55; }
.contact-intro a { text-decoration: underline; }

.contact-form {
  flex: 1.6 1 min(480px, 100%); margin: 0; padding: var(--pad-lg);
  display: flex; flex-direction: column; gap: 22px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field-row { display: flex; flex-wrap: wrap; gap: 22px; }
.field-row .field { flex: 1 1 min(220px, 100%); }
.contact-form label, .contact-form legend { font-size: 15px; }
.contact-form fieldset { margin: 0; padding: 0; border: 0; }
.contact-form legend { padding: 0; margin-bottom: 10px; }
.contact-form input[type=text], .contact-form input[type=email], .contact-form select, .contact-form textarea {
  width: 100%; min-height: 52px; padding: 0 16px;
  border: var(--rule); border-radius: 0; background: var(--paper); color: var(--ink);
  font-family: var(--mono); font-size: 16px;
}
.contact-form textarea { min-height: 160px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.contact-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(-45deg, transparent 50%, var(--ink) 50%); background-position: right 22px center, right 16px center; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 8px 14px; border: var(--rule); font-size: 14px; background: var(--paper); cursor: pointer; }
.chip input:checked + span { background: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form-actions .btn-primary { cursor: pointer; font-family: var(--mono); }
.form-note { margin: 0; font-size: 14px; line-height: 1.5; }

/* Nav: links sit inline on wide screens and collapse behind a menu button on phones. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-links { display: contents; }
.menu-btn { display: none; }

@media (max-width: 760px) {
  .nav .brand { flex: 1 1 auto; }
  .menu-btn {
    display: flex; align-items: center; justify-content: center;
    width: 56px; min-height: 56px; padding: 0;
    background: var(--paper); color: var(--ink); border: 0; border-right: var(--rule); border-bottom: var(--rule);
    cursor: pointer;
  }
  .menu-btn .icon-close { display: none; }
  .nav.is-open .menu-btn { background: var(--ink); color: var(--paper); }
  .nav.is-open .menu-btn .icon-open { display: none; }
  .nav.is-open .menu-btn .icon-close { display: block; }

  .nav-links { display: none; flex: 1 1 100%; flex-direction: column; }
  .nav.is-open .nav-links { display: flex; }
  .nav-links a { min-height: 60px; padding: 0 24px; font-size: 18px; }
  .nav-links .cta { padding: 0 24px; }
}
.form-note a { text-decoration: underline; }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.contact-done {
  flex: 1.6 1 min(480px, 100%); padding: var(--pad-lg);
  display: flex; flex-direction: column; justify-content: center; gap: 20px;
}
.contact-done h2 { margin: 0; font-size: clamp(40px, 5vw, 72px); line-height: 1; }
.contact-done p { margin: 0; font-size: 16px; line-height: 1.55; }
.contact-done:focus { outline: none; }
.nl-form button:disabled { opacity: .6; cursor: progress; }
.nl-status { margin: 0; min-height: 1.5em; font-size: 14px; line-height: 1.5; }
.nl-status:empty { display: none; }
.nl-status a { text-decoration: underline; }
.nl-form.is-done label, .nl-form.is-done input, .nl-form.is-done button { display: none; }
.nl-form.is-done .nl-status { font-family: var(--serif); font-size: 28px; line-height: 1.15; }
/* Plain-text service cells (no landing page yet) keep the linked cells' layout. */
.services li > span { flex: 1; min-height: 190px; padding: 24px; display: flex; align-items: flex-end; font-size: 34px; line-height: 1.05; }
@media (max-width: 600px) { .services li > span { min-height: 112px; font-size: 30px; } }
