/* ================================================================
   Hormone Shift Meter — Styles
   All classes prefixed with .hm- for WordPress isolation.
   ================================================================ */

/* ── Variables ── */
.hm-root {
  --hm-bg: #fff7fb;
  --hm-surface: #ffffff;
  --hm-text: #1f2937;
  --hm-muted: #6b7280;
  --hm-accent: #d946ef;
  --hm-accent2: #fb7185;
  --hm-line: #f3d7ea;
  --hm-shadow: rgba(31, 41, 55, 0.07);
  --hm-success: #22c55e;
  --hm-radius: 14px;
  --hm-stage-color: #d946ef;
  --hm-stage-color-light: rgba(217, 70, 239, 0.08);
  --hm-stage-color-glow: rgba(217, 70, 239, 0.15);
}

/* ── Container reset ── */
.hm-root {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--hm-text);
  line-height: 1.6;
  font-size: 15px;
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  background: radial-gradient(ellipse at 30% 0%, #fce7f3 0%, var(--hm-bg) 50%, #faf5ff 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hm-root *,
.hm-root *::before,
.hm-root *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Header ── */
.hm-header {
  text-align: center;
  margin-bottom: 20px;
  animation: hmFadeIn 0.6s ease both;
}

.hm-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--hm-text);
  margin-bottom: 4px;
  line-height: 1.2;
}

.hm-subtitle {
  font-size: 13px;
  color: var(--hm-muted);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ── Slider section ── */
.hm-slider-section {
  text-align: center;
  margin-bottom: 28px;
  animation: hmFadeIn 0.6s ease 0.08s both;
}

.hm-slider-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--hm-text);
  margin-bottom: 2px;
}

.hm-slider-helper {
  font-size: 12px;
  color: var(--hm-muted);
  margin-bottom: 16px;
}

.hm-slider-wrap {
  position: relative;
  padding-top: 44px;
}

/* Range slider track + thumb */
.hm-slider-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 5px;
  background: var(--hm-line);
  outline: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.hm-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--hm-surface);
  border: 3px solid var(--hm-stage-color);
  box-shadow: 0 2px 10px var(--hm-shadow), 0 0 0 0 var(--hm-stage-color-glow);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.hm-slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 10px var(--hm-shadow), 0 0 0 8px var(--hm-stage-color-light);
}

.hm-slider-input::-webkit-slider-thumb:active {
  transform: scale(1.2);
  box-shadow: 0 2px 10px var(--hm-shadow), 0 0 0 12px var(--hm-stage-color-light);
}

.hm-slider-input::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--hm-surface);
  border: 3px solid var(--hm-stage-color);
  box-shadow: 0 2px 10px var(--hm-shadow);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.3s ease;
}

.hm-slider-input::-moz-range-track {
  height: 10px;
  border-radius: 5px;
  background: var(--hm-line);
}

.hm-slider-anchors {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11px;
  color: var(--hm-muted);
  letter-spacing: 0.01em;
  user-select: none;
  opacity: 0.75;
}

.hm-slider-val {
  position: absolute;
  top: 0;
  left: 15px;
  transform: translateX(-50%);
  min-width: 40px;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  background: var(--hm-stage-color);
  padding: 4px 12px;
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  pointer-events: none;
  transition: background 0.3s ease, left 0.05s ease;
  z-index: 2;
}

.hm-slider-val::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--hm-stage-color);
  transition: border-top-color 0.3s ease;
}

/* ── Gauge ── */
.hm-gauge-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  animation: hmFadeIn 0.6s ease 0.16s both;
}

.hm-gauge-wrap {
  position: relative;
  width: 190px;
  height: 190px;
  margin-bottom: 12px;
}

.hm-gauge-wrap::before {
  content: '';
  position: absolute;
  inset: -32px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hm-stage-color-glow) 0%, var(--hm-stage-color-light) 40%, transparent 70%);
  transition: background 0.5s ease;
  pointer-events: none;
}

.hm-gauge {
  width: 100%;
  height: 100%;
  display: block;
}

.hm-gauge__bg {
  fill: none;
  stroke: var(--hm-line);
  stroke-width: 16;
}

.hm-gauge__arc {
  fill: none;
  stroke: var(--hm-stage-color);
  stroke-width: 16;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              stroke 0.4s ease;
  filter: drop-shadow(0 0 8px var(--hm-stage-color-glow));
}

.hm-gauge__score {
  font-family: inherit;
  font-size: 38px;
  font-weight: 700;
  fill: var(--hm-text);
  dominant-baseline: auto;
}

.hm-gauge__stage {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  fill: var(--hm-stage-color);
  letter-spacing: 0.02em;
  transition: fill 0.3s ease;
}

/* Stage info */
.hm-stage-info {
  text-align: center;
}

.hm-stage-badge {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hm-stage-summary {
  font-size: 14px;
  color: var(--hm-muted);
  max-width: 440px;
  margin: 0 auto;
  transition: opacity 0.25s ease;
}

/* ── Icons row ── */
.hm-icons-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 28px;
  animation: hmFadeIn 0.6s ease 0.24s both;
}

.hm-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  border-radius: var(--hm-radius);
  background: var(--hm-surface);
  border: 1px solid rgba(243, 215, 234, 0.7);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.4;
}

.hm-icon--active {
  opacity: 1;
  border-color: var(--hm-stage-color);
  background: var(--hm-stage-color-light);
  box-shadow: 0 2px 12px var(--hm-stage-color-light), 0 0 20px var(--hm-stage-color-glow);
  transform: scale(1.05);
}

.hm-icon__svg {
  width: 28px;
  height: 28px;
  color: var(--hm-muted);
  transition: color 0.3s ease, transform 0.3s ease;
}

.hm-icon__svg svg {
  width: 100%;
  height: 100%;
}

.hm-icon--active .hm-icon__svg {
  color: var(--hm-stage-color);
  transform: scale(1.1);
}

.hm-icon__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hm-muted);
  transition: color 0.3s ease;
}

.hm-icon--active .hm-icon__label {
  color: var(--hm-stage-color);
}

/* ── Timeline / Accordion ── */
.hm-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
  animation: hmSlideUp 0.6s ease 0.32s both;
}

.hm-card {
  background: var(--hm-surface);
  border-radius: var(--hm-radius);
  border: 1.5px solid var(--hm-line);
  border-left: 5px solid var(--hm-stage-color);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.hm-card:hover {
  box-shadow: 0 4px 16px var(--hm-shadow);
}

.hm-card--open {
  box-shadow: 0 4px 20px rgba(31, 41, 55, 0.1);
}

.hm-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 18px;
  min-height: 56px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--hm-text);
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}

.hm-card__header:focus-visible {
  outline: 2px solid var(--hm-accent);
  outline-offset: -2px;
  border-radius: 4px;
}

.hm-card__chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--hm-muted);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hm-card__chevron svg {
  width: 100%;
  height: 100%;
}

.hm-card--open .hm-card__chevron {
  transform: rotate(180deg);
}

.hm-card__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hm-card__content {
  padding: 0 18px 18px;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.7;
}

.hm-card__content ul {
  list-style: none;
  padding: 0;
}

.hm-card__content li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
}

.hm-card__content li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hm-stage-color);
  opacity: 0.6;
  transition: background 0.3s ease;
}

/* ── Email capture ── */
.hm-email-section {
  background: var(--hm-surface);
  border-radius: var(--hm-radius);
  border: 1.5px solid var(--hm-line);
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 20px;
  animation: hmFadeIn 0.6s ease 0.4s both;
}

.hm-email__title {
  font-size: 19px;
  font-weight: 700;
  color: var(--hm-text);
  margin-bottom: 6px;
}

.hm-email__subtitle {
  font-size: 14px;
  color: var(--hm-muted);
  margin-bottom: 20px;
}

.hm-email__row {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}

.hm-email__input {
  flex: 1;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid #d4c0d9;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  color: var(--hm-text);
  background: var(--hm-bg);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hm-email__input::placeholder {
  color: #a1a1aa;
}

.hm-email__input:focus {
  border-color: var(--hm-accent);
  box-shadow: 0 0 0 4px rgba(217, 70, 239, 0.12);
}

.hm-email__btn {
  height: 48px;
  padding: 0 28px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #c026d3 0%, var(--hm-accent) 40%, var(--hm-accent2) 100%);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(217, 70, 239, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.hm-email__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 70, 239, 0.35);
}

.hm-email__reassurance {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 8px;
  letter-spacing: 0.01em;
}

.hm-email__btn:active {
  transform: translateY(0);
}

.hm-email__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.hm-email__msg {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  padding: 12px 16px;
}

.hm-email__msg--success {
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.hm-email__msg--error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.hm-email__msg[hidden] {
  display: none;
}

/* ── Share / Copy link ── */
.hm-share-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  position: relative;
  margin-top: 8px;
  padding-bottom: 8px;
  animation: hmFadeIn 0.6s ease 0.48s both;
}

.hm-share__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1.5px solid var(--hm-line);
  border-radius: 999px;
  background: var(--hm-surface);
  color: var(--hm-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.hm-share__btn svg {
  width: 15px;
  height: 15px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hm-share__btn--copied svg {
  transform: scale(1.2);
}

.hm-share__btn:hover {
  border-color: var(--hm-accent);
  color: var(--hm-accent);
}

.hm-share__btn--copied {
  border-color: var(--hm-success);
  color: var(--hm-success);
}

/* ── Disclaimer ── */
.hm-disclaimer {
  text-align: center;
  font-size: 11px;
  color: var(--hm-muted);
  opacity: 0.55;
  margin-top: 14px;
  font-style: italic;
  letter-spacing: 0.01em;
}

/* ── Sticky CTA ── */
.hm-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  padding: 12px 16px;
  background: linear-gradient(to top, rgba(255,247,251,0.97) 60%, rgba(255,247,251,0));
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  pointer-events: none;
}

.hm-sticky-cta--visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.hm-sticky-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #c026d3 0%, var(--hm-accent) 40%, var(--hm-accent2) 100%);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(217, 70, 239, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.hm-sticky-cta__btn:active {
  transform: scale(0.97);
}

.hm-sticky-cta__btn svg {
  width: 16px;
  height: 16px;
}

/* ── Animations ── */
@keyframes hmFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hmSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive: desktop ── */
@media (min-width: 540px) {
  .hm-root {
    padding: 40px 32px 56px;
  }

  .hm-header {
    margin-bottom: 28px;
  }

  .hm-title {
    font-size: 30px;
  }

  .hm-subtitle {
    font-size: 15px;
  }

  .hm-slider-label {
    font-size: 17px;
  }

  .hm-icons-section {
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
  }

  .hm-gauge-wrap {
    width: 220px;
    height: 220px;
  }

  .hm-gauge__score {
    font-size: 42px;
  }

  .hm-slider-val {
    font-size: 20px;
    padding: 5px 14px;
  }

  .hm-email-section {
    padding: 28px 24px;
  }

  .hm-sticky-cta {
    display: none;
  }
}

/* ── Responsive: small phones ── */
@media (max-width: 380px) {
  .hm-email__row {
    flex-direction: column;
  }

  .hm-email__btn {
    width: 100%;
  }

  .hm-slider-val {
    font-size: 16px;
    padding: 3px 10px;
  }

  .hm-slider-anchors {
    font-size: 10px;
  }
}
