/*
 * Uruz — presentation site.
 *
 * Uses the same design tokens as the app itself (deep night background, warm
 * rune-gold accent), so the site and the product read as one thing.
 */

:root {
  --bg: #0b1016;
  --bg-elev: #121a24;
  --bg-elev-2: #1a2432;
  --border: #24313f;
  --border-strong: #33465a;

  --text: #f2f4f7;
  --muted: #9fb0c0;
  --faint: #6b7c8c;

  --accent: #e0a83e;
  --accent-strong: #f2bd53;
  --accent-soft: #3a2f18;
  --on-accent: #17130a;

  --success: #4ec48a;
  --success-soft: #163127;
  --danger: #d9615a;
  --danger-soft: #331c1b;
  --info: #5aa0d9;

  --maxw: 1120px;
  --radius: 16px;

  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle rune texture, same motif as the app */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23e0a83e' stroke-width='2'%3E%3Cpath d='M20 10v40M20 20l14 10'/%3E%3Cpath d='M80 70v40M80 110l14-10M80 90l14-10'/%3E%3Cpath d='M50 40l10 20 10-20'/%3E%3C/g%3E%3C/svg%3E");
}

.wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

.tabnum { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- nav ---- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); font-size: 1.05rem; }
.brand .rune {
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 18px;
}
.nav-links { display: flex; gap: 26px; align-items: center; font-size: .92rem; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 18px; border-radius: 11px; font-weight: 650; font-size: .92rem;
  border: 1px solid transparent; transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--accent-strong); color: var(--on-accent); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn.ghost:hover { border-color: var(--accent); background: transparent; }
@media (max-width: 800px) { .nav-links { display: none; } }

/* --------------------------------------------------------------- hero ---- */
.hero { padding: 88px 0 72px; position: relative; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(680px 340px at 18% 4%, rgba(224,168,62,.13), transparent 70%),
    radial-gradient(520px 320px at 88% 22%, rgba(90,160,217,.09), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

.eyebrow {
  /* inline-block, not flex: the label now contains a link, and as flex items
     the text and the link land on separate lines with a gap between them when
     the pill wraps on a phone. As inline text it simply wraps. */
  display: inline-block;
  font-size: .78rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 6px 13px; border-radius: 999px; font-weight: 600;
}
h1 {
  font-size: clamp(2.4rem, 5.6vw, 3.9rem); line-height: 1.06;
  letter-spacing: -.025em; font-weight: 800; margin: 22px 0 18px;
}
h1 .gold { color: var(--accent); }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 54ch; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin-top: 44px; background: var(--border);
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
}
.stat-strip div { background: var(--bg-elev); padding: 16px 14px; text-align: center; }
.stat-strip b { display: block; font-size: 1.45rem; color: var(--accent); font-weight: 750; }
.stat-strip span { font-size: .76rem; color: var(--faint); }
@media (max-width: 620px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }

/* ------------------------------------------------------------ sections --- */
section { padding: 84px 0; position: relative; }
.section-head { max-width: 62ch; margin-bottom: 44px; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.4rem); letter-spacing: -.02em; font-weight: 750; line-height: 1.18; }
h2 .gold { color: var(--accent); }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 1.03rem; }
.kicker {
  font-size: .76rem; letter-spacing: .11em; text-transform: uppercase;
  color: var(--faint); font-weight: 650; margin-bottom: 12px;
}
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }

/* ---------------------------------------------------------------- cards -- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 940px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-2px); }
.card .ico {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 15px;
}
.card h3 { font-size: 1.05rem; font-weight: 680; margin-bottom: 7px; }
.card p { color: var(--muted); font-size: .93rem; }

/* --------------------------------------------------------- phone frame --- */
.phone {
  width: 300px; border-radius: 38px; padding: 11px;
  background: linear-gradient(160deg, #2a3543, #131b25);
  box-shadow: 0 32px 70px -28px rgba(0,0,0,.92), 0 0 0 1px rgba(255,255,255,.05);
  flex-shrink: 0;
}
.phone-screen {
  background: var(--bg); border-radius: 29px; overflow: hidden;
  height: 588px; display: flex; flex-direction: column; position: relative;
}
.phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 106px; height: 22px; background: #0a0e13;
  border-radius: 0 0 13px 13px; z-index: 5;
}
.screen-body { flex: 1; overflow: hidden; padding: 32px 15px 12px; }
.screen-nav {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border); background: var(--bg-elev);
  padding: 8px 0 10px;
}
.screen-nav div { text-align: center; font-size: .58rem; color: var(--faint); }
.screen-nav div.on { color: var(--accent); }
.screen-nav i { display: block; font-size: .95rem; font-style: normal; margin-bottom: 2px; }

/* in-phone UI primitives (mirrors the app's tokens) */
.p-h1 { font-size: 1.15rem; font-weight: 750; letter-spacing: -.01em; }
.p-sub { font-size: .68rem; color: var(--muted); margin-top: 1px; }
.p-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 13px; padding: 11px;
}
.p-label { font-size: .55rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 650; }
.p-btn {
  background: var(--accent); color: var(--on-accent);
  border-radius: 11px; padding: 11px; text-align: center;
  font-weight: 700; font-size: .84rem;
}
.p-btn.sec { background: var(--bg-elev-2); color: var(--text); border: 1px solid var(--border-strong); font-weight: 600; }
.p-step {
  display: flex; align-items: center; gap: 4px;
}
.p-step .box {
  flex: 1; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-elev-2); display: grid; place-items: center;
  font-weight: 750; font-size: 1.05rem;
}
.p-step .pm {
  width: 34px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-elev-2); display: grid; place-items: center; color: var(--muted);
}
.p-set {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: 9px; padding: 7px 9px; font-size: .74rem;
}
.p-set.pr { border-color: var(--success); background: color-mix(in srgb, var(--success-soft) 60%, transparent); }
.p-progress { display: flex; gap: 3px; margin-top: 7px; }
.p-progress span { height: 3px; flex: 1; border-radius: 2px; background: var(--bg-elev-2); }
.p-progress span.done { background: var(--success); }
.p-progress span.now { background: var(--accent); }

/* ----------------------------------------------------------- showcase ---- */
.showcase { display: grid; grid-template-columns: 1fr auto; gap: 60px; align-items: center; }
.showcase.flip { grid-template-columns: auto 1fr; }
@media (max-width: 940px) {
  .showcase, .showcase.flip { grid-template-columns: 1fr; justify-items: center; gap: 36px; }
  .showcase .copy, .showcase.flip .copy { order: -1; }
}
.copy h3 { font-size: 1.55rem; font-weight: 720; letter-spacing: -.015em; margin-bottom: 12px; }
.copy p { color: var(--muted); margin-bottom: 14px; }
.tick { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }
.tick li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .94rem; }
.tick li::before {
  content: "✓"; color: var(--accent); font-weight: 800; flex-shrink: 0;
  line-height: 1.5;
}

/* ------------------------------------------------------------ mimir ------ */
.chat { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.msg { border-radius: 15px; padding: 14px 17px; font-size: .94rem; line-height: 1.62; }
.msg.user {
  align-self: flex-end; background: var(--bg-elev-2);
  border: 1px solid var(--border-strong); max-width: 82%;
}
.msg.mimir {
  background: var(--bg-elev); border: 1px solid var(--border); max-width: 92%;
}
.msg .who {
  font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 6px; display: block;
}
.change {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: 11px; padding: 11px 13px; margin-top: 9px;
}
.chip {
  font-size: .6rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; flex-shrink: 0; margin-top: 2px;
}
.chip.swap { background: var(--accent-soft); color: var(--accent); }
.chip.warn { background: var(--danger-soft); color: var(--danger); }
.change b { display: block; font-size: .88rem; font-weight: 620; }
.change span { font-size: .8rem; color: var(--muted); }
.note-medical {
  border: 1px solid color-mix(in srgb, var(--info) 40%, transparent);
  background: color-mix(in srgb, var(--info) 10%, transparent);
  color: var(--info); border-radius: 11px; padding: 11px 14px;
  font-size: .84rem; margin-top: 12px;
}

/* ------------------------------------------------------------- code ------ */
.code {
  background: #070b0f; border: 1px solid var(--border);
  border-radius: 13px; overflow: hidden; font-size: .87rem;
}
.code-head {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg-elev);
}
.code-head i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.code-head span { margin-left: 8px; font-size: .74rem; color: var(--faint); }
.code pre {
  padding: 16px 18px; overflow-x: auto; line-height: 1.75;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.code .c { color: var(--faint); }
.code .p { color: var(--accent); }
.code .s { color: var(--success); }

/* ------------------------------------------------------------ arch ------- */
.arch { display: flex; flex-direction: column; gap: 12px; }
.layer {
  border: 1px solid var(--border); border-radius: 13px;
  padding: 17px 20px; background: var(--bg-elev);
}
.layer.accent { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.layer h4 { font-size: .96rem; font-weight: 680; margin-bottom: 4px; display: flex; align-items: center; gap: 9px; }
.layer h4 em {
  font-style: normal; font-size: .62rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px;
}
.layer p { color: var(--muted); font-size: .88rem; }
.arrow { text-align: center; color: var(--faint); font-size: 1.05rem; line-height: 1; }

/* ------------------------------------------------------------ table ------ */
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--border); }
.tbl th { color: var(--faint); font-weight: 650; font-size: .76rem; letter-spacing: .07em; text-transform: uppercase; }
.tbl td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.tbl td { color: var(--muted); }
.tbl-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 13px; background: var(--bg-elev); }

/* ----------------------------------------------------------- footer ------ */
footer {
  border-top: 1px solid var(--border); padding: 44px 0 56px;
  color: var(--faint); font-size: .88rem;
}
.foot-grid { display: flex; justify-content: space-between; gap: 24px; align-items: center; flex-wrap: wrap; }

/* --------------------------------------------------------- animation ----- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Two code panels side by side, stacking on narrow screens so the commands
   stay readable rather than being clipped. */
.code-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 820px) { .code-pair { grid-template-columns: 1fr; } }

/* ------------------------------------------------------- language ------- */
/* Two documents rather than a toggle: each language is a real page with the
   right `lang`, which is what a screen reader and a search engine need. */
.nav-end { display: flex; align-items: center; gap: 14px; }
.lang {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden;
  font-size: .78rem; font-weight: 650; letter-spacing: .04em;
}
.lang > b, .lang > a { padding: 5px 9px; line-height: 1; }
.lang > b { background: var(--accent-soft); color: var(--accent); }
.lang > a { color: var(--muted); }
.lang > a:hover { color: var(--text); background: var(--bg-elev-2); }

/* ------------------------------------------------------ disclaimer ------ */
/* Deliberately plain and early: someone deciding whether to trust this with
   their training log should meet the warning before the feature list. */
.disclaimer {
  border: 1px solid color-mix(in srgb, #d98a4a 40%, transparent);
  background: color-mix(in srgb, #d98a4a 9%, transparent);
  color: var(--muted);
  border-radius: 13px; padding: 14px 18px; font-size: .92rem; line-height: 1.6;
  margin: 8px 0 32px;
}
.disclaimer b { color: #e0a166; font-weight: 650; }

.foot-note {
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border);
  color: var(--faint); font-size: .82rem; line-height: 1.6; max-width: 78ch;
}

/* -------------------------------------------------------- screenshots --- */
/* Real captures of the running app. They carry their intrinsic size so the
   page does not jump as they load, and they scroll sideways on a phone
   instead of shrinking to something nobody can read. */
.shots {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
}
.shots figure { margin: 0; }
.shots img {
  width: 100%; height: auto; display: block;
  border-radius: 20px; border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
}
.shots figcaption {
  margin-top: 12px; color: var(--muted); font-size: .88rem; text-align: center;
}
@media (max-width: 900px) { .shots { grid-template-columns: repeat(2, 1fr); gap: 18px; } }
@media (max-width: 560px) {
  .shots {
    display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: 10px; margin-inline: -24px; padding-inline: 24px;
  }
  .shots figure { flex: 0 0 72%; scroll-snap-align: center; }
}

/* ============================================================== desktop ====
 * The page was laid out mobile-first and then simply centred, so on a large
 * screen it read as a narrow column with two empty margins. These rules give
 * a wide screen something to do: the container grows with the viewport, the
 * type grows a step with it, and the sections breathe.
 *
 * Everything is a floor-and-ceiling clamp rather than a breakpoint jump, so
 * there is no width at which the layout visibly snaps.
 * ========================================================================= */
@media (min-width: 1280px) {
  :root {
    /* Grows from 1120 at 1280px wide to 1400 at roughly 1900px, then stops —
       past that, line lengths get harder to read rather than better. */
    --maxw: clamp(1120px, 78vw, 1400px);
  }

  .wrap { padding-inline: 40px; }
  section { padding: clamp(84px, 7vw, 116px) 0; }
  .hero { padding: clamp(88px, 8vw, 132px) 0 clamp(72px, 6vw, 104px); }

  /* The headline can afford to be bigger when there is room for it — but not
     so big that "én rune ad gangen." breaks across three lines, which reads
     as an accident rather than a design. */
  h1 { font-size: clamp(3.6rem, 3.5vw, 4.2rem); }
  /* Give the words a little more of the width than the phone beside them. */
  .hero-grid { grid-template-columns: 1.15fr .85fr; }
  h2 { font-size: clamp(2.4rem, 2.9vw, 3rem); }
  .lede { font-size: 1.22rem; max-width: 56ch; }
  .section-head { max-width: 68ch; }
  .section-head p { font-size: 1.1rem; }

  /* More air between the columns, and a little more between the cards. */
  .hero-grid { gap: clamp(56px, 5vw, 88px); }
  .showcase { gap: clamp(60px, 6vw, 100px); }
  .cards { gap: 24px; }
  .shots { gap: clamp(26px, 2.6vw, 40px); }

  /* The phone mockups are fixed-width; let them scale up slightly so they do
     not look lost beside the larger type. */
  .phone { transform: scale(1.06); transform-origin: center; }
}

/* Six in a row fits on a wide screen, but each phone then gets so small that
   the numbers inside it — the entire point of showing real screenshots —
   cannot be read. Three large ones beat six decorative ones. */
