/* Hallmark · pre-emit critique: P5 H4 E5 S4 R5 V5 */

/* ---------------------------------------------------------------
   Reset + base
------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: clip; scroll-behavior: smooth; }
body { overflow-x: clip; }

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

img { max-width: 100%; display: block; }
ul, ol { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

body {
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; max-width: 65ch; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -100%; left: var(--space-md); z-index: var(--z-toast);
  background: var(--color-ink); color: var(--color-paper);
  padding: var(--space-sm) var(--space-md); border-radius: var(--radius-sm);
  transition: top var(--dur-short) var(--ease-out);
}
.skip-link:focus { top: var(--space-md); }

.page-gutter { padding-inline: clamp(1.25rem, 4vw, 4rem); }

/* ---------------------------------------------------------------
   Reveal (page-load orchestration)
------------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: reveal var(--dur-long) var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 90ms);
}
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: reveal 150ms linear forwards; animation-delay: 0ms; }
}

/* ---------------------------------------------------------------
   Buttons
------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap;
  min-height: 44px;
  padding-inline: var(--space-lg);
  font-family: var(--font-body); font-weight: 600; font-size: var(--text-sm);
  transition: background-color var(--dur-short) var(--ease-out),
              color var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out),
              transform 100ms var(--ease-out);
}
.btn--pill { border-radius: var(--radius-pill); }
.btn--primary {
  background: var(--color-ink); color: var(--color-paper);
  border: 1px solid var(--color-ink);
}
.btn--primary:hover { background: var(--color-ink-2); }
.btn--primary:active { transform: translateY(1px); }

.btn--ghost {
  background: transparent; color: var(--color-ink);
  border: 1px solid var(--color-rule);
}
.btn--ghost:hover { border-color: var(--color-ink); }
.btn--ghost:active { transform: translateY(1px); }

/* ---------------------------------------------------------------
   Nav — N1b canonical SaaS three-section
------------------------------------------------------------------ */
.nav {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: color-mix(in oklch, var(--color-paper) 88%, transparent);
  backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: var(--rule-hair) solid transparent;
  transition: border-color var(--dur-short) var(--ease-out),
              background-color var(--dur-short) var(--ease-out);
}
.nav.is-scrolled { border-color: var(--color-rule); }

.nav__inner {
  max-width: 84rem; margin-inline: auto;
  padding: var(--space-md) clamp(1.25rem, 4vw, 4rem);
  display: flex; align-items: center; gap: var(--space-lg);
}
.nav__brand { display: inline-flex; }
.nav__logo { height: 32px; width: auto; }

.nav__links {
  display: flex; gap: var(--space-lg);
  margin-inline: auto;
  font-size: var(--text-sm); font-weight: 500;
}
.nav__links a { white-space: nowrap; color: var(--color-ink-2); }
.footer__cols a, .bento__link, .contact__info dd a { white-space: nowrap; }
.nav__links a:hover { color: var(--color-ink); }

.nav__cta { margin-left: auto; }

.nav__toggle {
  display: none; width: 44px; height: 44px;
  align-items: center; justify-content: center;
}
.nav__toggle-bar,
.nav__toggle-bar::before,
.nav__toggle-bar::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--color-ink);
  position: relative;
}
.nav__toggle-bar::before { position: absolute; top: -6px; }
.nav__toggle-bar::after { position: absolute; top: 6px; }

.nav__sheet {
  display: none;
  flex-direction: column; gap: var(--space-md);
  padding: var(--space-md) clamp(1.25rem, 4vw, 4rem) var(--space-lg);
  border-top: var(--rule-hair) solid var(--color-rule);
  background: var(--color-paper);
}
.nav__sheet a { font-size: var(--text-md); font-weight: 500; }
.nav__sheet[data-open] { display: flex; }

@media (max-width: 60rem) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; }
}

/* ---------------------------------------------------------------
   Hero — H2 Split Diptych
------------------------------------------------------------------ */
.hero {
  max-width: 84rem; margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 4vw, 4rem) clamp(3.5rem, 8vw, 5.5rem);
  min-height: clamp(60vh, 72dvh, 84dvh);
  display: grid; grid-template-columns: 6fr 6fr; gap: var(--space-2xl);
  align-items: center;
}

.hero__display {
  font-size: var(--text-display);
  line-height: 1.02;
  max-width: 14ch;
  overflow-wrap: anywhere;
  min-width: 0;
}

.hero__lede {
  margin-top: var(--space-lg);
  font-size: var(--text-md);
  color: var(--color-ink-2);
  max-width: 42ch;
}

.hero__actions {
  margin-top: var(--space-xl);
  display: flex; gap: var(--space-md); flex-wrap: wrap;
}

.hero__art { position: relative; }
.art__svg { width: 100%; height: auto; max-width: 26rem; margin-inline: auto; display: block; }

.art__pulse {
  transform-origin: 200px 222px;
  animation: art-pulse 4s var(--ease-in-out) infinite;
}
@keyframes art-pulse {
  0%, 100% { opacity: 0.75; transform: rotate(45deg) scale(1); }
  50%      { opacity: 1;    transform: rotate(45deg) scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .art__pulse { animation: none; opacity: 0.9; }
}

@media (max-width: 60rem) {
  .hero { grid-template-columns: 1fr; padding-top: clamp(2rem, 8vw, 3rem); }
  .hero__art { order: -1; max-width: 20rem; margin-inline: auto; }
  .hero__display { max-width: 100%; }
}
@media (max-width: 40rem) {
  .hero__display { font-size: clamp(2.1rem, 8vw, 2.75rem); }
}

/* ---------------------------------------------------------------
   Trust — T2 Logo wall (hairline)
------------------------------------------------------------------ */
.trust {
  border-block: var(--rule-hair) solid var(--color-rule);
  padding-block: var(--space-xl);
}
.trust__label {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-bottom: var(--space-lg);
}
.trust__wall {
  max-width: 72rem; margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 4rem);
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  row-gap: var(--space-md);
}
.trust__wall li {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--text-md);
  color: var(--color-ink-2);
  padding-inline: var(--space-lg);
  position: relative;
}
.trust__wall li + li::before {
  content: "";
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: var(--rule-hair); height: 1.1em;
  background: var(--color-rule);
}

@media (max-width: 40rem) {
  .trust__wall li { flex: 1 1 45%; text-align: center; padding-inline: var(--space-sm); }
  .trust__wall li::before { display: none; }
}

/* ---------------------------------------------------------------
   Section head — S2 Hanging
------------------------------------------------------------------ */
.section-head {
  font-size: var(--text-2xl);
  max-width: 18ch;
  overflow-wrap: anywhere;
  min-width: 0;
}

/* ---------------------------------------------------------------
   Process — F4 Step Sequence (dark band)
------------------------------------------------------------------ */
.process {
  background: var(--color-dark);
  color: var(--color-dark-ink);
  padding-block: var(--space-3xl);
}
.process__inner { max-width: 84rem; margin-inline: auto; }
.process .section-head { color: var(--color-dark-ink); margin-bottom: var(--space-2xl); }

.process__steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-lg);
}
.process__step {
  border-inline-start: var(--rule-hair) solid var(--color-dark-rule);
  padding-inline-start: var(--space-md);
}
.process__step:first-child { border-inline-start: var(--rule-hair) solid var(--color-dark-rule); }
.process__num {
  font-family: var(--font-mono); font-size: var(--text-sm);
  color: var(--color-accent); font-variant-numeric: tabular-nums;
}
.process__step h3 {
  font-size: var(--text-lg); margin-block: var(--space-xs) var(--space-xs);
  color: var(--color-dark-ink);
}
.process__step p { color: var(--color-dark-muted); font-size: var(--text-sm); max-width: 26ch; }

@media (max-width: 60rem) {
  .process__steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 40rem) {
  .process__steps { grid-template-columns: 1fr; }
  .process__step { border-inline-start: none; border-top: var(--rule-hair) solid var(--color-dark-rule); padding-block-start: var(--space-md); padding-inline-start: 0; }
  .process__step:first-child { border-top: none; }
}

/* ---------------------------------------------------------------
   Services + Bento — F1 Bento Grid
------------------------------------------------------------------ */
.services {
  max-width: 84rem; margin-inline: auto;
  padding-block: var(--space-3xl);
  padding-inline: clamp(1.25rem, 4vw, 4rem);
}
.services__head { max-width: 62rem; margin-bottom: var(--space-2xl); }
.services__intro { margin-top: var(--space-md); font-size: var(--text-md); color: var(--color-ink-2); max-width: 60ch; }
.services__intro strong { color: var(--color-ink); }

.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
}
.bento__tile {
  background: var(--color-paper-2);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: transform var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .bento__tile:hover { transform: translateY(-2px); border-color: var(--color-accent); }
}
.bento__tile h3 { font-size: var(--text-md); margin-bottom: var(--space-sm); }
.bento__tile p { color: var(--color-ink-2); font-size: var(--text-sm); }
.bento__tile ul { display: flex; flex-direction: column; gap: var(--space-2xs); }
.bento__tile li {
  font-size: var(--text-sm); color: var(--color-ink-2);
  padding-inline-start: var(--space-md); position: relative;
}
.bento__tile li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 5px; height: 5px; border-radius: 1px;
  background: var(--color-accent); transform: rotate(45deg);
}

.bento__tile--wide { grid-column: span 2; }
.bento__tile--accent {
  background: var(--color-ink); color: var(--color-paper);
  border-color: var(--color-ink);
}
.bento__tile--accent h3 { color: var(--color-paper); }

.bento__badges { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-xs); }
.bento__badges span {
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--color-paper-3); border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-sm); padding: var(--space-3xs) var(--space-xs);
  color: var(--color-ink-2);
}

.bento__link {
  display: inline-flex; margin-top: var(--space-sm);
  font-weight: 600; font-size: var(--text-sm);
  border-bottom: 1px solid currentColor;
  transition: opacity var(--dur-short) var(--ease-out);
}
.bento__link:hover { opacity: 0.7; }

@media (max-width: 60rem) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento__tile--wide { grid-column: span 2; }
}
@media (max-width: 40rem) {
  .bento { grid-template-columns: 1fr; }
  .bento__tile--wide { grid-column: span 1; }
}

/* ---------------------------------------------------------------
   Contact
------------------------------------------------------------------ */
.contact {
  background: var(--color-paper-2);
  border-top: var(--rule-hair) solid var(--color-rule);
  padding-block: var(--space-3xl);
}
.contact__inner {
  max-width: 84rem; margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 4rem);
  display: grid; grid-template-columns: 5fr 7fr; gap: var(--space-3xl);
  align-items: start;
}
.contact__intro p { color: var(--color-ink-2); margin-top: var(--space-sm); }

.contact__info { margin-top: var(--space-2xl); display: flex; flex-direction: column; gap: var(--space-lg); }
.contact__info dt { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted); }
.contact__info dd { margin: 0; font-size: var(--text-md); font-weight: 600; margin-top: var(--space-2xs); }
.contact__info a { border-bottom: 1px solid transparent; transition: border-color var(--dur-short) var(--ease-out); }
.contact__info a:hover { border-color: currentColor; }

.contact__form {
  background: var(--color-paper);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex; flex-direction: column; gap: var(--space-lg);
}
.field { display: flex; flex-direction: column; gap: var(--space-2xs); flex: 1; }
.field--row { flex-direction: row; gap: var(--space-lg); }
.field label { font-size: var(--text-sm); font-weight: 600; }
.field__optional { font-weight: 400; color: var(--color-muted); }

.field input, .field select, .field textarea {
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-sm);
  background: var(--color-paper);
  padding: var(--space-sm) var(--space-md);
  min-height: 44px;
  transition: border-color var(--dur-short) var(--ease-out);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--color-accent);
}
.field input.is-invalid, .field textarea.is-invalid { border-color: var(--color-accent-2); }

.field--hp { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

.contact__submit { align-self: flex-start; margin-top: var(--space-xs); }
.contact__submit[disabled] { opacity: 0.6; cursor: progress; }

.contact__status {
  margin: 0; font-size: var(--text-sm); min-height: 1.4em;
}
.contact__status[data-tone="ok"] { color: var(--color-accent); }
.contact__status[data-tone="error"] { color: var(--color-accent-2); }

@media (max-width: 60rem) {
  .contact__inner { grid-template-columns: 1fr; gap: var(--space-2xl); }
}
@media (max-width: 40rem) {
  .field--row { flex-direction: column; }
  .contact__form { padding: var(--space-lg); }
}

/* ---------------------------------------------------------------
   Footer — Ft1 Mast-headed
------------------------------------------------------------------ */
.footer { background: var(--color-dark); color: var(--color-dark-ink); }
.footer__inner {
  max-width: 84rem; margin-inline: auto;
  padding: var(--space-3xl) clamp(1.25rem, 4vw, 4rem) var(--space-2xl);
  display: grid; grid-template-columns: 1.2fr 2fr; gap: var(--space-2xl);
}
.footer__brand p { margin-top: var(--space-sm); color: var(--color-dark-muted); max-width: 32ch; }
.footer__brand img { filter: brightness(0) invert(1); }

.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
.footer__cols h3 {
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-dark-muted);
  margin-bottom: var(--space-sm);
}
.footer__cols > div { display: flex; flex-direction: column; gap: var(--space-xs); }
.footer__cols a, .footer__cols span { font-size: var(--text-sm); }
.footer__cols a { color: var(--color-dark-ink); border-bottom: 1px solid transparent; width: fit-content; }
.footer__cols a:hover { border-color: currentColor; }
.footer__mono { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-dark-muted); }
.footer__muted { color: var(--color-dark-muted); }

.footer__legal {
  border-top: var(--rule-hair) solid var(--color-dark-rule);
  padding: var(--space-lg) clamp(1.25rem, 4vw, 4rem);
  max-width: 84rem; margin-inline: auto;
  font-size: var(--text-xs); color: var(--color-dark-muted);
}

@media (max-width: 40rem) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr; gap: var(--space-lg); }
}
