/* ============================================================================
 * SafeSpoon landing page — styles (mobile-first, no framework)
 * ========================================================================== */

:root {
  /* Soft "clean wellness" palette — muted sage + warm cream + clay accent */
  --green: #7a9a72;          /* muted sage */
  --green-dark: #5f7d58;     /* deeper sage for hover/links */
  --green-soft: #e8efe3;     /* sage tint for chips/sections */
  --clay: #d68c6f;           /* warm terracotta accent */
  --clay-dark: #c1755a;
  --ink: #3b3a33;            /* warm charcoal */
  --ink-soft: #6f6a5f;       /* warm grey for body/secondary */
  --bg: #fcf9f3;             /* warm cream */
  --bg-alt: #f4eee3;         /* sand for alt sections */
  --line: #e9e1d3;           /* soft warm border */
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 14px 40px rgba(89, 74, 54, 0.10);
  --shadow-sm: 0 6px 18px rgba(89, 74, 54, 0.07);
  --maxw: 1080px;
  --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  font-weight: 600;
}

p { margin: 0 0 1em; }

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

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow { max-width: 620px; }

/* ----------------------------- Buttons ----------------------------- */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--clay);
  color: #fff;
  box-shadow: 0 8px 20px rgba(193, 117, 90, 0.28);
}
.btn-primary:hover { background: var(--clay-dark); box-shadow: 0 10px 24px rgba(193, 117, 90, 0.34); }
.btn-sm { padding: 10px 20px; font-size: 0.92rem; }
.btn-lg { padding: 16px 32px; font-size: 1.08rem; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn:disabled { opacity: 0.6; cursor: progress; }

/* ----------------------------- Header ----------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.01em; }

/* ------------------------------ Hero ------------------------------ */
.hero {
  background: radial-gradient(1200px 520px at 78% -12%, var(--green-soft), transparent 68%),
              radial-gradient(900px 460px at 0% 8%, #f7ebe2, transparent 60%),
              var(--bg);
  padding: 72px 0 64px;
}
.hero-inner { max-width: 780px; }
.eyebrow {
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0.9em;
}
.hero-title { font-size: clamp(2.1rem, 6vw, 3.5rem); font-weight: 600; letter-spacing: -0.02em; }
.accent { color: var(--clay); font-style: italic; }
.hero-sub { font-size: clamp(1.08rem, 2.4vw, 1.28rem); color: var(--ink-soft); max-width: 620px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 12px; }
.hero-note { font-size: 0.88rem; color: var(--ink-soft); }

/* ---------------------------- Sections ---------------------------- */
.section { padding: 60px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 600; text-align: center; }
.section-sub { text-align: center; color: var(--ink-soft); max-width: 580px; margin: 0 auto 1.5em; font-size: 1.05rem; }

/* ------------------------------ Cards ------------------------------ */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 32px;
}
.card {
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--green-soft);
  font-size: 1.7rem;
  margin-bottom: 16px;
}
.card h3 { font-size: 1.3rem; }
.card p { color: var(--ink-soft); margin: 0; }

/* ------------------------------ Steps ------------------------------ */
.steps {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  counter-reset: step;
}
.step { background: transparent; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  margin-bottom: 12px;
}
.step h3 { font-size: 1.15rem; }
.step p { color: var(--ink-soft); margin: 0; }

/* ---------------------------- Carousel ---------------------------- */
.carousel {
  position: relative;
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 6px 4px 16px;
  scrollbar-width: thin;
  flex: 1;
}
.carousel-track > .insta-card {
  scroll-snap-align: center;
  flex: 0 0 auto;
  width: min(330px, 82vw);
}
/* The Instagram blockquote sizes itself; keep it from overflowing the card. */
.carousel-track .instagram-media { margin: 0 !important; min-width: 0 !important; }
.carousel-empty { color: var(--ink-soft); padding: 20px; }
.carousel-btn {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.carousel-btn:hover { background: var(--green-soft); }
.carousel-btn:disabled { opacity: 0.35; cursor: default; }

/* ------------------------------ Form ------------------------------ */
.section-signup {
  background: linear-gradient(180deg, var(--green-soft), #f3ece1);
}
.lead-form {
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow);
  margin-top: 8px;
}
.field { margin-bottom: 22px; border: 0; padding: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field > label, .field legend { display: block; font-weight: 600; margin-bottom: 7px; }
.field legend { padding: 0; }
.req { color: var(--green); }
.hint { font-size: 0.85rem; color: var(--ink-soft); margin: 6px 0 0; }

input[type="email"],
input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(122, 154, 114, 0.22);
}
textarea { resize: vertical; }

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin-bottom: 12px;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.check:hover { border-color: var(--green); }
.check input { width: 18px; height: 18px; accent-color: var(--green); margin: 0; flex: 0 0 auto; }
.check.checked { background: var(--green-soft); border-color: var(--green); }
.other-label { font-weight: 500 !important; font-size: 0.9rem; color: var(--ink-soft); }

/* honeypot — visually + programmatically hidden, still in the DOM for bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-error {
  color: #b3261e;
  background: #fdecea;
  border: 1px solid #f5c6c2;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 0 0 16px;
  font-size: 0.92rem;
}
.form-fineprint { font-size: 0.82rem; color: var(--ink-soft); text-align: center; margin: 12px 0 0; }

.form-success {
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px 30px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-top: 8px;
}
.success-icon { font-size: 3rem; margin-bottom: 8px; }
.form-success h3 { font-size: 1.5rem; }
.form-success p { color: var(--ink-soft); margin: 0; }

/* ----------------------------- Footer ----------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; background: #fff; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
#footer-copy { color: var(--ink-soft); }

/* --------------------------- Breakpoints --------------------------- */
@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 96px 0 80px; }
  .section { padding: 80px 0; }
}

@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
