/* Renato Tupiza: Route Ledger website */
@font-face {
  font-family: "Barlow Condensed";
  src: url("../assets/fonts/BarlowCondensed-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("../assets/fonts/BarlowCondensed-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../assets/fonts/SourceSans3-Variable.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../assets/fonts/SourceSans3-Italic-Variable.ttf") format("truetype");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --rt-basalt: #171b18;
  --rt-chalk: #f3ebdd;
  --rt-sage: #68735f;
  --rt-orange: #c04b25;
  --rt-blue: #6f929d;
  --rt-pumice: #d7cfc1;
  --rt-white: #ffffff;
  --rt-ink-soft: #343a35;
  --rt-rule-dark: rgba(23, 27, 24, 0.24);
  --rt-rule-light: rgba(243, 235, 221, 0.26);
  --rt-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --rt-body: "Source Sans 3", Arial, sans-serif;
  --rt-content: 88rem;
  --rt-pad: clamp(1.25rem, 4vw, 4.5rem);
}

html {
  scroll-behavior: smooth;
  background: var(--rt-basalt);
}

.route-body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--rt-basalt);
  color: var(--rt-chalk);
  font-family: var(--rt-body);
  font-size: 16px;
  line-height: 1.6;
}

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

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

.route-body button,
.route-body input,
.route-body textarea,
.route-body select {
  font: inherit;
}

.route-body button,
.route-body a,
.route-body summary,
.route-body input,
.route-body textarea,
.route-body select {
  min-height: 44px;
}

.route-body :focus-visible {
  outline: 3px solid var(--rt-blue);
  outline-offset: 4px;
}

.route-ledger-site {
  min-height: 100vh;
  background: var(--rt-basalt);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  transform: translateY(-150%);
  background: var(--rt-chalk);
  color: var(--rt-basalt);
  font-weight: 800;
}

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

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: minmax(11rem, 16rem) 1fr auto;
  gap: 1.5rem;
  align-items: center;
  min-height: 72px;
  padding: 0.65rem var(--rt-pad);
  border-bottom: 1px solid var(--rt-rule-light);
  background: rgba(23, 27, 24, 0.96);
  backdrop-filter: blur(14px);
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: min(15rem, 100%);
  padding: 0.35rem 0;
  text-decoration: none;
}

.brand-name {
  color: var(--rt-chalk);
  font-family: var(--rt-display);
  font-size: clamp(1.45rem, 4.5vw, 1.8rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
}

.brand-sub {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
}

.brand-descriptor {
  color: var(--rt-blue);
  font-family: var(--rt-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  white-space: nowrap;
}

.brand-trace {
  flex: 0 1 4.5rem;
  min-width: 1.75rem;
  height: auto;
}

.primary-nav {
  display: flex;
  justify-content: center;
  gap: clamp(0.8rem, 1.7vw, 1.8rem);
}

.primary-nav a,
.site-footer a {
  display: inline-flex;
  align-items: center;
  color: var(--rt-chalk);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-decoration: none;
}

.primary-nav a {
  border-bottom: 2px solid transparent;
}

.primary-nav a:hover {
  border-bottom-color: var(--rt-orange);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.language-switch {
  display: flex;
  border: 1px solid var(--rt-rule-light);
}

.language-switch button {
  min-width: 46px;
  border: 0;
  background: transparent;
  color: var(--rt-chalk);
  cursor: pointer;
  font-family: var(--rt-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.language-switch button[aria-pressed="true"] {
  background: var(--rt-chalk);
  color: var(--rt-basalt);
}

.nav-route-tab {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0.6rem 1rem;
  border-left: 5px solid var(--rt-orange);
  background: var(--rt-chalk);
  color: var(--rt-basalt);
  font-family: var(--rt-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  transform: rotate(-1deg);
}

.nav-route-tab:hover {
  transform: rotate(0deg) translateY(-2px);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(20rem, 5fr) minmax(28rem, 7fr);
  min-height: calc(100svh - 72px);
  overflow: hidden;
  border-bottom: 1px solid var(--rt-rule-light);
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(4rem, 9vw, 9rem) var(--rt-pad);
  background: var(--rt-basalt);
}

.eyebrow,
.choice-heading > p,
.chapters-heading > p,
.process-heading > p,
.about-copy > p:first-child,
.archive-heading > p:first-child,
.faq-heading > p:first-child {
  margin: 0 0 1.3rem;
  color: var(--rt-orange);
  font-family: var(--rt-display);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.hero h1 {
  max-width: 9ch;
  margin: 0;
  color: var(--rt-chalk);
  font-family: var(--rt-display);
  font-size: clamp(4.6rem, 10vw, 9.5rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.82;
  text-wrap: balance;
}

.hero-support {
  max-width: 36rem;
  margin: 2rem 0 0;
  color: var(--rt-pumice);
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.55;
}

.hero-route-tab {
  display: inline-flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  min-width: min(100%, 20rem);
  margin-top: 2.2rem;
  padding: 0.9rem 1rem 0.9rem 1.25rem;
  border: 1px solid var(--rt-orange);
  border-left-width: 8px;
  background: var(--rt-orange);
  color: var(--rt-white);
  font-family: var(--rt-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.hero-route-tab:hover {
  border-color: var(--rt-chalk);
  background: var(--rt-chalk);
  color: var(--rt-basalt);
  transform: translateX(6px);
}

.hero-condition {
  max-width: 31rem;
  margin: 1rem 0 0;
  color: var(--rt-blue);
  font-size: 0.88rem;
  line-height: 1.5;
}

.independence-note {
  max-width: 35rem;
  margin: 1rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rt-rule-light);
  color: var(--rt-chalk);
  font-family: var(--rt-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.hero-visual {
  position: relative;
  min-height: 34rem;
  margin: 0;
  overflow: hidden;
  border-left: 1px solid var(--rt-rule-light);
  background: #0f1210;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% center;
}

.hero-visual figcaption {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(243, 235, 221, 0.46);
  background: rgba(23, 27, 24, 0.86);
  color: var(--rt-chalk);
  font-family: var(--rt-display);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.route-trace {
  position: absolute;
  z-index: 4;
  right: 2vw;
  bottom: 3.25rem;
  width: min(48vw, 50rem);
  overflow: visible;
  color: var(--rt-orange);
  pointer-events: none;
}

.route-trace path {
  fill: none;
  stroke-linecap: round;
  stroke-width: 4;
}

.route-trace-base {
  stroke: rgba(243, 235, 221, 0.38);
}

.route-trace-live {
  stroke: currentColor;
  stroke-dasharray: 980;
  stroke-dashoffset: 980;
  animation: route-draw 2.1s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

.route-trace circle {
  fill: var(--rt-orange);
}

@keyframes route-draw {
  to { stroke-dashoffset: 0; }
}

.culture-section,
.choice-section,
.circuit-section,
.chapters-section,
.process-section,
.about-section,
.archive-section,
.faq-section,
.request-section {
  scroll-margin-top: 84px;
}

.culture-section {
  position: relative;
  padding: clamp(5rem, 9vw, 9rem) var(--rt-pad);
  background-color: var(--rt-basalt);
  background-image: url("../assets/generated/plate_basalt_topo.jpg");
  background-position: center;
  background-size: cover;
}

.culture-section::before,
.archive-section::before {
  position: absolute;
  inset: 0;
  background: rgba(23, 27, 24, 0.82);
  content: "";
}

.section-intro,
.culture-ledger,
.archive-heading,
.archive-rail {
  position: relative;
  z-index: 1;
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(15rem, 0.8fr) minmax(20rem, 1.2fr);
  column-gap: clamp(2rem, 6vw, 8rem);
  max-width: var(--rt-content);
  margin: 0 auto 4rem;
}

.section-intro .eyebrow {
  grid-column: 1 / -1;
}

.section-intro h2,
.choice-heading h2,
.chapters-heading h2,
.process-heading h2,
.about-copy h2,
.archive-heading h2,
.faq-heading h2,
.request-heading h2 {
  margin: 0;
  font-family: var(--rt-display);
  font-size: clamp(2.8rem, 6vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.94;
  text-wrap: balance;
}

.section-intro > p:last-child,
.archive-heading > p:last-child {
  margin: 0;
  color: var(--rt-pumice);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  line-height: 1.65;
}

.culture-ledger {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: var(--rt-content);
  margin: 0 auto;
  border-top: 1px solid var(--rt-rule-light);
  border-bottom: 1px solid var(--rt-rule-light);
}

.culture-ledger article {
  min-height: 18rem;
  padding: 1.5rem;
  border-right: 1px solid var(--rt-rule-light);
}

.culture-ledger article:last-child {
  border-right: 0;
}

.culture-ledger span {
  color: var(--rt-blue);
  font-family: var(--rt-display);
  font-size: 0.95rem;
  font-weight: 800;
}

.culture-ledger h3 {
  margin: 3.8rem 0 0.75rem;
  color: var(--rt-chalk);
  font-family: var(--rt-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.culture-ledger p {
  margin: 0;
  color: var(--rt-pumice);
}

.choice-section {
  padding: clamp(5rem, 9vw, 9rem) var(--rt-pad);
  background: var(--rt-chalk);
  color: var(--rt-basalt);
}

.choice-heading,
.chapters-heading,
.process-heading,
.faq-heading,
.request-heading {
  display: grid;
  grid-template-columns: minmax(10rem, 0.55fr) minmax(20rem, 1.45fr);
  gap: 2rem;
  max-width: var(--rt-content);
  margin: 0 auto 3.5rem;
  align-items: start;
}

.choice-canvas {
  position: relative;
  display: grid;
  grid-template-columns: minmax(16rem, 0.9fr) minmax(24rem, 1.25fr) minmax(16rem, 0.9fr);
  max-width: var(--rt-content);
  min-height: 38rem;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--rt-basalt);
  background: var(--rt-basalt);
}

.choice-panel {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: clamp(1.5rem, 3vw, 3rem);
}

.choice-gym {
  background: var(--rt-chalk);
  color: var(--rt-basalt);
}

.choice-rock {
  background: var(--rt-basalt);
  color: var(--rt-chalk);
}

.choice-icon {
  width: 4rem;
  height: 4rem;
  margin-bottom: auto;
  color: var(--rt-orange);
}

.choice-panel h3 {
  margin: 0;
  font-family: var(--rt-display);
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.8;
}

.choice-panel p {
  min-height: 7.5rem;
  margin: 1.5rem 0;
  line-height: 1.55;
}

.choice-image {
  min-height: 38rem;
  margin: 0;
  overflow: hidden;
}

.choice-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
}

.gym-tape-label,
.rock-anchor-pull {
  width: 100%;
  min-height: 54px;
  cursor: pointer;
  font-family: var(--rt-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.gym-tape-label {
  border: 1px solid var(--rt-basalt);
  border-left: 8px solid var(--rt-orange);
  background: var(--rt-pumice);
  color: var(--rt-basalt);
  transform: rotate(-1deg);
}

.gym-tape-label:hover,
.gym-tape-label[aria-pressed="true"] {
  background: var(--rt-orange);
  color: var(--rt-white);
  transform: rotate(0deg);
}

.rock-anchor-pull {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rt-orange);
  background: transparent;
  color: var(--rt-chalk);
}

.rock-anchor-pull span:last-child {
  color: var(--rt-orange);
}

.rock-anchor-pull:hover,
.rock-anchor-pull[aria-pressed="true"] {
  background: var(--rt-orange);
  color: var(--rt-white);
  transform: translateX(4px);
}

.circuit-section {
  padding: clamp(5rem, 9vw, 9rem) var(--rt-pad);
  background: var(--rt-orange);
  color: var(--rt-white);
}

.circuit-shell {
  display: grid;
  grid-template-columns: minmax(18rem, 0.82fr) minmax(24rem, 1.18fr);
  gap: clamp(2rem, 6vw, 7rem);
  max-width: var(--rt-content);
  margin: 0 auto;
  align-items: start;
}

.circuit-copy h2 {
  max-width: 8ch;
  margin: 0;
  font-family: var(--rt-display);
  font-size: clamp(4rem, 8vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.82;
}

.circuit-copy > p:not(.eyebrow) {
  max-width: 36rem;
  margin: 2rem 0;
  font-size: 1.1rem;
  line-height: 1.65;
}

.circuit-cta {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 24rem);
  min-height: 58px;
  padding: 0.8rem 1rem;
  border: 2px solid var(--rt-basalt);
  background: var(--rt-basalt);
  color: var(--rt-chalk);
  cursor: pointer;
  font-family: var(--rt-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.045em;
}

.circuit-cta:hover {
  background: var(--rt-chalk);
  color: var(--rt-basalt);
  transform: translateX(5px);
}

.circuit-formats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.circuit-formats article {
  min-height: 25rem;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border-right: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(23, 27, 24, 0.14);
}

.circuit-formats article:nth-child(2) {
  border-right: 0;
  background: var(--rt-chalk);
  color: var(--rt-basalt);
}

.circuit-formats svg {
  width: 4rem;
  height: 4rem;
  margin-bottom: 5rem;
}

.circuit-formats article > span {
  font-family: var(--rt-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.circuit-formats h3 {
  margin: 0.65rem 0 1rem;
  font-family: var(--rt-display);
  font-size: clamp(2.6rem, 4vw, 4.7rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.86;
}

.circuit-formats article p {
  margin: 0;
  line-height: 1.55;
}

.circuit-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1rem 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--rt-basalt);
  color: var(--rt-pumice);
  font-size: 0.88rem;
  line-height: 1.5;
}

.chapters-section {
  padding: clamp(5rem, 9vw, 9rem) var(--rt-pad) clamp(8rem, 14vw, 14rem);
  background: var(--rt-basalt);
}

.chapters-heading h2,
.chapters-heading p,
.process-heading h2,
.process-heading p {
  color: var(--rt-chalk);
}

.chapter-stack {
  max-width: var(--rt-content);
  margin: 0 auto;
}

.ledger-chapter {
  position: sticky;
  top: calc(86px + (var(--chapter-index) * 12px));
  display: grid;
  grid-template-columns: minmax(5rem, 0.28fr) minmax(10rem, 0.72fr) minmax(20rem, 1fr) 2rem;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: center;
  min-height: 56vh;
  margin-bottom: 12vh;
  padding: clamp(2rem, 5vw, 5rem);
  border: 1px solid var(--rt-basalt);
  background-color: var(--rt-chalk);
  background-image: url("../assets/generated/plate_chalk_paper.jpg");
  background-position: center;
  background-size: cover;
  color: var(--rt-basalt);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
}

.ledger-chapter:nth-child(even) {
  background-color: var(--rt-pumice);
  transform: rotate(0.35deg);
}

.chapter-number {
  align-self: start;
  color: var(--rt-orange);
  font-family: var(--rt-display);
  font-size: 1.1rem;
  font-weight: 800;
}

.ledger-chapter h3 {
  margin: 0;
  font-family: var(--rt-display);
  font-size: clamp(3.2rem, 7vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.85;
}

.ledger-chapter p {
  margin: 0;
  color: var(--rt-ink-soft);
  font-size: clamp(1.05rem, 1.9vw, 1.35rem);
  line-height: 1.65;
}

.chapter-mark {
  width: 1.25rem;
  height: 1.25rem;
  border: 4px solid var(--rt-orange);
  border-radius: 50%;
}

.process-section {
  padding: clamp(5rem, 9vw, 9rem) var(--rt-pad);
  border-top: 1px solid var(--rt-rule-light);
  background: var(--rt-basalt);
}

.process-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: var(--rt-content);
  margin: 0 auto;
  padding: 2rem 0 0;
  list-style: none;
}

.process-line::before {
  position: absolute;
  top: 4.4rem;
  right: 8%;
  left: 8%;
  height: 3px;
  background: var(--rt-orange);
  content: "";
}

.process-line li {
  position: relative;
  z-index: 1;
  min-height: 16rem;
  padding: 0 1.2rem;
  text-align: center;
}

.process-icon {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  margin: 0 auto;
  border: 1px solid var(--rt-rule-light);
  border-radius: 50%;
  background: var(--rt-basalt);
  color: var(--rt-chalk);
}

.process-icon svg {
  width: 2.5rem;
  height: 2.5rem;
}

.process-number {
  display: block;
  margin-top: 1.4rem;
  color: var(--rt-blue);
  font-family: var(--rt-display);
  font-weight: 800;
}

.process-line p {
  margin: 0.65rem auto 0;
  color: var(--rt-pumice);
  line-height: 1.5;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(19rem, 0.8fr) minmax(24rem, 1.2fr);
  background: var(--rt-chalk);
  color: var(--rt-basalt);
}

.about-photo {
  position: relative;
  min-height: 46rem;
  margin: 0;
  overflow: hidden;
  background: var(--rt-pumice);
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.about-photo figcaption,
.archive-item figcaption {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-left: 6px solid var(--rt-orange);
  background: rgba(23, 27, 24, 0.93);
  color: var(--rt-chalk);
  font-family: var(--rt-display);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.about-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 8vw, 8rem) var(--rt-pad);
}

.about-copy h2 {
  max-width: 11ch;
}

.about-copy > p:nth-of-type(2) {
  max-width: 48rem;
  margin: 2rem 0;
  color: var(--rt-ink-soft);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  line-height: 1.68;
}

.about-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rt-rule-dark);
}

.about-facts span {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--rt-basalt);
  font-family: var(--rt-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.archive-section {
  position: relative;
  padding: clamp(5rem, 9vw, 9rem) var(--rt-pad);
  background-color: var(--rt-basalt);
  background-image: url("../assets/generated/plate_basalt_topo.jpg");
  background-position: center;
  background-size: cover;
}

.archive-heading {
  display: grid;
  grid-template-columns: minmax(12rem, 0.45fr) minmax(20rem, 0.75fr) minmax(20rem, 0.8fr);
  gap: 2rem;
  align-items: start;
  max-width: var(--rt-content);
  margin: 0 auto 4rem;
}

.archive-rail {
  display: grid;
  grid-template-columns: 1.05fr 0.8fr 1fr 0.88fr;
  gap: 1.25rem;
  align-items: start;
  max-width: var(--rt-content);
  margin: 0 auto;
}

.archive-item {
  position: relative;
  min-height: 28rem;
  margin: 0;
  overflow: hidden;
  border: 0.65rem solid var(--rt-chalk);
  background: var(--rt-pumice);
}

.archive-item-2 {
  margin-top: 5rem;
  transform: rotate(1.1deg);
}

.archive-item-3 {
  margin-top: 1.5rem;
  transform: rotate(-0.7deg);
}

.archive-item-4 {
  margin-top: 4rem;
  transform: rotate(0.6deg);
}

.archive-item img {
  width: 100%;
  height: 100%;
  min-height: 28rem;
  object-fit: cover;
}

.faq-section {
  padding: clamp(5rem, 9vw, 9rem) var(--rt-pad);
  background: var(--rt-chalk);
  color: var(--rt-basalt);
}

.faq-list {
  max-width: var(--rt-content);
  margin: 0 auto;
  border-top: 1px solid var(--rt-basalt);
}

.faq-list details {
  border-bottom: 1px solid var(--rt-rule-dark);
}

.faq-list summary {
  display: grid;
  grid-template-columns: 4rem 1fr 2rem;
  gap: 1rem;
  align-items: center;
  padding: 1.5rem 0;
  cursor: pointer;
  list-style: none;
}

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

.faq-list summary > span:first-child {
  color: var(--rt-orange);
  font-family: var(--rt-display);
  font-weight: 800;
}

.faq-list summary strong {
  font-family: var(--rt-display);
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  letter-spacing: -0.01em;
}

.faq-plus {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--rt-orange);
  font-size: 1.8rem;
}

.faq-list details[open] .faq-plus {
  transform: rotate(45deg);
}

.faq-list details > p {
  max-width: 52rem;
  margin: 0 0 1.75rem 5rem;
  color: var(--rt-ink-soft);
  font-size: 1.06rem;
  line-height: 1.65;
}

.request-section {
  padding: clamp(5rem, 9vw, 9rem) var(--rt-pad);
  background-color: var(--rt-chalk);
  background-image: url("../assets/generated/plate_chalk_paper.jpg");
  background-position: center;
  background-size: cover;
  color: var(--rt-basalt);
}

.request-heading .eyebrow {
  color: var(--rt-orange);
}

.request-form {
  display: grid;
  grid-template-columns: minmax(19rem, 0.9fr) minmax(22rem, 1.1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  max-width: var(--rt-content);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 4rem);
  border: 1px solid var(--rt-basalt);
  background: rgba(243, 235, 221, 0.9);
}

.request-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.request-form legend {
  width: 100%;
  margin-bottom: 0.9rem;
  font-family: var(--rt-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.path-fieldset {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-column: 1;
  gap: 0.75rem;
}

.path-fieldset legend {
  grid-column: 1 / -1;
}

.path-option {
  position: relative;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-height: 72px;
  padding: 0.75rem;
  border: 1px solid var(--rt-basalt);
  cursor: pointer;
  font-family: var(--rt-display);
  font-size: 1.4rem;
  font-weight: 800;
}

.path-option input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0.01;
}

.path-option svg {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--rt-orange);
}

.path-option.is-selected {
  border-left: 8px solid var(--rt-orange);
  background: var(--rt-basalt);
  color: var(--rt-chalk);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column: 1;
  gap: 1rem;
}

.field-label {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-family: var(--rt-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field-label > span {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.field-label svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--rt-orange);
}

.field-label input,
.field-label select,
.field-label textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.75rem;
  border: 1px solid var(--rt-basalt);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.42);
  color: var(--rt-basalt);
  font-family: var(--rt-body);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.field-goal {
  grid-column: 1 / -1;
}

.field-label textarea {
  min-height: 9rem;
  resize: vertical;
}

.field-label small {
  position: absolute;
  right: 0.5rem;
  bottom: 0.35rem;
  color: var(--rt-sage);
  font-family: var(--rt-body);
  font-size: 0.78rem;
  font-weight: 600;
}

.reply-fieldset {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1;
  gap: 0.75rem;
}

.reply-fieldset label {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  min-height: 48px;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--rt-rule-dark);
  cursor: pointer;
}

.reply-fieldset input {
  width: 1.1rem;
  min-height: 1.1rem;
  accent-color: var(--rt-orange);
}

.message-preview {
  grid-row: 1 / span 3;
  grid-column: 2;
  min-height: 30rem;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border: 1px solid var(--rt-basalt);
  background: var(--rt-basalt);
  color: var(--rt-chalk);
}

.message-preview > p {
  margin: 0 0 1rem;
  color: var(--rt-blue);
  font-family: var(--rt-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.message-preview pre {
  margin: 0;
  color: var(--rt-pumice);
  font-family: var(--rt-body);
  font-size: 1rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.whatsapp-dispatch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-column: 2;
  min-height: 64px;
  padding: 0.9rem 1.15rem;
  border: 2px solid var(--rt-orange);
  background: var(--rt-orange);
  color: var(--rt-white);
  cursor: pointer;
  font-family: var(--rt-display);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: 0.035em;
  text-align: left;
}

.whatsapp-dispatch:hover {
  border-color: var(--rt-basalt);
  background: var(--rt-basalt);
  transform: translateY(-3px);
}

.form-note {
  grid-column: 2;
  margin: -0.5rem 0 0;
  color: var(--rt-sage);
  font-size: 0.9rem;
  line-height: 1.5;
}

.site-footer {
  display: grid;
  grid-template-columns: 5rem 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 2rem var(--rt-pad);
  border-top: 1px solid var(--rt-rule-light);
  background: var(--rt-basalt);
}

.site-footer img {
  width: 4rem;
  height: 4rem;
}

.site-footer p {
  max-width: 48rem;
  margin: 0;
  color: var(--rt-pumice);
  font-size: 0.9rem;
  line-height: 1.55;
}

.site-footer a {
  border-bottom: 2px solid var(--rt-orange);
}

.system-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: var(--rt-basalt);
  color: var(--rt-chalk);
  font-family: var(--rt-body);
  text-align: center;
}

.system-page img {
  width: 6rem;
  height: 6rem;
}

.system-page p {
  color: var(--rt-orange);
  font-family: var(--rt-display);
  font-weight: 800;
  letter-spacing: 0.14em;
}

.system-page h1 {
  margin: 0.5rem 0 1.5rem;
  font-family: var(--rt-display);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.9;
}

.system-page a,
.system-page button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0.35rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rt-orange);
  background: var(--rt-orange);
  color: var(--rt-white);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: minmax(10rem, 14rem) 1fr;
  }

  .primary-nav {
    display: none;
  }

  .header-actions {
    justify-content: flex-end;
  }

  .hero {
    grid-template-columns: minmax(18rem, 0.95fr) minmax(22rem, 1.05fr);
  }

  .culture-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .culture-ledger article:nth-child(2) {
    border-right: 0;
  }

  .culture-ledger article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--rt-rule-light);
  }

  .choice-canvas {
    grid-template-columns: minmax(16rem, 0.9fr) minmax(20rem, 1.1fr);
  }

  .choice-rock {
    grid-column: 1 / -1;
    min-height: 24rem;
  }

  .ledger-chapter {
    grid-template-columns: 4rem minmax(9rem, 0.6fr) minmax(18rem, 1fr) 1.5rem;
  }

  .archive-heading {
    grid-template-columns: 0.5fr 1fr;
  }

  .archive-heading > p:last-child {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 64px;
  }

  .brand-lockup {
    width: 11rem;
  }

  .nav-route-tab {
    display: none;
  }

  .hero {
    display: flex;
    flex-direction: column;
    min-height: auto;
  }

  .hero-copy {
    min-height: 38rem;
    padding-top: 5rem;
    padding-bottom: 4rem;
  }

  .hero h1 {
    font-size: clamp(4.2rem, 22vw, 7rem);
  }

  .hero-visual {
    min-height: 28rem;
    border-top: 1px solid var(--rt-rule-light);
    border-left: 0;
  }

  .route-trace {
    right: -8rem;
    bottom: 24rem;
    width: 34rem;
  }

  .section-intro,
  .choice-heading,
  .chapters-heading,
  .process-heading,
  .faq-heading,
  .request-heading,
  .archive-heading {
    display: block;
  }

  .section-intro h2,
  .choice-heading h2,
  .chapters-heading h2,
  .process-heading h2,
  .about-copy h2,
  .archive-heading h2,
  .faq-heading h2,
  .request-heading h2 {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  .section-intro > p:last-child,
  .archive-heading > p:last-child {
    margin-top: 1.5rem;
  }

  .culture-ledger {
    grid-template-columns: 1fr;
  }

  .culture-ledger article,
  .culture-ledger article:nth-child(2) {
    min-height: 14rem;
    border-right: 0;
    border-bottom: 1px solid var(--rt-rule-light);
  }

  .culture-ledger article:last-child {
    border-bottom: 0;
  }

  .culture-ledger h3 {
    margin-top: 2rem;
  }

  .choice-canvas {
    display: flex;
    flex-direction: column;
  }

  .circuit-shell {
    grid-template-columns: 1fr;
  }

  .circuit-formats article {
    min-height: 21rem;
  }

  .choice-panel {
    min-height: 28rem;
  }

  .choice-image {
    min-height: 26rem;
  }

  .ledger-chapter,
  .ledger-chapter:nth-child(even) {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 30rem;
    margin-bottom: 1rem;
    transform: none;
  }

  .chapter-mark {
    margin-top: auto;
  }

  .process-line {
    grid-template-columns: 1fr;
  }

  .process-line::before {
    top: 3rem;
    bottom: 3rem;
    left: 2.45rem;
    width: 3px;
    height: auto;
  }

  .process-line li {
    display: grid;
    grid-template-columns: 5rem 3rem 1fr;
    gap: 0.75rem;
    align-items: center;
    min-height: 8rem;
    padding: 0;
    text-align: left;
  }

  .process-icon,
  .process-number,
  .process-line p {
    margin: 0;
  }

  .about-section {
    grid-template-columns: 1fr;
  }

  .about-photo {
    min-height: 34rem;
  }

  .archive-rail {
    grid-template-columns: 1fr;
  }

  .archive-item,
  .archive-item-2,
  .archive-item-3,
  .archive-item-4 {
    min-height: 24rem;
    margin-top: 0;
    transform: none;
  }

  .archive-item img {
    min-height: 24rem;
  }

  .faq-list summary {
    grid-template-columns: 2.6rem 1fr 2rem;
  }

  .faq-list details > p {
    margin-left: 2.6rem;
  }

  .request-form {
    grid-template-columns: 1fr;
  }

  .path-fieldset,
  .form-grid,
  .reply-fieldset,
  .message-preview,
  .whatsapp-dispatch,
  .form-note {
    grid-row: auto;
    grid-column: 1;
  }

  .message-preview {
    min-height: 24rem;
  }

  .site-footer {
    grid-template-columns: 4rem 1fr;
  }

  .site-footer a {
    grid-column: 2;
  }
}

@media (max-width: 480px) {
  .language-switch button {
    min-width: 44px;
  }

  .path-fieldset,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .circuit-formats {
    grid-template-columns: 1fr;
  }

  .circuit-formats article {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  }

  .field-goal {
    grid-column: 1;
  }

  .hero-route-tab {
    min-width: 100%;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .route-trace-live {
    stroke-dashoffset: 0;
  }

  .ledger-chapter,
  .ledger-chapter:nth-child(even) {
    position: static;
    transform: none;
  }
}

/* ===== WhatsApp chat widget (ported from Dental Quito) ===== */
.cwr-wa { position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 99990; font-family: var(--rt-body, inherit); }
.cwr-wa__fab {
  width: 60px; height: 60px; min-height: 60px; border: 0; border-radius: 50%; cursor: pointer;
  background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45); transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}
.cwr-wa__fab:hover { transform: scale(1.06); box-shadow: 0 10px 30px rgba(37, 211, 102, 0.6); }
.cwr-wa__fab svg { width: 32px; height: 32px; }
.cwr-wa__fab::after { /* pulse ring */
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: #25d366;
  z-index: -1; animation: cwrWaPulse 2.2s ease-out infinite;
}
@keyframes cwrWaPulse { 0% { transform: scale(1); opacity: 0.6; } 70% { transform: scale(1.7); opacity: 0; } 100% { opacity: 0; } }
.cwr-wa.is-anim .cwr-wa__fab::after { animation: none; }
.cwr-wa__panel {
  position: absolute; right: 0; bottom: 74px; width: 330px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 16px; overflow: hidden; transform-origin: bottom right;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  opacity: 0; transform: translateY(12px) scale(0.92); pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.cwr-wa.is-anim .cwr-wa__panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.cwr-wa__header { display: flex; align-items: center; gap: 10px; padding: 14px; background: #075e54; color: #fff; }
.cwr-wa__avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: #fff; }
.cwr-wa__avatar img { width: 100%; height: 100%; object-fit: contain; }
.cwr-wa__meta { flex: 1 1 auto; line-height: 1.25; min-width: 0; }
.cwr-wa__name { font-weight: 700; font-size: 15px; display: block; }
.cwr-wa__status { font-size: 12px; opacity: 0.85; display: flex; align-items: center; gap: 5px; }
.cwr-wa__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #34e36b; box-shadow: 0 0 0 0 rgba(52, 227, 107, 0.7); animation: cwrDot 1.8s infinite; }
@keyframes cwrDot { 0% { box-shadow: 0 0 0 0 rgba(52, 227, 107, 0.6); } 70% { box-shadow: 0 0 0 6px rgba(52, 227, 107, 0); } }
.cwr-wa__close { background: none; border: 0; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; opacity: 0.85; padding: 2px 4px; min-height: 0; }
.cwr-wa__close:hover { opacity: 1; }

.cwr-wa__body {
  padding: 18px 14px 12px; min-height: 96px;
  background: #e5ddd5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='3' cy='3' r='1' fill='%23000' opacity='.03'/%3E%3C/svg%3E");
}
.cwr-wa__typing { display: inline-flex; gap: 4px; align-items: center; background: #fff; padding: 12px 14px; border-radius: 0 12px 12px 12px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); }
.cwr-wa__typing span { width: 7px; height: 7px; border-radius: 50%; background: #9aa0a6; animation: cwrType 1.2s infinite; }
.cwr-wa__typing span:nth-child(2) { animation-delay: 0.18s; }
.cwr-wa__typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes cwrType { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-5px); opacity: 1; } }
.cwr-wa__bubble {
  display: inline-block; max-width: 85%; background: #fff; color: #111; padding: 10px 13px;
  border-radius: 0 12px 12px 12px; font-size: 14px; line-height: 1.45; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
  white-space: pre-wrap; min-height: 20px;
}
.cwr-wa__bubble.is-in { animation: cwrBubble 0.3s ease; }
@keyframes cwrBubble { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.cwr-wa__form { display: flex; align-items: center; gap: 8px; padding: 10px; background: #f0f0f0; }
.cwr-wa__input { flex: 1 1 auto; border: 0; border-radius: 20px; padding: 11px 14px; font-size: 14px; background: #fff; color: #111; outline: none; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); min-height: 0; }
.cwr-wa__send { width: 42px; height: 42px; min-height: 42px; flex: 0 0 auto; border: 0; border-radius: 50%; background: #25d366; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.2s ease, background 0.2s ease; padding: 0; }
.cwr-wa__send:hover { background: #1ebe5b; transform: scale(1.06); }
.cwr-wa__send svg { width: 20px; height: 20px; }

/* honor [hidden] even if other display rules apply */
.cwr-wa__typing[hidden], .cwr-wa__bubble[hidden], .cwr-wa__panel[hidden] { display: none !important; }

@media (max-width: 480px) {
  .cwr-wa { right: 16px; bottom: 16px; }
  .cwr-wa__fab { width: 56px; height: 56px; min-height: 56px; }
  .cwr-wa__panel { width: calc(100vw - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  .cwr-wa__fab::after, .cwr-wa__status::before { animation: none; }
  .cwr-wa__panel { transition: opacity 0.2s ease; transform: none; }
}

/* Los rótulos de campo no van en itálica */
.field-label span em {
  font-style: normal;
}
