/* Handoff's front page. Same type, colours and status language as the app itself (app/globals.css). */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #f2f3f5;
  --card: #ffffff;
  --ink: #0f1217;
  --ink-2: #4a5160;
  --ink-3: #5d6676;
  --line: #dfe2e8;
  --ready: #13733a;
  --out: #1b49c9;
  --late: #a85400;
  --bad: #b3261a;
  --keep: #2f3a4c;
  --charge: #6b6100;
  --on-ink: #ffffff;
  --ink-hover: #232a36;
  --shot-shadow: 0 1px 0 rgba(15, 18, 23, 0.05), 0 30px 70px -24px rgba(15, 18, 23, 0.3);
  --focus: #1b49c9;

  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 40px);
  --radius: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d0f13;
    --card: #15181e;
    --ink: #eef0f4;
    --ink-2: #b6bcc8;
    --ink-3: #8f97a6;
    --line: #292d36;
    --ready: #5fd38a;
    --out: #8fb0ff;
    --late: #f0ab55;
    --bad: #ff8a7d;
    --keep: #c3c9d4;
    --charge: #e4c95a;
    --on-ink: #0d0f13;
    --ink-hover: #d5d9e0;
    --shot-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 70px -24px rgba(0, 0, 0, 0.7);
    --focus: #8fb0ff;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--on-ink); padding: 10px 14px; border-radius: 10px; z-index: 20; }
.skip:focus { top: 12px; }

.held { background: var(--late); color: var(--on-ink); text-align: center; padding: 10px var(--gutter); font-weight: 600; font-size: 15px; }
.held a { color: inherit; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.brand img { border-radius: 7px; }
@media (prefers-color-scheme: dark) { .brand img { box-shadow: 0 0 0 1px var(--line); } }
.top-links { display: flex; align-items: center; gap: 6px; }

.quiet { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; padding: 12px 10px; border-radius: 10px; }
.quiet:hover { color: var(--ink); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 14px;
  background: var(--ink); color: var(--on-ink);
  font-weight: 650; font-size: 17px; letter-spacing: -0.005em; text-decoration: none;
  transition: background-color 160ms ease, transform 120ms ease;
}
.button:hover { background: var(--ink-hover); }
.button:active { transform: scale(0.98); }
.button.small { min-height: 44px; padding: 0 16px; font-size: 15px; border-radius: 12px; }
.button.invert { background: var(--on-ink); color: var(--ink); }
.button.invert:hover { background: color-mix(in srgb, var(--on-ink) 88%, var(--ink)); }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.cta-note { color: var(--ink-2); font-size: 15px; }
.email { font-weight: 600; color: var(--ink); user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }

/* Hero */
.hero { padding: clamp(48px, 9vw, 104px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.hero-grid { display: grid; gap: clamp(40px, 6vw, 64px); }
.hero-text { max-width: 640px; }
h1 {
  font-size: clamp(40px, 5.6vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 760;
  text-wrap: balance;
}
.late { color: var(--late); }
.lede { margin: 22px 0 32px; font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 34em; text-wrap: pretty; }
.hero-shot img, .screen img {
  border-radius: 14px;
  box-shadow: var(--shot-shadow);
  background: var(--card);
}
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; }
  /* The board runs off the right edge, the way it sits on a wide screen. */
  .hero-shot { width: min(820px, 56vw); }
}
@media (max-width: 999px) {
  /* Big enough to read on a phone: the board runs off the right edge instead of shrinking. */
  .hero-shot { margin-right: calc(-1 * var(--gutter)); }
  .hero-shot img { width: 165%; max-width: none; }
}

/* The blunt line, under the status strip the board uses */
.blunt { padding: clamp(56px, 9vw, 112px) 0; border-top: 1px solid var(--line); }
.statusbar { display: flex; gap: 4px; height: 8px; max-width: 520px; margin-bottom: 32px; }
.statusbar i { display: block; border-radius: 99px; }
.statusbar .s-ready { flex: 38; } .statusbar .s-keep { flex: 18; } .statusbar .s-out { flex: 13; }
.statusbar .s-charge { flex: 2.5; } .statusbar .s-late { flex: 3; } .statusbar .s-bad { flex: 3; }
.s-ready { background: var(--ready); } .s-keep { background: var(--keep); } .s-out { background: var(--out); }
.s-charge { background: var(--charge); } .s-late { background: var(--late); } .s-bad { background: var(--bad); }
.blunt-line { font-size: clamp(32px, 5vw, 56px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 740; max-width: 15em; text-wrap: balance; }
.blunt-sub { margin-top: 18px; font-size: clamp(17px, 1.8vw, 20px); color: var(--ink-2); max-width: 32em; }

/* Section headings */
h2 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.12; letter-spacing: -0.025em; font-weight: 720; }
.section-note { margin-top: 8px; color: var(--ink-2); }

/* How it works */
.steps { padding: clamp(56px, 8vw, 96px) 0; }
.step-list { list-style: none; padding: 0; margin-top: 36px; display: grid; gap: 14px; counter-reset: step; }
.step-list li {
  counter-increment: step;
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 24px 28px;
}
.step-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; right: 22px; top: 24px;
  font-size: 14px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.step-dot { display: block; width: 12px; height: 12px; border-radius: 50%; margin-bottom: 22px; }
.step-list h3 { font-size: 20px; letter-spacing: -0.015em; font-weight: 680; margin-bottom: 8px; }
.step-list p { color: var(--ink-2); font-size: 16px; }
@media (min-width: 720px) { .step-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .step-list { grid-template-columns: repeat(4, 1fr); } }

/* Real screens */
.screens { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.screen-grid { margin-top: 36px; display: grid; gap: 40px 28px; grid-template-columns: 1fr 1fr; align-items: start; }
.screen.wide { grid-column: 1 / -1; }
.screen.phone img { border-radius: 22px; }
.screen figcaption { margin-top: 14px; font-size: 15px; color: var(--ink-2); }
@media (min-width: 900px) {
  .screen-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 2.4fr) minmax(0, 2.4fr); }
  .screen.wide { grid-column: auto; }
}

/* What it does */
.does { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.does-grid, .faq-grid { display: grid; gap: 28px; }
.does-list { list-style: none; padding: 0; display: grid; gap: 0; }
.does-list li { padding: 18px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.does-list li:last-child { border-bottom: 1px solid var(--line); }
.does-list strong { color: var(--ink); font-weight: 650; }
@media (min-width: 900px) {
  .does-grid, .faq-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; }
  .does-list { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .does-list li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}

/* Questions */
.faq { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.faq-list { display: grid; gap: 0; }
.faq-list > div { padding: 20px 0; border-top: 1px solid var(--line); }
.faq-list > div:last-child { border-bottom: 1px solid var(--line); }
.faq-list dt { font-weight: 650; font-size: 18px; letter-spacing: -0.01em; }
.faq-list dd { margin-top: 6px; color: var(--ink-2); }

/* Closing */
.close { padding: 0 0 clamp(56px, 8vw, 96px); }
.close-card { background: var(--ink); color: var(--on-ink); border-radius: 28px; padding: clamp(36px, 6vw, 72px) clamp(24px, 6vw, 72px); }
.close-card h2 { font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -0.035em; margin: 10px 0 28px; }
.origin { color: color-mix(in srgb, var(--on-ink) 70%, var(--ink)); font-size: 17px; }
.close-card .cta-note { color: color-mix(in srgb, var(--on-ink) 70%, var(--ink)); }
.close-card .email { color: var(--on-ink); }
.close-card :focus-visible { outline-color: var(--on-ink); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 15px; color: var(--ink-2); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.foot .quiet { padding: 12px 0; margin-left: auto; }
.foot .email { font-weight: 500; color: var(--ink-2); }

@media (max-width: 520px) {
  .top-links .quiet { padding: 12px 6px; font-size: 14px; }
  .button.small { padding: 0 14px; }
  .foot .quiet { margin-left: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-text, .hero-shot { animation: rise 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-shot { animation-delay: 120ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
