/* style.css */
:root {
  --bg: #fbf1f1;
  --bg2: #f7e6e6;
  --card: #ffffffcc;
  --ink: #1d1b1b;
  --muted: #5c5151;
  --brand: #9a2b3a;
  --brand2: #c24b5b;
  --line: #ead2d2;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.1);
  --radius: 18px;
  --radius2: 24px;
  --max: 1120px;
  --focus: 0 0 0 3px rgba(154, 43, 58, 0.25);

  --ease-lux: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms;
  --dur-med: 520ms;
  --dur-slow: 820ms;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 20% 0%, #ffd9df55, transparent 60%),
    radial-gradient(900px 500px at 90% 10%, #f3b8c255, transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 10px;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px;
}

.muted {
  color: var(--muted);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 241, 241, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff, #ffe5e8);
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(154, 43, 58, 0.1);
  font-size: 18px;
}
.brand-name {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 18px;
}
.brand-sub {
  color: var(--brand);
}

.nav {
  display: flex;
  gap: 18px;
  align-items: center;
}
.nav a {
  color: var(--muted);
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 12px;
}
.nav a:hover {
  background: #ffffff70;
}

.nav-cta {
  color: var(--brand);
  border: 1px solid var(--line);
  background: #ffffff90;
}

.nav a.active {
  color: var(--brand);
  background: #ffffffcc;
  border: 1px solid rgba(154, 43, 58, 0.25);
  box-shadow: 0 10px 22px rgba(154, 43, 58, 0.1);
  padding: 8px 12px;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 40px;
  border: 1px solid var(--line);
  background: #ffffff90;
  border-radius: 14px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 6px 10px;
  background: var(--brand);
  border-radius: 2px;
}

/* Mobile nav dropdown */
.nav.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  right: 18px;
  top: 66px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  gap: 10px;
  z-index: 100;
}

/* Top progress bar */
.top-progress {
  position: sticky;
  top: 66px;
  z-index: 9999;
  height: 3px;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-soft);
}
.top-progress.show {
  opacity: 1;
}
.top-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  box-shadow: 0 12px 26px rgba(154, 43, 58, 0.14);
  transition: width var(--dur-med) var(--ease-lux);
}

/* Router views */
.view {
  display: none;
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  filter: blur(2px);
}
.view.view-active {
  display: block;
}
.view.view-anim {
  animation: viewIn var(--dur-med) var(--ease-lux) both;
}
@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Hero */
.hero {
  position: relative;
  padding: 56px 0 18px;
  overflow: hidden;
}
.hero-wave {
  position: absolute;
  inset: -40px -80px auto -80px;
  height: 280px;
  background:
    radial-gradient(
      closest-side at 60% 40%,
      rgba(154, 43, 58, 0.18),
      transparent 70%
    ),
    repeating-radial-gradient(
      circle at 70% 30%,
      rgba(154, 43, 58, 0.1) 0px,
      rgba(154, 43, 58, 0.1) 2px,
      transparent 3px,
      transparent 12px
    );
  mask-image: radial-gradient(
    closest-side at 50% 50%,
    black 60%,
    transparent 95%
  );
  opacity: 0.55;
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 26px;
  align-items: stretch;
}
.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.25em;
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
}
.hero-title {
  font-family: "Playfair Display", serif;
  font-size: 44px;
  margin: 0 0 12px;
  line-height: 1.06;
}
.hero-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 60ch;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Integrated home image layer */
.hero-right {
  position: relative;
  min-height: 100%;
}
.hero-brand-art {
  position: absolute;
  inset: -22px -18px auto -18px;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}
.hero-brand-art img {
  width: min(520px, 100%);
  height: auto;
  border-radius: 28px;
  filter: saturate(1.02) contrast(1.02);
  transform: translateY(-10px) scale(1.02);
  mix-blend-mode: multiply;
  mask-image: radial-gradient(circle at 50% 35%, black 62%, transparent 100%);
}
.hero-right::after {
  content: "";
  position: absolute;
  inset: -26px -22px auto -22px;
  height: 320px;
  background: radial-gradient(
    closest-side at 50% 40%,
    rgba(255, 255, 255, 0.55),
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  transition:
    transform var(--dur-med) var(--ease-lux),
    box-shadow var(--dur-med) var(--ease-lux);
}
.card:hover {
  transform: translateY(-2px);
}

.hero-card {
  position: relative;
  z-index: 1;
}
.card-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(
    closest-side at 30% 30%,
    rgba(194, 75, 91, 0.2),
    transparent 70%
  );
  filter: blur(2px);
  pointer-events: none;
}
.hero-card-inner {
  position: relative;
  padding: 22px;
}
.hero-card h3 {
  margin: 0 0 10px;
  font-family: "Playfair Display", serif;
}
.hero-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
}

.mini-stats {
  display: grid;
  gap: 10px;
  margin: 16px 0 8px;
}
.mini-stat {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff80;
}
.mini-stat-num {
  display: block;
  font-weight: 600;
  color: var(--brand);
}
.mini-stat-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.link-arrow {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--brand);
  font-weight: 600;
}

/* Sections */
.section {
  padding: 24px 0 56px;
}
.section-head {
  max-width: 78ch;
}
.section-title {
  font-family: "Playfair Display", serif;
  font-size: 34px;
  margin: 0 0 10px;
}
.section-body {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.grid {
  display: grid;
  gap: 16px;
}

/* Supplement cards */
.cards {
  margin-top: 18px;
  grid-template-columns: repeat(3, 1fr);
}
.cards .card {
  padding: 18px;
}
.cards h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

/* Tags */
.tags {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tags li {
  margin: 0;
  padding: 0;
}

.tag-link,
.tag-pill {
  display: inline-block;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand);
  font-weight: 600;
}
.tag-link:hover {
  background: #ffffffd6;
}

/* Form */
.form {
  margin-top: 18px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  padding: 14px;
  background: #ffffff85;
}
.fieldset legend {
  font-weight: 700;
  color: var(--brand);
  padding: 0 8px;
  font-family: "Playfair Display", serif;
}
.fieldset-wide {
  grid-column: 1 / -1;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 14px;
}
.check input {
  accent-color: var(--brand);
}

select,
input[type="text"],
input[type="date"],
textarea {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.input-inline {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
.input-inline span {
  display: block;
  margin-bottom: 6px;
}

.symptoms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 14px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #ffffff90;
  cursor: pointer;
  font-weight: 600;
  transition:
    transform var(--dur-med) var(--ease-lux),
    box-shadow var(--dur-med) var(--ease-lux),
    background var(--dur-med) var(--ease-lux),
    border-color var(--dur-med) var(--ease-lux),
    opacity var(--dur-fast) var(--ease-soft);
}
.btn:hover {
  transform: translateY(-1px);
}

/* Primary red */
.btn-primary {
  border-color: rgba(154, 43, 58, 0.25);
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: white;
  box-shadow: 0 14px 30px rgba(154, 43, 58, 0.2);
}

/* Keep ghost hover subtle elsewhere */
.btn-ghost:hover {
  background: #fff;
}

/* Force all plan Select buttons to the same red */
.plan .btn {
  border-color: rgba(154, 43, 58, 0.25);
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: white;
  box-shadow: 0 14px 30px rgba(154, 43, 58, 0.2);
}
.plan .btn:hover {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
}

/* Results */
.results-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}
.results-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.results-grid {
  margin-top: 18px;
  grid-template-columns: repeat(2, 1fr);
}

.stack-card {
  padding: 18px;
}
.stack-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.stack-title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 20px;
}
.stack-sub {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 13.5px;
}

.pill-art {
  width: 96px;
  height: 76px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 30% 20%, #ffffff, #ffe9ec);
  display: grid;
  place-items: center;
}

.stack-list {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}
.stack-list li {
  margin: 6px 0;
}

.stack-why {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: #6b5c5c;
  font-size: 13px;
}

/* Results reveal */
.stack-card.will-reveal {
  opacity: 0;
  transform: translateY(14px) scale(0.99);
  filter: blur(2px);
}
.stack-card.reveal {
  animation: cardIn var(--dur-slow) var(--ease-lux) both;
}
@keyframes cardIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Loading glass wrap */
.results-loading-wrap {
  margin-top: 18px;
  border-radius: 26px;
  border: 1px solid rgba(234, 210, 210, 0.85);
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
}
.results-loading-wrap::before {
  content: "";
  position: absolute;
  inset: -40px;
  background:
    radial-gradient(
      closest-side at 18% 20%,
      rgba(194, 75, 91, 0.18),
      transparent 60%
    ),
    radial-gradient(
      closest-side at 80% 20%,
      rgba(191, 233, 255, 0.22),
      transparent 62%
    ),
    radial-gradient(
      closest-side at 60% 90%,
      rgba(245, 240, 255, 0.22),
      transparent 60%
    );
  filter: blur(2px);
  opacity: 0.8;
  pointer-events: none;
}
.results-loading-head {
  position: relative;
  padding: 16px 18px 0;
}
.loading-title {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  margin: 0;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.loading-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

/* subtle dots */
.dots span {
  display: inline-block;
  opacity: 0.25;
  transform: translateY(0);
  animation: dotPulse 1.35s var(--ease-soft) infinite;
}
.dots span:nth-child(2) {
  animation-delay: 180ms;
}
.dots span:nth-child(3) {
  animation-delay: 360ms;
}

@keyframes dotPulse {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  45% {
    opacity: 0.7;
    transform: translateY(-1px);
  }
}

/* Skeleton shimmer */
.skeleton-grid {
  position: relative;
  padding: 4px 18px 18px;
}
.skeleton-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.4);
}

.skeleton-line,
.skeleton-block {
  border-radius: 12px;
  border: 1px solid rgba(234, 210, 210, 0.9);
  background: rgba(255, 255, 255, 0.55);
  position: relative;
  overflow: hidden;
}
.skeleton-line {
  height: 14px;
  margin: 10px 0;
}
.skeleton-block {
  height: 70px;
  margin: 14px 0;
  border-radius: 18px;
}

.w-40 {
  width: 40%;
}
.w-45 {
  width: 45%;
}
.w-55 {
  width: 55%;
}
.w-60 {
  width: 60%;
}
.w-65 {
  width: 65%;
}
.w-70 {
  width: 70%;
}
.w-75 {
  width: 75%;
}
.w-80 {
  width: 80%;
}
.w-85 {
  width: 85%;
}
.w-90 {
  width: 90%;
}

.skeleton-line::after,
.skeleton-block::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-60%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.38),
    transparent
  );
  animation: shimmer 1.45s var(--ease-soft) infinite;
}
@keyframes shimmer {
  0% {
    transform: translateX(-60%);
  }
  100% {
    transform: translateX(160%);
  }
}

/* Plans */
.plans {
  margin-top: 18px;
  grid-template-columns: repeat(3, 1fr);
}
.plan {
  padding: 18px;
  position: relative;
}
.plan h3 {
  margin: 26px 0 6px;
}
.plan-featured h3 {
  margin-top: 44px;
}
.plan.recommended h3 {
  margin-top: 56px;
}
.plan.plan-featured.recommended h3 {
  margin-top: 62px;
}

.plan-featured {
  border-color: rgba(154, 43, 58, 0.35);
}

.plan.recommended {
  border-color: rgba(154, 43, 58, 0.48);
  box-shadow: 0 22px 60px rgba(154, 43, 58, 0.12);
}

.badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand);
}

.badge-reco {
  left: 14px;
  right: auto;
  background: linear-gradient(
    135deg,
    rgba(154, 43, 58, 0.08),
    rgba(194, 75, 91, 0.12)
  );
  border-color: rgba(154, 43, 58, 0.22);
}

.plan-price {
  margin: 10px 0 10px;
  font-size: 34px;
  font-family: "Playfair Display", serif;
  color: var(--brand);
}
.plan-price span {
  font-size: 14px;
  color: var(--muted);
}
.plan-list {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

/* Tier recommendation card */
.rec-card {
  margin-top: 18px;
  padding: 18px;
}
.rec-card h3 {
  margin: 0 0 8px;
  font-family: "Playfair Display", serif;
}
.tier-reasons {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}
.rec-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 0;
  color: var(--muted);
  gap: 12px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0;
}
.footer-links a {
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--brand);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-brand-art {
    position: relative;
    inset: auto;
    margin: 0 0 12px;
    opacity: 0.92;
  }
  .hero-right::after {
    display: none;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .plans {
    grid-template-columns: 1fr;
  }
  .results-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 38px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .results-loading-wrap {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
