/* =============================================================================
   soyaresearch.com — landing + thank-you styles
   SoyaCare design language: warm cream ground · gradient-mesh sage · deep-forest
   accents · pill CTAs · large light grotesque headlines · soft forest-tinted
   shadows · faint grain. Tokens mirror the live SoyaCare theme.
============================================================================= */

:root {
  /* grounds + surfaces */
  --bg:        #FBFAF4;
  --paper:     #FFFFFF;
  --cream:     #F3EFE3;
  --sage-50:   #EEF3E1;
  --sage-100:  #E5EECF;
  --sage-200:  #D4E4AE;
  --sage-300:  #BCD884;
  --forest:    #2D3B20;
  --forest-900:#1A2413;

  /* ink + accents */
  --ink:        #1B1E15;
  --ink-soft:   #353A2C;
  --muted:      #5F6552;
  --faint:      #8A8F7C;
  --line:       #E7E3D5;
  --line-sage:  #CBD9AE;
  --accent:     #5E8C2C;
  --accent-deep:#4A7322;
  --lime:       #AEDB54;
  --danger:     #B23B2E;

  /* radii */
  --r-sm: 10px; --r: 16px; --r-md: 22px; --r-lg: 30px; --r-xl: 40px; --r-pill: 999px;

  /* shadows (forest-tinted) */
  --sh-1: 0 1px 2px rgba(31,40,20,.05), 0 2px 6px rgba(31,40,20,.04);
  --sh-2: 0 2px 4px rgba(31,40,20,.05), 0 14px 34px -16px rgba(31,40,20,.20);
  --sh-3: 0 4px 10px rgba(31,40,20,.06), 0 30px 60px -28px rgba(31,40,20,.30);

  /* type */
  --display: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --body:    "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ------------------------------------------------------------------ reset -- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01";
  min-height: 100dvh;
  position: relative;
}

/* gradient-mesh sage ground + faint grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60rem 40rem at 15% -10%, var(--sage-100) 0%, transparent 60%),
    radial-gradient(50rem 40rem at 100% 0%, var(--sage-200) 0%, transparent 55%),
    radial-gradient(70rem 50rem at 50% 120%, var(--sage-50) 0%, transparent 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------------------- layout -- */
.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1.15rem, 4vw, 2rem);
}

.brand { display: flex; justify-content: center; }
.brand__logo { height: 46px; width: auto; display: block; }
@media (max-width: 560px) { .brand__logo { height: 38px; } }

/* ------------------------------------------------------------------- card -- */
.card {
  width: 100%;
  max-width: 620px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
  padding: clamp(1.75rem, 5vw, 3.25rem) clamp(1.5rem, 5vw, 3rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* a whisper of sage light at the top edge of the card */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 140px;
  background: radial-gradient(30rem 10rem at 50% -20%, var(--sage-100) 0%, transparent 70%);
  pointer-events: none;
}
.card > * { position: relative; }

/* badge: US flag + Research Compounds */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .9rem .45rem .55rem;
  background: var(--sage-50);
  border: 1px solid var(--line-sage);
  border-radius: var(--r-pill);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.badge__flag {
  width: 22px;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(31,40,20,.12);
  display: block;
}

/* headline */
.headline {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.05;
  font-size: clamp(2rem, 6.5vw, 3.05rem);
  margin-top: 1.15rem;
  color: var(--ink);
}
.headline em { font-style: normal; color: var(--accent-deep); }

.sub {
  margin: .9rem auto 0;
  max-width: 44ch;
  color: var(--muted);
  font-size: 1.02rem;
}

/* trust pills */
.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem .65rem;
  margin: 1.4rem 0 .25rem;
  list-style: none;
  padding: 0;
}
.pills li {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .85rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.pills li::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* --------------------------------------------------------------- the form -- */
.form { margin-top: 1.6rem; text-align: left; }
.form__label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink-soft);
  margin: 0 0 .45rem .15rem;
}
.form__field {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: .95rem 1.1rem;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.form__field::placeholder { color: var(--faint); }
.form__field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(94,140,44,.15);
}
.form__field.is-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(178,59,46,.12);
}

/* honeypot — visually and programmatically hidden from humans */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Age gate: "Yes, I am 21+" / "No, exit" action buttons */
.age-actions {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  margin-top: 1.75rem;
}
.age-actions .btn { margin-top: 0; }

.btn {
  text-decoration: none;
  text-align: center;
  line-height: 1.2;
  margin-top: .9rem;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -.01em;
  color: #fff;
  /* --accent-deep (#4A7322) on white reaches WCAG AA (~5.3:1) for the label. */
  background: var(--accent-deep);
  border: 1.5px solid var(--accent-deep);
  border-radius: var(--r-pill);
  padding: 1.02rem 1.5rem;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.btn:hover {
  background: var(--forest);
  border-color: var(--forest);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -12px rgba(45,59,32,.55);
}
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; }
.btn[disabled] { opacity: .7; cursor: default; transform: none; box-shadow: none; }
.btn__arrow { transition: transform .18s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* messages */
.alert {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  text-align: left;
  margin-bottom: 1.25rem;
  padding: .8rem 1rem;
  border-radius: var(--r-sm);
  font-size: .92rem;
}
.alert--error { background: #FBECEA; border: 1px solid #E6C4BE; color: #7C271C; }

/* ---------------------------------------------------------- thank-you page -- */
.thanks__check {
  width: 68px; height: 68px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--sage-100);
  display: grid;
  place-items: center;
  color: var(--accent-deep);
}
.thanks__check svg { width: 34px; height: 34px; }
.link-back {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--accent-deep);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: border-color .18s var(--ease);
}
.link-back:hover { border-bottom-color: var(--accent-deep); }
.redirect-note {
  margin-top: 1.35rem;
  font-size: .92rem;
  color: var(--muted);
}
.redirect-note a { color: var(--accent-deep); font-weight: 600; text-decoration: none; }
.redirect-note a:hover { text-decoration: underline; }

/* ---------------------------------------------------------- legal / prose -- */
.legal-page {
  max-width: 860px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vw, 2.25rem);
  padding: clamp(1.75rem, 5vw, 3.25rem) clamp(1.15rem, 4vw, 2rem);
}
.legal {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: clamp(1.75rem, 5vw, 3.25rem);
}
.legal h1 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.08;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  color: var(--ink);
}
.legal .updated { color: var(--faint); font-size: .88rem; margin: .45rem 0 1.6rem; }
.legal h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.32rem;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 2rem 0 .55rem;
}
.legal h3 { font-size: 1.02rem; font-weight: 600; color: var(--ink-soft); margin: 1.15rem 0 .4rem; }
.legal p { color: var(--ink-soft); margin: .65rem 0; }
.legal ul { margin: .55rem 0 .75rem; padding-left: 1.25rem; color: var(--ink-soft); }
.legal li { margin: .4rem 0; }
.legal a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--forest); }
.legal__back { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-weight: 600; }
.legal__back a { text-decoration: none; }

/* ---------------------------------------------------------------- footer --- */
.site-footer {
  color: var(--muted);
  font-size: .8rem;
  text-align: center;
}
.site-footer a { color: var(--accent-deep); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ------------------------------------------------------- reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
