/* ==========================================================================
   On The Rock — styles.css
   Design language: calm, grounded, warm, substantial. Generous whitespace,
   one idea per section. See README for the token map.
   ========================================================================== */

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

:root {
  --bone:       #F6F2EC;
  --surface:    #FFFFFF;
  --ink:        #16232B;
  --slate:      #1E3A44;
  --stone:      #5F6E74;
  --sand:       #E7DFD4;
  --beam:       #D99A4E;
  --beam-deep:  #C4823A;
  --beam-text:  #97642D;  /* amber for TEXT and focus rings: AA on --bone (4.51:1).
                             --beam-deep is 2.85:1 and must never be used as a
                             foreground colour. See README, "There are two
                             ambers". */
  --terracotta: #C96F4C;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --size-h1: clamp(2.75rem, 6vw, 4.5rem);
  --size-h2: clamp(2rem, 4vw, 3rem);
  --size-h3: 1.375rem;
  --size-body: 1.125rem;

  --container: 1160px;
  --prose: 680px;
  --section-pad: clamp(5rem, 10vw, 9rem);

  --radius-card: 14px;
  --radius-btn: 10px;

  --shadow-soft: 0 2px 6px rgba(60, 42, 20, 0.05), 0 16px 40px rgba(60, 42, 20, 0.08);
  --shadow-lift: 0 4px 10px rgba(60, 42, 20, 0.07), 0 24px 56px rgba(60, 42, 20, 0.12);

  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bone);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}

h1 { font-size: var(--size-h1); font-optical-sizing: auto; }
h2 { font-size: var(--size-h2); font-optical-sizing: auto; }
h3 { font-size: var(--size-h3); line-height: 1.3; }

p {
  margin: 0 0 1.25rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--beam-text);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--beam);
  color: var(--ink);
}

.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;
}

/* ---------- Layout primitives ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section {
  padding-block: var(--section-pad);
}

.prose {
  max-width: var(--prose);
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--beam-text);
  margin-bottom: 1rem;
}

.section-head {
  max-width: var(--prose);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-sub {
  color: var(--stone);
  font-size: 1.1875rem;
}

.lede {
  font-size: 1.3125rem;
  line-height: 1.55;
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--bone);
  border-radius: var(--radius-btn);
  text-decoration: none;
  font-weight: 500;
  transform: translateY(-300%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-block;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out),
              border-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: none;
}

.btn-primary {
  background: var(--ink);
  color: var(--bone);
}

.btn-primary:hover {
  background: var(--slate);
}

.btn-spotlight {
  background: var(--beam);
  color: var(--ink);
}

.btn-spotlight:hover {
  background: var(--beam-deep);
}

.link-arrow {
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--beam);
  padding-bottom: 0.15rem;
  transition: border-color 200ms var(--ease-out);
}

.link-arrow:hover {
  border-color: var(--beam-deep);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bone) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 250ms var(--ease-out);
}

.site-header.is-scrolled {
  border-bottom-color: var(--sand);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.375rem;
  transition: padding 250ms var(--ease-out);
}

.site-header.is-scrolled .header-inner {
  padding-block: 0.875rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3125rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: border-color 200ms var(--ease-out);
}

.nav-list a:hover {
  border-bottom-color: var(--beam);
}

.btn-nav {
  padding: 0.65rem 1.25rem;
  font-size: 0.9375rem;
}

/* Mobile nav toggle (hidden without JS — nav simply stays visible) */

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  background: none;
  border: 0;
  padding: 0.5rem;
  margin: -0.5rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}

.nav-toggle-bars span {
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 200ms var(--ease-out);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

@media (max-width: 767px) {
  .js .nav-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bone);
    border-bottom: 1px solid var(--sand);
    padding: 1rem clamp(1.25rem, 4vw, 2.5rem) 1.75rem;
    box-shadow: var(--shadow-soft);
  }

  .js .site-nav.is-open {
    display: flex;
  }

  .js .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .js .nav-list a {
    display: block;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--sand);
    font-size: 1.0625rem;
  }

  .js .btn-nav {
    margin-top: 1.25rem;
    text-align: center;
  }

  /* Without JS the nav renders inline below the brand */
  html:not(.js) .header-inner {
    flex-wrap: wrap;
  }

  html:not(.js) .site-nav {
    flex-wrap: wrap;
    gap: 1rem;
  }

  html:not(.js) .nav-list {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(6rem, 13vw, 11rem);
}

.hero-beam {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(52rem 34rem at 84% -12%, rgba(217, 154, 78, 0.20), transparent 68%),
    radial-gradient(40rem 28rem at -8% 108%, rgba(231, 223, 212, 0.75), transparent 70%);
}

.hero-content {
  position: relative;
  max-width: 46rem;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--beam-text);
}

.hero-sub {
  margin-top: 1.75rem;
  font-size: 1.3125rem;
  line-height: 1.6;
  color: var(--stone);
  max-width: 40rem;
}

/* ---------- Problem ---------- */

.section-problem .prose p {
  font-size: 1.1875rem;
}

/* ---------- Belief band ---------- */

.belief {
  background: var(--slate);
  color: var(--bone);
  padding-block: clamp(5rem, 9vw, 8rem);
  text-align: center;
}

.belief-text {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 3.4vw, 2.5rem);
  line-height: 1.35;
  font-weight: 400;
  max-width: 52rem;
  margin-inline: auto;
  text-wrap: balance;
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  gap: 1.5rem;
}

.card-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.card-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--sand);
  border-radius: var(--radius-card);
  padding: 2rem 1.85rem;
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin-bottom: 0.85rem;
}

.card p {
  color: var(--stone);
  font-size: 1.0625rem;
}

.card-spotlight {
  border-color: var(--beam);
  border-width: 2px;
  box-shadow: var(--shadow-lift);
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--beam);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  margin-bottom: 1.1rem;
}

/* ---------- Proven Process ---------- */

.section-process {
  background: var(--surface);
}

.process-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 46rem;
}

.process-step {
  position: relative;
  display: flex;
  gap: 1.75rem;
  padding-block: 1.9rem;
}

.process-step + .process-step {
  border-top: 1px solid var(--sand);
}

.process-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--bone);
  border: 2px solid var(--beam);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1875rem;
  color: var(--beam-text);
}

.process-step h3 {
  margin-bottom: 0.4rem;
}

.process-step p {
  color: var(--stone);
}

/* ---------- Who it's for ---------- */

.section-fit .prose p {
  font-size: 1.1875rem;
}

/* ---------- About us ---------- */

.section-about {
  background: var(--surface);
}

.about-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  }
}

.about-figure {
  margin: 0;
  max-width: 24rem;
}

.about-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lift);
}

.about-quote {
  margin: 2.25rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--beam);
}

.about-quote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--slate);
  margin-bottom: 0.75rem;
}

.about-quote cite {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--stone);
}

/* ---------- Our foundation ---------- */

.section-foundation {
  background: linear-gradient(180deg, var(--bone), color-mix(in srgb, var(--sand) 55%, var(--bone)));
}

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

@media (min-width: 1024px) {
  .foundation-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}

.promise {
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1.45;
  color: var(--slate);
  border-left: 3px solid var(--beam);
  padding-left: 1.25rem;
  margin-top: 2rem;
}

/* The illustration is transparent line art, so it sits directly on the
   section background — no card frame, no shadow. */
.foundation-figure {
  margin: 0;
}

.foundation-figure img {
  width: 100%;
  height: auto;
}

/* ---------- Booking ---------- */

.section-book {
  background: var(--surface);
}

.section-book .section-head {
  margin-inline: auto;
  text-align: center;
}

.booking-widget {
  max-width: 62rem;
  margin-inline: auto;
  background: var(--bone);
  border: 1px solid var(--sand);
  border-radius: var(--radius-card);
  padding: clamp(0.5rem, 2vw, 1.5rem);
}

.booking-fallback {
  text-align: center;
  color: var(--stone);
  font-size: 0.9375rem;
  padding: 0.75rem 1rem 0.5rem;
}

.booking-fallback a {
  color: var(--ink);
  text-decoration-color: var(--beam);
  text-decoration-thickness: 2px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--slate);
  color: var(--bone);
  padding-block: clamp(3.5rem, 6vw, 5rem);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 26rem;
}

.footer-lockup {
  width: 260px;
  height: auto;
}

.footer-tagline {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.5;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
}

.footer-meta a {
  color: var(--bone);
  text-decoration-color: var(--beam);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.footer-meta a:hover {
  color: var(--beam);
}

.footer-meta p {
  color: color-mix(in srgb, var(--bone) 70%, var(--slate));
}

/* ---------- Document pages (privacy) ---------- */

.section-doc {
  background: var(--surface);
}

.doc-prose h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
}

.doc-prose h2 {
  font-size: 1.5rem;
  margin-top: 3rem;
}

.doc-date {
  color: var(--stone);
  font-size: 0.9375rem;
  margin-bottom: 2.5rem;
}

.doc-prose ul {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.doc-prose li {
  margin-bottom: 0.85rem;
}

.doc-prose a {
  color: var(--ink);
  text-decoration-color: var(--beam);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.doc-prose a:hover {
  color: var(--beam-text);
}

/* ---------- Thank-you / 404 pages ---------- */

.page-simple {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: var(--section-pad);
}

.page-simple .prose {
  margin-inline: auto;
}

.page-simple .cta-row {
  justify-content: center;
}

/* ---------- Reveal on scroll ---------- */
/* Applied only when JS is running; content is always visible without it. */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 450ms var(--ease-out), transform 450ms var(--ease-out);
  }

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

  /* Gentle stagger for sibling cards / steps */
  .js .card-grid .reveal:nth-child(2),
  .js .process-list .reveal:nth-child(2) { transition-delay: 80ms; }
  .js .card-grid .reveal:nth-child(3),
  .js .process-list .reveal:nth-child(3) { transition-delay: 160ms; }
  .js .card-grid .reveal:nth-child(4),
  .js .process-list .reveal:nth-child(4) { transition-delay: 240ms; }
  .js .process-list .reveal:nth-child(5) { transition-delay: 320ms; }
}

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