/* Hagi website. Colors and type follow the app's BRANDING.md: white cards on light gray, one temperature
   color per day (frost, cobalt, tangerine), Bricolage Grotesque for headlines, Figtree for everything else. */

:root {
  --screen: #F2F2EF;
  --card: #FFFFFF;
  --chip: #E4E4DF;
  --text: #1F2329;
  --label: #4A505A;
  --accent: #2F55E4;
  --outline: #D6D8D0;

  --frost: #1E2A78;
  --cobalt: #2F55E4;
  --tangerine: #FF7A3D;
  --on-day: #FFFFFF;
  --on-day-muted: #DCE4FF;
  --on-warm: #1A1410;
  --on-warm-muted: #3D2516;

  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Figtree', system-ui, sans-serif;
  --radius: 28px;
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --screen: #0F1114;
    --card: #1B1E23;
    --chip: #2A2E35;
    --text: #F2F3F5;
    --label: #A3A8B2;
    --accent: #8FA6F3;
    --outline: #2E3239;
    --frost: #2B3BA0;
  }
}

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

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

body {
  margin: 0;
  background: var(--screen);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
p { margin: 0; }

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

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 10; padding: 10px 16px; border-radius: 999px; background: var(--card); color: var(--text); }
.skip-link:focus { left: 8px; }

/* ─── Header ─────────────────────────────── */

.site-header { padding: 20px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.on-cobalt .brand img { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3); }

.site-nav ul { display: flex; gap: clamp(12px, 3vw, 28px); margin: 0; padding: 0; list-style: none; }
.site-nav a { color: inherit; text-decoration: none; font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

/* The home page header sits on the cobalt hero. */
.on-cobalt { background: var(--cobalt); color: var(--on-day); }
.on-cobalt :focus-visible { outline-color: var(--on-day); }

/* ─── Hero ───────────────────────────────── */

.hero { padding: clamp(24px, 6vw, 72px) 0 0; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(24px, 5vw, 64px); align-items: end; }

.hero-copy { padding-bottom: clamp(32px, 8vw, 112px); }
.eyebrow { display: inline-block; margin-bottom: 20px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); font-weight: 700; font-size: 0.9375rem; }
.hero h1 { font-size: clamp(2.75rem, 7vw, 5.25rem); }
.hero .lead { margin-top: 24px; max-width: 34ch; font-size: clamp(1.125rem, 2vw, 1.375rem); color: var(--on-day-muted); }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 36px; }
.store-badge { display: inline-flex; align-items: center; gap: 12px; padding: 14px 24px 14px 20px; border-radius: 999px; background: #0B0C0E; color: #FFFFFF; font-weight: 700; text-decoration: none; }
.store-badge svg { width: 22px; height: 22px; flex: none; }
.store-badge small { display: block; font-weight: 600; font-size: 0.75rem; opacity: 0.75; line-height: 1.2; }
.store-badge span { line-height: 1.2; }
.text-link { color: inherit; font-weight: 700; }

/* A phone: a dark bezel around a real simulator capture. */
.phone { margin: 0; padding: 10px; border-radius: 52px; background: #0B0C0E; box-shadow: 0 30px 60px rgba(10, 16, 60, 0.28), inset 0 0 0 2px #2A2D33; }
.phone img { border-radius: 42px; width: 100%; }

.hero-phone { justify-self: center; width: min(100%, 380px); margin-bottom: -180px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* ─── Day colors ─────────────────────────── */

.days { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { max-width: 40rem; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
.section-head p { margin-top: 16px; color: var(--label); font-size: 1.1875rem; }

.day-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 40px 0 0; padding: 0; list-style: none; }
.day-card { display: flex; flex-direction: column; justify-content: space-between; min-height: 220px; padding: 28px; border-radius: var(--radius); color: var(--on-day); }
.day-card .temp { font-weight: 700; color: var(--on-day-muted); }
.day-card .headline { font-family: var(--display); font-weight: 800; font-size: clamp(1.875rem, 3.4vw, 2.5rem); line-height: 1.05; letter-spacing: -0.02em; }
.day-card .band { font-weight: 600; color: var(--on-day-muted); }
.day-card.cold { background: var(--frost); }
.day-card.cool { background: var(--cobalt); }
.day-card.warm { background: var(--tangerine); color: var(--on-warm); }
.day-card.warm .temp, .day-card.warm .band { color: var(--on-warm-muted); }

/* ─── Feature rows ───────────────────────── */

.features { padding: clamp(24px, 4vw, 48px) 0 clamp(56px, 8vw, 96px); }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 6vw, 96px); align-items: center; padding: clamp(32px, 5vw, 56px) 0; }
.feature + .feature { border-top: 1px solid var(--outline); }
.feature:nth-child(even) .feature-media { order: -1; }
.feature-media { display: flex; justify-content: center; }
.feature-media .phone { width: min(100%, 320px); }
.feature-copy h2 { font-size: clamp(1.875rem, 3.6vw, 2.75rem); }
.feature-copy p { margin-top: 16px; color: var(--label); font-size: 1.125rem; max-width: 34rem; }
.feature-copy ul { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.feature-copy li { display: flex; gap: 12px; align-items: baseline; }
.feature-copy li::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transform: translateY(-2px); }

/* ─── Privacy band ───────────────────────── */

.private { padding: clamp(56px, 8vw, 96px) 0; background: var(--card); }
.promises { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 40px 0 0; }
.promise { padding: 24px; border-radius: 22px; background: var(--screen); }
.promise dt { font-weight: 800; font-size: 1.125rem; }
.promise dd { margin: 8px 0 0; color: var(--label); }
.private .more { margin-top: 28px; font-weight: 700; }

/* ─── Closing call to action ─────────────── */

.closing { padding: clamp(64px, 10vw, 120px) 0; text-align: center; }
.closing h2 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
.closing p { margin: 16px auto 0; color: var(--on-day-muted); font-size: 1.1875rem; max-width: 32rem; }
.closing .cta-row { justify-content: center; }

/* ─── Footer ─────────────────────────────── */

.site-footer { padding: 32px 0 48px; color: var(--label); font-size: 0.9375rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: center; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: inherit; }
/* The studio credit: Kayoon's mark at text size */
.site-footer .made-by { white-space: nowrap; }
.site-footer .kayoon-mark { vertical-align: -2px; margin-right: 0.3em; }

/* ─── Legal pages ────────────────────────── */

.legal { padding: clamp(24px, 5vw, 56px) 0 clamp(56px, 8vw, 96px); }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
.legal .meta { margin-top: 12px; color: var(--label); font-weight: 600; }
.legal .summary { margin-top: 32px; padding: 28px; border-radius: var(--radius); background: var(--cobalt); color: var(--on-day); }
.legal .summary h2 { font-size: 1.5rem; }
.legal .summary ul { margin: 14px 0 0; padding-left: 1.2em; display: grid; gap: 6px; }
.legal section { margin-top: 40px; }
.legal section h2 { font-size: 1.625rem; margin-bottom: 12px; }
.legal section p + p, .legal section p + ul, .legal section ul + p { margin-top: 12px; }
.legal section ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.legal table { width: 100%; margin-top: 16px; border-collapse: separate; border-spacing: 0; background: var(--card); border-radius: 20px; overflow: hidden; }
.legal caption { text-align: left; font-weight: 700; padding-bottom: 8px; }
.legal th, .legal td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--outline); }
.legal tr:last-child th, .legal tr:last-child td { border-bottom: 0; }
.legal thead th { font-size: 0.875rem; color: var(--label); }

/* ─── Narrow screens ─────────────────────── */

@media (max-width: 860px) {
  .hero .wrap, .feature { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .hero-phone { width: min(78%, 340px); }
  .feature:nth-child(even) .feature-media { order: 0; }
  .feature-media .phone { width: min(80%, 300px); }
  .day-cards { grid-template-columns: 1fr; }
  .day-card { min-height: 160px; }
  .promises { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .promises { grid-template-columns: 1fr; }
  .site-nav .optional { display: none; }
  .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; }
  .legal thead { position: absolute; left: -9999px; }
  .legal td { padding-top: 0; }
}
