/* ==========================================================================
   Oana Regeneraceuticals - landing page
   Plain CSS, no build step (managed shared hosting).

   One theme: the logo's own colours (dark green ground, light green type),
   used in both light and dark system modes.
   Shape rule: buttons and inputs are full pill; the checkbox is 4px. No other radii.
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-300-normal.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-300-italic.woff2") format("woff2");
  font-weight: 300; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --oana-green: #174102;
  --oana-sage: #E1EBDF;

  --bg: var(--oana-green);
  --ink: var(--oana-sage);
  --ink-soft: #C2D3BD;                    /* secondary copy, AA+ on --bg */
  --line: rgb(225 235 223 / 0.22);
  --error: #F6D5C7;                       /* warm blush, AA on --bg */

  --font-display: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --font-body: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 0.4vw + 0.98rem, 1.1875rem); /* 17-19px */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

/* ---------- Type ---------- */
.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  place-items: center;
  padding: clamp(88px, 13vw, 180px) var(--gutter) clamp(48px, 6vw, 80px);
}
.hero__logo {
  width: min(100%, 1040px);
  margin: 0;
}

/* ---------- Newsletter ---------- */
.newsletter {
  width: min(100% - 2 * var(--gutter), 560px);
  margin: 0 auto;
  padding: clamp(80px, 10vw, 128px) 0 clamp(88px, 11vw, 140px);
}
.newsletter__intro { text-align: center; }
.newsletter__intro p {
  margin: 18px auto 0;
  max-width: 38ch;
  color: var(--ink-soft);
}
.newsletter__form-wrap { margin-top: 48px; }

.signup { display: grid; gap: 22px; }

.field { display: grid; gap: 8px; }
.field label { font-size: 0.9375rem; letter-spacing: 0.02em; }
.field__optional { color: var(--ink-soft); }

.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  min-height: 56px;
  padding: 0 24px;
  border: 1px solid rgb(225 235 223 / 0.55);
  border-radius: 999px;
  background: rgb(225 235 223 / 0.06);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.3s var(--ease);
}
.field input:hover { border-color: var(--ink); }
.field input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-color: var(--ink);
}
.field input[aria-invalid="true"] { border-color: var(--error); }

.field__error { font-size: 0.9375rem; color: var(--error); }
.field__error:empty { display: none; }

.field--check {
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: 14px;
}
.field--check input {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 3px 0 0;
  border: 1px solid rgb(225 235 223 / 0.7);
  border-radius: 4px;
  background: rgb(225 235 223 / 0.06) center / 14px no-repeat;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.field--check input:hover { border-color: var(--ink); }
.field--check input:checked {
  border-color: var(--ink);
  background-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23174102' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.field--check input[aria-invalid="true"] { border-color: var(--error); }
.field--check label { color: var(--ink-soft); line-height: 1.55; cursor: pointer; }
.field--check .field__error { grid-column: 2; }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 32px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--oana-green);
  font: 500 0.9375rem/1 var(--font-body);
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { background: transparent; color: var(--ink); }
.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--oana-green); }
.btn:active { transform: translateY(1px) scale(0.985); }

.signup__submit { width: 100%; margin-top: 6px; }
.signup__submit[disabled] { opacity: 0.75; cursor: progress; }
.signup__status { font-size: 0.9375rem; color: var(--error); text-align: center; }
.signup__status:empty { display: none; }

.signup-success { text-align: center; }
.signup-success h3 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.875rem, 3vw, 2.375rem);
  line-height: 1.15;
}
.signup-success p { margin-top: 12px; color: var(--ink-soft); }
.signup-success:focus { outline: none; }

/* ---------- Philosophy ---------- */
.philosophy {
  width: min(100% - 2 * var(--gutter), 1200px);
  margin: 0 auto;
  padding: 0 0 clamp(80px, 10vw, 128px);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.philosophy__text {
  margin-top: 28px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.625rem, 2.5vw, 2.375rem);
  line-height: 1.35;
}
/* the markup puts a space after each dot, so the left margin is wider to balance it */
.philosophy__text .sep {
  margin: 0 0.2em 0 0.45em;
  color: var(--ink-soft);
}
/* keep each phrase whole so lines only break at the separators */
.philosophy__text span:not(.sep) { white-space: nowrap; }

.philosophy__actions {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 16px;
}
.philosophy__email {
  margin-top: 22px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.philosophy__email a {
  color: var(--ink);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.philosophy__email a:hover { text-decoration: none; }

@media (max-width: 479px) {
  .philosophy__actions .btn { width: 100%; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 28px var(--gutter) 36px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.site-footer__links a { text-decoration: none; }
.site-footer__links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 599px) {
  .site-footer { flex-direction: column-reverse; align-items: center; text-align: center; }
  .site-footer__links { justify-content: center; }
}

/* ---------- Motion ---------- */
/* The logo settles in on load; the form and philosophy rise once as they
   enter. Everything is static under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .hero__logo { animation: settle 1.6s var(--ease) both; }

  .js .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s var(--ease), transform 1s var(--ease);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

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