/* ifthenelse — Migration Factory
   Brand tokens: see ../tokens/brand-tokens.css
   Lead with White and Keyword Blue. Then Green confirms. Scope Orange accelerates. */

:root {
  --ite-keyword-blue: #0E5B8F;
  --ite-then-green: #0A8E4E;
  --ite-scope-orange: #DA5B2B;
  --ite-editor-ink: #1E1E1E;
  --ite-white: #FFFFFF;
  --ite-comment-gray: #F4F6F7;

  --ite-font-sans: 'Fira Sans', ui-sans-serif, system-ui, sans-serif;
  --ite-font-mono: 'Fira Code', ui-monospace, monospace;

  --rule: rgba(30, 30, 30, 0.10);
  --muted: rgba(30, 30, 30, 0.66);
  --radius: 16px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ite-white);
  color: var(--ite-editor-ink);
  font-family: var(--ite-font-sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--ite-keyword-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 720px; }

.mono { font-family: var(--ite-font-mono); font-weight: 500; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ite-keyword-blue); color: #fff; padding: 12px 18px; z-index: 100;
}
.skip:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 76px;
}
.brand img { height: 34px; width: auto; }
.brand:hover { text-decoration: none; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-size: 14px; font-weight: 500; color: var(--ite-editor-ink);
}
.nav a:hover { color: var(--ite-keyword-blue); text-decoration: none; }
.nav-cta {
  background: var(--ite-keyword-blue); color: #fff !important;
  padding: 9px 16px; border-radius: 10px;
}
.nav-cta:hover { background: #0b4a75; }

/* ---------- hero ---------- */

.hero {
  padding: 96px 0 80px;
  background-image: radial-gradient(circle at 1px 1px, rgba(14, 91, 143, 0.10) 1px, transparent 0);
  background-size: 28px 28px;
  border-bottom: 1px solid var(--rule);
}
.comment { color: var(--ite-then-green); font-size: 14px; margin: 0 0 14px; }

h1 {
  font-size: clamp(44px, 7vw, 76px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0 0 24px;
  color: var(--ite-keyword-blue);
}

.lede {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 22ch;
  margin: 0 0 20px;
}
@media (min-width: 700px) { .lede { max-width: 30ch; } }

.sub { max-width: 62ch; color: var(--muted); margin: 0 0 32px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 48px; }

.hero-stats {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 14px;
  border-top: 1px solid var(--rule);
  padding-top: 28px;
}
@media (min-width: 820px) { .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.hero-stats li { font-size: 15px; color: var(--muted); }
.hero-stats .tag { display: block; margin-bottom: 6px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--ite-font-sans);
  font-size: 15px; font-weight: 600;
  padding: 15px 28px; border-radius: 12px;
  border: 1px solid transparent; cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--ite-keyword-blue); color: #fff; }
.btn-primary:hover { background: #0b4a75; }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { border-color: var(--rule); color: var(--ite-editor-ink); background: #fff; }
.btn-ghost:hover { border-color: var(--ite-keyword-blue); color: var(--ite-keyword-blue); }
.btn-block { width: 100%; }

/* ---------- sections ---------- */

.band { padding: 80px 0; border-bottom: 1px solid var(--rule); }
.band.alt { background: var(--ite-comment-gray); }

h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.15;
  margin: 0 0 14px;
}
h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 8px; }

.section-lede { color: var(--muted); max-width: 60ch; margin: 0 0 40px; }

.note {
  margin: 40px 0 0; padding: 20px 24px;
  border-left: 3px solid var(--ite-then-green);
  background: #fff; border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted); max-width: 68ch;
}
.band.alt .note { background: #fff; }
.note strong { color: var(--ite-editor-ink); }

/* ---------- tags ---------- */

.tag {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ite-keyword-blue);
}
.tag.orange { color: var(--ite-scope-orange); }
.tag.green { color: var(--ite-then-green); }

/* ---------- cards ---------- */

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 26px 24px;
}
.card p:last-child { margin-bottom: 0; }
.card > .tag { margin: 0 0 12px; }
.card p { color: var(--muted); margin: 0; }
.card h3 { color: var(--ite-editor-ink); }

/* ---------- steps ---------- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.step {
  display: grid; grid-template-columns: 64px 1fr;
  gap: 20px; align-items: start;
  padding: 26px 0; border-top: 1px solid var(--rule);
}
.step:last-child { border-bottom: 1px solid var(--rule); }
.step-no {
  font-size: 26px; font-weight: 600;
  color: var(--ite-keyword-blue);
  line-height: 1.1; padding-top: 2px;
}
.step-body p { color: var(--muted); margin: 0 0 10px; max-width: 62ch; }
.step-body .outcome { margin: 0; color: var(--ite-editor-ink); font-size: 15px; }
.outcome .tag { margin-right: 8px; }

@media (max-width: 560px) {
  .step { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- ladder ---------- */

.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: rung; }
.ladder li {
  display: grid; grid-template-columns: 168px 1fr; gap: 20px; align-items: baseline;
  background: var(--ite-comment-gray);
  border-radius: 12px; padding: 18px 22px;
}
.band.alt .ladder li { background: #fff; }
.ladder li span:last-child { color: var(--muted); }
.rung {
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em;
  color: var(--ite-keyword-blue);
}
.ladder li:nth-child(1) .rung { color: var(--ite-then-green); }
@media (max-width: 620px) {
  .ladder li { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- honest panel ---------- */

.honest {
  margin-top: 40px; padding: 30px 28px;
  background: #fff; border: 1px solid var(--rule);
  border-top: 3px solid var(--ite-scope-orange);
  border-radius: var(--radius);
}
.honest .tag { margin: 0 0 10px; }
.honest p:last-child { color: var(--muted); margin: 0; max-width: 70ch; }

/* ---------- form ---------- */

.cta { background: var(--ite-white); }

.form { display: grid; gap: 20px; margin-top: 8px; }
.field { display: grid; gap: 8px; }

.label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.opt { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: .7; }

input[type="text"], input[type="email"], textarea {
  width: 100%;
  font-family: var(--ite-font-sans); font-size: 16px; color: var(--ite-editor-ink);
  background: #fff;
  border: 1px solid rgba(30, 30, 30, 0.18);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--ite-keyword-blue);
  box-shadow: 0 0 0 4px rgba(14, 91, 143, 0.10);
}
input.invalid, textarea.invalid { border-color: var(--ite-scope-orange); }

/* honeypot — visually and audibly gone, still fillable by bots */
.hp {
  position: absolute; left: -9999px; top: 0;
  height: 0; width: 0; overflow: hidden;
}

.bot {
  background: rgba(218, 91, 43, 0.05);
  border: 1px solid rgba(218, 91, 43, 0.25);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: grid; gap: 12px;
}
.bot .tag { margin: 0; }
.bot-q { margin: 0; font-size: 15px; color: var(--muted); }
.bot-q strong { color: var(--ite-scope-orange); }
.phrase {
  display: block; margin-top: 8px;
  font-size: 15px; font-style: italic; color: var(--ite-editor-ink);
}

.status { margin: 0; font-size: 14px; min-height: 20px; }
.status.ok { color: var(--ite-then-green); font-weight: 600; }
.status.bad { color: var(--ite-scope-orange); font-weight: 600; }
.status.ok::before { content: "// "; font-family: var(--ite-font-mono); }
.status.bad::before { content: "!! "; font-family: var(--ite-font-mono); }

.privacy { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- footer ---------- */

.site-footer { padding: 44px 0 56px; }
.footer-inner { display: flex; align-items: center; gap: 18px; }
.insignia { height: 40px; width: auto; }
.small { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.footer-inner .comment { margin: 0; }

@media (max-width: 700px) {
  .nav a:not(.nav-cta) { display: none; }
  .band, .hero { padding: 56px 0; }
}
