/* dingding.reedboat.com
   Ding Ding YYC tokens (Sky indigo, light + Night) copied from DingDing/product/design/design-system/tokens.json v4.
   Reed Boat frame tokens from vault/Projects/ReedBoat/Product/Design/DESIGN.md. Components use token names only. */

:root {
  color-scheme: light dark;

  /* Ding Ding: light */
  --paper: #f4f8fb;
  --surface: #ffffff;
  --ink: #10243a;
  --muted: #4e6378;
  --divider: #e4eaf0;
  --brand: #1b2978;
  --brand-pressed: #141f5c;
  --on-brand: #ffffff;
  --sky-glow: #84cdee;

  /* Reed Boat frame */
  --forest: #1d3023;
  --bone: #f7f5f2;
  --on-dark-soft: #dcece5;

  /* Ding Ding type: Manrope only (font files to come; system sans until then) */
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Ding Ding shape and space */
  --radius-card: 20px;
  --radius-sheet: 28px;
  --radius-pill: 999px;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --target-min: 44px;
  --button-height: 52px;

  --max: 68rem;
  --gutter: clamp(1rem, 5vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Ding Ding: Night */
    --paper: #0f1e30;
    --surface: #16283d;
    --ink: #f2f7fb;
    --muted: #a9bbcb;
    --divider: #2a3f57;
    --brand: #84cdee;
    --brand-pressed: #a9dcf3;
    --on-brand: #0f1e30;
    --sky-glow: #19366c;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  isolation: isolate;
  background: var(--paper);
  color: var(--ink);
  font: 500 1rem/1.5 var(--sans);
}

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

a { color: var(--brand); text-underline-offset: 0.18em; }
a:hover { color: var(--brand-pressed); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; } /* Button spec: 3 pt brand ring, 3 pt offset */

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

.skip {
  position: absolute; left: var(--space-16); top: -100px;
  background: var(--brand); color: var(--on-brand);
  padding: var(--space-12) var(--space-20); border-radius: var(--radius-pill);
  font-weight: 700; z-index: 10;
}
.skip:focus, .skip:hover { top: var(--space-16); color: var(--on-brand); }

/* The sky glow sits behind the header and the opening of each page, atmosphere only */
body { position: relative; }
body::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 36rem; z-index: -1; pointer-events: none;
  background: radial-gradient(60rem 30rem at 15% -8rem, color-mix(in srgb, var(--sky-glow) 65%, transparent), transparent 70%);
}

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-16);
  padding-top: var(--space-20); padding-bottom: var(--space-20);
}
.brand {
  display: inline-flex; align-items: center; gap: var(--space-12);
  min-height: var(--target-min);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px; line-height: 22px; /* headline */
}
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.top nav { display: flex; gap: var(--space-8); }
.top nav a {
  display: inline-flex; align-items: center; min-height: var(--target-min);
  padding: 0 var(--space-16); border-radius: var(--radius-pill);
  color: var(--ink); font-weight: 600; text-decoration: none;
}
.top nav a:hover { background: var(--surface); color: var(--brand); }
.top nav a[aria-current="page"] { color: var(--brand); text-decoration: underline; }

/* Headings: Ding Ding display and titles are light with tight tracking */
h1, h2, h3 { color: var(--brand); font-weight: 300; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.25rem, 5vw, 2.75rem); line-height: 46px; letter-spacing: -0.03em; max-width: 18ch; } /* display: 300 44/46 */
h2 { font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: 1.375rem; line-height: 1.27; letter-spacing: -0.02em; }
p { margin: 0; text-wrap: pretty; }

.hero-body { padding-top: clamp(2.5rem, 7vw, 5.5rem); padding-bottom: clamp(3rem, 7vw, 5rem); }
.lead { font-size: 1.1875rem; line-height: 1.55; max-width: 38rem; margin-top: var(--space-24); }
.facts { margin-top: var(--space-20); color: var(--muted); font-weight: 600; font-size: 13px; line-height: 18px; } /* label */

.actions { display: flex; flex-wrap: wrap; gap: var(--space-12); margin-top: var(--space-32); }
.btn {
  display: inline-flex; align-items: center; min-height: var(--button-height);
  padding: 0 var(--space-24); border-radius: var(--radius-pill);
  font-weight: 700; font-size: 1.0625rem; text-decoration: none;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-pressed); color: var(--on-brand); }
.btn-secondary { border: 1.5px solid var(--brand); color: var(--brand); }
.btn-secondary:hover { background: var(--surface); }

/* Sections */
.section { padding-top: 5rem; padding-bottom: 5rem; border-top: 1px solid var(--divider); }
.section-head { display: grid; gap: var(--space-12); max-width: 40rem; margin-bottom: var(--space-32); }
.section-head p { color: var(--muted); }

.who { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--space-32); align-items: start; }
.who p + p { margin-top: var(--space-16); }

.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-16); }
.features li {
  background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-card);
  padding: var(--space-20);
}
.features p { margin-top: var(--space-8); }
.features .note { margin-top: var(--space-12); color: var(--muted); font-size: 13px; line-height: 18px; font-weight: 600; } /* label */

/* Screenshots: real app screens, even grid */
.shots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-32); max-width: 60rem; }
.shots figure { margin: 0; }
.shots img { width: 100%; border-radius: var(--radius-sheet); border: 1px solid var(--divider); background: var(--surface); }
.shots figcaption { margin-top: var(--space-12); font-weight: 600; font-size: 1.0625rem; }
.shots-note { margin-top: var(--space-24); }

.free { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--space-32); }
.free p + p { margin-top: var(--space-16); }
.small { color: var(--muted); font-size: 0.9375rem; }

/* Support */
.page-head { padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: clamp(2rem, 5vw, 3rem); }
.page-head .lead { margin-top: var(--space-16); }
.contact {
  background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-card);
  margin-bottom: 4rem; padding: 2rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-32);
}
.contact h2 { margin-bottom: var(--space-12); }
.contact ul, .answers ul { margin: var(--space-12) 0 0; padding-left: 1.25rem; }
.contact li + li, .answers li + li { margin-top: var(--space-8); }
.email { font-size: 1.25rem; font-weight: 700; display: inline-flex; align-items: center; min-height: var(--target-min); }
.answers { display: grid; gap: var(--space-32); max-width: 44rem; }
.answers article p { margin-top: var(--space-8); }

/* Reed Boat frame */
.rb {
  background: var(--forest); color: var(--bone);
  margin-top: clamp(3rem, 7vw, 5rem);
}
.rb .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-16); padding-top: var(--space-32); padding-bottom: var(--space-32); }
.rb a { color: var(--bone); display: inline-flex; align-items: center; gap: var(--space-12); min-height: var(--target-min); font-weight: 600; }
.rb a:hover { color: var(--on-dark-soft); }
.rb svg { width: 36px; height: 26px; }
.rb p { color: var(--on-dark-soft); font-size: 0.9375rem; }
.rb :focus-visible { outline-color: var(--bone); }

/* Privacy policy */
.policy { padding-bottom: var(--space-32); }
.policy > * { max-width: 44rem; }
.policy .table-wrap + p { margin-top: var(--space-16); }
.policy h2 { margin-top: var(--space-40); margin-bottom: var(--space-12); }
.policy p + p, .policy p + ul, .policy ul + p { margin-top: var(--space-12); }
.policy ul { margin: var(--space-12) 0 0; padding-left: 1.25rem; }
.policy li + li { margin-top: var(--space-8); }
.policy .updated { color: var(--muted); font-size: 13px; line-height: 18px; font-weight: 600; margin-bottom: var(--space-16); }
.policy code { font: 600 0.9375em/1 var(--sans); overflow-wrap: anywhere; }
.table-wrap { margin-top: var(--space-16); overflow-x: auto; }
.policy table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 36rem; font-size: 0.9375rem; border: 1px solid var(--divider); border-radius: var(--radius-card); background: var(--surface); }
.policy th, .policy td { text-align: left; vertical-align: top; padding: var(--space-12) var(--space-16); }
.policy th { font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--divider); }
.policy td + td, .policy th + th { border-left: 1px solid var(--divider); }
.policy tr + tr td { border-top: 1px solid var(--divider); }

.notfound { padding-top: clamp(3rem, 10vw, 7rem); padding-bottom: clamp(3rem, 10vw, 7rem); }
.notfound p { margin-top: var(--space-16); }

@media (max-width: 900px) {
  .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-16); }
  .who, .free, .contact { grid-template-columns: minmax(0, 1fr); gap: var(--space-16); }
}

@media (max-width: 640px) {
  /* The policy table becomes one card per row, each cell labelled with its column */
  .policy table { min-width: 0; }
  .policy thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .policy tbody, .policy tr, .policy td { display: block; }
  .policy td + td { border-left: 0; padding-top: 0; }
  .policy tr + tr td + td { border-top: 0; }
  .policy td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 13px; line-height: 18px; font-weight: 600; margin-bottom: var(--space-4); }
  .shots { grid-template-columns: minmax(0, 1fr); max-width: 20rem; gap: var(--space-32); }
  .section { padding-top: 3rem; padding-bottom: 3rem; }
  .contact { padding: 1.25rem; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .brand span { font-size: 1rem; }
  .top nav a { padding: 0 var(--space-12); }
}
