/* Fridgeo landing site. Colours mirror app/lib/theme.dart: a soft canvas,
   plain white cards, tinted "tone" cards (13% wash of the accent, text at
   the accent darkened 55%), and purple only for the AI. No gradients. */

:root {
  --ink: #16191B;
  --muted: #4A5157;
  --card: #FFFFFF;
  --ai: #6D28D9;
  --radius: 24px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root[data-palette="fresh"]  { --brand: #2F855A; --canvas: #F5F7F2; --t2: #E4572E; --t3: #2563EB; --amber: #B7791F; }
:root[data-palette="pantry"] { --brand: #C05621; --canvas: #FBF6EE; --t2: #C53030; --t3: #4C51BF; --amber: #B7791F; }
:root[data-palette="ocean"]  { --brand: #0F766E; --canvas: #F1F6F8; --t2: #EA580C; --t3: #0E7490; --amber: #A16207; }

:root {
  --brand-strong: color-mix(in srgb, var(--brand) 88%, black);
  --border: color-mix(in srgb, var(--canvas) 92%, black);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand-strong); }
img { max-width: 100%; height: auto; display: block; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

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

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: var(--canvas); border-bottom: 1px solid var(--border); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.4rem; letter-spacing: -0.04em; color: var(--ink); text-decoration: none; }
.wordmark img { border-radius: 28%; }
nav { display: flex; align-items: center; gap: 24px; }
nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
nav a:not(.btn):hover { color: var(--brand-strong); }
@media (max-width: 640px) { nav a:not(.btn) { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font: 700 1rem var(--font); text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-brand { background: var(--brand-strong); color: #fff; }
.btn-brand:hover { background: color-mix(in srgb, var(--brand) 75%, black); }
.btn-ghost { color: var(--brand-strong); border-color: color-mix(in srgb, var(--brand) 35%, white); background: var(--card); }
.btn-ghost:hover { border-color: var(--brand-strong); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: .95rem; }
.btn[aria-disabled="true"] { background: var(--border); color: var(--muted); border-color: transparent; cursor: default; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 12px; }

/* Hero */
.hero { padding: 56px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--brand-strong); font-weight: 700; font-size: .95rem; margin-bottom: 12px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .phone { max-width: 320px; margin-inline: auto; }
}

/* Phone frame: a plain rounded card around each screenshot. */
.phone {
  margin: 0; justify-self: center; width: 100%; max-width: 360px;
  padding: 10px; background: var(--card); border: 1px solid var(--border);
  border-radius: 40px;
}
.phone img { border-radius: 30px; width: 100%; }

/* Sections */
.section { padding: 72px 0; }
.section-lead { color: var(--muted); font-size: 1.1rem; max-width: 40em; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }

/* Tone cards: same formula as Tone.of in the app. */
.tone { --accent: var(--brand); background: color-mix(in srgb, var(--accent) 13%, white); color: color-mix(in srgb, var(--accent) 45%, black); border-color: color-mix(in srgb, var(--accent) 22%, white); }
.tone p { color: inherit; opacity: .92; margin: 0; }
.tone-green  { --accent: var(--brand); }
.tone-amber  { --accent: var(--amber); }
.tone-ai     { --accent: var(--ai); }
.tone-blue   { --accent: var(--t3); }
.tone-orange { --accent: var(--t2); }
.tone .icon {
  display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px;
  border-radius: 16px; background: color-mix(in srgb, var(--accent) 88%, black); color: #fff;
}
.tone .icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* Screens */
.screens-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; }
.palette-picker { display: flex; flex-wrap: wrap; gap: 10px; }
.palette-picker button {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px 0 12px;
  border-radius: 16px; border: 2px solid var(--border); background: var(--card);
  font: 700 .95rem var(--font); color: var(--ink); cursor: pointer;
}
.palette-picker button[aria-checked="true"] { border-color: var(--brand-strong); background: color-mix(in srgb, var(--brand) 13%, white); }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); }

.screens { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; }
.screens figure { margin: 0; }
.screens .phone { max-width: 320px; margin-inline: auto; }
.screens figcaption { text-align: center; margin-top: 16px; color: var(--muted); }
.screens figcaption strong { color: var(--ink); }
@media (max-width: 860px) {
  .screens { grid-template-columns: repeat(4, 78%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .screens figure { scroll-snap-align: center; }
}

.web-shot { margin: 48px 0 0; }
.web-shot img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); }
.web-shot figcaption { text-align: center; margin-top: 16px; color: var(--muted); }
.web-shot figcaption strong { color: var(--ink); }

/* Comfort */
.comfort-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
@media (max-width: 860px) {
  .comfort-grid { grid-template-columns: 1fr; }
  .comfort-grid .phone { max-width: 300px; order: 2; }
}
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 36px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 13%, white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* Download */
.download { text-align: center; padding: 48px 24px; }
.download .section-lead { margin-inline: auto; }
.download .cta { justify-content: center; }

/* Footer */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 32px 0 48px; border-top: 1px solid var(--border); }

/* Optional illustrations (img/art/). Each removes itself if the file is
   missing, and replaces the card's small icon when it is there. */
.art { width: 100%; aspect-ratio: 3 / 2; max-height: 220px; object-fit: contain; margin: -8px 0 12px; }
.art + .icon { display: none; }
.art-wide { max-width: 420px; margin: 0 auto 16px; }
@media (max-width: 600px) { .web-shot { display: none; } }
