:root {
  color-scheme: light;
  --canvas: #ffffff;
  --soft-canvas: #f2f6f5;
  --ink: #102b28;
  --muted: #506461;
  --accent: #087c75;
  --accent-dark: #05645f;
  --coral: #ef503f;
  --line: #d7e0de;
  --page: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

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

.page-width {
  width: min(var(--page), calc(100% - (2 * var(--gutter))));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  min-height: 70px;
  padding: 10px var(--gutter);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.brand img,
.closing-layout img,
.error-page img { border-radius: 8px; }

.site-header nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-header nav a,
.site-footer nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible,
.site-footer nav a:hover,
.site-footer nav a:focus-visible { color: var(--accent); }

.availability {
  justify-self: end;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero {
  min-height: min(760px, calc(100vh - 70px));
  display: grid;
  align-items: center;
  background-color: #edf4f2;
  background-image: url("/tibetan-rites-challenge/assets/hero-rite-five.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-content { padding-block: 100px; }
.hero-content > * { max-width: 610px; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.08; }

h1 {
  max-width: 680px;
  margin-bottom: 24px;
  font-size: clamp(48px, 6vw, 78px);
  font-weight: 720;
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 680;
}

h3 { margin-bottom: 10px; font-size: 22px; }

.hero-copy {
  margin-bottom: 32px;
  color: #284542;
  font-size: clamp(20px, 2.2vw, 25px);
  line-height: 1.42;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hero-actions span {
  max-width: 220px;
  color: #35514e;
  font-size: 14px;
  font-weight: 600;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.button-primary { background: var(--accent); color: white; }
.button-primary:hover, .button-primary:focus-visible { background: var(--accent-dark); }

.proof-strip { background: var(--ink); color: white; }

.proof-grid {
  min-height: 118px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
}

.proof-grid p {
  margin: 0;
  padding: 10px 32px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.proof-grid p:first-child { padding-left: 0; border-left: 0; }
.proof-grid strong { font-size: 25px; }
.proof-grid span { color: #c7d7d4; font-size: 14px; }
.section { padding-block: clamp(82px, 10vw, 136px); }
.section-heading { max-width: 800px; }

.section-heading > p:last-child,
.app-copy > p,
.privacy-copy > p,
.closing-layout p { color: var(--muted); font-size: 18px; }

.principles {
  margin-top: 70px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
}

.principles article { padding-top: 24px; border-top: 2px solid var(--line); }

.step-number {
  display: inline-block;
  margin-bottom: 44px;
  color: var(--coral);
  font-size: 14px;
  font-weight: 750;
}

.principles p { margin: 0; color: var(--muted); }
.app-section { overflow: hidden; background: var(--soft-canvas); }

.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: clamp(50px, 8vw, 110px);
}

.app-copy h2 { max-width: 580px; }
.app-copy > p { max-width: 600px; }

.check-list {
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: 14px 0 14px 34px;
  border-top: 1px solid var(--line);
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 3px;
  width: 13px;
  height: 7px;
  border-bottom: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.phone-stage { display: grid; place-items: center; }

.phone-shell {
  position: relative;
  width: min(100%, 370px);
  aspect-ratio: 0.5;
  padding: 11px;
  overflow: hidden;
  background: #061815;
  border: 1px solid #2f4e49;
  border-radius: 42px;
  box-shadow: 0 28px 60px rgba(16, 43, 40, 0.18);
}

.phone-island {
  position: absolute;
  z-index: 3;
  top: 20px;
  left: 50%;
  width: 96px;
  height: 28px;
  background: #061815;
  border-radius: 18px;
  transform: translateX(-50%);
}

.camera-preview {
  position: relative;
  height: 77%;
  overflow: hidden;
  border-radius: 33px 33px 8px 8px;
}

.camera-preview > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
}

.tracking-status, .rep-count {
  position: absolute;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.tracking-status {
  top: 58px;
  left: 18px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.tracking-status span {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 5px;
  background: var(--accent);
  border-radius: 50%;
}

.rep-count {
  right: 18px;
  bottom: 18px;
  min-width: 72px;
  padding: 8px 11px;
  text-align: right;
  border-radius: 6px;
}

.rep-count strong, .rep-count span { display: block; }
.rep-count strong { font-size: 32px; line-height: 1; }
.rep-count span { color: var(--muted); font-size: 11px; }

.pose-line {
  position: absolute;
  z-index: 1;
  height: 3px;
  background: var(--coral);
  border-radius: 2px;
  transform-origin: left center;
}

.pose-line-a { width: 120px; left: 103px; top: 262px; transform: rotate(-29deg); }
.pose-line-b { width: 100px; left: 202px; top: 203px; transform: rotate(58deg); }
.pose-line-c { width: 120px; left: 91px; top: 275px; transform: rotate(15deg); }

.phone-caption {
  height: 23%;
  padding: 27px 20px 18px;
  display: flex;
  flex-direction: column;
  color: white;
}

.phone-caption span { margin-bottom: 6px; color: #9eb9b5; font-size: 13px; }
.phone-caption strong { font-size: 20px; }

.rites-heading {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  column-gap: 90px;
  max-width: none;
}

.rites-heading .eyebrow { grid-column: 1 / -1; }
.rites-heading h2, .rites-heading > p:last-child { margin-bottom: 0; }

.rites-list {
  margin: 70px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.rites-list li {
  min-height: 92px;
  display: grid;
  grid-template-columns: 70px minmax(220px, 0.7fr) 1fr;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.rites-list span { color: var(--coral); font-size: 13px; font-weight: 750; }
.rites-list strong { font-size: 20px; }
.rites-list p { margin: 0; color: var(--muted); }
.privacy-section { background: var(--accent); color: white; }

.privacy-layout {
  display: grid;
  grid-template-columns: 1fr 0.75fr;
  align-items: end;
  gap: 100px;
}

.privacy-section .eyebrow, .privacy-copy p { color: #d4efec; }
.privacy-layout h2, .privacy-copy p { margin-bottom: 0; }

.text-link {
  display: inline-block;
  margin-top: 28px;
  font-weight: 700;
  text-underline-offset: 5px;
}

.faq-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 90px;
}

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

.faq-list summary {
  padding: 24px 42px 24px 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
}

.faq-list details p {
  max-width: 700px;
  padding: 0 30px 25px 0;
  color: var(--muted);
}

.closing-section { padding-block: 72px; background: var(--soft-canvas); }

.closing-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 32px;
}

.closing-layout h2 { margin-bottom: 8px; font-size: clamp(30px, 4vw, 46px); }
.closing-layout p:last-child { margin-bottom: 0; }
.site-footer { padding-block: 36px; color: white; background: var(--ink); }

.footer-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
}

.footer-layout p { margin: 0; font-size: 14px; }
.footer-layout span, .copyright { color: #b7cbc7; }
.copyright { justify-self: end; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

.legal-main { padding-block: clamp(68px, 9vw, 120px); }

.legal-heading {
  max-width: 850px;
  padding-bottom: 50px;
  border-bottom: 1px solid var(--line);
}

.legal-heading h1 { margin-bottom: 14px; }
.legal-heading > p:last-child { color: var(--muted); }

.legal-layout {
  padding-top: 48px;
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  gap: clamp(50px, 9vw, 120px);
}

.legal-index {
  position: sticky;
  top: 28px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-index a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.legal-index a:hover, .legal-index a:focus-visible { color: var(--accent); }
.legal-copy > p, .legal-copy section { margin-bottom: 46px; }
.legal-copy h2 { margin-bottom: 14px; font-size: 28px; }
.legal-copy p { color: var(--muted); }

.legal-copy a {
  color: var(--accent-dark);
  font-weight: 650;
  text-underline-offset: 3px;
}

.error-page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
}

.error-page img { margin-bottom: 34px; }
.error-page h1 { margin-bottom: 12px; }

.error-page > p:not(.eyebrow) {
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 19px;
}

@media (max-width: 940px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .app-layout, .faq-section { grid-template-columns: 1fr; }
  .app-copy { max-width: 700px; }
  .rites-heading { grid-template-columns: 1fr; gap: 16px; }
  .privacy-layout { grid-template-columns: 1fr; gap: 32px; }
  .footer-layout { grid-template-columns: 1fr auto; }
  .copyright { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 760px) {
  .legal-layout { grid-template-columns: 1fr; gap: 42px; }
  .legal-index { position: static; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .site-header { min-height: 62px; gap: 12px; }
  .brand span { max-width: 150px; line-height: 1.1; }
  .availability { max-width: 90px; text-align: right; }

  .hero {
    min-height: 680px;
    align-items: end;
    background-position: 69% center;
  }

  .hero-content {
    width: 100%;
    padding: 38px var(--gutter);
    background: rgba(255, 255, 255, 0.90);
  }

  h1 { margin-bottom: 18px; font-size: 46px; }
  .hero-copy { font-size: 19px; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .proof-grid { padding-block: 22px; grid-template-columns: 1fr; }

  .proof-grid p, .proof-grid p:first-child {
    padding: 13px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    border-left: 0;
  }

  .proof-grid p:first-child { border-top: 0; }
  .principles { margin-top: 45px; grid-template-columns: 1fr; gap: 34px; }
  .step-number { margin-bottom: 24px; }
  .app-layout { grid-template-columns: minmax(0, 1fr); }
  .phone-shell { width: min(92vw, 340px); }

  .rites-list li {
    padding-block: 18px;
    grid-template-columns: 46px 1fr;
    gap: 5px 14px;
  }

  .rites-list p { grid-column: 2; }

  .closing-layout {
    align-items: start;
    grid-template-columns: 64px 1fr;
    gap: 20px;
  }

  .closing-layout img { width: 64px; height: 64px; }
  .footer-layout { grid-template-columns: 1fr; }

  .site-footer nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .copyright { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
