/* ══════════════════════════════════════════
   RECIPES BY LENI — SAGE & LINEN STYLESHEET
   Font: Cormorant Garamond + DM Sans
   Palette: Sage green · Warm linen · Charcoal
══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600;1,700&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ── VARIABLES ── */
:root {
  --bg:        #F8F7F4;
  --bg-alt:    #F2F0EC;
  --card:      #FFFFFF;
  --nav-bg:    rgba(248,247,244,0.95);
  --sage:      #7C9E7E;
  --sage-d:    #5A7D5C;
  --sage-l:    #EAF0EA;
  --sage-mid:  #C5D9C6;
  --text:      #2A332B;
  --text-2:    #8A9B8C;
  --border:    #E4E0D9;
  --input-bg:  #F5F3EF;
  --danger:    #B85450;
  --danger-l:  #FDECEA;
  --shadow-sm: 0 2px 12px rgba(42,51,43,.06);
  --shadow-md: 0 8px 32px rgba(42,51,43,.11);
  --shadow-lg: 0 20px 60px rgba(42,51,43,.15);
  --radius:    18px;
  --max-w:     1200px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  opacity: 0;
  animation: pageFadeIn .5s .1s forwards;
}
@keyframes pageFadeIn {
  to { opacity: 1; }
}

/* ══════════════════════════════════════════
   LOADING OVERLAY
══════════════════════════════════════════ */
.loading-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(248,247,244,.92);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 16px;
  z-index: 1000; backdrop-filter: blur(8px);
}
.loading-overlay.show { display: flex; }
.spin-icon { font-size: 52px; animation: spin 1.2s linear infinite; display: inline-block; }
.loading-overlay p { font-size: 15px; color: var(--text-2); font-weight: 500; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════ */
.navbar {
  background: var(--nav-bg);
  position: sticky; top: 0; z-index: 200;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.navbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.navbar-left  { display: flex; align-items: center; }
.navbar-center { display: flex; justify-content: center; }
.navbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }

.navbar-greeting {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: .2px;
}
.navbar-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: -.3px;
}
.navbar-brand em { color: var(--sage); font-style: italic; }

.search-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--sage-l);
  border: 1.5px solid var(--sage-mid);
  border-radius: 30px;
  padding: 8px 16px;
  transition: all .2s;
}
.search-pill:focus-within {
  background: #fff;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(124,158,126,.15);
}
.search-pill svg { width: 16px; height: 16px; color: var(--sage); flex-shrink: 0; }
.search-pill input {
  background: none; border: none; outline: none;
  font-size: 14px; font-family: 'DM Sans', sans-serif;
  color: var(--text); width: 160px;
}
.search-pill input::placeholder { color: var(--text-2); }

.nav-icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--sage-l);
  border: 1.5px solid var(--sage-mid);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--sage-d);
  transition: all .2s;
}
.nav-icon-btn:hover { background: var(--sage); color: #fff; border-color: var(--sage); }
.nav-icon-btn svg { width: 18px; height: 18px; }

/* ══════════════════════════════════════════
   HERO — SPLIT LAYOUT
══════════════════════════════════════════ */
.hero {
  display: flex;
  min-height: calc(100vh - 72px);
  overflow: hidden;
}

.hero-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 64px 80px 80px;
  background: var(--bg);
  position: relative;
  z-index: 1;
}

.hero-right {
  flex: 0 0 50%;
  position: relative;
  overflow: hidden;
}
.hero-right::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to right,
    var(--bg) 0%,
    transparent 15%
  );
  z-index: 1;
  pointer-events: none;
}
.hero-right img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
  transition: transform 8s ease;
}
.hero-right:hover img { transform: scale(1.03); }

.hero-tagline {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sage-d);
  margin-bottom: 28px;
  animation: heroFadeUp .7s .1s both;
}
.hero-tagline::before {
  content: '"';
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--sage);
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  margin-top: -2px;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(46px, 6vw, 78px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -1px;
  animation: heroFadeUp .8s .25s both;
}
.hero-title em {
  color: var(--sage-d);
  font-style: italic;
  display: block;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 44px;
  max-width: 420px;
  font-weight: 400;
  animation: heroFadeUp .8s .4s both;
}

.hero-cta {
  display: inline-flex; align-items: center; gap: 10px;
  align-self: flex-start;
  padding: 17px 40px;
  background: var(--sage);
  color: #fff; border: none; border-radius: 50px;
  font-size: 15px; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer; letter-spacing: .3px;
  box-shadow: 0 8px 28px rgba(124,158,126,.35);
  transition: background .2s, transform .15s, box-shadow .2s;
  animation: heroFadeUp .8s .55s both;
}
.hero-cta:hover {
  background: var(--sage-d);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(90,125,92,.4);
}
.hero-cta:active { transform: translateY(0); }

/* decorative floating pill */
.hero-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 30px;
  padding: 8px 16px 8px 12px;
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
  width: fit-content;
}
.hero-pill-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 3px rgba(124,158,126,.25);
}

/* ══════════════════════════════════════════
   ABOUT STRIP
══════════════════════════════════════════ */
.about-strip {
  background: var(--sage-l);
  border-top: 1px solid var(--sage-mid);
  border-bottom: 1px solid var(--sage-mid);
  padding: 72px 48px;
}
.about-strip-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 72px;
  align-items: center;
}
.about-eyebrow {
  font-size: 11px; font-weight: 700;
  color: var(--sage-d); text-transform: uppercase;
  letter-spacing: 2.5px; margin-bottom: 20px;
}
.about-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600; font-style: italic;
  color: var(--text); line-height: 1.35;
  padding-left: 22px;
  border-left: 3px solid var(--sage);
  margin: 0;
}
.about-text {
  font-size: 16px; color: var(--text-2);
  line-height: 1.85; margin-bottom: 24px;
}
.about-signature {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-style: italic;
  color: var(--sage-d); font-weight: 600;
}

/* ══════════════════════════════════════════
   RECIPES SECTION
══════════════════════════════════════════ */
.recipes-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 72px 48px 96px;
}
.section-header {
  display: flex; align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1.5px solid var(--border);
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px; font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -.5px;
  line-height: 1.1;
}
.section-sub { font-size: 14px; color: var(--text-2); font-weight: 400; }

/* ══════════════════════════════════════════
   BENTO GRID
══════════════════════════════════════════ */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  grid-auto-flow: dense;
  gap: 18px;
}

/* Bento size modifiers */
.bento-lg   { grid-column: span 2; grid-row: span 2; }
.bento-tall { grid-row: span 2; }
.bento-wide { grid-column: span 2; }

/* ══════════════════════════════════════════
   FLIP CARD
══════════════════════════════════════════ */
.recipe-card {
  perspective: 1400px;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: visible; /* must stay visible for 3D */
}

/* Inner — the thing that flips */
.card-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.4, 0, .2, 1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  will-change: transform;
}
.recipe-card:not(.flipped):hover .card-inner {
  box-shadow: var(--shadow-md);
}
.recipe-card.flipped .card-inner {
  transform: rotateY(180deg);
  box-shadow: var(--shadow-md);
}

/* Both faces */
.card-front,
.card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  overflow: hidden;
}

/* ── FRONT FACE ── */
.card-front {
  background: var(--sage-l);
}
.card-front img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .55s ease;
}
.recipe-card:not(.flipped):hover .card-front img {
  transform: scale(1.05);
}
.card-no-photo {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--sage-l); font-size: 72px;
}

/* Hover overlay — slides up from bottom */
.card-front-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(42,51,43,.8) 0%, rgba(42,51,43,.2) 55%, transparent 100%);
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s ease, transform .3s ease;
}
.recipe-card:not(.flipped):hover .card-front-overlay {
  opacity: 1; transform: translateY(0);
}
.card-front-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 700;
  color: #fff; line-height: 1.2; margin-bottom: 4px;
}
.card-front-servings {
  font-size: 12px; color: rgba(255,255,255,.75);
  font-weight: 500; letter-spacing: .3px;
}

/* "Tap" pill — top right corner */
.card-front-hint {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 5px 11px; border-radius: 20px;
  opacity: 0; transition: opacity .3s;
  pointer-events: none;
}
.recipe-card:not(.flipped):hover .card-front-hint { opacity: 1; }

/* ── BACK FACE ── */
.card-back {
  transform: rotateY(180deg);
  background: var(--card);
  border: 1.5px solid var(--border);
  padding: 20px;
  display: flex; flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  /* custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--sage-mid) transparent;
}
.card-back::-webkit-scrollbar { width: 4px; }
.card-back::-webkit-scrollbar-thumb { background: var(--sage-mid); border-radius: 4px; }

.card-back-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 8px;
  flex-shrink: 0;
}
.card-back-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px; font-weight: 700;
  color: var(--text); line-height: 1.2; flex: 1;
}
.card-back-close {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-2);
  transition: all .2s;
}
.card-back-close:hover { background: var(--sage-l); border-color: var(--sage-mid); color: var(--sage-d); }
.card-back-close svg { width: 14px; height: 14px; }

.card-back-desc {
  font-size: 12px; color: var(--text-2); line-height: 1.6; flex-shrink: 0;
}
.card-back-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; color: var(--sage-d);
  text-transform: uppercase; letter-spacing: .5px;
  background: var(--sage-l); border: 1px solid var(--sage-mid);
  border-radius: 20px; padding: 3px 9px; flex-shrink: 0;
}

/* Mini scale row */
.card-scale-row {
  display: flex; gap: 5px; flex-shrink: 0;
}
.card-scale-btn {
  flex: 1; padding: 6px 2px;
  border: 1.5px solid var(--border); border-radius: 8px;
  background: none; font-size: 12px; font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-2); cursor: pointer;
  transition: all .15s;
}
.card-scale-btn:hover { border-color: var(--sage-mid); color: var(--sage-d); }
.card-scale-btn.active { border-color: var(--sage); background: var(--sage); color: #fff; }

/* Section label */
.card-back-section {
  font-size: 10px; font-weight: 700; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 1px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--border);
  flex-shrink: 0;
}

/* Ingredients */
.card-back-ings {
  list-style: none; display: flex; flex-direction: column; gap: 5px;
}
.card-back-ings li {
  display: flex; align-items: baseline; gap: 5px;
  font-size: 12px; color: var(--text);
}
.card-ing-amt {
  font-weight: 700; color: var(--sage-d);
  background: var(--sage-l); border-radius: 4px;
  padding: 1px 5px; min-width: 36px; max-width: 64px;
  text-align: center; font-size: 12px; flex-shrink: 0;
  font-family: 'DM Sans', sans-serif;
  border: 1.5px solid transparent;
  transition: border-color .15s, background .15s;
  -moz-appearance: textfield;
}
.card-ing-amt::-webkit-outer-spin-button,
.card-ing-amt::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.card-ing-amt:focus {
  outline: none; border-color: var(--sage);
  background: #fff;
}
.card-ing-hint {
  font-size: 10px; font-weight: 400; color: var(--text-2);
  font-style: italic; margin-left: 6px;
}
.card-ing-unit { color: var(--text-2); font-size: 11px; flex-shrink: 0; }
.card-ing-name { color: var(--text); }

/* Change photo button */
.card-change-photo-btn {
  width: 100%; padding: 8px;
  border: none; border-top: 1px solid var(--border);
  background: none;
  color: var(--text-2); font-size: 11px; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer; text-align: left;
  transition: color .2s; flex-shrink: 0;
  margin-top: 6px;
}
.card-change-photo-btn:hover { color: var(--sage-d); }

/* Steps */
.card-back-steps {
  list-style: none; display: flex; flex-direction: column; gap: 8px;
}
.card-back-steps li {
  display: flex; gap: 8px;
  font-size: 12px; color: var(--text); line-height: 1.55;
  align-items: flex-start;
}
.card-step-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--sage); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0; margin-top: 1px;
}

/* Delete */
.card-delete-btn {
  margin-top: auto; padding-top: 10px;
  border: none; border-top: 1px solid var(--danger-l);
  background: none;
  color: var(--danger); font-size: 11px; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer; text-align: left;
  transition: color .2s; flex-shrink: 0;
}
.card-delete-btn:hover { color: #8b3535; }

/* ── Empty State ── */
.empty-state {
  text-align: center; padding: 96px 24px; color: var(--text-2);
}
.empty-icon { font-size: 80px; margin-bottom: 24px; display: block; }
.empty-state h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px; color: var(--text); margin-bottom: 10px;
}
.empty-state p { font-size: 15px; line-height: 1.7; max-width: 340px; margin: 0 auto; }

/* ══════════════════════════════════════════
   FLUID FAB
══════════════════════════════════════════ */

/* Invisible scrim — click to close */
.fab-scrim {
  display: none;
  position: fixed; inset: 0;
  z-index: 98;
  cursor: default;
}
.fab-scrim.show { display: block; }

/* Root container — fixed at bottom-right */
.fab-container {
  position: fixed;
  bottom: 40px; right: 40px;
  width: 62px; height: 62px;
  z-index: 100;
}

/* Main toggle button */
.fab-main {
  position: absolute;
  bottom: 0; right: 0;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(124,158,126,.45);
  transition: background .25s, box-shadow .25s, transform .2s;
  z-index: 5;
  /* subtle idle pulse */
  animation: fabPulse 3.5s ease-in-out infinite;
}
.fab-container.open .fab-main {
  background: var(--sage-d);
  animation: none;
  box-shadow: 0 10px 32px rgba(90,125,92,.5);
}
.fab-main:active { transform: scale(.93); }

@keyframes fabPulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(124,158,126,.45); }
  50%       { box-shadow: 0 8px 28px rgba(124,158,126,.45), 0 0 0 10px rgba(124,158,126,.1); }
}

/* Icon morph: + → × */
.fab-icon-wrap {
  position: relative;
  width: 26px; height: 26px;
}
.fab-icon {
  position: absolute; inset: 0;
  width: 26px; height: 26px;
  transition: transform .35s cubic-bezier(.34,1.4,.64,1), opacity .25s ease;
  will-change: transform, opacity;
}
/* Plus — visible by default */
.fab-icon-plus  { transform: rotate(0deg) scale(1);    opacity: 1; }
.fab-icon-x     { transform: rotate(-45deg) scale(.5); opacity: 0; }
/* When open: swap */
.fab-container.open .fab-icon-plus { transform: rotate(45deg) scale(.5);  opacity: 0; }
.fab-container.open .fab-icon-x   { transform: rotate(0deg) scale(1);    opacity: 1; }

/* ── Each spoke (label + sub-button) ── */
.fab-spoke {
  position: absolute;
  /* align right edge with main button */
  bottom: 6px; right: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  /* collapsed state: stacked on main button */
  opacity: 0;
  pointer-events: none;
  transform: translateY(0px) scale(.7);
  transform-origin: bottom right;
  transition:
    transform .38s cubic-bezier(.34,1.28,.64,1),
    opacity   .22s ease;
  will-change: transform, opacity;
}

/* ── Open: slide spokes up ── */
.fab-container.open .fab-spoke[data-index="0"] {
  transform: translateY(-76px) scale(1);
  opacity: 1; pointer-events: all;
  transition-delay: 0ms;
}
.fab-container.open .fab-spoke[data-index="1"] {
  transform: translateY(-152px) scale(1);
  opacity: 1; pointer-events: all;
  transition-delay: 45ms;
}
.fab-container.open .fab-spoke[data-index="2"] {
  transform: translateY(-228px) scale(1);
  opacity: 1; pointer-events: all;
  transition-delay: 90ms;
}

/* ── Label pill ── */
.fab-spoke-label {
  background: var(--text);
  color: rgba(255,255,255,.92);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px; font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  letter-spacing: .2px;
  box-shadow: var(--shadow-md);
  /* enter from right */
  opacity: 0;
  transform: translateX(10px);
  transition: opacity .22s ease, transform .3s cubic-bezier(.34,1.2,.64,1);
  pointer-events: none;
  user-select: none;
}
.fab-container.open .fab-spoke[data-index="0"] .fab-spoke-label {
  opacity: 1; transform: translateX(0);
  transition-delay: 60ms;
}
.fab-container.open .fab-spoke[data-index="1"] .fab-spoke-label {
  opacity: 1; transform: translateX(0);
  transition-delay: 100ms;
}
.fab-container.open .fab-spoke[data-index="2"] .fab-spoke-label {
  opacity: 1; transform: translateX(0);
  transition-delay: 140ms;
}

/* ── Sub button ── */
.fab-sub-btn {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--card);
  border: 1.5px solid var(--border);
  box-shadow: 0 6px 20px rgba(42,51,43,.12);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--sage-d);
  transition: background .2s, transform .2s, border-color .2s, box-shadow .2s;
  flex-shrink: 0;
}
.fab-sub-btn svg { width: 20px; height: 20px; }
.fab-sub-btn:hover {
  background: var(--sage-l);
  border-color: var(--sage-mid);
  transform: scale(1.12);
  box-shadow: 0 8px 24px rgba(124,158,126,.25);
}
.fab-sub-btn:active { transform: scale(.95); }

/* ══════════════════════════════════════════
   MODAL BASE
══════════════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(42,51,43,.45);
  z-index: 500;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: flex-start; justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--card);
  border-radius: 24px;
  width: 100%; max-width: 700px;
  margin: auto;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn .28s cubic-bezier(.22,.87,.36,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(28px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  background: var(--bg-alt);
  padding: 22px 28px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1.5px solid var(--border);
}
.modal-header-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 700; color: var(--text);
}
.modal-x-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--border); border: none;
  color: var(--text-2); font-size: 15px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.modal-x-btn:hover { background: var(--sage-l); color: var(--sage-d); }

.modal-body { padding: 32px; overflow-y: auto; max-height: 80vh; }

/* ══════════════════════════════════════════
   ADD / SETTINGS MODAL SHARED
══════════════════════════════════════════ */
.add-modal, .settings-modal { max-width: 660px; }

/* Photo zone */
.photo-zone {
  width: 100%; height: 175px;
  border: 2.5px dashed var(--sage-mid); border-radius: var(--radius);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  cursor: pointer; background: var(--sage-l); margin-bottom: 20px;
  transition: all .2s;
}
.photo-zone:hover { background: #dce9dc; border-color: var(--sage); }
.photo-zone-icon { font-size: 42px; }
.photo-zone-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px; font-weight: 700; color: var(--sage-d);
}
.photo-zone-sub { font-size: 13px; color: var(--text-2); }

.photo-preview-img {
  width: 100%; height: 230px; object-fit: cover;
  border-radius: var(--radius); margin-bottom: 14px;
  display: none; box-shadow: var(--shadow-md);
}
.retake-btn {
  display: none; width: 100%; padding: 11px;
  background: none; border: 1.5px solid var(--border); border-radius: 12px;
  font-size: 14px; font-family: 'DM Sans', sans-serif;
  color: var(--text-2); cursor: pointer; margin-bottom: 14px;
  transition: border-color .2s;
}
.retake-btn:hover { border-color: var(--sage-mid); }

/* ── COLLECTION PICKER ── */
.collection-toggle-btn {
  width: 100%; padding: 11px;
  background: none; border: 1.5px dashed var(--sage-mid); border-radius: 12px;
  font-size: 14px; font-family: 'DM Sans', sans-serif;
  color: var(--sage-d); cursor: pointer; margin-bottom: 14px;
  transition: border-color .2s, background .2s;
}
.collection-toggle-btn:hover {
  border-color: var(--sage); background: var(--sage-l);
}
.collection-picker {
  background: var(--bg-alt); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  margin-bottom: 14px;
}
.collection-picker-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-2); margin: 0 0 10px;
}
.collection-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}
.collection-thumb {
  cursor: pointer; border-radius: 10px; overflow: hidden;
  border: 2px solid transparent; transition: border-color .2s, transform .15s;
  display: flex; flex-direction: column; align-items: center;
}
.collection-thumb:hover {
  border-color: var(--sage); transform: scale(1.03);
}
.collection-thumb img {
  width: 100%; height: 80px; object-fit: cover; display: block;
}
.collection-thumb-label {
  font-size: 11px; font-family: 'DM Sans', sans-serif; color: var(--text-2);
  padding: 4px 4px 6px; text-align: center; background: var(--card);
  width: 100%;
}

.ai-extract-btn {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, var(--sage), var(--sage-d));
  color: #fff; border: none; border-radius: var(--radius);
  font-size: 16px; font-weight: 600; font-family: 'DM Sans', sans-serif;
  cursor: pointer; display: none;
  align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 14px;
  box-shadow: 0 6px 20px rgba(124,158,126,.4);
  transition: opacity .2s;
}
.ai-extract-btn:hover { opacity: .9; }
.ai-extract-btn.visible { display: flex; }
.ai-loading-box {
  display: none; text-align: center;
  background: var(--bg-alt); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 28px; margin-bottom: 18px;
}
.ai-loading-box.visible { display: block; }
.ai-spin { display: inline-block; font-size: 40px; animation: spin 1.3s linear infinite; }
.ai-loading-box p { margin-top: 12px; color: var(--text-2); font-size: 14px; }

.or-divider {
  text-align: center; color: var(--text-2); font-size: 13px;
  margin: 10px 0 20px; position: relative;
}
.or-divider::before, .or-divider::after {
  content: ''; position: absolute; top: 50%;
  width: 40%; height: 1px; background: var(--border);
}
.or-divider::before { left: 0; }
.or-divider::after  { right: 0; }

/* Form elements */
.form-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px; font-weight: 700; color: var(--text);
  margin: 24px 0 14px; padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }
.form-group { margin-bottom: 14px; }
.form-label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--text-2); text-transform: uppercase;
  letter-spacing: .7px; margin-bottom: 7px;
}
.form-input {
  width: 100%; padding: 13px 16px;
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 12px; font-size: 15px;
  font-family: 'DM Sans', sans-serif; color: var(--text);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.form-input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(124,158,126,.15);
}
textarea.form-input { resize: vertical; min-height: 84px; }

.ing-editor {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.ing-editor-row {
  display: flex; gap: 6px; padding: 11px 16px;
  border-bottom: 1px solid var(--border); align-items: center;
}
.ing-editor-row:last-child { border-bottom: none; }
.ing-editor-row input {
  background: none; border: none; font-size: 14px;
  font-family: 'DM Sans', sans-serif; color: var(--text); outline: none;
}
.ing-editor-row .e-amt  { width: 56px; font-weight: 700; color: var(--sage-d); }
.ing-editor-row .e-unit { width: 60px; color: var(--text-2); }
.ing-editor-row .e-name { flex: 1; }
.ing-editor-row .e-del {
  background: none; border: none; font-size: 20px;
  color: var(--text-2); cursor: pointer; padding: 0 4px; line-height: 1;
  transition: color .15s;
}
.ing-editor-row .e-del:hover { color: var(--danger); }
.step-editor-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.step-editor-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--sage); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0; margin-top: 11px;
  box-shadow: 0 2px 8px rgba(124,158,126,.3);
}
.add-row-btn {
  width: 100%; padding: 12px;
  background: none; border: 1.5px dashed var(--sage-mid);
  border-radius: 12px; color: var(--sage-d);
  font-size: 14px; font-weight: 600; font-family: 'DM Sans', sans-serif;
  cursor: pointer; margin-top: 10px;
  transition: all .2s;
}
.add-row-btn:hover { border-color: var(--sage); background: var(--sage-l); }

/* Buttons */
.btn-primary {
  width: 100%; padding: 16px;
  background: var(--sage); color: #fff; border: none;
  border-radius: var(--radius); font-size: 16px; font-weight: 600;
  font-family: 'DM Sans', sans-serif; cursor: pointer;
  margin-top: 14px; letter-spacing: .2px;
  box-shadow: 0 6px 20px rgba(124,158,126,.35);
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--sage-d); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-outline {
  width: 100%; padding: 14px;
  background: none; color: var(--sage-d);
  border: 2px solid var(--sage-mid); border-radius: var(--radius);
  font-size: 15px; font-weight: 600; font-family: 'DM Sans', sans-serif;
  cursor: pointer; margin-top: 10px; transition: all .2s;
}
.btn-outline:hover { background: var(--sage-l); border-color: var(--sage); }

/* Settings cards */
.settings-card {
  background: var(--bg-alt); border-radius: var(--radius);
  padding: 22px; border: 1.5px solid var(--border); margin-bottom: 14px;
}
.settings-card-icon { font-size: 28px; margin-bottom: 10px; }
.settings-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 6px;
}
.settings-card-desc { font-size: 13px; color: var(--text-2); line-height: 1.65; margin-bottom: 14px; }
.danger-card { border-color: var(--danger-l); background: #fff9f9; }
.danger-card .settings-card-title { color: var(--danger); }
.btn-danger {
  width: 100%; padding: 13px;
  background: none; border: 2px solid var(--danger-l);
  border-radius: 12px; color: var(--danger);
  font-size: 14px; font-weight: 600; font-family: 'DM Sans', sans-serif;
  cursor: pointer; transition: background .2s;
}
.btn-danger:hover { background: var(--danger-l); }

/* ══════════════════════════════════════════
   FOOTER — MARQUEE
══════════════════════════════════════════ */
.site-footer {
  background: var(--text);
  overflow: hidden;
  padding: 0;
}
.footer-marquee {
  display: flex;
  white-space: nowrap;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 0;
  animation: marquee 28s linear infinite;
  will-change: transform;
}
.marquee-track .m-item {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 0 32px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px; font-style: italic; font-weight: 600;
  color: rgba(255,255,255,.55);
  letter-spacing: .5px;
}
.marquee-track .m-item .m-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--sage);
  flex-shrink: 0;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.footer-copy {
  text-align: center;
  padding: 20px 24px;
  font-size: 12px;
  color: rgba(255,255,255,.3);
  font-weight: 400;
  letter-spacing: .3px;
}

/* ══════════════════════════════════════════
   TOAST
══════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 36px; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--text); color: rgba(255,255,255,.95);
  padding: 13px 26px; border-radius: 18px;
  font-size: 14px; font-weight: 500;
  z-index: 2000; opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  white-space: normal;
  word-break: break-word;
  max-width: calc(100vw - 48px);
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,.06);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ══════════════════════════════════════════
   NAVBAR SCROLL EFFECT
══════════════════════════════════════════ */
.navbar {
  transition: box-shadow .3s ease, background .3s ease;
}
.navbar.scrolled {
  box-shadow: 0 4px 32px rgba(42,51,43,.12);
}

/* ══════════════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .75s cubic-bezier(.22,.87,.36,1),
              transform .75s cubic-bezier(.22,.87,.36,1);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity .75s cubic-bezier(.22,.87,.36,1),
              transform .75s cubic-bezier(.22,.87,.36,1);
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity .75s cubic-bezier(.22,.87,.36,1),
              transform .75s cubic-bezier(.22,.87,.36,1);
}
.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0);
}
.reveal-left.visible { transition-delay: .1s; }
.reveal-right.visible { transition-delay: .2s; }

/* ══════════════════════════════════════════
   RECIPE CARD STAGGER ENTRANCE
══════════════════════════════════════════ */
@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.recipe-card {
  animation: cardEntrance .55s both;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero-left { padding: 64px 48px 64px 56px; }

  /* Bento: 3 columns on mid-size screens */
  .recipe-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar-inner { padding: 0 20px; height: 62px; }
  .navbar-greeting { display: none; }
  .navbar-inner { grid-template-columns: auto 1fr auto; }
  .navbar-center { justify-content: flex-start; }
  .navbar-brand { font-size: 20px; }
  .search-pill input { width: 110px; }

  /* Stack hero on mobile: image top, text bottom */
  .hero {
    flex-direction: column;
    min-height: auto;
  }
  .hero-right {
    flex: 0 0 55vw;
    height: 56vw;
    max-height: 320px;
    order: -1;
  }
  .hero-right::after {
    background: linear-gradient(to bottom, transparent 60%, var(--bg) 100%);
  }
  .hero-left {
    padding: 32px 24px 56px;
  }
  .hero-title { font-size: clamp(38px, 9vw, 52px); }
  .hero-sub { font-size: 15px; max-width: 100%; }
  .hero-cta { padding: 15px 32px; align-self: flex-start; }

  .about-strip { padding: 52px 24px; }
  .about-strip-inner { grid-template-columns: 1fr; gap: 32px; }

  .recipes-section { padding: 44px 20px 64px; }
  .section-title { font-size: 30px; }

  /* Bento: 2 columns on tablet, flatten tall spans */
  .recipe-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
    gap: 14px;
  }
  .bento-lg   { grid-column: span 2; grid-row: span 1; }
  .bento-tall { grid-row: span 1; }
  .bento-wide { grid-column: span 2; }

  .fab-container { bottom: 24px; right: 20px; width: 56px; height: 56px; }
  .fab-main { width: 56px; height: 56px; }
  .fab-container.open .fab-spoke[data-index="0"] { transform: translateY(-70px) scale(1); }
  .fab-container.open .fab-spoke[data-index="1"] { transform: translateY(-140px) scale(1); }
  .fab-container.open .fab-spoke[data-index="2"] { transform: translateY(-210px) scale(1); }

  .modal-overlay { padding: 12px; }
  .modal-body { padding: 22px; max-height: 88vh; }

  .form-row { flex-direction: column; gap: 0; }
}

@media (max-width: 480px) {
  .recipe-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 190px;
    gap: 10px;
  }
  /* On small phones all cards same size */
  .bento-lg, .bento-wide { grid-column: span 2; grid-row: span 1; }
  .bento-tall { grid-row: span 1; }
  .card-front-title { font-size: 17px; }
}

/* ══════════════════════════════════════════
   LOGIN OVERLAY
══════════════════════════════════════════ */
.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}

.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
}

.login-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 4px;
}

.login-brand em {
  color: var(--sage);
  font-style: italic;
}

.login-sub {
  text-align: center;
  color: var(--text-2);
  font-size: 13px;
  margin-bottom: 28px;
}

.login-error {
  color: var(--danger);
  font-size: 13px;
  min-height: 18px;
  margin: 8px 0 0;
}
