/* Tally landing — Tally Dark, token-for-token fra docs/design/ (DESIGN.md + DESIGN.md).
   Sora display · Hanken Grotesk body · JetBrains Mono tal. Statisk, intet build-step. */

:root {
  --ink: #181B22;
  --surface: #1C2028;
  --surface-2: #20242D;
  --deep: #14171D;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.12);

  --text: #F2ECE3;
  --sub: #C9C2B6;
  --faint: #9F988D;
  --muted: #7C7468;

  --coral: #EC8C63;
  --coral-deep: #D2683F;
  --lilac: #C9A7CE;
  --sky: #8FB6D8;
  --green: #8FCBA1;
  --green-deep: #3C7A57;

  --receipt: #FBF6F1;
  --receipt-ink: #23291F;
  --receipt-body: #3A352D;
  --receipt-muted: #8A8175;
  --receipt-line: rgba(35, 41, 31, 0.12);

  --grad-hero: linear-gradient(155deg, #F4C6A2 0%, #EC9A78 52%, #C9A7CE 100%);
  --glow-coral: 0 6px 18px rgba(236, 140, 99, 0.26);
  --shadow-card: 0 24px 60px -22px rgba(0, 0, 0, 0.5);

  --sora: 'Sora', system-ui, sans-serif;
  --hanken: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 16px/1.6 var(--hanken);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--sora); font-weight: 600; letter-spacing: -0.02em; margin: 0; }
a { color: var(--coral); text-decoration: none; }
a:hover { color: var(--coral-deep); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: var(--hanken); cursor: pointer; }

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

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

/* ambient glød bag hero */
.glow {
  position: absolute;
  inset: 0 0 auto 0;
  height: 720px;
  pointer-events: none;
  background:
    radial-gradient(560px 420px at 18% -60px, rgba(236, 140, 99, 0.22), transparent 65%),
    radial-gradient(640px 480px at 85% 40px, rgba(201, 167, 206, 0.20), transparent 65%),
    radial-gradient(520px 420px at 55% 240px, rgba(143, 182, 216, 0.12), transparent 65%);
}

/* ---------- typografi-hjælpere ---------- */
.kicker {
  font: 550 11.5px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
h2 { font-size: clamp(26px, 4.5vw, 34px); line-height: 1.15; margin-bottom: 10px; }
.section-lede { color: var(--sub); max-width: 620px; margin: 0 0 34px; }
.muted { color: var(--faint); }
.mono-path, .mono-inline { font: 500 0.86em var(--mono); color: var(--sub); }

/* ---------- knapper ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 650 15px/1 var(--hanken);
  border-radius: 11px;
  padding: 13px 22px;
  white-space: nowrap;
}
.btn-primary { background: var(--coral); color: var(--ink); box-shadow: var(--glow-coral); }
.btn-primary:hover { background: var(--coral-deep); color: var(--ink); }
.btn-ghost { border: 1px solid var(--hairline-strong); color: var(--sub); }
.btn-ghost:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.25); }
.btn-small { padding: 9px 14px; font-size: 13.5px; border-radius: 9px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.cta-center { justify-content: center; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap { display: flex; align-items: center; gap: 26px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { border-radius: 8px; }
.wordmark { font: 600 19px/1 var(--sora); letter-spacing: -0.02em; color: var(--text); }
.wordmark em { font-style: normal; color: var(--faint); }
/* Early access-mærket ved wordmarket — samme pille-idiom som appens .beta
   (mono, coral outline). */
.early-badge {
  font: 550 10.5px/1 var(--mono);
  color: var(--coral);
  border: 1px solid var(--coral);
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
}
@media (max-width: 560px) { .early-badge { display: none; } }
.site-nav { display: none; gap: 22px; }
.site-nav a { font: 500 14.5px/1 var(--hanken); color: var(--faint); }
.site-nav a:hover { color: var(--text); }
.nav-cta { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.lang-pill {
  display: flex;
  background: var(--deep);
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  padding: 3px;
}
.lang-pill button {
  font: 600 11.5px/1 var(--mono);
  color: var(--faint);
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
}
.lang-pill button[aria-pressed='true'] { background: var(--coral); color: var(--ink); }
.lang-pill button:not([aria-pressed='true']):hover { color: var(--text); }

/* smal telefon: sektions-CTA'erne dækker login — pillen og Kom i gang vinder */
@media (max-width: 460px) { .nav-cta .btn-ghost { display: none; } }

@media (min-width: 820px) { .site-nav { display: flex; } }

/* ---------- hero ---------- */
.hero { position: relative; padding: 60px 0 56px; }

.hero h1 { font-size: clamp(34px, 6vw, 52px); line-height: 1.06; letter-spacing: -0.025em; }
.hero h1 em {
  font-style: normal;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede { color: var(--sub); font-size: clamp(16px, 2.4vw, 18.5px); max-width: 480px; margin: 18px 0 0; }

/* centered copy above the animated stage (wireframe 2b) */
.hero-copy-center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero-copy-center .lede { max-width: 560px; }
.cta-center { justify-content: center; }

/* ---------- the stage: chat  ⟶  day-table ---------- */
.hero-stage {
  margin: 34px auto 0;
  max-width: 920px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  align-content: start;
  /* reserve the final height so the sections below never jump as the demo plays/loops */
  min-height: 760px;
}
@media (min-width: 860px) {
  .hero-stage { grid-template-columns: 1fr auto 1fr; gap: 16px; min-height: 470px; }
}

.hero-bridge {
  display: none;
  align-self: center;
  font-size: 20px;
  color: var(--coral);
  animation: bridgePulse 2.6s ease-in-out infinite;
}
@media (min-width: 860px) { .hero-bridge { display: block; } }
@keyframes bridgePulse {
  0%, 100% { opacity: 0.45; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(3px); }
}

/* --- Claude chat panel --- */
.hero-chat {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 404px;
}
@media (min-width: 860px) { .hero-chat { height: 470px; } }
.hero-chat-head {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--hairline);
  font: 550 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint);
}
.hero-chat-head .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--coral); }
.hero-chat-scroll {
  flex: 1;
  min-height: 0; /* let it scroll inside the fixed-height panel instead of growing it */
  padding: 14px;
  display: flex; flex-direction: column; gap: 9px;
  overflow: hidden;
  scroll-behavior: smooth;
}
.hero-chat-placeholder { margin: auto 0 4px; color: var(--muted); font-size: 13.5px; }

.hero-msg {
  margin: 0; max-width: 88%; font-size: 13.5px; line-height: 1.45;
  opacity: 0; transform: translateY(6px);
  animation: msgIn 0.34s ease forwards;
}
@keyframes msgIn { to { opacity: 1; transform: none; } }
.hero-msg.you {
  align-self: flex-end;
  background: var(--surface-2); border: 1px solid var(--hairline);
  border-radius: 13px 13px 4px 13px; padding: 8px 12px; color: var(--text);
}
.hero-msg.bot {
  align-self: flex-start;
  background: var(--deep); border: 1px solid var(--hairline);
  border-radius: 13px 13px 13px 4px; padding: 8px 12px; color: var(--sub);
}
.hero-msg.bot b { color: var(--text); }
.hero-msg .caret { border-right: 2px solid var(--coral); animation: caret 0.8s step-end infinite; }
@keyframes caret { 50% { border-color: transparent; } }
.hero-msg .arrow { color: var(--coral); }

/* photo attachment in a user bubble */
.hero-photo {
  align-self: flex-end;
  width: 128px; border-radius: 12px; border: 1px solid var(--hairline);
  display: block; opacity: 0; transform: translateY(6px);
  animation: msgIn 0.34s ease forwards;
}

/* in-chat component table — the estimation depth */
.hero-breakdown {
  align-self: stretch;
  background: var(--receipt); color: var(--receipt-ink);
  border-radius: 10px; padding: 8px 10px;
  font: 450 10.5px/1.25 var(--mono); font-variant-numeric: tabular-nums;
  opacity: 0; transform: translateY(6px); animation: msgIn 0.34s ease forwards;
}
.hero-breakdown .bd-title {
  font: 550 9.5px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--receipt-muted); margin-bottom: 5px;
}
.hero-breakdown .bd-row { display: grid; gap: 1px 6px; align-items: baseline; }
.hero-breakdown .bd-row > span:first-child { text-align: left; font-family: var(--hanken); font-size: 11px; color: var(--receipt-body); }
.hero-breakdown .bd-row > span { text-align: right; white-space: nowrap; }
.hero-breakdown .bd-total { border-top: 1px solid var(--receipt-line); margin-top: 3px; padding-top: 3px; font-weight: 650; }
.hero-breakdown .bd-total > span:first-child { color: var(--receipt-ink); font-weight: 600; }
.hero-breakdown .bd-note { margin-top: 6px; color: var(--receipt-muted); font-family: var(--hanken); font-size: 11px; }

/* --- day-table panel (reuses receipt tokens) --- */
.hero-day {
  background: var(--receipt);
  color: var(--receipt-ink);
  border-radius: 16px;
  padding: 16px 18px 18px;
  box-shadow: var(--shadow-card);
  /* hold one constant size — rows fill into reserved space, the card never resizes */
  min-height: 340px;
}
.hero-day table { width: 100%; border-collapse: collapse; }
.hero-day th {
  font: 550 10.5px/1 var(--mono);
  color: var(--receipt-muted);
  text-align: right; padding: 0 0 6px 8px;
  border-bottom: 1px solid var(--receipt-line);
}
.hero-day th:first-child { width: 42%; text-align: left; }
.hero-day td {
  padding: 6.5px 0 6.5px 8px;
  font: 450 12.5px/1 var(--mono); font-variant-numeric: tabular-nums;
  text-align: right; white-space: nowrap; color: var(--receipt-ink);
}
.hero-day td.label {
  padding-left: 0; font: 500 13px/1.3 var(--hanken); color: var(--receipt-body);
  text-align: left; white-space: normal;
}
.hero-day tr.topline > td { border-top: 1px solid var(--receipt-line); }
.hero-day tr.sum td { font-weight: 650; }
.hero-day tr.sum td.label { font-weight: 650; color: var(--receipt-ink); }
.hero-day tr.motion td { color: var(--coral-deep); }
.hero-day tr.motion td.label { color: var(--receipt-body); }
.hero-day tr.muted-row td { color: var(--receipt-muted); font-weight: 450; }
.hero-day tr.muted-row td.label { color: var(--receipt-muted); font-weight: 500; }
.hero-day tr.tilbage td { color: var(--green-deep); }
.hero-day tr.tilbage td.label { color: var(--receipt-ink); }
.hero-day tr .net { font-weight: 650; }

/* rows are hidden until they land; totals collapse until first relevant log */
.hero-day tr.is-collapsed { display: none; }
.hero-day tr.landing td { animation: rowLand 0.5s ease; }
@keyframes rowLand {
  0% { background: rgba(236, 140, 99, 0.34); }
  100% { background: transparent; }
}
.hero-day td.bump { animation: cellBump 0.45s ease; }
@keyframes cellBump {
  0% { color: var(--coral-deep); }
  100% { color: inherit; }
}

/* the kcal chip that flies from the chat over to the landing row */
.hero-fly {
  position: fixed; z-index: 60; pointer-events: none;
  font: 650 12.5px/1 var(--mono); font-variant-numeric: tabular-nums;
  color: #fff; background: var(--coral-deep);
  padding: 3px 8px; border-radius: 999px;
  box-shadow: var(--glow-coral);
  will-change: transform, opacity;
}

/* ---------- chat-kort ---------- */
.chat-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 16px 18px;
  display: grid;
  gap: 10px;
}
.msg { margin: 0; max-width: 92%; font-size: 14.5px; line-height: 1.5; }
.msg.you {
  justify-self: end;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 14px 14px 4px 14px;
  padding: 9px 14px;
  color: var(--text);
}
.msg.tally {
  justify-self: start;
  background: var(--deep);
  border: 1px solid var(--hairline);
  border-radius: 14px 14px 14px 4px;
  padding: 9px 14px;
  color: var(--sub);
}
.msg.tally b { color: var(--text); }
.ex-title {
  margin: 0 0 2px;
  font: 550 11px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- kvitteringen ---------- */
.receipt {
  background: var(--receipt);
  color: var(--receipt-ink);
  border-radius: 16px;
  padding: 16px 18px 18px;
  box-shadow: var(--shadow-card);
}
.receipt-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font: 550 11px/1.3 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--receipt-muted);
}
.receipt table { width: 100%; border-collapse: collapse; }
.receipt th {
  font: 550 10.5px/1 var(--mono);
  color: var(--receipt-muted);
  text-align: right;
  padding: 0 0 6px 8px;
  border-bottom: 1px solid var(--receipt-line);
}
.receipt th:first-child { width: 34%; }
.receipt td {
  padding: 6.5px 0 6.5px 8px;
  font: 450 12.5px/1 var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
  color: var(--receipt-ink);
}
.receipt td.label {
  padding-left: 0;
  font: 500 13.5px/1.35 var(--hanken);
  color: var(--receipt-body);
  text-align: left;
  white-space: normal;
}
.receipt tr.topline > td { border-top: 1px solid var(--receipt-line); }
.receipt tr.sum td { font-weight: 650; }
.receipt tr.sum td.label { font-weight: 650; color: var(--receipt-ink); }
.receipt tr.motion td { color: var(--coral-deep); }
.receipt tr.motion td.label { color: var(--receipt-body); }
.receipt tr.muted-row td { color: var(--receipt-muted); font-weight: 450; }
.receipt tr.muted-row td.label { color: var(--receipt-muted); font-weight: 500; }
.receipt tr.tilbage td { color: var(--green-deep); }
.receipt tr.tilbage td.label { color: var(--receipt-ink); }

/* ---------- sektioner ---------- */
section { padding: 56px 0; }
.setup { padding-top: 64px; }

/* ---------- opsætning ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.step {
  display: grid;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: 24px;
  align-items: center;
}
@media (min-width: 860px) {
  .step { grid-template-columns: 0.9fr 1.1fr; padding: 28px; }
}
.step img {
  border-radius: 12px;
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-card);
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--grad-hero);
  color: var(--receipt-ink);
  font: 650 16px/1 var(--mono);
  margin-bottom: 14px;
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { margin: 0; color: var(--sub); }
.step-chat { align-self: stretch; align-content: center; }

.copyfield {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.copyfield code {
  flex: 1;
  min-width: 220px;
  font: 500 13.5px/1.2 var(--mono);
  color: var(--text);
  background: var(--ink);
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  padding: 12px 14px;
  overflow-x: auto;
  white-space: nowrap;
}
.copyfield button {
  font: 650 14px/1 var(--hanken);
  background: var(--coral);
  color: var(--ink);
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  box-shadow: var(--glow-coral);
}
.copyfield button:hover { background: var(--coral-deep); }

/* ---------- sådan virker det ---------- */
.feature-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .feature-grid { grid-template-columns: 1fr 1fr; gap: 16px; } }
.feature {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 22px 24px;
}
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--sub); font-size: 15px; }

/* ---------- dashboard ---------- */
.dash-shot {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--hairline-strong);
  box-shadow: 0 32px 80px -36px rgba(0, 0, 0, 0.7);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.dash-shot:hover { transform: translateY(-3px); border-color: rgba(236, 140, 99, 0.45); }
.dash .cta-row { margin-top: 30px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); padding: 26px 0 34px; }
.site-footer .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--muted);
}
.site-footer .spacer { flex: 1; }
.site-footer a { color: var(--faint); }
.site-footer a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* hero demo elements normally fade in via animation — without it they must
     start visible (hero.js renders the finished end-state statically). */
  .hero-msg, .hero-photo, .hero-breakdown { opacity: 1 !important; transform: none !important; }
  .hero-msg .caret { display: none; }
  .hero-bridge { opacity: 0.7; }
}

/* ---------- widescreen (LAYOUT-1 rev 2) ---------- */
/* Rigtige 16:9-monitorer (1440p+): 1080px-søjlen læste som en smal stribe i
   et kæmpe mørkt felt, og hero-demoen mistede sin "her ER produktet"-vægt.
   Sektionerne og scenen vokser med — moderat (1300px), ikke kant-til-kant:
   det er stadig en læseside. */
@media (min-width: 1600px) {
  :root { --maxw: 1300px; }
  .hero { padding: 84px 0 72px; }
  .hero h1 { font-size: 62px; }
  .lede { font-size: 19.5px; }
  .hero-copy-center .lede { max-width: 660px; }
  .hero-stage { max-width: 1200px; gap: 22px; min-height: 560px; }
  .hero-chat { height: 560px; }
  .section-lede { max-width: 720px; }
}
