/*
  rossbased-site — site.css
  Zero-build static site. Mobile-first. One house easing, one accent.
  Class vocabulary is documented top-to-bottom; page builders should not
  need to read this file to use it — see README.md for the summary.
*/

/* ---------------------------------------------------------------------- */
/* Tokens                                                                  */
/* ---------------------------------------------------------------------- */

:root {
  /* Color */
  --bg: #0b0b0b;
  --surface: #121212;
  --hairline: #232323;
  --ink: #efeae0;
  --muted: #9a958a;
  --muted-dim: #8a8579;
  --accent: #ffdd00;
  --accent-ink: #0b0b0b; /* text/icons drawn on top of accent fill */

  /* Type */
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 56px;
  --space-10: 64px;
  --space-11: 80px;

  /* Layout */
  --container-max: 1120px;
  --container-pad: 20px;
  --radius: 2px;
  --radius-card: 2px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 320ms;
}

@media (min-width: 720px) {
  :root {
    --container-pad: 40px;
  }
}

/* ---------------------------------------------------------------------- */
/* Reset                                                                   */
/* ---------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

/* Focus */
:focus {
  outline: none;
}

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

.close :focus-visible,
.btn-dark:focus-visible {
  outline-color: var(--accent-ink);
}

/* ---------------------------------------------------------------------- */
/* Type classes                                                            */
/* ---------------------------------------------------------------------- */

/* .display — headline type: uppercase condensed, tight leading */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.01em;
}

/* .serif — reader quotes / long-form copy */
.serif {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.6;
}

/* .eyebrow — small caps label above a headline */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* .lede — intro paragraph, slightly larger body */
.lede {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  max-width: 65ch;
}

/* body copy: cap measure at 65ch by default */
.stack p,
.card p {
  max-width: 65ch;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 0 var(--space-6);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  text-decoration: none;
}

.btn:hover {
  opacity: 0.92;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn-dark {
  background: #000;
  color: var(--accent);
}

@media (min-width: 720px) {
  .btn {
    width: auto;
    min-height: 64px;
    font-size: 26px;
    padding: 0 var(--space-8);
  }
}

/* ---------------------------------------------------------------------- */
/* Forms                                                                   */
/* ---------------------------------------------------------------------- */

.input {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 0 var(--space-4);
  background: #161616;
  border: 1px solid #2c2c2c;
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
}

.input::placeholder {
  color: var(--muted-dim);
}

.close .input::placeholder {
  color: #5a5220;
}

.input:focus-visible {
  border-color: var(--accent);
}

/* .form-row — stacks on phones, goes inline (input + button) at >=720px */
.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (min-width: 720px) {
  .form-row {
    flex-direction: row;
    align-items: stretch;
    flex-wrap: wrap;
  }

  .form-row .input {
    flex: 1 1 220px;
  }

  .form-row .btn {
    flex-shrink: 0;
  }
}

.form-error {
  display: none;
  color: var(--accent);
  font-size: 14px;
  margin-top: var(--space-2);
}

.form-error.is-visible {
  display: block;
}

/* ---------------------------------------------------------------------- */
/* Cards / rules / containers                                              */
/* ---------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: var(--space-6);
}

.rule {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* ---------------------------------------------------------------------- */
/* Nav                                                                     */
/* ---------------------------------------------------------------------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  border-bottom: 1px solid var(--hairline);
}

.nav__wordmark {
  display: flex;
  align-items: center;
  height: 100%;
}

/* The wordmark is ~9:1, so height sets width: 20px tall ≈ 180px wide on a
   phone (under half the viewport), 28px ≈ 250px on desktop. The nav is
   furniture; the headline must be the loudest thing on screen. */
.nav__wordmark img,
.nav__wordmark video {
  height: 20px;
  width: auto;
}

.nav__slot {
  display: flex;
  align-items: center;
}

/* muted text link that sits in the nav slot */
.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}

@media (min-width: 900px) {
  .nav {
    height: 84px;
  }

  .nav__wordmark img,
  .nav__wordmark video {
    height: 28px;
  }
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
  align-items: center;
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-9);
    padding-top: var(--space-11);
    padding-bottom: var(--space-11);
  }
}

/* ---------------------------------------------------------------------- */
/* Founder strip                                                           */
/* ---------------------------------------------------------------------- */

.founder {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* rb-face.png is a yellow circle brand mark with transparent corners —
   already circular with no background, so render it at its natural aspect
   with no clipping, no fill, and no shadow. */
.founder__face {
  width: 64px;
  height: auto;
  flex-shrink: 0;
}

.founder__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.founder__stat {
  color: var(--muted);
  font-size: 14px;
}

@media (min-width: 900px) {
  .founder__face {
    width: 96px;
    height: auto;
  }
}

/* ---------------------------------------------------------------------- */
/* Proof grid                                                              */
/* ---------------------------------------------------------------------- */

.proof {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 600px) {
  .proof {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .proof {
    grid-template-columns: repeat(3, 1fr);
  }

  .proof--pair {
    grid-template-columns: repeat(2, 1fr);
    max-width: 760px;
  }
}

/* ---------------------------------------------------------------------- */
/* Testimonial                                                             */
/* ---------------------------------------------------------------------- */

.testimonial {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.testimonial .pull {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.4;
  color: var(--ink);
}

.testimonial__img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
}

.attr {
  color: var(--muted);
  font-size: 14px;
}

.testimonial .attr {
  margin-top: auto;
}

/* ---------------------------------------------------------------------- */
/* Chapters                                                                */
/* ---------------------------------------------------------------------- */

.chapters {
  display: flex;
  flex-direction: column;
}

.chapters details {
  border-bottom: 1px solid var(--hairline);
}

.chapters details:first-child {
  border-top: 1px solid var(--hairline);
}

.chapters summary {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  cursor: pointer;
  list-style: none;
}

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

.chapters__num {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--muted-dim);
  font-size: 20px;
  flex-shrink: 0;
  width: 2ch;
}

.chapters__title {
  font-weight: 500;
  flex: 1 1 auto;
}

.chapters summary:hover .chapters__title {
  color: var(--accent);
}

.chapters summary::after {
  content: '';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-left: var(--space-4);
  background:
    linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat;
  transition: transform var(--dur) var(--ease);
}

.chapters details[open] summary::after {
  transform: rotate(90deg);
  background:
    linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat;
}

.chapters__body {
  padding: 0 0 var(--space-5);
  color: var(--muted);
  max-width: 65ch;
}

.chapters__body p + p {
  margin-top: var(--space-3);
}

.chapters__body ul {
  margin: var(--space-3) 0;
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* ---------------------------------------------------------------------- */
/* Why (comparison rows)                                                   */
/* ---------------------------------------------------------------------- */

.why {
  display: flex;
  flex-direction: column;
}

.why__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-1);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--hairline);
}

.why__row:first-child {
  border-top: 1px solid var(--hairline);
}

.why__label {
  color: var(--muted);
  font-size: 14px;
}

@media (min-width: 600px) {
  .why__row {
    grid-template-columns: 1fr auto;
    gap: var(--space-4);
    align-items: baseline;
  }

  .why__label {
    text-align: right;
    white-space: nowrap;
  }
}

/* ---------------------------------------------------------------------- */
/* FAQ                                                                     */
/* ---------------------------------------------------------------------- */

.faq {
  display: flex;
  flex-direction: column;
}

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

.faq details:first-child {
  border-top: 1px solid var(--hairline);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: var(--space-4) 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

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

.faq summary::after {
  content: '';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-left: var(--space-4);
  background:
    linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat;
  transition: transform var(--dur) var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(90deg);
  background:
    linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat;
}

.faq__answer {
  padding-bottom: var(--space-5);
  color: var(--muted);
  max-width: 65ch;
}

/* ---------------------------------------------------------------------- */
/* Guarantee / close / footer                                              */
/* ---------------------------------------------------------------------- */

.guarantee {
  border: 1px solid var(--accent);
  border-radius: var(--radius-card);
  padding: var(--space-6);
}

.close {
  background: var(--accent);
  color: var(--accent-ink);
  padding: var(--space-9) 0;
  border-radius: var(--radius-card);
}

.close .btn-dark {
  background: #000;
  color: var(--accent);
}

.footer {
  border-top: 1px solid var(--hairline);
  padding-top: var(--space-7);
  padding-bottom: var(--space-7);
  color: var(--muted);
  font-size: 14px;
}

.footer a {
  color: var(--muted);
  text-decoration: underline;
  display: inline-block;
  padding: 8px 0;
}

/* ---------------------------------------------------------------------- */
/* Video embed (Wistia iframe, responsive 16:9)                            */
/* ---------------------------------------------------------------------- */

.video {
  position: relative;
  padding-top: 56.25%;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  overflow: hidden;
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------------------------------------------------------------------- */
/* Testimonial wall                                                        */
/* ---------------------------------------------------------------------- */

.wall {
  margin-top: var(--space-7);
}

.wall a {
  display: block;
}

.wall a.card {
  padding: 0;
  border: 0;
  background: none;
}

.wall img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
}

.wall-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
  margin-top: var(--space-7);
}

@media (max-width: 699px) {
  .wall {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-3);
    margin-left: calc(var(--container-pad) * -1);
    margin-right: calc(var(--container-pad) * -1);
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);
  }
  .wall a {
    flex: 0 0 78vw;
    scroll-snap-align: start;
  }
}

@media (min-width: 700px) {
  .wall {
    display: block;
    column-count: 3;
    column-gap: var(--space-4);
  }
  .wall a {
    display: block;
    break-inside: avoid;
    margin-bottom: var(--space-4);
  }
}

@media (min-width: 1100px) {
  .wall { column-count: 4; }
}

/* ---------------------------------------------------------------------- */
/* Book cover                                                              */
/* ---------------------------------------------------------------------- */

.book {
  width: 190px;
  margin: 0 auto;
  perspective: 1000px;
}

.book img {
  width: 100%;
  border-radius: 2px;
  transform: rotateY(-14deg);
  transform-style: preserve-3d;
  box-shadow: 40px 40px 60px -20px rgba(0, 0, 0, 0.6);
}

@media (min-width: 900px) {
  .book {
    width: 360px;
    max-width: 400px;
    margin: 0;
  }
}

/* ---------------------------------------------------------------------- */
/* Thanks state                                                            */
/* ---------------------------------------------------------------------- */

.thanks {
  display: none;
  flex-direction: column;
  gap: var(--space-4);
}

.thanks.is-visible {
  display: flex;
}

/* ---------------------------------------------------------------------- */
/* Utilities                                                               */
/* ---------------------------------------------------------------------- */

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

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

/* ---------------------------------------------------------------------- */
/* Sticky CTA bar                                                          */
/* ---------------------------------------------------------------------- */

body.has-cta-bar {
  transition: padding-bottom var(--dur) var(--ease);
}

.cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: #0b0b0b;
  border-top: 1px solid #232323;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  visibility: hidden;
  transition: transform var(--dur) var(--ease), visibility 0s linear var(--dur);
  box-shadow: none;
}

.cta-bar.is-visible {
  transform: translateY(0);
  visibility: visible;
  transition: transform var(--dur) var(--ease), visibility 0s;
}

.cta-bar__inner {
  max-width: 480px;
  margin: 0 auto;
}

.cta-bar .btn {
  width: 100%;
}

/* ---------------------------------------------------------------------- */
/* Motion                                                                  */
/* ---------------------------------------------------------------------- */

/* Resting state is VISIBLE. The hidden-then-reveal state is only applied
   once site.js is confirmed alive (the inline `js` class in each page head),
   so a JS failure can never leave the page blank. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

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

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
