/* =========================================================================
   5RS — style.css  (layout + components)
   ========================================================================= */

/* ============================ HEADER ============================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h, 66px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  min-width: 0;
}
.brand-mark {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--teal-deep);
  padding: 5px;
}
.brand-mark img { width: 100%; height: 100%; display: block; }
.brand-name {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.2;
  max-width: 17ch;
}
.brand-name b { font-weight: 600; }
.brand-name-short { display: none; white-space: nowrap; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2rem);
  list-style: none;
}
.site-nav a {
  color: var(--ink-2);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.005em;
  white-space: nowrap;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.15s var(--ease);
}
.site-nav a::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1.5px;
  background: var(--teal-ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.22s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"]::after { transform: scaleX(1); background: var(--teal-ink); }

.header-tools { display: flex; align-items: center; gap: 0.75rem; }

/* Theme toggle */
.theme-toggle {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-3); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.nav-toggle { display: none; }

/* ============================ BUTTONS ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: var(--step--1);
  font-weight: 500;
  line-height: 1;
  padding: 0.82rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
              color 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--teal-ink); color: #fff; }
.btn-primary:hover { background: var(--teal-ink-h); color: #fff; }

.btn-secondary {
  background: transparent; color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--teal-ink); color: var(--teal-ink); }

.btn-ghost {
  background: transparent; color: var(--ink-2);
  border-color: transparent;
  padding-inline: 0.4rem;
}
.btn-ghost:hover { color: var(--teal-ink); }
.btn-ghost .btn-arrow { transition: transform 0.2s var(--ease); }
.btn-ghost:hover .btn-arrow { transform: translateX(3px); }

/* Text link with underline accent */
.link-underline {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--teal-ink); font-weight: 600; font-size: var(--step-0);
  padding-bottom: 2px;
  border-bottom: 1.5px solid color-mix(in srgb, var(--teal-ink) 45%, transparent);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.link-underline:hover { color: var(--teal-ink-h); border-color: var(--teal-ink); }
.link-underline .arr { transition: transform 0.2s var(--ease); }
.link-underline:hover .arr { transform: translateX(3px); }

/* ============================ SHARED SECTION BITS ============================ */
.kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-ink);
  margin-bottom: 1.1rem;
}
.section-heading {
  font-size: var(--step-3);
  margin-bottom: 1.35rem;
}
.rule {
  width: 44px; height: 2px;
  background: var(--teal-ink);
  margin-bottom: 1.6rem;
}
.lead { font-size: var(--step-1); color: var(--ink-2); line-height: 1.72; }
.prose p { color: var(--ink-2); line-height: 1.74; margin-bottom: 1.05rem; }
.prose p:last-child { margin-bottom: 0; }
.prose .emphatic { color: var(--ink); font-weight: 500; }

.section { padding: clamp(3.75rem, 8vw, 6rem) 0; }
.section--line { border-top: 1px solid var(--surface-line); }

/* ============================ HERO ============================ */
.hero { padding: clamp(3.25rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 4.75rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.hero-eyebrow {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal-ink);
  margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.7rem;
}
.hero-eyebrow::before {
  content: ""; width: 26px; height: 1.5px; background: var(--teal-ink); display: inline-block;
}
.hero h1 {
  font-size: var(--step-4);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  max-width: 15ch;
}
.hero h1 em { font-style: normal; color: var(--teal-ink); }
.hero-subhead {
  font-size: var(--step-1);
  color: var(--ink-2);
  line-height: 1.68;
  max-width: 46ch;
  margin-bottom: 2rem;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.hero-micronote {
  margin-top: 1.75rem;
  font-size: var(--step--1);
  color: var(--ink-3);
  max-width: 44ch;
  line-height: 1.5;
}

/* Hero book showcase — inset card on a contained teal wash */
.hero-book {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 360px;
}
.hero-book-stage {
  position: relative;
  padding: clamp(2rem, 4vw, 2.75rem);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 100% at 30% 0%, color-mix(in srgb, var(--teal) 20%, var(--paper)) 0%, var(--paper-2) 70%);
  border: 1px solid var(--surface-line);
}
.hero-book-stage::after {
  /* faint radial motif echo of the mark, very subtle */
  content: "";
  position: absolute; inset: 0;
  background: url("assets/logo-teal.png") no-repeat 88% 8% / 46px;
  opacity: 0.05;
  pointer-events: none;
  border-radius: inherit;
}
.book-cover-img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  box-shadow: var(--shadow-md);
  transform: rotate(-1.4deg);
  transition: transform 0.4s var(--ease);
}
.hero-book:hover .book-cover-img { transform: rotate(0deg) translateY(-3px); }
.hero-book-caption {
  margin-top: 1.4rem;
  text-align: center;
  font-size: var(--step--1);
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

/* ============================ WHY (editorial long-form) ============================ */
.why-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.why-aside { position: sticky; top: 96px; }
.why-aside .kicker { margin-bottom: 1rem; }
.why-toc { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; border-left: 1px solid var(--surface-line); }
.why-toc a {
  display: block;
  padding: 0.1rem 0 0.1rem 1rem;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--ink-3);
  font-size: var(--step--1);
  line-height: 1.4;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.why-toc a:hover, .why-toc a.is-active { color: var(--ink); border-left-color: var(--teal-ink); }

.why-body { max-width: 62ch; }
.why-body > h2 { font-size: var(--step-3); margin-bottom: 1.35rem; }
.why-subhead {
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 2.6rem 0 1.1rem;
}
/* short, punchy standalone lines get pull treatment */
.why-body .standout {
  font-size: var(--step-2);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  margin: 1.4rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--teal);
}

/* ============================ WHAT ARE THE 5 RS ============================ */
.what-intro { max-width: 62ch; margin-bottom: clamp(2.5rem, 5vw, 3.25rem); }
.what-intro .lead { margin-bottom: 0; }

/* Five Rs definition grid */
.r-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: clamp(3.5rem, 7vw, 5rem);
}
.r-card {
  padding: 1.5rem 1.35rem 1.65rem;
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  position: relative;
}
.r-num {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-4);
  margin-bottom: 1.1rem;
}
.r-icon {
  display: inline-flex;
  width: 34px; height: 34px;
  color: var(--teal-ink);
  margin-bottom: 1rem;
}
.r-icon svg { width: 100%; height: 100%; }
.r-card h3 {
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 0.55rem;
}
.r-card p {
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--ink-2);
}

/* Differentiation block */
.what-diff-heading {
  font-size: var(--step-2);
  max-width: 34ch;
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}
.diff-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.diff-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.75rem, 3.5vw, 2.25rem) 0;
  border-top: 1px solid var(--surface-line);
}
.diff-row:last-child { border-bottom: 1px solid var(--surface-line); }
.diff-fig {
  color: var(--teal-ink);
  opacity: 0.9;
}
.diff-fig svg { width: 100%; height: auto; display: block; }
.diff-fig text { font-family: var(--sans); }
.diff-copy { max-width: 56ch; }
.diff-copy h4 {
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
  max-width: 34ch;
}
.diff-copy p {
  font-size: 0.94rem;
  line-height: 1.68;
  color: var(--ink-2);
}

/* ============================ BOOK SECTION ============================ */
.book-section { background: var(--paper-2); }
.book-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.book-cover-frame {
  position: relative;
}
.book-cover-frame img {
  width: 100%; height: auto;
  border-radius: 3px;
  box-shadow: var(--shadow-md);
}
.book-cover-frame::before {
  content: ""; position: absolute;
  inset: auto -14px -14px 20px;
  height: 60%;
  background: var(--teal-soft);
  border-radius: var(--radius);
  z-index: -1;
}
.book-copy { max-width: 52ch; }
.book-copy .section-heading { margin-bottom: 1.5rem; }
.book-support { margin-top: 1rem; font-size: var(--step--1); color: var(--ink-3); }
.book-actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; align-items: center; }

/* ============================ CTA BAND ============================ */
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.cta-block { padding: clamp(0.5rem, 2vw, 1rem) clamp(2rem, 4vw, 3.25rem); }
.cta-block:first-child { padding-left: 0; border-right: 1px solid var(--surface-line); }
.cta-block:last-child { padding-right: 0; }
.cta-block h2 {
  font-size: var(--step-2);
  margin-bottom: 1rem;
}
.cta-block .cta-body { color: var(--ink-2); line-height: 1.7; font-size: var(--step-0); margin-bottom: 1.5rem; }
.cta-micro { margin-top: 1rem; font-size: var(--step--1); color: var(--ink-3); line-height: 1.5; }

/* Email capture */
.field { }
.field-label {
  display: block;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 0.6rem;
}
.email-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.email-input {
  flex: 1 1 200px;
  min-height: 44px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.email-input::placeholder { color: var(--ink-4); }
.email-input:focus { border-color: var(--teal-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal-ink) 18%, transparent); }
.form-status {
  margin-top: 0.85rem;
  font-size: var(--step--1);
  color: var(--teal-ink);
  min-height: 1.2em;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.form-status.is-visible { opacity: 1; transform: translateY(0); }

/* ============================ FOOTER ============================ */
.site-footer {
  border-top: 1px solid var(--surface-line);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 clamp(2rem, 4vw, 2.75rem);
}
.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 2rem; flex-wrap: wrap; margin-bottom: 2.25rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.7rem; }
.footer-brand .brand-mark { width: 30px; height: 30px; }
.footer-brand span { font-size: var(--step--1); font-weight: 600; color: var(--ink); max-width: 22ch; line-height: 1.3; }
.footer-links { display: flex; gap: clamp(1.25rem, 3vw, 2.25rem); flex-wrap: wrap; }
.footer-links a {
  font-size: var(--step--1); color: var(--ink-2); font-weight: 500;
  transition: color 0.15s var(--ease);
}
.footer-links a:hover { color: var(--teal-ink); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid var(--surface-line);
  padding-top: 1.5rem;
}
.footer-copy { font-size: var(--step--1); color: var(--ink-3); }
.footer-note { font-size: 0.78rem; color: var(--ink-4); }

/* ============================ ABOUT PAGE ============================ */
.about-hero { padding-bottom: clamp(2rem, 5vw, 3rem); }
.about-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}
.about-title { font-size: var(--step-4); margin-bottom: 0.9rem; }
.about-role { color: var(--teal-ink); font-weight: 500; font-size: var(--step-0); margin-bottom: 1.2rem; }
.about-intro { max-width: 56ch; margin-bottom: 1.8rem; }
.about-hero-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.about-mark { justify-self: center; opacity: 0.92; }
.about-mark img { width: 100%; height: auto; max-width: 220px; }

.about-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.about-cta .section-heading { margin-bottom: 0; max-width: 32ch; }
.about-cta-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* ============================ SCORE MY ACCOUNT PAGE ============================ */
.score-hero { padding-bottom: clamp(1.5rem, 4vw, 2.25rem); }
.score-hero-layout { max-width: 68ch; }
.score-hero-layout .lead { margin-bottom: 1rem; }
.score-hero-layout .lead:last-child { margin-bottom: 0; }

.score-embed { padding-top: clamp(1.5rem, 4vw, 2.25rem); }
.score-frame-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  border: 1px solid var(--surface-line);
  box-shadow: var(--shadow-md);
  background: #0a0b10;
}
.score-frame {
  display: block;
  width: 100%;
  height: min(88vh, 1000px);
  min-height: 620px;
  border: 0;
}
.score-embed-note {
  margin-top: 1rem;
  font-size: var(--step--1);
  color: var(--ink-3);
  text-align: center;
}

/* ============================ CONTACT PAGE ============================ */
.contact-section { padding-top: clamp(2.5rem, 6vw, 4rem); }
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.contact-intro { position: sticky; top: 96px; }
.contact-intro .section-heading { margin-bottom: 1.1rem; }
.contact-intro .lead { margin-bottom: 1.4rem; }
.contact-micro { font-size: var(--step--1); color: var(--ink-3); line-height: 1.6; }

.contact-form { max-width: 560px; }
.form-row { margin-bottom: 1.3rem; }
.form-row--split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; }
.form-input {
  min-height: 44px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--step-0);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.form-input::placeholder { color: var(--ink-4); }
.form-input:focus { outline: none; border-color: var(--teal-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal-ink) 18%, transparent); }
.form-textarea { min-height: 140px; padding-top: 0.75rem; resize: vertical; font-family: inherit; line-height: 1.6; }
.contact-form .btn { margin-top: 0.3rem; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.75rem; }
  .hero-book { max-width: 300px; justify-self: start; }
  .hero h1 { max-width: 18ch; }
  .why-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .why-aside { position: static; margin-bottom: 0.5rem; }
  .why-toc { flex-direction: row; flex-wrap: wrap; border-left: none; gap: 0.4rem 0.75rem; }
  .why-toc a { border-left: none; border-bottom: 2px solid transparent; padding: 0.35rem 0.7rem; background: var(--surface); border-radius: 20px; margin-left: 0; }
  .why-toc a:hover, .why-toc a.is-active { border-left-color: transparent; background: var(--teal-soft); }
  .book-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .book-cover-frame { max-width: 260px; }
  .cta-grid { grid-template-columns: 1fr; }
  .cta-block { padding: 0; }
  .cta-block:first-child { border-right: none; padding-bottom: 2.5rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--surface-line); }
  .about-hero-layout { grid-template-columns: 1fr; gap: 2rem; }
  .about-mark { justify-self: start; order: -1; }
  .about-mark img { max-width: 120px; }
  .about-cta { flex-direction: column; align-items: flex-start; }
  .contact-layout { grid-template-columns: 1fr; gap: 2rem; }
  .contact-intro { position: static; }
  .score-frame { height: 720px; }
  .r-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .diff-row { grid-template-columns: 110px minmax(0, 1fr); gap: 1.75rem; }
}

@media (max-width: 640px) {
  .r-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .diff-row { grid-template-columns: 1fr; gap: 1rem; }
  .diff-fig { width: 96px; }
}

@media (max-width: 560px) {
  .score-frame { height: 640px; min-height: 560px; }
}

@media (max-width: 560px) {
  .form-row--split { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .site-nav {
    position: fixed;
    inset: var(--header-h, 66px) 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    transform: translateY(-115%);
    transition: transform 0.3s var(--ease);
    box-shadow: var(--shadow-md);
    max-height: calc(100dvh - var(--header-h, 66px));
    overflow-y: auto;
  }
  .site-nav.is-open { transform: translateY(0); }
  .site-nav { flex-direction: column; align-items: flex-start; gap: 0; padding: 0.5rem var(--gutter) 1rem; }
  .site-nav li { width: 100%; }
  .site-nav a { display: block; width: 100%; padding: 0.95rem 0; font-size: var(--step-0); border-bottom: 1px solid var(--surface-line); }
  .site-nav a::after { display: none; }
  .site-nav li:last-child a { border-bottom: none; }
  .nav-toggle {
    display: grid; place-items: center;
    width: 44px; height: 44px;
    background: transparent; border: 1px solid var(--border);
    border-radius: var(--radius); cursor: pointer; color: var(--ink);
    flex-shrink: 0;
  }
  .nav-toggle svg { width: 21px; height: 21px; }
  .hero-ctas .btn { flex: 1 1 auto; }
}

/* ---- Mobile header: fix clipping, boost logo + menu prominence ---- */
@media (max-width: 860px) {
  .header-inner { min-height: var(--header-h); gap: 0.75rem; }

  .brand { gap: 0.6rem; }
  .brand-mark {
    width: 40px; height: 40px;
    padding: 6px;
  }
  .brand-name-full { display: none; }
  .brand-name-short {
    display: inline-block;
    font-size: var(--step-1);
    font-weight: 700;
    letter-spacing: 0.01em;
  }
  .brand-name { max-width: none; overflow: visible; }

  .header-tools { gap: 0.5rem; }
  .theme-toggle { width: 44px; height: 44px; }
  .theme-toggle svg { width: 19px; height: 19px; }
}
