/* LEYA DARK PLUM PRIVATE TAROT STUDIO — shared theme
   Load first on every customer-facing page.
   Mobile-only. No CDN, framework, or build step. */

@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("assets/fonts/instrument-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --plum-bg: #150d15;
  --plum-surface: #20121f;
  --plum-surface-raised: #2b1729;
  --plum-panel: #351c32;
  --plum-accent: #74345f;
  --plum-section-alt: #180f18;
  --plum-footer: #120a12;

  --berry-cta: #b64a78;
  --berry-cta-hover: #c85a88;
  --berry-cta-active: #9f3d68;

  --ivory-primary: #f7eee8;
  --ivory-secondary: #ddcfd8;
  --text-muted: #aa92a1;

  --antique-gold: #c8a45f;
  --antique-gold-soft: #9f814b;

  --success: #9daf98;
  --warning: #d0a267;
  --error: #d77983;
  --info: #9da9c5;

  --line-light: rgba(247, 238, 232, 0.14);
  --line-gold: rgba(200, 164, 95, 0.38);
  --overlay: rgba(8, 3, 9, 0.76);
  --shadow-plum: rgba(4, 1, 5, 0.42);
  --focus-ring: rgba(200, 164, 95, 0.18);

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-ui: "Instrument Sans", system-ui, -apple-system, sans-serif;

  --radius-surface: 4px;
  --radius-control: 6px;
  --radius-chip: 3px;

  --page-x: 20px;
  --section-y: 30px;
  --max-width: 430px;
  --tap-min: 44px;

  --shadow-cta: 0 10px 24px var(--shadow-plum);
  --shadow-modal: 0 18px 40px var(--shadow-plum);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  background: #0d070d;
  color-scheme: dark;
}

html:has(body.dark-plum-mobile) {
  scrollbar-width: none;
}

html:has(body.dark-plum-mobile)::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--plum-bg);
  color: var(--ivory-primary);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.page-shell,
.quiz-shell,
.reading-shell,
.library-shell {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  background: var(--plum-bg);
}

h1,
h2,
h3 {
  color: var(--ivory-primary);
  font-family: var(--font-display);
  font-weight: 400;
  text-wrap: pretty;
}

h1 {
  font-size: 43px;
  line-height: 1.06;
  letter-spacing: -0.018em;
}

h2 {
  font-size: 33px;
  line-height: 1.12;
  letter-spacing: -0.012em;
}

h3 {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.26;
}

p {
  color: var(--ivory-secondary);
}

small,
.supporting {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.eyebrow,
.step-kicker,
.section-rule-label {
  margin: 0;
  color: var(--antique-gold);
  font: 600 10.5px/1.4 var(--font-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

a {
  color: var(--ivory-secondary);
  text-decoration-color: var(--line-gold);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ivory-primary);
  text-decoration-color: var(--antique-gold);
}

:focus-visible {
  outline: 1px solid var(--antique-gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.gold-divider {
  display: flex;
  height: 6px;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
}

.gold-divider::before,
.gold-divider::after {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-gold));
  content: "";
}

.gold-divider::after {
  background: linear-gradient(90deg, var(--line-gold), transparent);
}

.surface {
  background: var(--plum-surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-surface);
}

.surface-raised {
  background: var(--plum-surface-raised);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-surface);
}

.panel {
  background: var(--plum-panel);
  border-radius: var(--radius-surface);
}

.primary-cta,
.primary-button,
.gold-button {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--berry-cta);
  box-shadow: var(--shadow-cta);
  color: var(--ivory-primary);
  cursor: pointer;
  font: 600 17px/1.2 var(--font-ui);
  text-decoration: none;
  transition: background 160ms ease, transform 120ms ease;
}

.primary-cta:hover,
.primary-button:hover,
.gold-button:hover {
  background: var(--berry-cta-hover);
}

.primary-cta:active,
.primary-button:active {
  background: var(--berry-cta-active);
  transform: scale(0.99);
}

.primary-cta[disabled],
.primary-button[disabled] {
  background: var(--plum-panel);
  box-shadow: none;
  color: var(--text-muted);
  cursor: not-allowed;
}

.is-loading-button {
  background: var(--berry-cta-active);
}

.secondary-button,
.text-button {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--antique-gold);
  cursor: pointer;
  font: 600 15px/1.2 var(--font-ui);
}

.secondary-button:hover,
.text-button:hover {
  border-color: var(--antique-gold);
  color: var(--ivory-primary);
}

.destructive-action {
  border-color: rgba(215, 121, 131, 0.42);
  color: var(--error);
}

.destructive-action:hover {
  border-color: var(--error);
  background: rgba(215, 121, 131, 0.08);
  color: var(--error);
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-surface);
  background: var(--plum-surface);
  color: var(--ivory-primary);
  font: 400 16px/1.5 var(--font-ui);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus-visible,
textarea:focus-visible {
  border-color: var(--antique-gold);
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.is-invalid {
  border-color: var(--error) !important;
}

label {
  color: var(--text-muted);
  font: 500 13px/1.4 var(--font-ui);
}

.topic-option {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-surface);
  background: var(--plum-surface);
  cursor: pointer;
}

.topic-option:hover {
  border-color: var(--line-gold);
}

.topic-option:has(input:checked) {
  border-color: var(--antique-gold);
  background: var(--plum-surface-raised);
}

.topic-option:has(input:focus-visible) {
  border-color: var(--antique-gold);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.progress-track {
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--plum-panel);
}

.progress-track > span {
  display: block;
  height: 100%;
  background: var(--antique-gold);
  transition: width 200ms ease;
}

.progress-card li {
  position: relative;
  margin-left: 9px;
  padding-left: 20px;
  border-left: 1px solid var(--line-light);
}

.progress-card li.is-complete {
  border-left-color: var(--line-gold);
}

.progress-card li.is-complete .progress-marker {
  background: var(--antique-gold);
  transform: rotate(45deg);
}

.progress-card li.is-current .progress-marker {
  border: 2px solid var(--berry-cta);
  border-radius: 50%;
  background: var(--plum-bg);
}

.status-success {
  border: 1px solid rgba(157, 175, 152, 0.42);
  border-left: 3px solid var(--success);
  color: var(--success);
}

.status-warning {
  border: 1px solid rgba(208, 162, 103, 0.42);
  border-left: 3px solid var(--warning);
  color: var(--warning);
}

.status-error {
  border: 1px solid rgba(215, 121, 131, 0.42);
  border-left: 3px solid var(--error);
  color: var(--error);
}

.status-info {
  border: 1px solid rgba(157, 169, 197, 0.42);
  border-left: 3px solid var(--info);
  color: var(--info);
}

.video-slot {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-surface);
  background-color: var(--plum-surface);
  background-image: repeating-linear-gradient(
    45deg,
    rgba(247, 238, 232, 0.045) 0 1px,
    transparent 1px 9px
  );
}

.video-slot-primary,
.video-slot-process {
  aspect-ratio: 4 / 5;
}

.video-slot > span,
.video-slot > strong,
.video-slot > small {
  display: none;
}

.refund-dialog,
dialog {
  width: calc(100% - 40px);
  max-width: 390px;
  padding: 20px 18px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-control);
  background: var(--plum-surface);
  box-shadow: var(--shadow-modal);
  color: var(--ivory-secondary);
}

dialog::backdrop {
  background: var(--overlay);
  animation: leya-fade 160ms ease;
}

@keyframes leya-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sticky-cta,
.cookie-consent-panel {
  padding-bottom: calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--line-gold);
  background: rgba(24, 15, 24, 0.94);
}

.orb-loader {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(200, 164, 95, 0.28);
  border-top-color: var(--antique-gold);
  border-radius: 50%;
  animation: leya-spin 1s linear infinite;
}

@keyframes leya-spin {
  to { transform: rotate(360deg); }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
