/* Harbor marketing site.
 *
 * The palette is lifted verbatim from the iOS app's asset catalogue
 * (ios/Harbor/Resources/Assets.xcassets) and Theme.swift, so the site and the
 * app are the same product visually. Brand values are fixed across themes for
 * the same reason they are in the app: a mark that shifts hue with the system
 * theme stops being a mark. Semantic values resolve per colour scheme.
 */

:root {
  /* Brand — fixed in both themes. */
  --mint: #5BE0A5;
  --cyan: #38C6D9;
  --blue: #2A93F2;
  --navy: #142A47;
  --navy-deep: #0C1829;
  --brand-gradient: linear-gradient(135deg, var(--mint), var(--cyan), var(--blue));

  /* Semantic — light. */
  --bg: #F6F8FB;
  --bg-2: #FFFFFF;
  --surface: #FFFFFF;
  --surface-muted: #EDF1F7;
  --text: #0F1B2E;
  --text-2: #5A6B84;
  --sep: #DFE5EE;
  --accent: #2A93F2;
  --proceed: #137A4B;
  --caution: #9A6100;
  --wait: #AF2B21;
  --shadow: 0 1px 2px rgba(15, 27, 46, .04), 0 12px 32px rgba(15, 27, 46, .07);

  /* Layout, matching the app's Layout enum. */
  --gutter: 20px;
  --radius-card: 16px;
  --radius-control: 14px;
  --measure: 1080px;

  --font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN",
          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1526;
    --bg-2: #101D31;
    --surface: #152439;
    --surface-muted: #1C2E47;
    --text: #F1F5FA;
    --text-2: #94A6C0;
    --sep: #253750;
    --accent: #4FA9F7;
    --proceed: #48D391;
    --caution: #FFC24B;
    --wait: #FF8B80;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px rgba(0, 0, 0, .35);
  }
}

/* ---------------------------------------------------------------- base --- */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-2);
}

.lede { color: var(--text-2); font-size: 1.06rem; }

section { padding-block: clamp(56px, 8vw, 104px); }
.section-head { max-width: 640px; display: grid; gap: 12px; margin-bottom: 40px; }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--surface); color: var(--text);
  padding: 12px 18px; border-radius: var(--radius-control); z-index: 100;
}
.skip-link:focus { left: var(--gutter); top: 12px; }

/* ----------------------------------------------------------- the mark --- */

.mark { display: block; flex: none; }
.mark path { fill: none; stroke: url(#harborGradient); stroke-width: 14; stroke-linecap: round; }

.lockup { display: inline-flex; align-items: center; gap: 10px; color: inherit; }
.lockup:hover { text-decoration: none; }
.lockup .name { font-size: 1.22rem; font-weight: 600; letter-spacing: -0.01em; }

/* The icon tile, reproduced from HarborLogo. */
.tile {
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--navy), var(--navy-deep));
  border-radius: 26%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 10px 30px rgba(0, 0, 0, .35);
}

/* -------------------------------------------------------------- header --- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--navy-deep) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: #F1F5FA;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 24px;
  min-height: 66px;
}
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.site-nav a { color: rgba(241, 245, 250, .78); font-size: .95rem; font-weight: 500; }
.site-nav a:hover { color: #fff; text-decoration: none; }
@media (max-width: 720px) { .site-nav .hide-sm { display: none; } }

/* ------------------------------------------------------------- buttons --- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 26px;
  border-radius: var(--radius-control);
  font-size: 1rem; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.985); }

/* Gradient reversed (blue → cyan) exactly as PrimaryButtonStyle does it: on a
   wide control the mark's own orientation would put nearly the whole button in
   mint. */
.btn-primary { background: linear-gradient(90deg, var(--blue), var(--cyan)); color: #fff; }
.btn-primary:hover { opacity: .92; }

.btn-ghost {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .16);
  color: #F1F5FA;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }

.btn-sm { padding: 10px 18px; font-size: .92rem; }

/* Pre-launch state for the store link: looks like a button, is not a lie. */
.btn-store {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .16);
  color: #F1F5FA;
  cursor: default;
  flex-direction: column; gap: 1px; align-items: flex-start;
  padding: 11px 22px;
}
.btn-store .top { font-size: .72rem; font-weight: 500; color: rgba(241, 245, 250, .7); letter-spacing: .02em; }
.btn-store .bottom { font-size: 1.02rem; font-weight: 600; }

/* ---------------------------------------------------------------- hero --- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #F1F5FA;
  padding-block: clamp(64px, 9vw, 112px) clamp(72px, 10vw, 128px);
}
/* Two soft brand glows. Kept low-opacity and blurred so the gradient reads as
   light in the room rather than as a shape competing with the card. */
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .28; pointer-events: none;
}
.hero::before { width: 520px; height: 520px; background: var(--mint); top: -220px; left: -140px; }
.hero::after  { width: 620px; height: 620px; background: var(--blue); bottom: -320px; right: -180px; opacity: .34; }

.hero .wrap { position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { max-width: 15ch; }
.hero h1 .grad {
  background: var(--brand-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.hero-copy .lede { color: rgba(241, 245, 250, .8); font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { font-size: .88rem; color: rgba(241, 245, 250, .6); }

/* -------------------------------------------------- the app, in HTML --- */

/* These reproduce the shipping SwiftUI views (AskView's input, and
   RecommendationCard rendering MockFixtures.macbookResult — the PRD's own
   worked example). Screenshots would drift the first time the card changes;
   this at least drifts visibly, in one file. */
.device { display: grid; gap: 14px; }

.app-card {
  background: #152439;
  border: 1px solid #253750;
  border-radius: var(--radius-card);
  padding: var(--gutter);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  color: #F1F5FA;
}

.ask-label { font-size: .98rem; font-weight: 600; margin-bottom: 12px; }
.ask-field {
  background: #1C2E47;
  border: 1.5px solid rgba(42, 147, 242, .55);
  border-radius: var(--radius-control);
  padding: 13px 14px;
  font-size: .98rem;
}
.ask-caret {
  display: inline-block; width: 2px; height: 1.05em; vertical-align: -2px;
  margin-left: 2px; background: var(--cyan); animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ask-caret { animation: none; } }

.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.card-title { font-size: 1.02rem; font-weight: 600; }
.card-meta { font-size: .8rem; color: #94A6C0; }

.verdict {
  display: flex; gap: 12px; align-items: center;
  margin-top: 12px; padding: 14px;
  border-radius: 12px;
}
.verdict .icon { flex: none; width: 30px; height: 30px; }
.verdict .headline { font-size: 1.32rem; font-weight: 700; letter-spacing: .01em; line-height: 1.1; }
.verdict .sub { font-size: .84rem; color: #94A6C0; }
.verdict.wait { background: rgba(255, 139, 128, .1); color: #FF8B80; }
.verdict.caution { background: rgba(255, 194, 75, .1); color: #FFC24B; }
.verdict.proceed { background: rgba(72, 211, 145, .1); color: #48D391; }

.card-rule { height: 1px; background: #253750; margin: 16px 0; border: 0; }

.why-label { font-size: .78rem; font-weight: 600; color: #94A6C0; margin-bottom: 12px; }
.reason { display: flex; gap: 12px; align-items: flex-start; }
.reason + .reason { margin-top: 12px; }
.reason .icon { flex: none; width: 22px; height: 18px; color: #4FA9F7; margin-top: 3px; }
.reason .text { font-size: .94rem; }
.reason .kind { font-size: .72rem; font-weight: 500; color: #94A6C0; }

/* ---------------------------------------------------------------- grid --- */

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--sep);
  border-radius: var(--radius-card);
  padding: 26px;
  display: grid; gap: 10px; align-content: start;
}
.card p { color: var(--text-2); font-size: .97rem; }

.step-num {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-gradient); color: #06121f;
  font-weight: 700; font-size: .95rem;
  margin-bottom: 4px;
}

/* --------------------------------------------------------- the answers --- */

.answers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .answers { grid-template-columns: 1fr; } }

.answer {
  border-radius: var(--radius-card);
  border: 1px solid var(--sep);
  background: var(--surface);
  padding: 24px;
  display: grid; gap: 8px; align-content: start;
}
.answer .badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 1.05rem; letter-spacing: .02em;
}
.answer .badge svg { width: 22px; height: 22px; }
.answer p { color: var(--text-2); font-size: .97rem; }
.answer.proceed .badge { color: var(--proceed); }
.answer.caution .badge { color: var(--caution); }
.answer.wait .badge { color: var(--wait); }

/* -------------------------------------------------------------- prose --- */

.panel {
  background: var(--bg-2);
  border-top: 1px solid var(--sep);
  border-bottom: 1px solid var(--sep);
}

.prose { max-width: 68ch; display: grid; gap: 18px; }
.prose h2 { margin-top: 24px; }
.prose h3 { margin-top: 14px; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.prose .updated { font-size: .9rem; }

details.faq {
  border-bottom: 1px solid var(--sep);
  padding: 18px 0;
}
details.faq summary {
  cursor: pointer; font-weight: 600; font-size: 1.03rem;
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; color: var(--text-2); font-weight: 400; font-size: 1.4rem; line-height: 1;
}
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--text-2); margin-top: 12px; font-size: .99rem; max-width: 68ch; }

/* --------------------------------------------------------------- price --- */

.price-card {
  max-width: 460px; margin-inline: auto; text-align: center;
  background: var(--surface); border: 1px solid var(--sep);
  border-radius: var(--radius-card); padding: 34px 28px;
  box-shadow: var(--shadow);
  display: grid; gap: 8px; justify-items: center;
}
.price-card .amount { font-size: 2.4rem; font-weight: 700; }
/* Stands in for .amount before there is a number. Smaller, because a phrase set
   at display size reads as a headline the layout wasn't built for. */
.price-card .amount-pending { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.price-card ul { text-align: left; margin: 14px 0 4px; padding: 0; list-style: none; display: grid; gap: 11px; width: 100%; }
.price-card li { display: flex; gap: 10px; align-items: flex-start; font-size: .98rem; }
.price-card li svg { flex: none; width: 18px; height: 18px; color: var(--accent); margin-top: 4px; }

/* ---------------------------------------------------------------- CTA --- */

.cta {
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  color: #F1F5FA;
  border-radius: 24px;
  padding: clamp(40px, 6vw, 64px);
  text-align: center;
  display: grid; gap: 18px; justify-items: center;
  box-shadow: var(--shadow);
}
.cta p { color: rgba(241, 245, 250, .78); max-width: 48ch; }

/* -------------------------------------------------------------- footer --- */

.site-footer {
  border-top: 1px solid var(--sep);
  padding-block: 44px;
  color: var(--text-2);
  font-size: .93rem;
}
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--text); }
.disclaimer { margin-top: 22px; font-size: .84rem; max-width: 74ch; }
