/* ============================================================
   Sorena Health · shared styles
   ============================================================ */
:root {
  --sage-deep: #3A4F3E;
  --sage-warm: #7A9681;
  --sage-mist: #A8BBAD;
  --stone: #EDE8DF;
  --stone-warm: #E4DDD0;
  --stone-deep: #D4CCBA;
  --rust-gold: #B07A3D;
  --rust-deep: #8F6330;
  --ink: #1F2A22;
  --ink-soft: #4A5A4F;
  --ink-mute: #7A857E;
  --bone: #F7F3EB;
  --serif: 'Source Serif 4', Georgia, serif;
}
html[data-serif="spectral"] {
  --serif: 'Spectral', Georgia, serif;
}
html[data-serif="crimson"] {
  --serif: 'Crimson Pro', Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--stone);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

/* Typography */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--rust-gold);
  font-weight: 500;
}
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(48px, 7vw, 96px); font-weight: 300; }
h1 em { font-style: italic; color: var(--sage-deep); font-weight: 400; }
h2 { font-size: clamp(32px, 4vw, 48px); }
h2 em { font-style: italic; color: var(--rust-gold); font-weight: 400; }
h3 { font-size: clamp(20px, 2vw, 26px); }
p { text-wrap: pretty; }

/* Nav */
nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 20px 48px;
  background: rgba(237, 232, 223, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 0.5px solid rgba(58, 79, 62, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--sage-deep);
  position: relative;
  flex-shrink: 0;
}
.logo-mark::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--rust-gold);
}
.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--sage-deep); }
.nav-links a.active { color: var(--sage-deep); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--rust-gold);
}
.nav-cta {
  padding: 10px 20px;
  background: var(--sage-deep);
  color: var(--bone);
  border-radius: 100px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-cta:hover {
  background: var(--ink);
  transform: translateY(-1px);
}

/* Buttons */
.btn-primary {
  padding: 16px 28px;
  background: var(--sage-deep);
  color: var(--bone);
  border: none;
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-primary:hover {
  background: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(58, 79, 62, 0.25);
}
.btn-primary .arrow { transition: transform 0.3s; display: inline-block; }
.btn-primary:hover .arrow { transform: translateX(4px); }
.btn-secondary {
  padding: 16px 28px;
  background: transparent;
  color: var(--ink);
  border: 0.5px solid var(--sage-warm);
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-secondary:hover {
  border-color: var(--sage-deep);
  background: rgba(58, 79, 62, 0.04);
}

/* Generic section */
.section {
  padding: 120px 48px;
  max-width: 1400px;
  margin: 0 auto;
}
.section-eyebrow { margin-bottom: 24px; display: block; }
.section-lede {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* Footer */
footer.site-footer {
  background: var(--ink);
  color: var(--stone);
  padding: 80px 48px 48px;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 80px;
  margin-bottom: 60px;
}
.footer-brand .logo {
  color: var(--bone);
  margin-bottom: 24px;
}
.footer-brand p {
  color: rgba(237, 232, 223, 0.6);
  font-size: 14px;
  line-height: 1.7;
  max-width: 340px;
}
.footer-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--rust-gold);
  margin-bottom: 20px;
  font-weight: 500;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: rgba(237, 232, 223, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--rust-gold); }
.footer-bottom {
  border-top: 0.5px solid rgba(237, 232, 223, 0.1);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(237, 232, 223, 0.5);
  font-family: 'JetBrains Mono', monospace;
  flex-wrap: wrap;
  gap: 12px;
}

/* Page hero (interior pages) */
.page-hero {
  padding: 180px 48px 80px;
  max-width: 1400px;
  margin: 0 auto;
}
.page-hero .eyebrow { margin-bottom: 24px; display: inline-block; }
.page-hero h1 {
  font-size: clamp(44px, 6vw, 80px);
  max-width: 900px;
  margin-bottom: 32px;
}
.page-hero .lede {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 640px;
  letter-spacing: -0.01em;
}

/* Fade entrance */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.fade-up-1 { animation-delay: 0.1s; }
.fade-up-2 { animation-delay: 0.25s; }
.fade-up-3 { animation-delay: 0.4s; }
.fade-up-4 { animation-delay: 0.55s; }
.fade-up-5 { animation-delay: 0.7s; }
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  background: var(--bone);
  border: 0.5px solid rgba(58, 79, 62, 0.2);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(31, 42, 34, 0.18);
  width: 300px;
  display: none;
  font-family: 'Inter', sans-serif;
}
.tweaks-panel.visible { display: block; }
.tweaks-panel h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 16px;
  font-weight: 500;
}
.tweak-row {
  display: flex;
  gap: 6px;
  background: var(--stone);
  border-radius: 100px;
  padding: 4px;
}
.tweak-row button {
  flex: 1;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.tweak-row button.on {
  background: var(--sage-deep);
  color: var(--bone);
}
.tweak-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
  margin-top: 14px;
}
.tweak-label:first-of-type { margin-top: 0; }

/* Responsive */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .page-hero { padding: 140px 24px 60px; }
}
@media (max-width: 640px) {
  nav.site-nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .section { padding: 72px 20px; }
  footer.site-footer { padding: 60px 20px 32px; }
}
