/* Jelly Fork design system for the web: the iPhone app's tokens and components
   (FoodMatch/Design/JellyStage.swift JellyInk, Glass.swift, GooeyButtons.swift, Theme.swift).
   Shared by the landing page (index.html) and the web app (app.html). Motion is slow and calm:
   no bounce, no flicker; prefers-reduced-motion stops the moving light. */

@font-face {
  font-family: "Fredoka"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/fonts/Fredoka-Bold.ttf") format("truetype");
}
@font-face {
  font-family: "Fredoka"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("/fonts/Fredoka-SemiBold.ttf") format("truetype");
}

:root {
  /* JellyInk */
  --cream: #FFF1E4;
  --blush: #FCE3EC;
  --glow: #FFC9A3;
  --coral: #FF7A59;
  --tomato: #FF5A3C;
  --raspberry: #E5405E;
  --plum: #3A2E36;
  --heart: #FF4F7B;
  --yum: #2BAF61;
  --nah: #E8607A;
  --night: #2E2428;

  --accent: var(--tomato);
  --accent-ink: #FFFFFF;
  --accent-text: #D2401F;           /* tomato for small text on cream (4.5:1) */
  --bg: var(--cream);
  --bg-wash: linear-gradient(180deg, var(--cream) 0%, var(--blush) 100%);
  --ink: #1D1619;
  --ink-2: #6A5C63;
  --ink-3: #72646B;           /* 4.6:1 or better on every cream/blush tint */
  --line: rgba(58, 46, 54, 0.10);
  --surface: rgba(255, 255, 255, 0.72);       /* jelly card */
  --surface-solid: #FFF9F6;
  --surface-2: rgba(58, 46, 54, 0.06);        /* fields, soft chips */
  --surface-rim: rgba(255, 255, 255, 0.85);
  --soft-pill: rgba(255, 255, 255, 0.62);
  --glass: rgba(255, 255, 255, 0.66);
  --glass-line: rgba(255, 255, 255, 0.7);
  --pill: rgba(255, 255, 255, 0.5);
  --chip: rgba(58, 46, 54, 0.07);
  --shadow-sm: 0 1px 2px rgba(80, 30, 30, 0.05), 0 4px 14px rgba(120, 50, 40, 0.07);
  --shadow: 0 1px 2px rgba(80, 30, 30, 0.06), 0 14px 34px rgba(150, 60, 50, 0.13);
  --shadow-cta: 0 10px 24px rgba(229, 64, 94, 0.28);
  --focus: var(--tomato);
  --favorite: #C2361B;
  --done: #1E7A4C;

  --radius-card: 32px;
  --radius-panel: 24px;
  --radius-tile: 22px;
  --gutter: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Fredoka", ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  --ease: cubic-bezier(.25, .8, .25, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1A1417;
    --bg-wash: radial-gradient(120% 60% at 50% 0%, rgba(255, 122, 89, 0.16), transparent 60%), linear-gradient(180deg, #211A1D 0%, #17121A 100%);
    --ink: #F8EEF0;
    --ink-2: #C9B9C0;
    --ink-3: #A5959C;
    --accent-text: #FF8A6E;
    --line: rgba(255, 255, 255, 0.10);
    --surface: rgba(46, 36, 40, 0.86);
    --surface-solid: var(--night);
    --surface-2: rgba(255, 255, 255, 0.07);
    --surface-rim: rgba(255, 255, 255, 0.08);
    --soft-pill: rgba(255, 90, 60, 0.16);
    --glass: rgba(46, 36, 40, 0.72);
    --glass-line: rgba(255, 255, 255, 0.10);
    --pill: rgba(0, 0, 0, 0.30);
    --chip: rgba(255, 255, 255, 0.10);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 16px rgba(0, 0, 0, 0.25);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.45);
    --favorite: #FF9C80;
    --done: #4CC48A;
    --focus: #FF8A6E;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image: var(--bg-wash);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overflow-x: clip;
}
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 12px 18px; border-radius: 999px;
  background: var(--surface-solid); color: var(--ink); font: 600 16px/1 var(--font); text-decoration: none; box-shadow: var(--shadow);
}
.skip-link:focus, .skip-link:focus-visible { top: 12px; }
/* Site footer on every page that isn't the landing page or a guide (those use landing.css .foot). */
.site-foot {
  max-width: 720px; margin: 40px auto 0; padding: 18px var(--gutter) calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px;
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0 16px; }
.site-foot a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.site-foot p { margin: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Type */
.head, h1, h2, h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
.eyebrow-word { display: block; height: 30px; width: auto; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; font-weight: 700; color: var(--ink-3); margin: 0 0 8px; }

/* Jelly card surface */
.jcard {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--surface-rim);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
}

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; padding: 0 24px; border-radius: 999px; border: 0;
  font: 600 18px/1.1 var(--font-head); letter-spacing: 0; text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), opacity .2s, box-shadow .2s;
  -webkit-user-select: none; user-select: none;
}
.btn:active { transform: scale(0.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: default; }
.btn svg { width: 22px; height: 22px; flex: none; }

/* Tomato candy pill (GooeyCandy): coral top, tomato middle, raspberry edge, a soft gloss. */
.btn-primary {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, var(--coral) 0%, var(--tomato) 52%, #EE4B4E 100%);
  box-shadow: var(--shadow-cta), inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -2px 6px rgba(160, 30, 60, 0.18);
}
.btn-primary svg { fill: currentColor; stroke: none; }

/* The frosted glass ring with the slow liquid light (GlassBorderRing): one turn every 14 s. */
@property --jf-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.ring { position: relative; isolation: isolate; }
.ring::before, .ring::after {
  content: ""; position: absolute; inset: -6px; border-radius: 999px; pointer-events: none; z-index: -1;
  padding: 6px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.ring::before {
  background:
    linear-gradient(135deg, rgba(252, 227, 236, 0.85), rgba(255, 201, 163, 0.55), rgba(252, 227, 236, 0.85));
  box-shadow: inset 0 0 0 1px rgba(229, 64, 94, 0.22);
}
.ring::after {
  --jf-angle: var(--jf-start, 40deg);
  background: conic-gradient(from var(--jf-angle),
    transparent 0turn, rgba(255, 90, 60, .85) .05turn, rgba(255, 122, 89, .95) .11turn, rgba(255, 227, 211, .95) .155turn,
    rgba(255, 122, 89, .95) .2turn, rgba(240, 71, 122, .9) .26turn, transparent .33turn, transparent .55turn,
    rgba(229, 64, 94, .4) .66turn, rgba(255, 90, 60, .45) .74turn, transparent .84turn);
  filter: blur(1.2px);
  animation: jf-turn 14s linear infinite;
}
.ring.slow::after { animation-duration: 18s; opacity: .55; }
@keyframes jf-turn { to { --jf-angle: calc(var(--jf-start, 40deg) + 360deg); } }

/* Soft secondary pill */
.btn-soft {
  color: var(--accent-text);
  background: var(--soft-pill);
  border: 1px solid var(--surface-rim);
  box-shadow: var(--shadow-sm);
}
.btn-soft.ink { color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); min-height: 48px; }
.btn-small { min-height: 44px; font-size: 16px; padding: 0 18px; width: auto; }

/* Map / link chips ("Apple Maps", "Google Maps") */
.link-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--soft-pill); border: 1px solid var(--surface-rim); color: var(--ink);
  font: 600 14px/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
}
.link-chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Pro tag */
.pro-tag {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px;
  font: 700 10px/1.3 var(--font); letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: linear-gradient(180deg, var(--coral), var(--raspberry));
}
.pro-tag svg { width: 9px; height: 9px; fill: currentColor; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .ring::after { animation: none; }
}
