/* Northline Code homepage. Job-ticket functionalism: paper, ink, one red stamp.
   Flat color only. Every corner square. No shadows. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 700 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-var.woff2") format("woff2");
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plexmono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plexmono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #FAF6EF;
  --ink: #101214;
  --red: #C93A2E;
  --red-text: #B92F24;
  --hair: #DCD4C6;
  --quiet: rgba(16, 18, 20, 0.72);
  --paper-quiet: rgba(250, 246, 239, 0.72);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--red); color: var(--paper); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.wrap { max-width: 1228px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.mono, .eyebrow, .sec-label, .tabs button, .tag, .ticket, .stat-label, .wordmark {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

/* ---------- top bar ---------- */
.topbar { border-bottom: 1px solid var(--hair); }
.topbar-in { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.wordmark {
  font-size: 14px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; display: inline-flex; align-items: center; gap: 10px; margin-right: auto;
}
.wm-box { width: 9px; height: 9px; background: var(--red); flex: none; }
.topnav { display: flex; gap: 26px; }
.topnav a { font-size: 15px; text-decoration: none; padding: 4px 0; }
.topnav a:hover { color: var(--red); }
.btn {
  display: inline-block; background: var(--ink); color: var(--paper);
  text-decoration: none; font-weight: 500; font-size: 15px;
  padding: 10px 18px; border: none; cursor: pointer;
  box-shadow: inset 0 0 0 0 var(--red);
  transition: box-shadow 160ms ease-out;
}
.btn:hover { box-shadow: inset 0 -3px 0 0 var(--red); }

/* ---------- hero ---------- */
.hero { display: flex; flex-direction: column; padding-top: 46px; }
.greeting { font-weight: 500; margin: 0; }
.eyebrow {
  color: var(--red-text); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  margin: 16px 0 12px;
}
.hero h1 {
  font-family: "Archivo", sans-serif; font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: -0.01em;
  margin: 0 0 20px; max-width: 21ch;
}
.s1, .s2 { margin: 0 0 12px; max-width: 62ch; }
.actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 14px 0 0; }
.btn-big { padding: 15px 28px; font-size: 16px; }
.email-inline { font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--hair); padding-bottom: 2px; }
.email-inline:hover { color: var(--red); border-bottom-color: var(--red); }
.small-line { font-size: 14px; color: var(--ink); margin: 18px 0 0; }
.email-narrow { display: none; }

/* ---------- demo: tabs, stamp, frame ---------- */
.demo { margin-top: 42px; }
.tabs { display: flex; align-items: flex-end; gap: 4px; flex-wrap: wrap; }
.tabs button {
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  background: none; border: none; padding: 10px 14px; cursor: pointer;
  color: var(--quiet); box-shadow: inset 0 -2px 0 0 transparent;
  transition: box-shadow 160ms ease-out, color 160ms ease-out;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 500; box-shadow: inset 0 -3px 0 0 var(--red); }
.swipe-label {
  display: none; font-family: "IBM Plex Mono", monospace; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--red-text);
  margin-left: auto; padding-bottom: 10px;
}
.frame-shell { width: 100%; margin: 0 auto; transition: width 600ms var(--ease-out); }
.frame-clip { margin-top: 10px; }
.frame-box {
  border: 1px solid var(--hair); background: #FFFFFF;
  height: 580px; transition: height 350ms ease-out;
}
.frame-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.demo[data-view="phone"] .frame-shell { width: 380px; max-width: 100%; }
.demo[data-view="phone"] .frame-box { height: 900px; }
@media (min-width: 649px) and (max-width: 1048px) {
  .demo[data-view="computer"] .frame-box { height: 836px; }
}

/* stats panel */
.stats {
  border: 1px solid var(--hair); background: var(--paper);
  padding: 30px 28px 26px; margin-top: 10px;
}
.stats-wait { font-size: 15px; color: var(--quiet); margin: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.stat-label {
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--quiet); margin: 0 0 8px;
}
.stat-value {
  font-family: "Archivo", sans-serif; font-weight: 700;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.1; margin: 0;
  animation: statIn 200ms ease-out;
}
.stat-unit {
  font-family: "IBM Plex Mono", monospace; font-weight: 400;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--quiet);
}
.stat + .stat { border-left: 1px solid var(--hair); padding-left: 28px; }
@keyframes statIn { from { opacity: 0; } to { opacity: 1; } }
.stats-note { font-size: 15px; margin: 20px 0 0; max-width: 68ch; }
.stats-method { font-size: 14px; color: var(--quiet); margin: 20px 0 0; max-width: 68ch; }
.caption { font-size: 14px; color: var(--quiet); margin: 14px 0 0; max-width: 76ch; }
.cap-narrow { display: none; }

/* ---------- ticket strip ---------- */
.ticket {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  margin-top: 52px;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
.ticket span { padding: 16px 18px; }
.ticket span + span { border-left: 1px solid var(--hair); }

/* ---------- sections ---------- */
.section { padding-top: 62px; }
.sec-head { margin-bottom: 10px; }
.sec-label {
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--quiet); margin: 0 0 8px;
}
.sec-head h2 {
  font-family: "Archivo", sans-serif; font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.3rem); line-height: 1.1; margin: 0 0 16px;
}
.rule { height: 1px; background: var(--hair); }
.js .sec-head .rule { transform: scaleX(0); transform-origin: left; transition: transform 500ms ease-out; }
.js .sec-head h2 { transform: translateY(10px); opacity: 0; transition: transform 500ms ease-out, opacity 500ms ease-out; }
.js .sec-head.in .rule { transform: scaleX(1); }
.js .sec-head.in h2 { transform: translateY(0); opacity: 1; }

/* ---------- index rows (Builds and Cost) ---------- */
.rows { border-bottom: 1px solid var(--hair); }
.rows .row:first-child { border-top: none; }
.steps li:first-child { border-top: none; }
.qa-item:first-child { border-top: none; }
.row {
  position: relative; display: flex; align-items: flex-start; gap: 22px;
  padding: 26px 8px; border-top: 1px solid var(--hair);
  text-decoration: none; overflow: hidden;
}
a.row::before {
  content: ""; position: absolute; inset: 0; background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform 250ms ease-out; z-index: 0;
}
a.row:hover::before, a.row:focus-visible::before { transform: scaleX(1); }
.row > * { position: relative; z-index: 1; }
.row-num {
  font-family: "IBM Plex Mono", monospace; font-size: 15px; color: var(--quiet);
  transition: color 250ms ease-out; margin-top: 13px;
}
a.row:hover .row-num, a.row:focus-visible .row-num { color: var(--paper); }
.row-main { display: block; margin-right: auto; max-width: 72ch; }
.row-name {
  display: block; font-family: "Archivo", sans-serif; font-weight: 700;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.12;
  transition: color 250ms ease-out;
}
.row-line { display: block; margin-top: 6px; transition: color 250ms ease-out; }
a.row:hover .row-name, a.row:focus-visible .row-name,
a.row:hover .row-line, a.row:focus-visible .row-line { color: var(--paper); }
.tag {
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--ink); padding: 6px 10px; white-space: nowrap;
  margin-top: 7px; transition: color 250ms ease-out, border-color 250ms ease-out;
}
.tag-sample { border-color: var(--red-text); color: var(--red-text); }
a.row:hover .tag, a.row:focus-visible .tag { border-color: var(--paper); color: var(--paper); }
.row-arrow { font-size: 22px; margin-top: 4px; color: var(--quiet); transition: color 250ms ease-out; }
a.row:hover .row-arrow, a.row:focus-visible .row-arrow { color: var(--red); }
.index-note, .cost-line { font-size: 15px; margin: 20px 0 0; max-width: 72ch; }
.cost-line a { font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--hair); }
.cost-line a:hover { color: var(--red); border-bottom-color: var(--red); }

/* ---------- steps ---------- */
.steps { list-style: none; margin: 6px 0 0; padding: 0; }
.steps li {
  display: flex; gap: 26px; padding: 22px 0; border-top: 1px solid var(--hair);
}
.steps li:last-child { border-bottom: 1px solid var(--hair); }
.step-num {
  font-family: "Archivo", sans-serif; font-weight: 800; font-size: 1.35rem;
  line-height: 1.2; color: var(--ink); min-width: 52px;
}
.steps h3 { font-family: "Archivo", sans-serif; font-weight: 700; font-size: 1.15rem; margin: 0 0 4px; }
.steps p { margin: 0; max-width: 62ch; }

/* ---------- straight answers ---------- */
.qa-item { padding: 24px 0; border-top: 1px solid var(--hair); }
.qa-item:last-child { border-bottom: 1px solid var(--hair); }
.qa-item h3 {
  font-family: "Archivo", sans-serif; font-weight: 700; font-size: 1.3rem;
  margin: 0 0 8px;
}
.qa-item p { margin: 0; max-width: 68ch; }

/* ---------- closing block ---------- */
.closing {
  background: var(--ink); color: var(--paper);
  margin-top: 78px; padding: 74px 0 42px;
  border-top: 3px solid var(--red);
}
.closing-cta {
  display: block; font-family: "Archivo", sans-serif; font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 5.4rem); line-height: 1.02; letter-spacing: -0.01em;
  color: var(--paper); text-decoration: none; margin-bottom: 22px;
}
.closing-cta:hover { color: var(--red); }
.closing-email {
  font-size: clamp(1.05rem, 2.6vw, 1.5rem); font-weight: 500; color: var(--paper);
  text-decoration: none; border-bottom: 1px solid rgba(250, 246, 239, 0.4); padding-bottom: 3px;
}
.closing-email:hover { color: var(--red); border-bottom-color: var(--red); }
.closing-line { color: var(--paper-quiet); margin: 20px 0 0; }
.closing-small {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 56px; padding-top: 18px; border-top: 1px solid rgba(250, 246, 239, 0.25);
  font-family: "IBM Plex Mono", monospace; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper-quiet);
}

/* ---------- touch: the iframe never traps a swipe ---------- */
@media (hover: none) {
  .frame-box iframe { pointer-events: none; }
  .row-arrow { color: var(--red); }
  a.row:hover::before { transform: scaleX(0); }
  a.row:hover .row-name, a.row:hover .row-line { color: inherit; }
  a.row:hover .row-num { color: var(--quiet); }
  a.row:hover .row-arrow { color: var(--red); }
  a.row:hover .tag { border-color: var(--ink); color: inherit; }
  a.row:hover .tag-sample { border-color: var(--red-text); color: var(--red-text); }
}

/* ---------- narrow: under 900 ---------- */
@media (max-width: 899px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  .topbar-in { min-height: 56px; gap: 16px; }
  .topnav { gap: 18px; }
  .hero { padding-top: 20px; }
  .eyebrow { margin: 10px 0 8px; }
  .hero h1 { margin-bottom: 12px; }
  .s1 { margin-bottom: 8px; }
  .actions { margin-top: 8px; }
  .tabs button { padding: 8px 9px; letter-spacing: 0.04em; }
  .greeting { order: 1; } .eyebrow { order: 2; } .hero h1 { order: 3; }
  .s1 { order: 4; } .actions { order: 5; } .demo { order: 6; }
  .s2 { order: 7; } .email-narrow { order: 8; } .small-line { order: 9; }
  .s2 { margin-top: 18px; }
  .email-inline { display: none; }
  .email-narrow { display: block; margin: 16px 0 0; }
  .email-narrow a { font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--hair); }
  .small-line { margin-top: 12px; }
  .demo { margin-top: 16px; }
  .cap-wide { display: none; } .cap-narrow { display: inline; }
  /* phone view between 561 and 899: the whole sample fits, no window */
  /* computer view: real 1100px layout, sideways swipe */
  .demo[data-view="phone"] .frame-shell { width: 100%; }
  .demo[data-view="computer"] .frame-clip { overflow-x: auto; }
  .demo[data-view="computer"] .frame-box { width: 1100px; height: 580px; }
  .demo[data-view="computer"] .swipe-label { display: block; }
  .stats-grid { grid-template-columns: 1fr; gap: 20px; }
  .stat + .stat { border-left: none; border-top: 1px solid var(--hair); padding-left: 0; padding-top: 20px; }
  .ticket { grid-template-columns: 1fr; margin-top: 40px; }
  .ticket span { padding: 13px 18px; }
  .ticket span + span { border-left: none; border-top: 1px solid var(--hair); }
  .section { padding-top: 48px; }
  .row { flex-wrap: wrap; gap: 10px 16px; padding: 22px 4px; }
  .row-num { order: 1; margin-top: 8px; } .tag { order: 2; margin-left: auto; margin-top: 0; }
  .row-main { order: 3; flex-basis: 100%; }
  .row-arrow { order: 2; margin-top: 2px; }
  .steps li { gap: 18px; }
  .closing { padding: 56px 0 36px; }
}

/* ---------- small phones: under 560 ---------- */
@media (max-width: 559px) {
  .topnav { display: none; }
  .btn-top { display: none; }
  /* phone view: 300px window onto the fitting sample (the 390 by 844 budget) */
  .demo[data-view="phone"] .frame-clip { height: 300px; overflow: hidden; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .sec-head .rule { transform: none; }
  .js .sec-head h2 { transform: none; opacity: 1; }
}
