/* ── Design tokens (palette sampled from the SoilCents logo) ───────────── */
:root {
  --maroon-900: #4a141d;
  --maroon-700: #7a2330;
  --maroon-600: #8f2c3a;
  --maroon-400: #b25966;
  --maroon-200: #e7c3c8;
  --blush: #f7e9e7;
  --cream: #fdf8f3;
  --sage: #6f9171;
  --sage-dark: #4d6e50;
  --amber: #c98a3e;
  --ink: #2c1f20;
  --ink-soft: #6b5658;
  --white: #ffffff;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 18px 40px -16px rgba(74, 20, 29, 0.25);
  --shadow-pop: 0 24px 60px -20px rgba(74, 20, 29, 0.35);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ── Decorative background blobs ─────────────────────────────────────── */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
}
.blob-a { width: 480px; height: 480px; background: var(--maroon-400); top: -160px; right: -120px; animation: float-a 18s ease-in-out infinite; }
.blob-b { width: 380px; height: 380px; background: var(--sage); top: 40%; left: -160px; animation: float-b 22s ease-in-out infinite; }
.blob-c { width: 320px; height: 320px; background: var(--amber); bottom: -140px; right: 10%; opacity: 0.25; animation: float-a 26s ease-in-out infinite reverse; }

@keyframes float-a { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-30px, 40px); } }
@keyframes float-b { 0%,100% { transform: translate(0,0); } 50% { transform: translate(40px, -30px); } }

/* ── Header / footer ─────────────────────────────────────────────────── */
.site-header { padding: 24px 0 8px; position: relative; z-index: 2; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.brand-logo { height: 34px; width: auto; }
.brand-logo-link { line-height: 0; }

.site-footer { padding: 48px 0 32px; text-align: center; color: var(--ink-soft); position: relative; z-index: 1; }
.footer-logo { height: 26px; margin: 0 auto 10px; opacity: 0.8; }
.footer-inner p { font-size: 13px; margin: 0; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--maroon-700), var(--maroon-900));
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { box-shadow: var(--shadow-pop); transform: translateY(-2px); }
.btn-outline {
  background: var(--white);
  color: var(--maroon-700);
  border: 2px solid var(--maroon-200);
}
.btn-outline:hover { border-color: var(--maroon-400); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { color: var(--maroon-700); }
.btn-lg { padding: 16px 34px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { position: relative; padding-top: 16px; padding-bottom: 80px; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 40px;
  padding-top: 32px;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--maroon-700);
  background: var(--blush);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.12;
  margin: 0 0 18px;
  color: var(--maroon-900);
  max-width: 100%;
  overflow-wrap: break-word;
}
.hero-copy h1 em { color: var(--sage-dark); font-style: italic; }
.hero-copy p { font-size: 16.5px; color: var(--ink-soft); line-height: 1.6; max-width: 480px; margin: 0 0 28px; }
.hint { margin-top: 14px; font-size: 13px; color: var(--ink-soft); }

.hero-copy { min-width: 0; }
.hero-art { position: relative; height: 320px; min-width: 0; display: flex; align-items: center; justify-content: center; }
.hero-ring { position: absolute; border-radius: 50%; border: 2px solid var(--maroon-200); animation: spin-slow 30s linear infinite; }
.ring-1 { width: 320px; height: 320px; border-color: var(--maroon-200); }
.ring-2 { width: 230px; height: 230px; border-color: var(--maroon-400); opacity: 0.6; animation-direction: reverse; animation-duration: 22s; }
.ring-3 { width: 150px; height: 150px; border-color: var(--sage); opacity: 0.5; animation-duration: 16s; }
.hero-leaf { font-size: 54px; filter: drop-shadow(0 10px 20px rgba(74,20,29,0.25)); animation: bob 4s ease-in-out infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.wave-divider { position: absolute; left: 0; right: 0; bottom: -2px; line-height: 0; }
.wave-divider svg { width: 100%; height: 90px; }
.wave-divider path { fill: var(--white); }

/* ── Scan section ─────────────────────────────────────────────────────── */
.scan-section { background: var(--white); padding: 0 0 70px; position: relative; }
.scan-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: 28px;
  max-width: 560px;
  margin: -10px auto 0;
  border: 1px solid var(--blush);
}
.scan-tabs { display: flex; gap: 8px; background: var(--cream); border-radius: 999px; padding: 6px; margin-bottom: 20px; }
.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab-btn.active { background: var(--maroon-700); color: var(--white); box-shadow: var(--shadow-soft); }

.scan-stage {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--cream);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--maroon-200);
}
#camera-video, #preview-image { width: 100%; height: 100%; object-fit: cover; }
.scan-placeholder { text-align: center; padding: 24px; color: var(--ink-soft); }
.placeholder-icon { font-size: 40px; display: block; margin-bottom: 10px; }
.scan-placeholder p { font-size: 14px; margin: 0; max-width: 260px; margin-inline: auto; }

.scan-loading {
  position: absolute; inset: 0;
  background: rgba(253, 248, 243, 0.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; text-align: center; padding: 20px;
}
.scan-loading p { margin: 0; font-size: 14px; color: var(--maroon-700); font-weight: 600; }

.wave-spinner { display: flex; gap: 6px; height: 36px; align-items: flex-end; }
.wave-spinner span {
  width: 7px; height: 100%;
  background: var(--maroon-700);
  border-radius: 4px;
  animation: wave-bounce 1s ease-in-out infinite;
}
.wave-spinner span:nth-child(2) { animation-delay: 0.12s; background: var(--maroon-400); }
.wave-spinner span:nth-child(3) { animation-delay: 0.24s; background: var(--sage); }
.wave-spinner span:nth-child(4) { animation-delay: 0.36s; background: var(--amber); }
@keyframes wave-bounce { 0%,100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

.scan-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.scan-actions .btn { flex: 1; justify-content: center; }

/* ── Result section ───────────────────────────────────────────────────── */
.result-section { padding: 60px 0 80px; }
.result-banner {
  text-align: center;
  padding: 36px 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  background: var(--blush);
  color: var(--maroon-900);
  animation: pop-in 0.4s ease;
}
.result-banner.status-positive          { background: #e8f0e6; color: var(--sage-dark); }
.result-banner.status-researching       { background: #f4ecd9; color: #7a5a23; }
.result-banner.status-safe-researching  { background: #f4ecd9; color: #7a5a23; }
.result-banner.status-harsh-researching { background: var(--blush); color: var(--maroon-900); }
.result-icon { font-size: 38px; display: block; margin-bottom: 8px; }
.result-banner h2 { font-family: var(--font-display); margin: 0 0 8px; font-size: 26px; }
.result-banner p { margin: 0; font-size: 15px; max-width: 520px; margin-inline: auto; opacity: 0.9; }

@keyframes pop-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.result-meta { display: flex; gap: 10px; justify-content: center; margin-bottom: 28px; flex-wrap: wrap; }
.meta-chip {
  background: var(--white);
  border: 1px solid var(--maroon-200);
  color: var(--maroon-700);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.ingredient-block { margin-bottom: 28px; }
.ingredient-block h3 { font-size: 15px; color: var(--ink); margin: 0 0 12px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-row .chip {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  background: var(--cream);
  color: var(--ink-soft);
  border: 1px solid var(--blush);
}
.chip-row.harsh .chip { background: #fbe7e8; color: var(--maroon-700); border-color: var(--maroon-200); font-weight: 600; }

/* ── Harsh effects summary ──────────────────────────────────────────────── */
.harsh-effects { display: flex; flex-direction: column; gap: 12px; }
.harsh-placeholder-wrapper .harsh-effects-heading,
.harsh-placeholder-wrapper .harsh-effect-row { /* inherits from shared classes */ }
#harsh-effects { margin-top: 16px; }
.harsh-effects-heading { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin: 0 0 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.harsh-effect-row {
  background: #fff8f8;
  border: 1px solid var(--maroon-200);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.harsh-effect-name { font-size: 13px; font-weight: 700; color: var(--maroon-700); }
.harsh-effect-desc { font-size: 13px; color: var(--ink-soft); margin: 0; }
.risk-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
  width: fit-content;
}
.risk-badge.risk-high { background: #fce4e4; color: #9b1c1c; }
.risk-badge.risk-medium { background: #fef3c7; color: #92400e; }

/* ── Harsh effects blur lock ────────────────────────────────────────────── */
.harsh-placeholder-wrapper {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
  overflow: hidden;
  max-height: 420px;
}
/* Gradient fade at the bottom to hint there's more locked content */
.harsh-placeholder-wrapper::after {
  content: '';
  display: block;
  position: sticky;
  bottom: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--cream, #faf8f5));
  pointer-events: none;
}

/* ── Inline registration block ──────────────────────────────────────────── */
.register-inline-block {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  margin: 36px auto;
  box-shadow: var(--shadow-soft);
  border: 1.5px solid var(--blush);
}
.register-inline-block h3 {
  font-family: var(--font-display);
  color: var(--maroon-900);
  margin: 0 0 6px;
  font-size: 22px;
}
.register-inline-block > p { color: var(--ink-soft); font-size: 14px; margin: 0 0 20px; }

.products-block h3 { font-family: var(--font-display); font-size: 21px; color: var(--maroon-900); margin: 0 0 18px; text-align: center; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  text-align: center;
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); }
.product-card .product-img {
  width: 100%; height: 120px; object-fit: cover;
  border-radius: var(--radius-sm); background: var(--cream); margin-bottom: 12px;
}
.product-card .product-img.placeholder {
  display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.product-card h4 { font-size: 14px; margin: 0 0 4px; color: var(--ink); }
.product-card .product-cat { font-size: 11px; color: var(--sage-dark); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; }
.product-btn-row { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 10px; }
.product-btn-row .btn { width: 100%; justify-content: center; }
.claim-offer-btn { }


.result-cta { display: flex; gap: 14px; justify-content: center; margin-top: 38px; flex-wrap: wrap; }

/* ── Modal ────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(44, 31, 32, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 20px; backdrop-filter: blur(2px);
}
.modal-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-pop);
  animation: pop-in 0.25s ease;
}
.modal-card h3 { font-family: var(--font-display); color: var(--maroon-900); margin: 0 0 6px; font-size: 24px; }
.modal-card p { color: var(--ink-soft); font-size: 14px; margin: 0 0 22px; }
.modal-close { position: absolute; top: 18px; right: 18px; background: none; border: none; font-size: 22px; color: var(--ink-soft); cursor: pointer; line-height: 1; }
#register-form { display: flex; flex-direction: column; gap: 16px; }
#register-form label { font-size: 13px; font-weight: 600; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
#register-form input {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--blush);
  background: var(--cream);
  outline: none;
  transition: border-color 0.15s ease;
}
#register-form input:focus { border-color: var(--maroon-400); }
#register-submit-btn { margin-top: 6px; justify-content: center; }

/* ── Toast ────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--white);
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--shadow-pop);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Embed page ───────────────────────────────────────────────────────── */
.embed-main { padding: 12px 0 40px; max-width: 1080px; margin: 0 auto; }
.embed-greeting { text-align: center; margin: 8px 0 18px; color: var(--maroon-700); font-weight: 600; }
.iframe-wrap {
  margin: 0 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-pop);
  background: var(--white);
  height: calc(100vh - 180px);
  min-height: 480px;
}
.iframe-wrap iframe { width: 100%; height: 100%; border: none; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .hero-copy p { margin-inline: auto; }
  .hero-art { height: 220px; order: -1; }
  .ring-1 { width: 200px; height: 200px; }
  .ring-2 { width: 140px; height: 140px; }
  .ring-3 { width: 90px; height: 90px; }
}
@media (max-width: 520px) {
  .scan-card { padding: 20px; border-radius: 22px; }
  .modal-card { padding: 24px; }
  .scan-actions { flex-direction: column; }
}
