/* =========================================================================
   Sexual Health Score — static build (HTML/CSS/JS, no framework)
   Design tokens ported 1:1 from the original TanStack/Tailwind app.
   ========================================================================= */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Manrope:wght@500;600;700;800&family=Hind+Siliguri:wght@400;500;600;700&display=swap');

/* Bengali glyphs (incl. digits like ১) -> Hind Siliguri 700 on Latin families */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url(https://fonts.gstatic.com/s/hindsiliguri/v14/ijwOs5juQtsyLLR5jN4cxBEoRCf_4uE.ttf) format('truetype');
  unicode-range: U+0980-09FF, U+200C-200D, U+25CC, U+0964-0965; size-adjust: 108%;
}
@font-face {
  font-family: "Manrope";
  font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url(https://fonts.gstatic.com/s/hindsiliguri/v14/ijwOs5juQtsyLLR5jN4cxBEoRCf_4uE.ttf) format('truetype');
  unicode-range: U+0980-09FF, U+200C-200D, U+25CC, U+0964-0965; size-adjust: 110%;
}

:root {
  --radius: 1rem;
  --background: oklch(0.985 0.005 240);
  --surface-muted: oklch(0.965 0.008 220);
  --foreground: oklch(0.21 0.04 260);
  --muted-foreground: oklch(0.55 0.03 250);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.21 0.04 260);
  --primary: oklch(0.52 0.09 178);
  --primary-foreground: oklch(0.99 0.005 220);
  --primary-soft: oklch(0.95 0.03 178);
  --secondary: oklch(0.55 0.2 262);
  --muted: oklch(0.96 0.008 230);
  --accent: oklch(0.94 0.04 200);
  --success: oklch(0.7 0.14 165);
  --warning: oklch(0.78 0.14 75);
  --warning-foreground: oklch(0.25 0.05 75);
  --destructive: oklch(0.6 0.2 25);
  --border: oklch(0.92 0.01 230);
  --input: oklch(0.92 0.01 230);
  --ring: oklch(0.52 0.09 178);

  --gradient-hero: linear-gradient(140deg, oklch(0.97 0.025 195) 0%, oklch(0.97 0.03 285) 50%, oklch(0.97 0.03 350) 100%);

  /* tool accents */
  --male: oklch(0.55 0.2 262);
  --male-soft: oklch(0.95 0.04 262);
  --gradient-male: linear-gradient(140deg, oklch(0.6 0.2 262) 0%, oklch(0.5 0.22 248) 100%);
  --male-accent: oklch(0.62 0.21 296);
  --male-accent-soft: oklch(0.95 0.04 296);
  --gradient-male-accent: linear-gradient(140deg, oklch(0.66 0.2 296) 0%, oklch(0.55 0.22 280) 100%);
  --female: oklch(0.65 0.22 0);
  --female-soft: oklch(0.95 0.04 0);
  --gradient-female: linear-gradient(140deg, oklch(0.7 0.2 5) 0%, oklch(0.6 0.22 350) 100%);

  --gradient-blob-teal: radial-gradient(closest-side, oklch(0.78 0.14 178 / 0.35), transparent);
  --gradient-blob-violet: radial-gradient(closest-side, oklch(0.7 0.2 290 / 0.3), transparent);
  --gradient-blob-pink: radial-gradient(closest-side, oklch(0.78 0.18 350 / 0.3), transparent);

  --glass-bg: oklch(1 0 0 / 0.62);
  --glass-bg-strong: oklch(1 0 0 / 0.78);
  --glass-border: oklch(1 0 0 / 0.7);
  --glass-blur: 20px;

  --shadow-soft: 0 1px 2px oklch(0.5 0.05 230 / 0.04), 0 4px 14px oklch(0.5 0.05 230 / 0.06);
  --shadow-card: 0 4px 24px -8px oklch(0.5 0.08 230 / 0.12), 0 2px 6px oklch(0.5 0.05 230 / 0.05);
  --shadow-float: 0 10px 40px -12px oklch(0.4 0.08 250 / 0.18), 0 2px 8px oklch(0.4 0.05 250 / 0.06);
  --shadow-elevated: 0 24px 60px -20px oklch(0.4 0.1 250 / 0.25), 0 8px 20px -8px oklch(0.4 0.06 250 / 0.1);

  --font-sans: "Plus Jakarta Sans", "Hind Siliguri", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Manrope", "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
* { border-color: var(--border); }
html { font-family: var(--font-sans); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  position: relative;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

/* ---- Ambient background blobs ---- */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--gradient-hero); }
.blob { position: absolute; border-radius: 9999px; filter: blur(8px); animation: vc-blob-drift 14s ease-in-out infinite; }
.blob-1 { width: 42vw; height: 42vw; top: -10vw; left: -8vw; background: var(--gradient-blob-teal); }
.blob-2 { width: 38vw; height: 38vw; top: 30vh; right: -10vw; background: var(--gradient-blob-violet); animation-delay: -4s; }
.blob-3 { width: 36vw; height: 36vw; bottom: -12vw; left: 25vw; background: var(--gradient-blob-pink); animation-delay: -8s; }

/* ---- Glass ---- */
.glass {
  background-color: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-border);
}
.glass-strong {
  background-color: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-border);
}

/* ---- Layout ---- */
.wrap { margin: 0 auto; max-width: 64rem; padding: 1.5rem 1.25rem; }
@media (min-width: 640px) { .wrap { padding: 2.5rem 1.5rem; } }
.narrow { max-width: 44rem; }

.topbar { display: flex; align-items: center; justify-content: space-between; }
.pill {
  display: inline-flex; align-items: center; gap: 0.375rem;
  border-radius: 9999px; padding: 0.375rem 0.75rem;
  font-size: 0.6875rem; font-weight: 600; color: var(--primary);
}
.muted { color: var(--muted-foreground); }
.font-display { font-family: var(--font-display); letter-spacing: -0.02em; }
.text-balance { text-wrap: balance; }
.center { text-align: center; }

/* ---- Brand ---- */
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand-mark {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem;
  border-radius: 0.85rem; color: #fff; background: var(--gradient-male);
  box-shadow: var(--shadow-soft); flex-shrink: 0;
}
.brand-mark svg { width: 1.3rem; height: 1.3rem; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; line-height: 1.05; letter-spacing: -0.01em; }
.brand-sub { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-foreground); }

/* ---- Hero / landing ---- */
.hero { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 0; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 1.25rem;
  border-radius: 9999px; padding: 0.375rem 0.75rem; font-size: 0.75rem; font-weight: 500;
  color: var(--muted-foreground); box-shadow: var(--shadow-soft);
}
.eyebrow svg, .pill svg { width: 0.9rem; height: 0.9rem; }
h1.hero-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.85rem, 6vw, 3rem); line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
.grad-text { background: linear-gradient(90deg, var(--primary), var(--male-accent), var(--female)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 1rem auto 0; max-width: 38rem; font-size: 1rem; line-height: 1.6; color: var(--muted-foreground); }

/* ---- Tool cards grid ---- */
.tool-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; width: 100%; margin-top: 3rem; }
@media (min-width: 768px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  border-radius: calc(var(--radius) + 4px); padding: 1.5rem; text-align: left;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-card); overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
}
.card.interactive:hover { transform: translateY(-4px); box-shadow: var(--shadow-elevated); }
.card .accent-bar { position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.icon-tile { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 1rem; }
.icon-tile svg { width: 1.5rem; height: 1.5rem; }
.tag { margin-top: 1rem; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.card h3 { margin: 0.25rem 0 0; font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; line-height: 1.25; }
.card-desc { margin-top: 0.5rem; flex: 1; font-size: 0.875rem; line-height: 1.55; color: var(--muted-foreground); }
.card-meta { margin-top: 1rem; font-size: 0.6875rem; font-weight: 500; color: var(--muted-foreground); }
.card-cta { margin-top: 1rem; display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.875rem; font-weight: 700; }
.card-cta svg { width: 1rem; height: 1rem; transition: transform .2s; }
.card.interactive:hover .card-cta svg { transform: translateX(3px); }

/* theme helpers */
.t-male { color: var(--male); } .bg-male { background: var(--male-soft); }
.t-male-accent { color: var(--male-accent); } .bg-male-accent { background: var(--male-accent-soft); }
.t-female { color: var(--female); } .bg-female { background: var(--female-soft); }

/* ---- Trust badges row ---- */
.trust {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem;
  margin: 2.5rem auto 0; max-width: 40rem; border-radius: calc(var(--radius) + 4px);
  padding: 0.75rem 1rem; box-shadow: var(--shadow-soft);
}
.trust-item { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; font-weight: 500; }
.trust-item svg { width: 0.9rem; height: 0.9rem; color: var(--primary); }
.trust-divider { width: 1px; height: 1rem; background: var(--border); }
@media (max-width: 520px) { .trust-divider { display: none; } }

footer.foot { padding-top: 1.5rem; text-align: center; font-size: 0.75rem; color: var(--muted-foreground); }

/* ---- Top nav (assessment / results) ---- */
.topnav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.back-btn {
  display: inline-flex; align-items: center; gap: 0.4rem; border-radius: 9999px;
  padding: 0.45rem 0.9rem; font-size: 0.8rem; font-weight: 600; color: var(--foreground);
  background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--shadow-soft);
}
.back-btn svg { width: 0.95rem; height: 0.95rem; }

/* ---- Progress bar ---- */
.progress-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.5rem; }
.progress-label { font-size: 0.8rem; font-weight: 600; }
.progress-count { font-size: 0.8rem; font-weight: 700; }
.progress-track { height: 0.5rem; border-radius: 9999px; background: var(--muted); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 9999px; transition: width .4s cubic-bezier(.2,.8,.2,1); }

/* ---- Question card ---- */
.q-card {
  border-radius: calc(var(--radius) + 8px); padding: 1.5rem; margin-top: 1.5rem;
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-float);
}
@media (min-width: 640px) { .q-card { padding: 2rem; } }
.q-index { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.q-text { margin: 0.5rem 0 1.25rem; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; line-height: 1.45; }
@media (min-width: 640px) { .q-text { font-size: 1.3rem; } }

.options { display: flex; flex-direction: column; gap: 0.6rem; }
.option {
  display: flex; align-items: center; gap: 0.75rem; width: 100%; text-align: left;
  border-radius: 0.85rem; padding: 0.85rem 1rem; font-size: 0.95rem; line-height: 1.4;
  background: var(--card); border: 1.5px solid var(--border); color: var(--foreground);
  transition: border-color .15s, background .15s, transform .1s;
}
.option:hover { border-color: var(--ring); background: var(--primary-soft); }
.option:active { transform: scale(0.995); }
.option .radio {
  display: grid; place-items: center; flex-shrink: 0; width: 1.15rem; height: 1.15rem;
  border-radius: 9999px; border: 2px solid var(--border); transition: border-color .15s;
}
.option .radio::after { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: transparent; transition: background .15s; }
.option.selected { border-color: var(--ring); background: var(--primary-soft); }
.option.selected .radio { border-color: var(--primary); }
.option.selected .radio::after { background: var(--primary); }

.q-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 1.5rem; gap: 0.75rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.45rem; border-radius: 9999px;
  padding: 0.6rem 1.3rem; font-size: 0.9rem; font-weight: 700; border: none;
  background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-soft);
  transition: opacity .15s, transform .1s;
}
.btn:hover { opacity: 0.92; } .btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn svg { width: 1rem; height: 1rem; }
.btn-ghost { background: var(--glass-bg); color: var(--foreground); border: 1px solid var(--glass-border); box-shadow: none; }

/* ---- Results ---- */
.result-head { text-align: center; margin-bottom: 1.5rem; }
.result-head .badge {
  display: inline-flex; align-items: center; gap: 0.4rem; border-radius: 9999px;
  padding: 0.35rem 0.85rem; font-size: 0.75rem; font-weight: 700; margin-bottom: 0.75rem;
}
.result-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; margin: 0.25rem 0; line-height: 1.25; }
@media (min-width: 640px) { .result-title { font-size: 1.85rem; } }
.result-desc { max-width: 40rem; margin: 0.75rem auto 0; color: var(--muted-foreground); line-height: 1.6; }

.panel {
  border-radius: calc(var(--radius) + 8px); padding: 1.5rem; margin-top: 1.25rem;
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-card);
}
.panel-title { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin: 0 0 1rem; }
.panel-title svg { width: 1.15rem; height: 1.15rem; color: var(--primary); }

/* radial score */
.radial-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.radial { position: relative; width: 160px; height: 160px; }
.radial svg { transform: rotate(-90deg); }
.radial .val { position: absolute; inset: 0; display: grid; place-items: center; }
.radial .val .num { font-family: var(--font-display); font-size: 2.3rem; font-weight: 800; line-height: 1; }
.radial .val .den { font-size: 0.8rem; color: var(--muted-foreground); }

/* domain bars */
.dbar { margin-bottom: 1rem; }
.dbar:last-child { margin-bottom: 0; }
.dbar-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.35rem; }
.dbar-label { font-size: 0.85rem; font-weight: 600; }
.dbar-val { font-size: 0.85rem; font-weight: 700; }
.dbar-track { height: 0.55rem; border-radius: 9999px; background: var(--muted); overflow: hidden; }
.dbar-fill { height: 100%; border-radius: 9999px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.s-normal { color: var(--success); } .bg-normal { background: var(--success); }
.s-mild { color: var(--warning-foreground); } .bg-mild { background: var(--warning); }
.s-severe { color: var(--destructive); } .bg-severe { background: var(--destructive); }

/* chips / flags */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { border-radius: 9999px; padding: 0.3rem 0.75rem; font-size: 0.78rem; font-weight: 600;
  background: oklch(0.95 0.05 25); color: var(--destructive); border: 1px solid oklch(0.88 0.07 25); }

/* recommendation list */
.rec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.rec-list li { display: flex; gap: 0.6rem; font-size: 0.9rem; line-height: 1.5; }
.rec-list li svg { flex-shrink: 0; width: 1.05rem; height: 1.05rem; margin-top: 0.15rem; color: var(--primary); }

.risk-row { display: flex; align-items: center; gap: 0.6rem; }
.risk-dot { width: 0.7rem; height: 0.7rem; border-radius: 9999px; }
.r-Low { background: var(--success); } .r-Moderate { background: var(--warning); }
.r-High, .r-VeryHigh { background: var(--destructive); }

.result-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.75rem; }

.disclaimer {
  margin-top: 1.5rem; border-radius: 1rem; padding: 1rem 1.25rem; font-size: 0.8rem; line-height: 1.55;
  color: var(--warning-foreground); background: oklch(0.97 0.04 75); border: 1px solid oklch(0.88 0.08 75);
  display: flex; gap: 0.6rem;
}
.disclaimer svg { flex-shrink: 0; width: 1.1rem; height: 1.1rem; margin-top: 0.1rem; }

/* ---- animations ---- */
@keyframes vc-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes vc-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes vc-blob-drift { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(20px,-15px) scale(1.05);} }
.animate-fade-up { animation: vc-fade-up .5s cubic-bezier(.2,.8,.2,1) both; }
.animate-fade-in { animation: vc-fade-in .4s ease-out both; }
[data-delay="60"] { animation-delay: 60ms; } [data-delay="120"] { animation-delay: 120ms; }
[data-delay="180"] { animation-delay: 180ms; } [data-delay="240"] { animation-delay: 240ms; }
[data-delay="300"] { animation-delay: 300ms; } [data-delay="360"] { animation-delay: 360ms; }

@media (prefers-reduced-motion: reduce) {
  .animate-fade-up, .animate-fade-in, .blob { animation: none !important; }
}
