/* ==========================================================================
   Hyperplant public site — design system
   Ported from the "warm-clay / forest" design prototype.
   Light, warm palette; Hanken Grotesk; pill buttons; soft elevation.
   ========================================================================== */

/* ---- Self-hosted font (variable, weight axis 400–900) -------------------- */
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/hanken-grotesk-latin.woff2") format("woff2");
}

/* ---- Tokens -------------------------------------------------------------- */
:root {
  color-scheme: light;

  --bg: #f2ecde;
  --card: #fbf8ef;
  --ink: #21392b; /* primary text / forest */
  --ink-soft: #586051; /* secondary text */
  --ink-faint: #8a9079; /* meta text */
  --cream: #f2ecde; /* text on dark */

  --accent: #c0673f; /* warm-clay accent */
  --green: #3f6b4b; /* mid green (headline highlight) */
  --green-soft: #9fae76;
  --sage: #c9d2ab; /* light sage (accent on dark) */
  --chip: #eef1e2; /* feature icon chip */

  --line: rgba(33, 57, 43, 0.09);
  --line-strong: rgba(33, 57, 43, 0.1);

  --max-width: 1200px;
  --pad-x: 40px;

  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --shadow-btn: 0 14px 30px -14px rgba(33, 57, 43, 0.7);
  --shadow-card: 0 18px 44px -34px rgba(33, 57, 43, 0.35);
  --shadow-accent: 0 24px 50px -30px rgba(33, 57, 43, 0.7);
  --shadow-cta: 0 40px 80px -44px rgba(33, 57, 43, 0.7);
  --shadow-app: 0 50px 90px -34px rgba(33, 57, 43, 0.55), 0 14px 36px -18px rgba(33, 57, 43, 0.3);
}

/* ---- Reset --------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

::selection {
  background: var(--sage);
  color: var(--ink);
}

/* ---- Ambient background glows ------------------------------------------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 88% -8%, rgba(155, 174, 118, 0.38), transparent 60%),
    radial-gradient(900px 600px at -8% 4%, rgba(192, 103, 63, 0.1), transparent 55%);
}

.site-shell {
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

.site-content {
  position: relative;
  z-index: 1;
}

/* ---- Animations ---------------------------------------------------------- */
@keyframes hp-drift {
  0%,
  100% {
    transform: translateY(0) rotate(-2.5deg);
  }
  50% {
    transform: translateY(-10px) rotate(-2.5deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Shared layout ------------------------------------------------------- */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* ---- Header / nav -------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(242, 236, 222, 0.78);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: block;
  box-shadow: 0 6px 16px -6px rgba(33, 57, 43, 0.5);
}

.brand-word {
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.015em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 10px;
}

.nav-link.is-active {
  color: var(--ink);
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 17px;
  border-radius: 999px;
  padding: 17px 30px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--ink);
  color: var(--cream);
  box-shadow: var(--shadow-btn);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid rgba(33, 57, 43, 0.22);
}

.btn-sage {
  background: var(--sage);
  color: var(--ink);
  font-weight: 800;
  font-size: 16px;
  padding: 16px 28px;
}

.btn-ghost {
  background: rgba(242, 236, 222, 0.1);
  color: var(--cream);
  font-weight: 600;
  font-size: 16px;
  padding: 16px 26px;
  border: 1px solid rgba(242, 236, 222, 0.28);
}

.btn .arrow {
  flex: none;
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px var(--pad-x) 96px;
  display: flex;
  gap: 56px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-copy {
  flex: 1 1 480px;
  min-width: 320px;
}

.hero h1 {
  font-size: clamp(56px, 7.4vw, 116px);
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
  color: var(--ink);
  text-wrap: balance;
}

.hero h1 .soft {
  color: var(--green);
}

.lead {
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 480px;
  margin: 0 0 36px;
  font-weight: 450;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* hero illustration */
.hero-art {
  flex: 1 1 420px;
  min-width: 320px;
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-art .glow {
  position: absolute;
  width: 460px;
  height: 460px;
  max-width: 100%;
  border-radius: 50%;
  top: -10px;
  background: radial-gradient(
    circle at 50% 40%,
    rgba(155, 174, 118, 0.55),
    rgba(155, 174, 118, 0) 65%
  );
}

.app-card {
  position: relative;
  z-index: 2;
  width: 312px;
  max-width: 100%;
  background: var(--card);
  border-radius: 40px;
  padding: 13px;
  box-shadow: var(--shadow-app);
  border: 1px solid rgba(33, 57, 43, 0.07);
  animation: hp-drift 8s ease-in-out infinite;
}

.app-card img {
  display: block;
  width: 100%;
  border-radius: 30px;
  border: 1px solid rgba(33, 57, 43, 0.06);
}

/* ---- Highlight strip ----------------------------------------------------- */
.highlights {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--pad-x) 28px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.highlight-card {
  flex: 1 1 200px;
  background: rgba(251, 248, 239, 0.7);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 24px;
}

.highlight-card .big {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.highlight-card .small {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 3px;
}

/* ---- Section scaffold ---------------------------------------------------- */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px var(--pad-x) 40px;
}

.section-head {
  max-width: 760px;
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: clamp(40px, 5vw, 68px);
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
  color: var(--ink);
}

.section-head p {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  max-width: 560px;
}

/* ---- Feature grid -------------------------------------------------------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 34px;
  box-shadow: var(--shadow-card);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--chip);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.feature-card h3 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--ink);
}

.feature-card p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

/* accent (dark) feature card */
.feature-accent {
  background: var(--ink);
  border-radius: 28px;
  padding: 34px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-accent);
}

.feature-accent .inner {
  position: relative;
  z-index: 2;
}

.feature-accent .kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 14px;
}

.feature-accent h3 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--cream);
}

.feature-accent p {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(242, 236, 222, 0.78);
  margin: 0;
  max-width: 340px;
}

.feature-accent .plant {
  position: absolute;
  bottom: -10px;
  right: 18px;
  z-index: 1;
  opacity: 0.92;
}

/* ---- iOS CTA band -------------------------------------------------------- */
.cta-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px var(--pad-x) 80px;
}

.cta {
  background: var(--ink);
  border-radius: 36px;
  padding: clamp(40px, 6vw, 76px);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-cta);
}

.cta .orb {
  position: absolute;
  top: -80px;
  right: -40px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 210, 171, 0.22), transparent 65%);
}

.cta-inner {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
}

.cta-left {
  flex: 1 1 460px;
  min-width: 300px;
}

.cta .kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 20px;
}

.cta h2 {
  font-size: clamp(42px, 5.4vw, 76px);
  line-height: 0.94;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--cream);
}

.cta-right {
  flex: 1 1 340px;
  min-width: 280px;
}

.cta-right p {
  font-size: 19px;
  line-height: 1.55;
  color: rgba(242, 236, 222, 0.82);
  margin: 0 0 28px;
}

.cta-actions {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
}

/* ---- Inner page hero (support / privacy) -------------------------------- */
.page-hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px var(--pad-x) 0;
}

.page-hero h1 {
  font-size: clamp(48px, 6vw, 92px);
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
  color: var(--ink);
}

.page-hero .lead {
  max-width: 560px;
}

.page-hero .meta {
  font-size: 15px;
  color: var(--ink-faint);
  margin: 0;
  font-weight: 600;
}

/* ---- Support page -------------------------------------------------------- */
.support-main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--pad-x) 90px;
}

.support-main .page-hero {
  padding-left: 0;
  padding-right: 0;
}

.support-cards {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 40px 0 64px;
}

.support-card {
  flex: 1 1 320px;
  border-radius: 26px;
  padding: 34px;
}

.support-card.dark {
  background: var(--ink);
  color: var(--cream);
}

.support-card.light {
  background: var(--card);
  border: 1px solid var(--line);
}

.support-card .kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.support-card.dark .kicker {
  color: var(--sage);
}

.support-card.light .kicker {
  color: var(--green-soft);
}

.support-card .headline {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.support-card.light .headline {
  color: var(--ink);
  margin-bottom: 8px;
}

.support-card p {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

.support-h2 {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 24px;
}

.topic-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
}

.topic-card h3 {
  font-size: 18.5px;
  font-weight: 800;
  margin: 0 0 9px;
  color: var(--ink);
}

.topic-card p {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

.support-cta {
  margin-top: 56px;
}

/* ---- Privacy page -------------------------------------------------------- */
.privacy-main {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 var(--pad-x) 90px;
}

.privacy-main .page-hero {
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

.policy-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 48px);
  margin-top: 44px;
}

.policy-intro {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 36px;
}

.policy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 48px;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line-strong);
}

.policy-meta .item .label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.policy-meta .item .value {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.policy-section {
  margin-bottom: 32px;
}

.policy-section:last-child {
  margin-bottom: 0;
}

.policy-section + .policy-section {
  padding-top: 32px;
  border-top: 1px solid var(--line-strong);
}

.policy-section h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 10px;
}

.policy-section p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.policy-section p:last-child {
  margin-bottom: 0;
}

.policy-section ul {
  margin: 0;
  padding-left: 22px;
}

.policy-section li {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.policy-section a,
.support-card a.inline {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1.5px solid rgba(63, 107, 75, 0.35);
}

/* ---- Footer -------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line-strong);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.footer-brand img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: block;
}

.footer-brand span {
  font-size: 15px;
  color: var(--ink-soft);
  font-weight: 500;
}

.footer-links {
  display: flex;
  gap: 8px;
}

.footer-links a {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 760px) {
  :root {
    --pad-x: 22px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 40px;
    padding-bottom: 64px;
    gap: 40px;
  }

  .section {
    padding-top: 56px;
  }

  .nav-links {
    gap: 0;
  }

  .nav-link {
    padding: 9px 11px;
    font-size: 15px;
  }
}

@media (max-width: 460px) {
  .brand-word {
    font-size: 19px;
  }

  .btn,
  .btn-sage,
  .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
