/* ───────────────────────────────────────────────────────────────────────────
   Andon AI — one-page marketing site
   Design system: neutral paper / warm ink / single signal amber (from the
   logo handoff bundle). Hanken Grotesk for display & body, IBM Plex Mono for
   technical captions — the same pairing the logo system uses. The mark is a
   dial: a near-closed amber ring with one slot. Where it appears on its own
   it rotates slowly — the workflow in motion, always improving.
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  --paper: #F2F2F1;
  --paper-raised: #FAFAF9;
  --paper-72: rgba(242, 242, 241, 0.72);
  --paper-55: rgba(242, 242, 241, 0.55);
  --paper-28: rgba(242, 242, 241, 0.28);
  --paper-14: rgba(242, 242, 241, 0.14);
  --ink: #211E1A;
  --ink-74: rgba(33, 30, 26, 0.74);
  --ink-55: rgba(33, 30, 26, 0.55);
  --ink-46: rgba(33, 30, 26, 0.46);
  --ink-24: rgba(33, 30, 26, 0.24);
  --ink-15: rgba(33, 30, 26, 0.15);
  --ink-10: rgba(33, 30, 26, 0.10);
  --amber: #E8843B;
  --amber-deep: #CE6A27;
  --amber-soft: rgba(232, 132, 59, 0.12);

  --sans: 'Hanken Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --w: 1120px;
  --w-text: 720px;
}

* { box-sizing: border-box; }

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(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--amber); color: var(--ink); }

a { color: inherit; }

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

/* Paper grain — one fixed turbulence layer over everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

.wrap {
  width: min(var(--w), calc(100% - 48px));
  margin-inline: auto;
}

/* ── Type ────────────────────────────────────────────────────────────────── */

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.02em; /* the lockup's tracking */
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.7rem, 6.4vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.22rem; line-height: 1.3; }

p { margin: 0; }

.mono {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-55);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--sans);
  font-size: 0.97rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-radius: 9px;
  padding: 0.72em 1.35em;
  transition: background-color 160ms ease, color 160ms ease,
              box-shadow 160ms ease, transform 160ms ease;
}

.btn-primary {
  background: var(--amber);
  color: var(--ink);
}
.btn-primary:hover {
  background: var(--amber-deep);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink-24);
  background: transparent;
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }

.dark .btn-ghost {
  color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--paper-28);
}
.dark .btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--paper); }

/* ── Nav ─────────────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper-72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ink-10);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}

.nav-logo img { display: block; height: 26px; width: auto; }

.nav-right { display: flex; align-items: center; gap: 1.4rem; }

.nav-link {
  font-size: 0.97rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-74);
  transition: color 140ms ease;
}
.nav-link:hover { color: var(--ink); }

.nav .btn { padding: 0.55em 1.1em; }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: clamp(84px, 11vh, 140px) 0 96px;
  overflow: clip;
}

.hero-inner {
  position: relative;
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
}

.hero .mono { color: var(--ink-46); }

.hero h1 { margin-top: 1.1rem; }

.hero-sub {
  max-width: 640px;
  margin: 1.6rem auto 0;
  font-size: 1.17rem;
  line-height: 1.65;
  color: var(--ink-74);
}

/* ── Queue panel — the product story in one panel ───────────────────────── */

.queue {
  position: relative;
  max-width: 880px;
  margin: 84px auto 0;
  background: var(--paper-raised);
  border: 1px solid var(--ink-15);
  border-radius: 14px;
  box-shadow: 0 24px 60px -38px rgba(33, 30, 26, 0.45);
  overflow: hidden;
  text-align: left;
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.4rem;
  border-bottom: 1px solid var(--ink-10);
}

.queue-title {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  color: var(--ink-55);
}

.queue-live {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-46);
}

.queue-live img {
  width: 11px;
  height: 11px;
  animation: dial-spin 9s linear infinite reverse;
}

/* the dial in motion — one slow, steady sweep */
@keyframes dial-spin {
  to { transform: rotate(360deg); }
}

.queue-rows { padding: 0.45rem 0 0.6rem; }

.qrow {
  display: grid;
  grid-template-columns: 6.2rem 1fr auto 5.2rem;
  align-items: baseline;
  gap: 1.2rem;
  padding: 0.62rem 1.4rem;
  font-family: var(--mono);
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--ink-74);
  border-left: 2px solid transparent;
}

.qrow + .qrow { border-top: 1px dashed var(--ink-10); }

.qrow .qid { color: var(--ink-46); }
.qrow .qact { color: var(--ink); }
.qrow .qconf { text-align: right; color: var(--ink-46); }

.qrow-flag {
  background: var(--amber-soft);
  border-left-color: var(--amber);
}
.qrow-flag .qact { color: var(--amber-deep); font-weight: 500; }
.qrow-flag .qconf { color: var(--amber-deep); }

.queue-foot {
  padding: 0.8rem 1.4rem 0.95rem;
  border-top: 1px solid var(--ink-10);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--ink-46);
}

.queue-foot b {
  color: var(--amber-deep);
  font-weight: 500;
}

/* ── Sections ────────────────────────────────────────────────────────────── */

section { padding: clamp(84px, 11vw, 128px) 0; }

#problem { padding-top: clamp(64px, 8vw, 96px); }

.kicker {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.kicker-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  color: var(--amber-deep);
}

.kicker-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-55);
}

.kicker::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ink-10);
}

.section-head { max-width: 760px; }

.lead {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: var(--w-text);
  margin-top: 1.6rem;
}

/* problem example cards */
.cases {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
  margin-top: 3rem;
}

.case {
  background: var(--paper-raised);
  border: 1px solid var(--ink-10);
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.case .mono { color: var(--amber-deep); font-size: 0.7rem; }

.case p {
  font-size: 1.06rem;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.problem-bridge {
  max-width: 100%;
  margin-top: clamp(2.2rem, 4vw, 3rem);
  padding: clamp(1.25rem, 2vw, 1.6rem) 0 0 clamp(1rem, 1.8vw, 1.35rem);
  border-left: 2px solid var(--amber);
}

.problem-bridge .mono {
  color: var(--amber-deep);
  font-size: 0.7rem;
}

.problem-bridge-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.6rem, 4vw, 3rem);
  margin-top: 0.85rem;
}

.problem-bridge p {
  color: var(--ink);
  font-size: clamp(1.08rem, 1.45vw, 1.18rem);
  line-height: 1.6;
  letter-spacing: -0.005em;
}

/* the two bad options — hollow, dashed cards; Andon is the third line */
.options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
  margin-top: 2.6rem;
}

.option {
  border: 1px dashed var(--ink-24);
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1.4rem;
}

.option .mono { color: var(--ink-46); font-size: 0.7rem; }

.option h3 { font-size: 1.12rem; margin-top: 0.8rem; }

.option p { margin-top: 0.7rem; color: var(--ink-74); font-size: 0.97rem; }

/* Section-closing statement: the emphatic centered line that punctuates the
   end of a major section. One treatment, reused verbatim in the problem,
   what-we-do, and who-it's-for sections so the three read as a single
   recurring element. Key phrase in amber. */
.statement {
  max-width: 760px;
  margin: clamp(3.4rem, 6vw, 4.8rem) auto 0;
  text-align: center;
  font-size: clamp(1.35rem, 2.3vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
  text-wrap: balance;
  color: var(--ink);
}

.statement em { font-style: normal; color: var(--amber-deep); }

/* pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.6rem;
  margin-top: 3.4rem;
}

.pillar { position: relative; }

.pillar h3 { margin-top: 0.85rem; }

.pillar p { margin-top: 0.85rem; color: var(--ink-74); font-size: 0.99rem; }

/* steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.6rem;
  margin-top: 3.4rem;
}

.step { position: relative; }

.pillar .mono,
.step .mono {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink-46);
  font-size: 0.7rem;
}

.pillar .mono::before,
.step .mono::before {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: var(--amber-deep);
  flex: 0 0 auto;
}

.pillar .mono::after,
.step .mono::after {
  content: "";
  height: 1px;
  min-width: 2rem;
  background: var(--ink-15);
  flex: 1 1 auto;
}

.step h3 { margin-top: 0.4rem; }

.step p { margin-top: 0.85rem; color: var(--ink-74); font-size: 0.99rem; }

/* who it's for */
.industries {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
  margin-top: 3rem;
}

.industry {
  background: var(--paper-raised);
  border: 1px solid var(--ink-10);
  border-radius: 12px;
  padding: 1.6rem 1.6rem 1.5rem;
}

.industry h3 { font-size: 1.12rem; }

.industry ul {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.industry li {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-55);
  padding-left: 1.1rem;
  position: relative;
}

.industry li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--amber-deep);
}

/* ── Dark closing band ───────────────────────────────────────────────────── */

.dark {
  background: var(--ink);
  color: var(--paper);
}

.cta {
  position: relative;
  text-align: center;
  padding: clamp(100px, 13vw, 150px) 0;
  overflow: clip;
}

.cta-inner { position: relative; max-width: 680px; margin-inline: auto; }

.cta-dial {
  height: 64px;
  width: auto;
  animation: dial-spin 14s linear infinite reverse;
}

.cta h2 { color: var(--paper); margin-top: 1.6rem; }

.cta p {
  color: var(--paper-55);
  font-size: 1.13rem;
  max-width: 520px;
  margin: 1.3rem auto 0;
}

.cta .btn { margin-top: 2.4rem; }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--paper-14);
  padding: 3.4rem 0 2.6rem;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-brand img { height: 24px; width: auto; display: block; }

.footer-tag {
  margin-top: 1.05rem;
  font-size: 0.95rem;
  color: var(--paper-55);
  max-width: 320px;
  line-height: 1.55;
}

.footer-base {
  margin-top: 3rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--paper-28);
}

/* ── Reveal on scroll ────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 640ms cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 640ms cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--d, 0ms);
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .queue-live img, .cta-dial { animation: none; }
  .btn { transition: none; }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1020px) {
  .cases { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  .problem-bridge-copy { grid-template-columns: 1fr; gap: 1.05rem; }
  .pillars, .steps, .industries, .options { grid-template-columns: 1fr; }
  .pillars, .steps { gap: 2.2rem; }
  .qrow { grid-template-columns: 5.4rem 1fr auto; }
  .qrow .qconf { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .reveal { --d: 0ms !important; }
  .cases { grid-template-columns: 1fr; }
  .nav-right { gap: 0.9rem; }
  .nav-link { display: none; }
  .qrow { grid-template-columns: 1fr auto; }
  .qrow .qid { display: none; }
  .hero-sub { font-size: 1.07rem; }
}
