/* FreshSense — shared subpage system (dark). Fonts and spacing scale match index.html. */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800&family=Instrument+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500&display=swap');

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

:root {
  /* navy ramp sampled from FreshSenseLogoo.png (canvas ≈ #1F2842) */
  --n-950: #0B1020;
  --n-900: #0F1527;
  --n-850: #141B31;
  --n-800: #1F2842;          /* logo canvas — header + footer */
  --n-700: #2A3556;
  --line:  rgba(233, 228, 214, .12);
  --line-strong: rgba(233, 228, 214, .24);

  --cream: #F1ECDF;          /* logo "Fresh" */
  --cream-2: #C9CFDD;        /* secondary text, 9.6:1 on n-900 */
  --cream-3: #9AA5BD;        /* tertiary, 6.3:1 on n-900 */
  --sage:  #86B38C;          /* logo "Sense", lifted for contrast (8.1:1 on n-900) */
  --sage-d:#5F8F66;
  --sage-ink: #0E1A12;       /* text on sage buttons */

  --font-head: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-ui:   'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --font-body: 'Instrument Sans', -apple-system, sans-serif;

  --r-sm: 3px; --r-md: 6px; --r-lg: 10px;
  --gutter: clamp(20px, 5vw, 56px);
  --max: 1200px;
  --header-h: 68px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0; background: var(--n-900); color: var(--cream);
  font-family: var(--font-body); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--cream); color: var(--n-950); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 600; }
.skip:focus { top: 12px; }

/* ── type ── */
.eyebrow {
  font-family: var(--font-ui); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sage); display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; }
.h1, .h2, .h3 { font-family: var(--font-head); font-weight: 700; margin: 0; text-wrap: balance; color: var(--cream); }
.h1 { font-size: clamp(40px, 6.6vw, 84px); line-height: .98; letter-spacing: -.035em; }
.h2 { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.03; letter-spacing: -.028em; }
.h3 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.12; letter-spacing: -.02em; }
.lede { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; color: var(--cream-2); max-width: 56ch; margin: 0; text-wrap: pretty; }
.body-2 { color: var(--cream-2); margin: 0; max-width: 52ch; text-wrap: pretty; }
.mono { font-family: var(--font-ui); }
.accent { color: var(--sage); }
.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 10vw, 140px); }

/* ── buttons ── */
.btn {
  --lift: 0px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 15px; letter-spacing: -.01em; text-decoration: none;
  padding: 13px 24px; min-height: 46px; border-radius: var(--r-md); border: 1px solid transparent; cursor: pointer;
  background: var(--sage); color: var(--sage-ink);
  transform: translateY(var(--lift)); transition: transform .25s var(--ease), background-color .2s, border-color .2s, box-shadow .25s;
}
.btn:hover { --lift: -2px; background: #98C29D; box-shadow: 0 14px 30px -10px rgba(134,179,140,.55); }
.btn:active { --lift: 0px; transform: translateY(0) scale(.985); box-shadow: none; }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn[disabled] { opacity: .55; cursor: progress; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--cream); border-color: var(--line-strong); }
.btn-ghost:hover { background: rgba(241,236,223,.07); border-color: var(--cream); box-shadow: none; }
.btn-lg { font-size: 17px; padding: 16px 30px; min-height: 54px; }

/* ── header component ── */
fs-header { display: block; height: var(--header-h); }
.fs-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: var(--gutter);
  background: rgba(31, 40, 66, .86);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid transparent; transition: border-color .3s, background-color .3s;
}
.fs-header.is-scrolled { border-bottom-color: var(--line); background: rgba(31, 40, 66, .96); }
/* The logo PNG ships on its own navy canvas; matching the header to that canvas + feathering the edges makes the seam disappear. */
.fs-brand { display: block; flex: none; line-height: 0; text-decoration: none; border-radius: 4px; }
.fs-brand img {
  height: 30px; width: auto; aspect-ratio: 1968 / 422;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent), linear-gradient(180deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent), linear-gradient(180deg, transparent, #000 10%, #000 90%, transparent);
  mask-composite: intersect;
}
.fs-nav { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 34px); margin-left: auto; }
.fs-nav a:not(.btn) {
  font-family: var(--font-ui); font-size: 13.5px; color: var(--cream-2); text-decoration: none; padding: 8px 2px; position: relative;
  transition: color .2s;
}
.fs-nav a:not(.btn)::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--sage);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.fs-nav a:not(.btn):hover, .fs-nav a[aria-current="page"] { color: var(--cream); }
.fs-nav a:not(.btn):hover::after, .fs-nav a[aria-current="page"]::after { transform: scaleX(1); }
.fs-nav .btn { padding: 9px 18px; min-height: 40px; font-size: 14px; }
.fs-burger { display: none; }

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  :root { --header-h: 60px; }
  .fs-brand img { height: 26px; }
  .fs-burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; margin-right: -10px;
    background: none; border: 0; cursor: pointer; align-items: center;
  }
  .fs-burger i { display: block; width: 22px; height: 1.5px; background: var(--cream); transition: transform .3s var(--ease), opacity .2s; }
  .fs-burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .fs-burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
  .fs-burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .fs-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    padding: 8px var(--gutter) 24px; background: var(--n-800); border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(-10px); visibility: hidden; pointer-events: none;
    transition: opacity .25s, transform .35s var(--ease), visibility 0s .35s;
  }
  .fs-nav.is-open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }
  .fs-nav a:not(.btn) { font-size: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .fs-nav a:not(.btn)::after { display: none; }
  .fs-nav .btn { margin-top: 18px; min-height: 50px; }
}

/* ── footer component ── */
.fs-footer { background: var(--n-800); border-top: 1px solid var(--line); padding: clamp(48px, 7vw, 88px) 0 28px; }
.fs-footer .grid { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(120px, 1fr)); gap: 40px; }
.fs-footer .fs-brand img { height: 34px; }
.fs-footer p { color: var(--cream-2); font-size: 15px; max-width: 34ch; margin: 18px 0 0; }
.fs-footer h4 { font-family: var(--font-ui); font-weight: 500; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--cream-3); margin: 0 0 16px; }
.fs-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.fs-footer li a { display: inline-block; padding: 6px 0; color: var(--cream-2); text-decoration: none; font-size: 15px; transition: color .2s, transform .25s var(--ease); }
.fs-footer li a:hover { color: var(--cream); transform: translateX(3px); }
.fs-footer .legal { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--font-ui); font-size: 12.5px; color: var(--cream-3); }
@media (max-width: 860px) { .fs-footer .grid { grid-template-columns: 1fr 1fr; } .fs-footer .grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 420px) { .fs-footer .grid { grid-template-columns: 1fr; } }

/* ── shared surfaces ── */
.panel { background: var(--n-850); border: 1px solid var(--line); border-radius: var(--r-lg); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* progressive enhancement: content is visible without JS; reveals only arm when the script loads */
.js .reveal { opacity: 0; transform: translateY(24px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  .btn, .fs-nav a, .fs-footer li a { transition: none; }
}

/* ── WIREFRAME PLACEHOLDERS (replace the old puck / app-screen photos; pure CSS, no image requests) ──
   Navy canvas sampled from FreshSenseLogoo.png (#1F2842), blueprint grid, dashed inner boundary.
   The puck glyph echoes the logo mark: outer ring, dashed ring, centre dot. */
.ph {
  --ph-ink: 241,236,223;               /* logo cream, as rgb for alpha mixing */
  --ph-sage: 134,179,140;
  position: relative; display: block; width: 100%; overflow: hidden; isolation: isolate;
  aspect-ratio: 1; border: 1px solid rgba(var(--ph-ink), .2); border-radius: var(--r-md);
  background:
    linear-gradient(rgba(var(--ph-ink), .05) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(var(--ph-ink), .05) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(160deg, #26325A 0%, #1F2842 52%, #161D35 100%);
}
.ph::before {                           /* dashed inner boundary */
  content: ''; position: absolute; inset: 10px; border: 1px dashed rgba(var(--ph-ink), .18); border-radius: 3px; pointer-events: none; z-index: 0;
}
.ph-glyph { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: block; z-index: 1; }
.ph-glyph::before, .ph-glyph::after { content: ''; position: absolute; }
.ph-label {
  position: absolute; left: 22px; bottom: 18px; z-index: 2; max-width: calc(100% - 44px);
  font: 500 12px/1.2 'IBM Plex Mono', ui-monospace, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; color: #B4BDD0;
}
.ph-label::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: rgb(var(--ph-sage)); vertical-align: 1px; }

/* puck: ring + dashed ring + dot (the logo mark, drawn as a wireframe) */
.ph--puck .ph-glyph { width: 46%; aspect-ratio: 1; border: 1.5px solid rgba(var(--ph-ink), .5); border-radius: 50%; }
.ph--puck .ph-glyph::before { inset: 17%; border: 1.5px dashed rgba(var(--ph-ink), .4); border-radius: 50%; }
.ph--puck .ph-glyph::after  { left: 50%; top: 50%; width: 16%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: rgb(var(--ph-sage)); }
.ph[data-view="angle"] .ph-glyph { width: 52%; aspect-ratio: 1.7; }
.ph[data-view="inside"] .ph-glyph { width: 56%; aspect-ratio: 1.5; border-style: dashed; }

/* phone: screen outline, notch, home bar */
.ph--phone .ph-glyph { height: 82%; aspect-ratio: 853 / 1844; border: 1.5px solid rgba(var(--ph-ink), .5); border-radius: 12% / 5.6%; }
.ph--phone .ph-glyph::before { left: 50%; top: 2.6%; width: 30%; height: 2.4%; translate: -50% 0; border: 1.5px solid rgba(var(--ph-ink), .4); border-radius: 99px; }
.ph--phone .ph-glyph::after  { left: 50%; bottom: 2.4%; width: 34%; height: 0; translate: -50% 0; border-top: 2px solid rgba(var(--ph-ink), .4); border-radius: 2px; }
.ph--phone.ph--solo { border-radius: 36px; }
.ph--phone.ph--solo .ph-glyph { height: calc(100% - 64px); top: calc(50% - 16px); }
.ph--phone.ph--solo .ph-label { left: 50%; translate: -50% 0; bottom: 16px; white-space: nowrap; }

/* scene (fridge / shelf): shelf lines + a small device */
.ph--scene .ph-glyph { width: 62%; height: 54%; border: 1.5px solid rgba(var(--ph-ink), .5); border-radius: 4px; }
.ph--scene .ph-glyph::before { left: 0; right: 0; top: 62%; border-top: 1.5px solid rgba(var(--ph-ink), .4); }
.ph--scene .ph-glyph::after  { left: 18%; top: 62%; width: 17%; aspect-ratio: 1; translate: 0 -100%; border: 1.5px solid rgb(var(--ph-sage)); border-radius: 50%; }

.ph--mini { border-radius: 4px; }
.ph--mini::before, .ph--mini .ph-label { display: none; }
.ph--mini .ph-glyph { width: 52%; }
