/* ─────────────────────────────────────────────────────────────
   Nature's Cafe — review page
   ───────────────────────────────────────────────────────────── */

:root {
  --forest: #0f2a22;
  --forest-soft: #17402f;
  --moss: #5c7f5a;
  --moss-deep: #3f5f43;
  --sage: #a9c0a0;
  --sage-soft: #cfdcc7;
  --cream: #f7f3e7;
  --paper: #fcfaf2;
  --gold: #d9a441;
  --clay: #c06b43;
  --ink: #14211c;
  --muted: #4d5d53;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: #f6f1e3;
  background-image:
    radial-gradient(880px 520px at 50% -12%, rgba(169, 192, 160, 0.66), transparent 68%),
    radial-gradient(700px 460px at 106% 6%, rgba(217, 164, 65, 0.18), transparent 72%),
    radial-gradient(820px 620px at -10% 94%, rgba(92, 127, 90, 0.22), transparent 70%),
    linear-gradient(180deg, #faf6ea 0%, #f2ecdb 100%);
  background-attachment: fixed;
  padding-bottom: 112px;
  overflow-x: hidden;
}

/* faint leaf-vein texture across the whole page */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%230F2A22' stroke-width='1'%3E%3Cpath d='M-10 210C60 170 100 120 140 20'/%3E%3Cpath d='M18 192c14-2 26-10 34-22'/%3E%3Cpath d='M46 168c14-2 26-10 34-22'/%3E%3Cpath d='M74 142c14-2 26-10 34-22'/%3E%3Cpath d='M102 114c14-2 26-10 34-22'/%3E%3Cpath d='M130 84c14-2 26-10 34-22'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 260px 260px;
}

h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; line-height: 1.08; margin: 0; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; }

.wrap { width: 100%; max-width: 620px; margin-inline: auto; padding-inline: clamp(20px, 5vw, 30px); }

.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;
}

.grain {
  position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0.18;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

/* ── botanical decoration ───────────────────── */

.sprig {
  position: fixed; z-index: 0; pointer-events: none;
  color: var(--moss); opacity: 0.4;
  transform-origin: bottom center;
  animation: sway 14s ease-in-out infinite;
}
.sprig-a { width: 168px; left: -52px; bottom: -36px; }
.sprig-b { width: 140px; right: -46px; top: 54px; opacity: 0.26; animation-delay: -6s; transform: scaleX(-1); }

@keyframes sway {
  0%, 100% { rotate: -2deg; }
  50% { rotate: 2.5deg; }
}

.drift {
  position: fixed; z-index: 0; pointer-events: none;
  width: 26px; color: var(--moss); opacity: 0.16;
  animation: drift 30s ease-in-out infinite;
}
.d1 { left: 7%; top: 16%; }
.d2 { right: 9%; top: 42%; width: 20px; animation-duration: 36s; animation-delay: -8s; opacity: 0.12; }
.d3 { left: 16%; bottom: 18%; width: 18px; animation-duration: 26s; animation-delay: -14s; opacity: 0.1; }

@keyframes drift {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  33% { transform: translate3d(16px, -26px, 0) rotate(12deg); }
  66% { transform: translate3d(-12px, -52px, 0) rotate(-8deg); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

/* ── header ─────────────────────────────────── */

.head {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(16px) saturate(1.05);
  -webkit-backdrop-filter: blur(16px) saturate(1.05);
  background: rgba(247, 243, 231, 0.82);
  border-bottom: 1px solid rgba(15, 42, 34, 0.07);
}
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; }

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--forest); }
.logo {
  width: 38px; height: 38px; display: grid; place-items: center; flex: none;
  border-radius: 50%; background: var(--forest); color: var(--sage-soft);
  box-shadow: 0 8px 18px -12px rgba(15, 42, 34, 0.95), inset 0 0 0 1px rgba(207, 220, 199, 0.18);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.brand:hover .logo { transform: rotate(-8deg) scale(1.06); }
.logo svg { width: 21px; height: 21px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--serif); font-size: 1.08rem; font-weight: 500; }
.brand-text em { font-style: normal; font-size: 0.57rem; letter-spacing: 0.21em; text-transform: uppercase; color: var(--moss); margin-top: 3px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  border: 1px solid rgba(15, 42, 34, 0.14); background: rgba(252, 250, 242, 0.75);
  font-size: 0.72rem; letter-spacing: 0.04em; color: var(--moss); text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}
.pill:hover { color: var(--forest); border-color: var(--forest); background: #fff; transform: translateY(-1px); }
.pill svg { width: 14px; height: 14px; opacity: 0.85; }

/* ── hero ───────────────────────────────────── */

main {
  position: relative; z-index: 1;
  padding-top: clamp(48px, 9vw, 78px);
  text-align: center;
}

/* ── hero photo (drop-in assets/hero.jpg) ───── */

.hero-photo {
  position: absolute; left: 50%; top: -66px; transform: translateX(-50%);
  width: 100vw; height: clamp(380px, 60vh, 540px);
  z-index: -1; overflow: hidden; pointer-events: none;
}
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 58%;
  opacity: 0.68; filter: saturate(0.92) contrast(0.98);
  animation: photoIn 1.5s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
@keyframes photoIn {
  from { opacity: 0; transform: scale(1.05); }
  to { opacity: 0.68; transform: none; }
}

/* soft green veil, fading to cream where the text sits */
.hero-photo-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg,
      rgba(63, 95, 67, 0.22) 0%,
      rgba(247, 243, 231, 0.5) 28%,
      rgba(247, 243, 231, 0.74) 54%,
      rgba(247, 243, 231, 0.93) 80%,
      #f3eddd 100%),
    radial-gradient(85% 60% at 50% 0%, rgba(255, 255, 255, 0.3), transparent 72%);
}

.hero-leaves {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%;
  color: var(--moss); opacity: 0; transition: opacity 0.5s ease;
}

/* no photo yet → a hand-drawn garden so the hero still feels alive */
.hero-photo.is-fallback img { display: none; }
.hero-photo.is-fallback .hero-photo-veil {
  background:
    radial-gradient(58% 52% at 16% 8%, rgba(255, 255, 255, 0.92), transparent 62%),
    radial-gradient(72% 60% at 84% 0%, rgba(217, 164, 65, 0.26), transparent 66%),
    linear-gradient(180deg, #dde7d4 0%, #e7e2cf 50%, #f2ecdb 100%);
}
.hero-photo.is-fallback .hero-leaves { opacity: 0.26; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.63rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--moss-deep); font-weight: 600; margin-bottom: 12px;
  animation: fadeUp 0.7s ease both;
}
.eyebrow svg { width: 15px; height: 15px; }

h1 {
  font-size: clamp(2.05rem, 7vw, 3rem);
  animation: fadeUp 0.7s ease 0.06s both;
}
h1 em { font-style: italic; color: var(--moss); }
h1::after {
  content: ""; display: block; width: 54px; height: 2px; margin: 18px auto 0; border-radius: 2px;
  background: linear-gradient(to right, transparent, var(--sage), transparent);
}

.sub {
  margin: 16px auto 0; max-width: 34ch; color: var(--muted);
  font-size: 0.96rem; line-height: 1.7;
  animation: fadeUp 0.7s ease 0.12s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ── stars in a plate ───────────────────────── */

.star-plate {
  position: relative; margin: 24px auto 0; max-width: 430px;
  padding: 16px 18px 12px; border-radius: 30px;
  background:
    radial-gradient(130% 130% at 50% -20%, #ffffff, rgba(252, 250, 242, 0.94) 52%, rgba(240, 236, 223, 0.97) 100%);
  border: 1px solid rgba(15, 42, 34, 0.08);
  box-shadow: 0 26px 46px -36px rgba(15, 42, 34, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: fadeUp 0.7s ease 0.18s both;
}
.star-plate::before {
  content: ""; position: absolute; inset: 7px; border-radius: 23px;
  border: 1px dashed rgba(92, 127, 90, 0.26); pointer-events: none;
}
.star-plate::after {
  content: ""; position: absolute; inset: 0; border-radius: 30px; pointer-events: none;
  background: radial-gradient(140px 70px at 50% 30%, rgba(217, 164, 65, 0.16), transparent 70%);
}

.stars { display: flex; justify-content: center; gap: 2px; position: relative; z-index: 1; }
.stars button {
  width: 58px; height: 58px; padding: 8px; border: 0; border-radius: 16px;
  background: transparent; color: #cdd9c6; cursor: pointer;
  transition: color 0.18s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.stars button svg { width: 100%; height: 100%; fill: currentColor; display: block; filter: drop-shadow(0 2px 3px rgba(15, 42, 34, 0.07)); }
.stars button:hover { transform: translateY(-3px) scale(1.04); }
.stars button.is-on { color: var(--gold); }
.stars button.pop { animation: starPop 0.46s cubic-bezier(0.2, 1.4, 0.4, 1); }

@keyframes starPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.24) rotate(-5deg); }
  100% { transform: scale(1); }
}

.rating-caption {
  position: relative; z-index: 1; margin-top: 2px;
  font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--moss);
}

/* ── status ─────────────────────────────────── */

.status {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px; padding: 10px 17px; border-radius: 999px;
  background: rgba(252, 250, 242, 0.9);
  border: 1px solid rgba(15, 42, 34, 0.09);
  font-size: 0.84rem; color: var(--muted); text-align: left;
  box-shadow: 0 14px 26px -24px rgba(15, 42, 34, 0.95);
  transition: color 0.3s, border-color 0.3s, background 0.3s, transform 0.3s;
  animation: fadeUp 0.7s ease 0.24s both;
}
.status-leaf { width: 15px; height: 15px; flex: none; color: var(--sage); transition: color 0.3s; }
.status.copied {
  color: var(--forest); border-color: rgba(92, 127, 90, 0.42);
  background: linear-gradient(180deg, rgba(224, 235, 216, 0.95), rgba(207, 220, 199, 0.92));
  box-shadow: 0 16px 28px -24px rgba(63, 95, 67, 1);
}
.status.copied .status-leaf { color: var(--moss-deep); animation: leafPulse 2.4s ease-in-out infinite; }
.status.flash { animation: statusIn 0.5s ease; }

@keyframes statusIn {
  0% { opacity: 0.3; transform: translateY(5px) scale(0.99); }
  100% { opacity: 1; transform: none; }
}

@keyframes leafPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.16) rotate(-7deg); }
}

/* ── leaf divider ───────────────────────────── */

.leaf-divider {
  display: flex; align-items: center; justify-content: center; gap: 13px;
  width: min(100%, 320px); margin: 24px auto 0; color: var(--sage);
}
.leaf-divider::before, .leaf-divider::after {
  content: ""; flex: 1 1 0; height: 1px;
  background: linear-gradient(to right, transparent, rgba(92, 127, 90, 0.4), transparent);
}
.leaf-divider svg { width: 20px; height: 20px; flex: none; color: var(--moss); opacity: 0.8; }

/* ── drafts ─────────────────────────────────── */

.drafts { margin-top: 22px; text-align: left; }
.drafts[hidden] { display: none; }

.drafts-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 6px 10px; margin-bottom: 12px;
}
.drafts-head h2 { font-size: 1.12rem; }
.newset {
  flex: none; background: rgba(252, 250, 242, 0.85);
  border: 1px solid rgba(15, 42, 34, 0.15); border-radius: 999px;
  padding: 5px 11px; font-size: 0.68rem; letter-spacing: 0.05em; color: var(--moss);
  cursor: pointer; white-space: nowrap;
  transition: color 0.18s, border-color 0.18s, background 0.18s, transform 0.18s;
}
.newset:hover { color: var(--forest); border-color: var(--forest); background: #fff; transform: translateY(-1px) rotate(-1deg); }
.newset:active { transform: translateY(0); }

.draft-list { display: grid; gap: 9px; }

.draft {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 27px 1fr; gap: 12px; align-items: start;
  width: 100%; text-align: left; cursor: pointer;
  background: var(--paper); border: 1px solid rgba(15, 42, 34, 0.085);
  border-left: 3px solid rgba(92, 127, 90, 0.28);
  border-radius: 16px; padding: 14px 16px;
  font-size: 0.9rem; line-height: 1.6;
  box-shadow: 0 12px 28px -28px rgba(15, 42, 34, 0.9);
  transition: border-color 0.22s, box-shadow 0.22s, transform 0.22s, background 0.22s, color 0.22s;
  animation: cardIn 0.5s cubic-bezier(0.2, 0.8, 0.25, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
  -webkit-tap-highlight-color: transparent;
}
/* leaf watermark in the corner of each card */
.draft::after {
  content: ""; position: absolute; right: 10px; top: 10px; width: 20px; height: 20px;
  opacity: 0.08; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22c0-8 0-12 5-20' stroke='%230F2A22' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3Cpath d='M12 18C8 17.2 5.5 14.5 5.5 10.2c3.9.8 6.5 3.5 6.5 7.8Zm1-5.4c3.3-1.6 5-4.2 5-7.8-3.3 1.2-5 3.8-5 7.8Z' fill='%230F2A22'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: opacity 0.25s;
}
.draft:hover { border-color: rgba(92, 127, 90, 0.55); transform: translateY(-2px); box-shadow: 0 18px 32px -26px rgba(15, 42, 34, 1); }
.draft:hover::after { opacity: 0.16; }
.draft:active { transform: translateY(0) scale(0.995); }

.draft .num {
  font-family: var(--serif); font-size: 0.76rem; color: var(--moss);
  width: 27px; height: 27px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid rgba(15, 42, 34, 0.14);
  transition: background 0.22s, color 0.22s, border-color 0.22s, transform 0.22s;
}
.draft.is-copied {
  border-color: rgba(15, 42, 34, 0.9); border-left-color: var(--forest);
  background: linear-gradient(180deg, #ffffff, #f6f9f3);
  box-shadow: 0 20px 36px -26px rgba(15, 42, 34, 1);
}
.draft.is-copied .num {
  background: var(--forest); border-color: var(--forest); color: transparent;
  position: relative; transform: scale(1.04);
}
.draft.is-copied .num::after {
  content: "✓"; position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--sage-soft); font-size: 0.8rem; font-family: var(--sans);
}
.draft.is-copied .text { color: var(--forest); }
.draft.is-copied::after { opacity: 0.18; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* ── sticky action ──────────────────────────── */

.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 12px clamp(20px, 5vw, 30px) calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, #f4efdf 60%, rgba(244, 239, 223, 0.72) 86%, rgba(244, 239, 223, 0));
  display: flex; justify-content: center;
  animation: barUp 0.55s cubic-bezier(0.2, 0.85, 0.25, 1) both;
}
.bar[hidden] { display: none; }

@keyframes barUp {
  from { transform: translateY(110%); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; max-width: 560px; padding: 16px 22px; border-radius: 999px;
  background: linear-gradient(180deg, var(--forest-soft), var(--forest));
  color: var(--cream); text-decoration: none;
  font-size: 0.97rem; font-weight: 600; letter-spacing: 0.01em;
  box-shadow: 0 20px 34px -20px rgba(15, 42, 34, 1), inset 0 1px 0 rgba(207, 220, 199, 0.16);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(140px 70px at 20% -10%, rgba(207, 220, 199, 0.3), transparent 70%);
  opacity: 0; transition: opacity 0.3s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 24px 38px -20px rgba(15, 42, 34, 1); }
.btn:hover::after { opacity: 1; }
.btn:active { transform: translateY(0) scale(0.995); }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform 0.28s; }
.btn:hover svg { transform: translateX(4px); }

/* ── footer ─────────────────────────────────── */

.foot {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  margin-top: 32px; padding-bottom: 28px;
  font-size: 0.75rem; color: var(--muted); letter-spacing: 0.02em;
}
.foot a, .linkish {
  color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(15, 42, 34, 0.26); transition: color 0.2s;
}
.foot a:hover, .linkish:hover { color: var(--forest); }
.foot-copy { margin-left: auto; color: #7d8b82; }

/* ── toast ──────────────────────────────────── */

.toast {
  position: fixed; left: 50%; bottom: 106px; z-index: 120;
  display: flex; align-items: center; gap: 9px;
  padding: 11px 17px; border-radius: 999px;
  background: linear-gradient(180deg, var(--forest-soft), var(--forest));
  color: var(--cream); font-size: 0.84rem; max-width: calc(100% - 32px);
  box-shadow: 0 22px 38px -22px rgba(15, 42, 34, 1);
  transform: translate(-50%, 140%); opacity: 0; pointer-events: none;
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.26s ease;
}
.toast svg { width: 16px; height: 16px; flex: none; color: var(--sage); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

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

/* ── responsive ─────────────────────────────── */

@media (max-width: 720px) {
  .sprig-a { width: 120px; left: -50px; opacity: 0.32; }
  .sprig-b { width: 96px; right: -42px; opacity: 0.2; }
  .hero-photo { height: clamp(340px, 54vh, 460px); }
}

@media (max-width: 480px) {
  .drafts-head h2 { flex: 1 1 100%; }
  .newset { margin-left: auto; }
}

@media (max-width: 420px) {
  .brand-text em { display: none; }
  .stars button { width: 52px; height: 52px; }
  .star-plate { padding: 14px 14px 10px; }
  .foot-copy { margin-left: 0; }
  .drift { display: none; }
}

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