/* =========================================================
   Discipline Beats Motivation — stylesheet
   Design tokens live at the top; everything below consumes them.
   ========================================================= */

/* Self-hosted fonts: no request to any third party, so no visitor
   data (IP address) is sent to Google when the page loads. */
@font-face {
  font-family: "Anton";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/anton-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-variable.woff2") format("woff2");
}

:root {
  /* Color */
  --bg-base: #0c0e13;
  --bg-surface: #1c1f26;
  --bg-surface-raised: #23272f;
  --accent-start: #d9711f;
  --accent-end: #f7a64a;
  --text-primary: #f4f1ea;
  --text-muted: #9aa0ad;
  --text-faint: #838a99;
  --hairline: rgba(247, 166, 74, 0.16);
  --hairline-strong: rgba(247, 166, 74, 0.32);

  /* Type */
  --font-display: "Anton", "Archivo Black", "Arial Narrow Bold", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Scale */
  --step-0: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
  --step-2: clamp(1.75rem, 1.5rem + 1vw, 2.5rem);
  --step-3: clamp(2.5rem, 2rem + 2vw, 4rem);
  --step-4: clamp(3.25rem, 2.4rem + 3.5vw, 6rem);

  /* Layout */
  --content-width: 720px;
  --wide-width: 1100px;
  --edge: clamp(1.25rem, 4vw, 3rem);

  color-scheme: dark;
}

/* ---------- Reset & base ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--accent-end);
  outline-offset: 3px;
}

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

.accent-gradient-text {
  background: linear-gradient(100deg, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--wide-width);
  margin-inline: auto;
  padding-inline: var(--edge);
}

.wrap--narrow {
  max-width: var(--content-width);
}

section {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-faint);
  margin-bottom: 1.25rem;
}

.section-label::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
}

.section-heading {
  font-size: var(--step-2);
  max-width: 16ch;
}

.rule {
  border: none;
  height: 1px;
  background: var(--hairline);
  margin-block: 0;
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 14, 19, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
  max-width: var(--wide-width);
  margin-inline: auto;
  padding-inline: var(--edge);
}

.site-nav__mark {
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__links {
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.site-nav__links a:hover {
  color: var(--text-primary);
}

a.site-nav__cta.btn {
  display: none;
}

@media (min-width: 720px) {
  a.site-nav__cta.btn {
    display: inline-flex;
  }
}

.site-nav__toggle {
  display: inline-flex;
  background: none;
  border: 1px solid var(--hairline-strong);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  border-radius: 2px;
  font-size: 0.85rem;
}

@media (min-width: 720px) {
  .site-nav__toggle {
    display: none;
  }
  .site-nav__links {
    display: flex;
  }
}

.site-nav__links[hidden] {
  display: none;
}

@media (max-width: 719px) {
  .site-nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-surface);
    padding: 1.25rem var(--edge);
    border-bottom: 1px solid var(--hairline);
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.95rem 2rem;
  border-radius: 2px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn--primary {
  background: linear-gradient(100deg, var(--accent-start), var(--accent-end));
  color: #17110a;
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -12px rgba(217, 113, 31, 0.55);
}

.btn--ghost {
  background: transparent;
  border-color: var(--hairline-strong);
  color: var(--text-primary);
}

.btn--ghost:hover {
  border-color: var(--accent-end);
}

.btn--large {
  padding: 1.1rem 2.5rem;
  font-size: 1.05rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 10vw, 6rem);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 860px) {
  .hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero__title {
  font-size: var(--step-4);
  margin-bottom: 1.25rem;
}

.hero__subtitle {
  font-family: var(--font-body);
  text-transform: none;
  font-size: var(--step-1);
  font-weight: 400;
  color: var(--text-muted);
  max-width: 34ch;
  margin-bottom: 1.75rem;
}

.hero__message {
  font-size: 1.1rem;
  max-width: 42ch;
  margin-bottom: 2.25rem;
  color: var(--text-primary);
}

.hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.hero__price-note {
  font-size: 0.85rem;
  color: var(--text-faint);
}

.hero__visual {
  position: relative;
  aspect-ratio: 560 / 893;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: linear-gradient(160deg, var(--bg-surface), var(--bg-base));
}

.hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Staircase motif: a thin ascending line used as a structural device
   between sections that describe progress (problem -> value -> chapters). */
.staircase {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}

.staircase svg {
  width: 100%;
  height: 100%;
}

/* ---------- Problem section ---------- */
.problem {
  position: relative;
  background: var(--bg-surface);
  border-block: 1px solid var(--hairline);
}

.problem__lead {
  font-size: var(--step-1);
  max-width: 30ch;
  margin-bottom: 1.5rem;
  text-transform: none;
  font-family: var(--font-display);
  font-weight: 400;
}

.problem__body {
  color: var(--text-muted);
  max-width: 58ch;
  font-size: 1.05rem;
}

.problem__body + .problem__body {
  margin-top: 1.1rem;
}

/* ---------- Value proposition ---------- */
.value-list {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.value-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--hairline);
  align-items: baseline;
}

.value-item:last-child {
  border-bottom: 1px solid var(--hairline);
}

.value-item__mark {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent-end);
}

.value-item__text {
  font-size: 1.05rem;
}

.value-item__text strong {
  color: var(--text-primary);
}

.value-item__text {
  color: var(--text-muted);
}

/* ---------- Chapters ---------- */
.chapters {
  background: var(--bg-surface);
  border-block: 1px solid var(--hairline);
}

.chapters__intro {
  color: var(--text-faint);
  font-size: 0.9rem;
  margin-top: 1rem;
}

.chapter-accordion {
  margin-top: 2rem;
  border-top: 1px solid var(--hairline);
}

.chapter-row,
.chapter-item__summary {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-block: 1.15rem;
  border-bottom: 1px solid var(--hairline);
}

.chapter-row--tag {
  background: linear-gradient(90deg, rgba(217, 113, 31, 0.08), transparent 60%);
}

.chapter-row__tag,
.chapter-item__num {
  flex: none;
  width: 3.25rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-faint);
}

.chapter-row__tag {
  width: auto;
  min-width: 3.25rem;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-end);
}

.chapter-item__num--tag {
  width: auto;
  min-width: 3.25rem;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-end);
}

.chapter-row__title,
.chapter-item__title {
  font-size: 1.02rem;
  color: var(--text-primary);
  flex: 1;
}

.chapter-item {
  border-bottom: none;
}

.chapter-item__summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.chapter-item__summary::-webkit-details-marker {
  display: none;
}

.chapter-item__icon {
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  position: relative;
}

.chapter-item__icon::before,
.chapter-item__icon::after {
  content: "";
  position: absolute;
  background: var(--accent-end);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.chapter-item__icon::before {
  width: 100%;
  height: 2px;
}

.chapter-item__icon::after {
  width: 2px;
  height: 100%;
  transition: transform 0.2s ease;
}

.chapter-item[open] .chapter-item__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.chapter-item--final .chapter-item__summary {
  background: linear-gradient(90deg, rgba(217, 113, 31, 0.08), transparent 60%);
}

.chapter-item__desc {
  color: var(--text-muted);
  padding: 0 0 1.5rem 4.5rem;
  max-width: 56ch;
  border-bottom: 1px solid var(--hairline);
}

/* Used by the legal pages (privacy/terms/cookies) */
.about__body {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 56ch;
}

.about__body p + p {
  margin-top: 1.1rem;
}

/* ---------- Purchase ---------- */
.purchase {
  position: relative;
  background: linear-gradient(180deg, var(--bg-surface), var(--bg-base));
  border-block: 1px solid var(--hairline);
}

.purchase__panel {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  background: var(--bg-surface-raised);
  border: 1px solid var(--hairline-strong);
  border-radius: 6px;
  padding: clamp(1.75rem, 4vw, 3rem);
}

@media (min-width: 820px) {
  .purchase__panel {
    grid-template-columns: 1fr 1fr;
  }
}

.purchase__cover {
  aspect-ratio: 560 / 893;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--hairline);
}

.purchase__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.purchase__title {
  font-size: var(--step-2);
  margin-bottom: 1rem;
}

.purchase__desc {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 46ch;
}

.purchase__includes {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.purchase__includes li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.purchase__includes li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 0.55em;
  flex: none;
  background: var(--accent-end);
  border-radius: 50%;
}

.purchase__price-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.purchase__price {
  font-family: var(--font-display);
  font-size: var(--step-3);
}

.purchase__price-note {
  color: var(--text-faint);
  font-size: 0.9rem;
}

.purchase__buy-btn {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  transition: opacity 0.15s ease;
}

.purchase__buy-btn.is-locked {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.purchase__secure-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.purchase__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
}

.purchase__consent input {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  accent-color: var(--accent-end);
}

.purchase__consent span {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.purchase__consent a {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* ---------- FAQ ---------- */
.faq-list {
  margin-top: 2.5rem;
  border-top: 1px solid var(--hairline);
}

.faq-item {
  border-bottom: 1px solid var(--hairline);
}

.faq-item__question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  background: none;
  border: none;
  color: var(--text-primary);
  text-align: left;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 1.5rem 0;
  cursor: pointer;
}

.faq-item__icon {
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  position: relative;
}

.faq-item__icon::before,
.faq-item__icon::after {
  content: "";
  position: absolute;
  background: var(--accent-end);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-item__icon::before {
  width: 100%;
  height: 2px;
}

.faq-item__icon::after {
  width: 2px;
  height: 100%;
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-item__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.faq-item__answer {
  color: var(--text-muted);
  padding-bottom: 1.5rem;
  max-width: 60ch;
}

.faq-item summary {
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 3rem;
  color: var(--text-faint);
  font-size: 0.9rem;
}

.site-footer__grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 700px) {
  .site-footer__grid {
    grid-template-columns: 1.6fr 1fr;
  }
}

.site-footer__mark {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.site-footer h3 {
  font-family: var(--font-body);
  text-transform: none;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.site-footer a {
  text-decoration: none;
  color: var(--text-faint);
  transition: color 0.15s ease;
}

.site-footer a:hover {
  color: var(--text-primary);
}

.site-footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

/* ---------- Legal pages sub-nav ---------- */
.legal-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--hairline);
}

.legal-subnav a {
  font-size: 0.85rem;
  color: var(--text-faint);
  text-decoration: none;
}

.legal-subnav a:hover {
  color: var(--text-primary);
}

.legal-subnav a[aria-current="page"] {
  color: var(--accent-end);
}

/* ---------- Reveal-on-load (hero only) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
