@charset "utf-8";

/* ===========================================================================
   Kitchen Bright — marketing site
   ---------------------------------------------------------------------------
   The palette is lifted directly from the app's own design tokens
   (src/theme/tokens.ts) so the site and the product read as one thing:
   warm paper neutrals, a citrus persimmon brand, and the freshness ramp
   (leaf / butter / coral) reserved strictly for freshness meaning.
   =========================================================================== */

/* ---------- tokens: light is the default ground ------------------------- */

:root {
  /* surfaces, furthest back to closest */
  --canvas:          #FBF7F0;
  --canvas-alt:      #F4EEE4;
  --surface:         #FFFFFF;
  --surface-sunken:  #F4EEE4;
  --glass:           rgba(255, 253, 249, 0.82);

  --border:          #E8DFD1;
  --border-strong:   #D6C9B6;

  --text:            #12100E;
  --text-2:          #5A524C;
  --text-3:          #8A807A;

  /* brand — persimmon, warmed so it never reads as an alert */
  --brand:           #E86F22;
  --brand-bright:    #FF8A3D;
  --brand-soft:      #FFEEE0;
  --on-brand:        #FFFFFF;

  /* freshness ramp — semantic only, never decorative */
  --fresh:           #1E9A5E;
  --fresh-soft:      #E4F6EC;
  --soon:            #D9A61F;
  --soon-soft:       #FDF3D9;
  --urgent:          #D13A24;
  --urgent-soft:     #FEE9E5;

  --info:            #2570B8;
  --accent:          #8B5FBF;

  --shadow-sm: 0 1px 2px rgba(70, 52, 32, .07), 0 2px 8px rgba(70, 52, 32, .05);
  --shadow-md: 0 2px 6px rgba(70, 52, 32, .08), 0 12px 32px rgba(70, 52, 32, .09);
  --shadow-lg: 0 8px 20px rgba(70, 52, 32, .10), 0 32px 64px rgba(70, 52, 32, .13);

  /* type */
  --display: 'Montserrat', 'Segoe UI Variable Display', 'Segoe UI', system-ui, sans-serif;
  --body: 'Segoe UI Variable Text', -apple-system, BlinkMacSystemFont, 'Segoe UI',
          Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'Cascadia Mono', Menlo, Consolas, monospace;

  /* layout */
  --measure: 68ch;
  --page: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius-sm: .5rem;
  --radius: .875rem;
  --radius-lg: 1.375rem;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root { --canvas:#12100E; --canvas-alt:#171412; --surface:#1C1917; --surface-sunken:#161311;
    --glass:rgba(28,25,23,.82); --border:#332D29; --border-strong:#463E39;
    --text:#F7F2EA; --text-2:#B3A99F; --text-3:#8A807A;
    --brand:#FF8A3D; --brand-bright:#FFB784; --brand-soft:#3A2317; --on-brand:#1A0E06;
    --fresh:#7CD9A8; --fresh-soft:#12291F; --soon:#FFE08A; --soon-soft:#2B2312;
    --urgent:#FFA79B; --urgent-soft:#2E1714;
    --info:#9EC9F0; --accent:#C9A8E8;
    --shadow-sm:0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
    --shadow-md:0 2px 6px rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.4);
    --shadow-lg:0 8px 20px rgba(0,0,0,.5), 0 32px 64px rgba(0,0,0,.5);
    color-scheme: dark; }
}

/* The viewer's own toggle must win over the OS preference, both directions. */
:root[data-theme="dark"] { --canvas:#12100E; --canvas-alt:#171412; --surface:#1C1917; --surface-sunken:#161311;
  --glass:rgba(28,25,23,.82); --border:#332D29; --border-strong:#463E39;
  --text:#F7F2EA; --text-2:#B3A99F; --text-3:#8A807A;
  --brand:#FF8A3D; --brand-bright:#FFB784; --brand-soft:#3A2317; --on-brand:#1A0E06;
  --fresh:#7CD9A8; --fresh-soft:#12291F; --soon:#FFE08A; --soon-soft:#2B2312;
  --urgent:#FFA79B; --urgent-soft:#2E1714;
  --info:#9EC9F0; --accent:#C9A8E8;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
  --shadow-md:0 2px 6px rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.4);
  --shadow-lg:0 8px 20px rgba(0,0,0,.5), 0 32px 64px rgba(0,0,0,.5);
  color-scheme: dark; }

:root[data-theme="light"] { --canvas:#FBF7F0; --canvas-alt:#F4EEE4; --surface:#FFFFFF; --surface-sunken:#F4EEE4;
  --glass:rgba(255,253,249,.82); --border:#E8DFD1; --border-strong:#D6C9B6;
  --text:#12100E; --text-2:#5A524C; --text-3:#8A807A;
  --brand:#E86F22; --brand-bright:#FF8A3D; --brand-soft:#FFEEE0; --on-brand:#FFFFFF;
  --fresh:#1E9A5E; --fresh-soft:#E4F6EC; --soon:#D9A61F; --soon-soft:#FDF3D9;
  --urgent:#D13A24; --urgent-soft:#FEE9E5;
  --info:#2570B8; --accent:#8B5FBF;
  --shadow-sm:0 1px 2px rgba(70,52,32,.07), 0 2px 8px rgba(70,52,32,.05);
  --shadow-md:0 2px 6px rgba(70,52,32,.08), 0 12px 32px rgba(70,52,32,.09);
  --shadow-lg:0 8px 20px rgba(70,52,32,.10), 0 32px 64px rgba(70,52,32,.13);
  color-scheme: light; }

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

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--body);
  font-size: clamp(1rem, .97rem + .16vw, 1.0625rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -.022em;
  line-height: 1.08;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; }
img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration-color: color-mix(in srgb, var(--brand) 40%, transparent);
    text-underline-offset: .18em; }
a:hover { text-decoration-color: currentColor; }

:where(a, button, summary, input, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: var(--on-brand);
  padding: .7rem 1.1rem; border-radius: 0 0 var(--radius-sm) 0; font-weight: 700;
}
.skip:focus { left: 0; }

/* ---------- shared shapes ---------------------------------------------- */

.wrap { width: min(var(--page), 100% - var(--gutter) * 2); margin-inline: auto; }
.prose { max-width: var(--measure); }

.eyebrow {
  font-family: var(--display);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 .75rem;
}

.lede { font-size: clamp(1.09rem, 1.02rem + .38vw, 1.32rem); color: var(--text-2); line-height: 1.55; }

.rule { height: 1px; background: var(--border); border: 0; margin: 0; }

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

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.site-header > .wrap {
  position: relative;
  display: flex; align-items: center; gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--display); font-weight: 800; font-size: 1.0625rem;
  letter-spacing: -.02em; color: var(--text); text-decoration: none;
  margin-inline-end: auto;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: var(--shadow-sm); }

.nav { display: flex; align-items: center; gap: .15rem; }

.nav a {
  display: inline-block;
  padding: .5rem .8rem;
  border-radius: 999px;
  font-size: .945rem;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--surface-sunken); }
.nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }

.theme-toggle {
  display: inline-grid; place-items: center;
  width: 2.35rem; height: 2.35rem; margin-inline-start: .35rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text-2);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.theme-toggle svg { width: 17px; height: 17px; }
:root[data-theme="dark"] .theme-toggle .i-sun,
:root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon,
:root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .i-moon { display: none; }
}
:root[data-theme="light"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }

.menu-btn {
  display: none;
  width: 2.35rem; height: 2.35rem;
  align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); cursor: pointer;
}
.menu-btn svg { width: 18px; height: 18px; }

@media (max-width: 44rem) {
  .menu-btn { display: inline-flex; }
  .nav {
    position: absolute; inset-inline: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: .1rem;
    padding: .6rem var(--gutter) 1rem;
    background: var(--canvas);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav[hidden] { display: none; }
  .nav a { padding: .7rem .85rem; font-size: 1.02rem; }
}

/* ---------- sections ---------------------------------------------------- */

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--sunken { background: var(--canvas-alt); border-block: 1px solid var(--border); }

.section-head { display: flex; flex-direction: column; gap: .9rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { font-size: clamp(1.75rem, 1.35rem + 1.7vw, 2.6rem); }

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

.hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 6vw, 4.5rem); }

.hero-grid {
  display: grid; gap: clamp(2.25rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (min-width: 60rem) { .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } }

.hero h1 {
  font-size: clamp(2.35rem, 1.5rem + 3.7vw, 4.15rem);
  font-weight: 900;
  letter-spacing: -.035em;
}
.hero .lede { margin-top: 1.15rem; max-width: 34ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.9rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.25rem;
  border-radius: 999px;
  font-family: var(--display); font-weight: 700; font-size: .95rem;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
}
.btn--primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--brand-bright); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--text-3); }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 0 2.25rem;
  margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--border);
}
.hero-stats div { display: flex; flex-direction: column; gap: .1rem; }
.hero-stats dt { font-size: .8rem; color: var(--text-3); order: 2; }
.hero-stats dd {
  margin: 0; order: 1;
  font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

/* ---------- device frames ---------------------------------------------- */

.phone {
  position: relative;
  border-radius: 2rem;
  padding: 5px;
  background: linear-gradient(160deg, var(--border-strong), var(--border));
  box-shadow: var(--shadow-lg);
  width: min(100%, 19rem);
}
.phone img { border-radius: 1.68rem; display: block; width: 100%; }

.phone--lg { width: min(100%, 22rem); }

.tablet {
  border-radius: 1.1rem; padding: 6px;
  background: linear-gradient(160deg, var(--border-strong), var(--border));
  box-shadow: var(--shadow-lg);
}
.tablet img { border-radius: .8rem; width: 100%; }

.hero-shots { display: flex; justify-content: center; gap: 1.1rem; align-items: flex-start; }
.hero-shots .phone:nth-child(2) { margin-top: 2.75rem; }
@media (max-width: 34rem) { .hero-shots .phone:nth-child(2) { display: none; } }

/* ---------- freshness demo (the app's core idea, made playable) --------- */

.demo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-md);
}

.demo-control { display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1.6rem; }
.demo-control label { font-weight: 650; font-size: .95rem; }
.demo-control output {
  font-family: var(--display); font-weight: 800; color: var(--brand);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 1.5rem; background: transparent; cursor: pointer; margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px; background: var(--surface-sunken); border: 1px solid var(--border);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 1.35rem; height: 1.35rem; margin-top: -.6rem;
  border-radius: 999px; background: var(--brand); border: 3px solid var(--surface);
  box-shadow: var(--shadow-sm);
}
input[type="range"]::-moz-range-track {
  height: 6px; border-radius: 999px; background: var(--surface-sunken); border: 1px solid var(--border);
}
input[type="range"]::-moz-range-thumb {
  width: 1.35rem; height: 1.35rem;
  border-radius: 999px; background: var(--brand); border: 3px solid var(--surface);
}

.demo-rows { display: grid; gap: 1rem; }

.demo-row {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto;
  align-items: center; gap: .9rem;
  padding: .9rem 1rem;
  background: var(--canvas-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.demo-emoji { font-size: 1.6rem; line-height: 1; text-align: center; }
.demo-name { font-weight: 700; }
.demo-sub { font-size: .84rem; color: var(--text-3); }

.demo-meter { height: 6px; border-radius: 999px; background: var(--surface-sunken);
  overflow: hidden; margin-top: .45rem; border: 1px solid var(--border); }
.demo-meter span { display: block; height: 100%; border-radius: 999px; }
@media (prefers-reduced-motion: no-preference) {
  .demo-meter span { transition: width .25s ease, background-color .25s ease; }
}

.chip {
  display: inline-flex; align-items: center;
  padding: .28rem .62rem; border-radius: 999px;
  font-size: .78rem; font-weight: 750; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chip--fresh  { background: var(--fresh-soft);  color: var(--fresh); }
.chip--soon   { background: var(--soon-soft);   color: var(--soon); }
.chip--urgent { background: var(--urgent-soft); color: var(--urgent); }

.demo-note { margin-top: 1.4rem; font-size: .93rem; color: var(--text-2); }

/* ---------- feature rows ------------------------------------------------ */

.feature { display: grid; gap: clamp(1.75rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 56rem) {
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .feature--flip .feature-media { order: -1; }
}

.feature + .feature { margin-top: clamp(3rem, 7vw, 5.5rem); }

.feature-media { display: flex; justify-content: center; }
.feature h3 { font-size: clamp(1.4rem, 1.2rem + .85vw, 1.95rem); margin-bottom: .85rem; }
.feature p + p { margin-top: .8rem; }
.feature p { color: var(--text-2); }

.bullets { list-style: none; padding: 0; margin: 1.35rem 0 0; display: grid; gap: .7rem; }
.bullets li { position: relative; padding-inline-start: 1.5rem; color: var(--text-2); }
.bullets li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .62em;
  width: .46rem; height: .46rem; border-radius: 999px; background: var(--brand);
}
.bullets strong { color: var(--text); font-weight: 700; }

/* ---------- cards ------------------------------------------------------- */

.cards { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 1.09rem; margin-bottom: .5rem; }
.card p { color: var(--text-2); font-size: .955rem; }

.card-icon {
  display: grid; place-items: center;
  width: 2.35rem; height: 2.35rem; margin-bottom: .95rem;
  border-radius: .68rem; background: var(--brand-soft); color: var(--brand);
}
.card-icon svg { width: 19px; height: 19px; }

/* ---------- gallery ----------------------------------------------------- */

.gallery { display: grid; gap: clamp(1.1rem, 2.5vw, 1.9rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14.5rem), 1fr)); }

.shot { display: flex; flex-direction: column; gap: .85rem; margin: 0; }
.shot .phone, .shot .tablet { width: 100%; }
.shot figcaption { font-size: .9rem; color: var(--text-2); }
.shot figcaption b { display: block; color: var(--text); font-weight: 700; font-size: .955rem; margin-bottom: .1rem; }

.shot-btn { appearance: none; background: none; border: 0; padding: 0; cursor: zoom-in; width: 100%; display: block; }

.gallery--wide { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 56rem) { .gallery--wide { grid-template-columns: minmax(0, 1fr); } }

/* An author-level `display` would beat the UA's `dialog:not([open]){display:none}`,
   so the closed state has to be restated here or the dialog renders inline. */
.lightbox:not([open]) { display: none; }

.lightbox[open] {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(9, 8, 7, .9);
  backdrop-filter: blur(6px);
  border: 0;
}
.lightbox::backdrop { background: rgba(9, 8, 7, .9); }
.lightbox img { max-height: 88vh; width: auto; border-radius: 1.1rem; box-shadow: var(--shadow-lg); }
.lightbox-close {
  position: fixed; top: 1rem; right: 1rem;
  width: 2.6rem; height: 2.6rem; display: grid; place-items: center;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(30,27,25,.8); color: #F7F2EA; cursor: pointer;
}
.lightbox-close svg { width: 18px; height: 18px; }

/* ---------- table ------------------------------------------------------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: start; padding: .8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { font-family: var(--display); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3); background: var(--surface-sunken); }
tbody tr:last-child td { border-bottom: 0; }
td b { font-weight: 700; }

/* ---------- callout ----------------------------------------------------- */

.callout {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.2rem 1.35rem;
  display: grid; gap: .5rem;
}
.callout--warn { background: var(--soon-soft); border-color: color-mix(in srgb, var(--soon) 35%, transparent); }
.callout h3 { font-size: 1rem; }
.callout p { color: var(--text-2); font-size: .95rem; }

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

.site-footer { border-top: 1px solid var(--border); background: var(--canvas-alt); padding-block: 3rem 2.5rem; margin-top: 2rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.site-footer h2 { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.site-footer a { color: var(--text-2); text-decoration: none; font-size: .93rem; }
.site-footer a:hover { color: var(--brand); }
.footer-note { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  color: var(--text-3); font-size: .86rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }

.tag-draft {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .12rem .45rem; border-radius: .35rem;
  background: var(--soon-soft); color: var(--soon);
  font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}

/* ---------- utilities --------------------------------------------------- */

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
