/* Supper marketing site — no framework, one stylesheet. */

:root {
  /* #82BD49 is the app-icon green. Filled elements use white text on it to
     match the app's own buttons (a deliberate brand choice over AA contrast);
     --green-text is the same hue darkened for body-text links and focus
     outlines, where legibility wins. */
  --green: #82BD49;
  --green-hover: #74AC3C;
  --green-text: #4C7A21;
  --sage: #EEF2EA;
  --cream: #F7F6F3;
  --ink: #1C211B;
  --muted: #55604F;
  --card: #FFFFFF;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(28, 33, 27, 0.08);
  --font-head: 'Poppins', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

/* Mobile browsers paint a dark tap-highlight rectangle over tapped
   elements (most visibly the FAQ summaries); our own focus/hover states
   cover that feedback. */
a, button, summary { -webkit-tap-highlight-color: transparent; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 0.5em; }

a { color: var(--green-text); }

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--green-text);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--green-text); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 246, 243, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(28, 33, 27, 0.06);
}

.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 16px;
}

.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head);
  font-weight: 700; font-size: 26px; color: var(--green);
  text-decoration: none; letter-spacing: -0.02em;
}

.wordmark img { width: 32px; height: 32px; border-radius: 8px; }

.site-nav { display: flex; align-items: center; gap: 22px; }

.site-nav a {
  color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500;
}
.site-nav a:hover { color: var(--green-text); }

.nav-cta {
  background: var(--green); color: #fff !important;
  padding: 9px 18px; border-radius: 999px; font-weight: 600;
}
.nav-cta:hover { background: var(--green-hover); }

@media (max-width: 720px) {
  .site-nav a:not(.nav-cta) { display: none; }
}

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

.hero { padding: 64px 0 40px; }

.hero .wrap {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 48px; align-items: center;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700; letter-spacing: -0.02em;
}

.hero-sub { font-size: 19px; color: var(--muted); max-width: 34em; margin: 0 0 28px; }

.hero-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.badge-link { display: inline-block; line-height: 0; }
.badge-link img { width: 170px; height: 57px; }

.hero-note { font-size: 14px; color: var(--muted); margin: 14px 0 0; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-top: 40px; }
}

/* ---------- phone frame around real app screenshots ---------- */

.phone {
  width: 300px; margin: 0 auto;
  border-radius: 46px; background: #2b332a;
  border: 10px solid #2b332a;
  box-shadow: var(--shadow);
  overflow: hidden;
  line-height: 0;
}

.phone-screenshot {
  display: block; width: 100%; height: auto;
  border-radius: 36px;
}

/* ---------- shared section styles ---------- */

.section { padding: 56px 0; }

.section-sage { background: var(--sage); }

.section h2 {
  font-size: clamp(26px, 4vw, 34px); font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-lede { color: var(--muted); max-width: 40em; margin: 0 0 36px; }

/* ---------- how it works ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.step {
  background: var(--card); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow);
}

.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: #fff;
  font-family: var(--font-head); font-weight: 600; font-size: 16px;
  margin-bottom: 14px;
}

.step h3 { font-size: 19px; font-weight: 600; }

.step p { color: var(--muted); font-size: 15.5px; margin: 0 0 16px; }

.step-visual {
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(28, 33, 27, 0.08);
  line-height: 0;
}

.step-visual img { display: block; width: 100%; height: auto; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- feature grid ---------- */

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.feature {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
}

.feature h3 { font-size: 16.5px; font-weight: 600; margin-bottom: 6px; }

.feature p { font-size: 14.5px; color: var(--muted); margin: 0; }

.feature-icon { font-size: 24px; line-height: 1; margin-bottom: 12px; }

@media (max-width: 980px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ---------- pays for itself ---------- */

.pays .wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}

.pays ul { color: var(--muted); padding-left: 20px; margin: 0 0 24px; }
.pays li { margin-bottom: 8px; }

.pays-caption {
  text-align: center; font-size: 14px; color: var(--muted);
  max-width: 300px; margin: 14px auto 0;
}

@media (max-width: 860px) { .pays .wrap { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- FAQ ---------- */

.faq-list { max-width: 720px; }

.faq-list details {
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow);
  margin-bottom: 12px; padding: 0 22px;
}

.faq-list summary {
  cursor: pointer; font-family: var(--font-head); font-weight: 600;
  font-size: 16.5px; padding: 18px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  list-style: none;
}

.faq-list summary::-webkit-details-marker { display: none; }

/* custom +/× disclosure indicator */
.faq-list summary::after {
  content: '';
  flex: none; width: 12px; height: 12px;
  background:
    linear-gradient(var(--green), var(--green)) center / 12px 2px no-repeat,
    linear-gradient(var(--green), var(--green)) center / 2px 12px no-repeat;
  transition: transform 0.2s ease;
}

.faq-list details[open] summary::after { transform: rotate(45deg); }

.faq-list details[open] summary { border-bottom: 1px solid var(--sage); }

.faq-list p { color: var(--muted); margin: 0; padding: 14px 0 18px; }

/* Animated open/close. Browsers with interpolate-size (Chrome 131+) get a
   real height transition on the details content; everywhere else the answer
   still fades and slides in via the keyframe fallback. */
@supports (interpolate-size: allow-keywords) {
  .faq-list { interpolate-size: allow-keywords; }

  .faq-list details::details-content {
    opacity: 0;
    block-size: 0;
    overflow: clip;
    transition: block-size 0.3s ease, opacity 0.3s ease,
      content-visibility 0.3s allow-discrete;
  }

  .faq-list details[open]::details-content {
    opacity: 1;
    block-size: auto;
  }
}

@supports not (interpolate-size: allow-keywords) {
  .faq-list details[open] p { animation: faq-reveal 0.25s ease; }
}

@keyframes faq-reveal {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .faq-list details::details-content { transition: none; }
  .faq-list details[open] p { animation: none; }
  .faq-list summary::after { transition: none; }
}

/* ---------- final CTA ---------- */

.final-cta { text-align: center; padding: 72px 0; }

.final-cta h2 { font-size: clamp(26px, 4vw, 34px); }

.final-cta .badge-link { margin-top: 18px; }

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

.site-footer {
  background: var(--sage); padding: 36px 0 44px;
  font-size: 14.5px; color: var(--muted);
}

.footer-links { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; }

.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { color: var(--green-text); }

/* ---------- privacy page ---------- */

.legal { max-width: 760px; padding: 48px 0 72px; }
.legal h1 { font-size: 32px; }
.legal h2 { font-size: 21px; margin-top: 1.6em; }
.legal p { color: #333a32; }

/* ---------- shared recipe fallback (client-rendered when the Worker is unavailable) ---------- */

.share-page { max-width: 680px; margin: 0 auto; padding: 24px; }

.share-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px; margin-top: 12px;
}

.share-card img.share-photo { width: 100%; border-radius: 12px; margin-bottom: 18px; object-fit: cover; max-height: 380px; }

.share-card h1 { font-size: 28px; }

.share-muted { color: var(--muted); }

.share-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 20px 0 8px; }

.share-open {
  background: var(--green); color: #fff !important; text-decoration: none;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-family: var(--font-head);
}
.share-open:hover { background: var(--green-hover); }

.share-footer { text-align: center; color: var(--muted); font-size: 14px; padding: 20px 0 40px; }
