/* Jackson Ryle — County Line After Midnight */

:root {
  --rust: #8b3a2a;
  --oxide: #5c2a1e;
  --saddle: #6b4423;
  --washed-blue: #6a7f8e;
  --wheat: #c9a66b;
  --wheat-soft: #d4b896;
  --dusk-orange: #c4783a;
  --fog: #9a958c;
  --charcoal: #14110e;
  --ink: #1a120c;
  --cream: #f0e6d4;
  --cream-soft: rgba(240, 230, 212, 0.82);
  --steel: #3a3530;
  --display: "Playfair Display", "Times New Roman", serif;
  --body: "Source Sans 3", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "Consolas", monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --amp-h: 6.5rem;
  --focus: #c9a66b;
  --jr-gold: rgba(235, 205, 145, 0.42);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

::selection {
  background: rgba(201, 166, 107, 0.4);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--cream);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.55;
  background: var(--charcoal);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  opacity: 1;
  transition: opacity 0.85s var(--ease);
}

body.is-booting {
  opacity: 0;
}

body.is-ready {
  opacity: 1;
}

body[data-light="dusk"] {
  --sky-top: #2a1810;
  --sky-mid: #8a4a28;
  --sky-bot: #c4783a;
  --plate-warm: #c4783a;
}

body[data-light="night"] {
  --sky-top: #0a0c12;
  --sky-mid: #1a2030;
  --sky-bot: #2a3040;
  --plate-warm: #3a4a68;
}

body[data-light="dawn"] {
  --sky-top: #4a2a28;
  --sky-mid: #c9897a;
  --sky-bot: #d4a060;
  --plate-warm: #d4a060;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* —— Atmosphere stack —— */

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 45% at 72% 42%, rgba(255, 200, 120, 0.55), transparent 55%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 42%, var(--sky-bot) 100%);
  transition: background 1.2s var(--ease);
  pointer-events: none;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.plate {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.1s var(--ease);
}

/* County-line plate — photo when present, painted dusk fallback otherwise */
.plate-county {
  opacity: 0.95;
  background-color: #1a120c;
  background-image:
    linear-gradient(180deg, transparent 0%, rgba(20, 12, 8, 0.15) 45%, rgba(10, 6, 4, 0.75) 100%),
    radial-gradient(ellipse 55% 40% at 78% 38%, rgba(255, 210, 120, 0.7), transparent 60%),
    linear-gradient(185deg, #3a2218 0%, #6a3a22 28%, #a06030 52%, #2a1810 78%, #120c08 100%);
}

.plate-county::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 18px,
      rgba(20, 10, 4, 0.04) 18px,
      rgba(20, 10, 4, 0.04) 19px
    );
  opacity: 0.5;
  mask-image: linear-gradient(180deg, transparent 35%, #000 70%);
  pointer-events: none;
}

/* Plate: keep more sky gold for the JR mark to live in */
.plate-county.has-photo {
  background-position: center 28%;
  background-image:
    linear-gradient(
      180deg,
      rgba(12, 8, 4, 0.22) 0%,
      rgba(12, 8, 4, 0.08) 22%,
      rgba(12, 8, 4, 0.35) 52%,
      rgba(8, 4, 2, 0.82) 100%
    ),
    image-set(
      url("../assets/plates/county-line-1600.jpg") 1x,
      url("../assets/plates/county-line.jpg") 2x
    );
}

.plate-county.has-photo::after {
  opacity: 0.22;
}

.plate-workshop {
  opacity: 0;
  background:
    radial-gradient(ellipse 80% 60% at 40% 50%, rgba(80, 45, 25, 0.45), transparent 70%),
    linear-gradient(180deg, rgba(20, 12, 8, 0.4), rgba(10, 6, 4, 0.85));
}

body.is-workshop .plate-workshop {
  opacity: 1;
}

body.is-workshop .plate-county {
  opacity: 0.35;
}

#atmosphere {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  mix-blend-mode: screen;
  opacity: 0.78;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  #atmosphere {
    opacity: 0.5;
  }
}

.stage-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 6, 4, 0.2), transparent 30%, rgba(10, 6, 4, 0.55) 100%);
  opacity: 0.65;
  transition: opacity 0.8s var(--ease);
}

body.is-film .stage-scrim {
  opacity: 0.9;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(8, 4, 2, 0.55) 100%);
}

/* —— Journey —— */

.journey {
  position: relative;
  z-index: 3;
  padding-bottom: calc(var(--amp-h) + 2rem);
}

.panel {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4.5rem clamp(1.25rem, 4vw, 3.5rem);
}

.panel-hero {
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 6vh;
  padding-bottom: 10vh;
  overflow: clip;
}

/* Soft sky lift so JR has gold to sit in — not a card, just light */
.panel-hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  width: min(920px, 92vw);
  height: min(58vh, 520px);
  background:
    radial-gradient(
      ellipse 75% 70% at 50% 45%,
      rgba(255, 200, 120, 0.22) 0%,
      rgba(200, 140, 70, 0.08) 45%,
      transparent 72%
    );
  pointer-events: none;
  z-index: 0;
}

/* —— Hero lockup (JR back layer) —— */

.hero-lockup {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  margin: 0 auto;
  isolation: isolate;
  padding: 2rem 0 1rem;
}

/* Giant JR — sits in the sky band, luminous against dusk */
.jr-mark {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translate(-50%, -42%);
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.05em, 1.5vw, 0.22em);
  width: 115%;
  max-width: 1100px;
  pointer-events: none;
  user-select: none;
  animation: jr-settle 1.6s var(--ease) 0.15s both;
}

.jr-mark span {
  position: relative;
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(10.5rem, 32vw, 20rem);
  line-height: 0.72;
  letter-spacing: -0.055em;
  color: transparent;
}

/* Solid gold core — must read on the dark jacket */
.jr-mark span i {
  font-style: normal;
  font-weight: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 236, 195, 0.72) 0%,
    rgba(220, 175, 105, 0.58) 45%,
    rgba(180, 130, 70, 0.42) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 200, 120, 0.35))
    drop-shadow(0 4px 28px rgba(0, 0, 0, 0.25));
}

/* Soft-light bloom over the plate sky */
.jr-mark span::after {
  content: "J";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 230, 180, 0.45);
  mix-blend-mode: soft-light;
  -webkit-text-stroke: 1.25px rgba(255, 242, 210, 0.25);
  pointer-events: none;
}

.jr-mark .jr-r::after {
  content: "R";
}

@media (prefers-reduced-motion: reduce) {
  .jr-mark {
    animation: none;
  }

  .jr-mark span i {
    background: rgba(236, 205, 140, 0.7);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

@keyframes jr-settle {
  from {
    opacity: 0;
    transform: translate(-50%, -38%) scale(1.04);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -42%) scale(1);
  }
}

.brand {
  position: relative;
  z-index: 1;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--display);
  font-weight: 700;
  color: var(--cream);
  line-height: 0.9;
  letter-spacing: -0.025em;
  text-shadow:
    0 1px 0 rgba(255, 240, 210, 0.12),
    0 2px 24px rgba(0, 0, 0, 0.45),
    0 8px 48px rgba(0, 0, 0, 0.35);
  animation: brand-in 1.1s var(--ease) 0.35s both;
}

.brand-first {
  font-size: clamp(2.55rem, 7.8vw, 4.85rem);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.brand-last {
  font-size: clamp(4.6rem, 15vw, 9.2rem);
  font-weight: 700;
  margin-top: -0.08em;
}

@keyframes brand-in {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.tagline {
  position: relative;
  z-index: 1;
  margin: 1.25rem 0 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.12rem, 2.5vw, 1.55rem);
  color: var(--wheat);
  letter-spacing: 0.03em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
  animation: brand-in 1.1s var(--ease) 0.5s both;
}

.tagline::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 1px;
  margin: 1.15rem auto 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(201, 166, 107, 0.75),
    transparent
  );
}

.lede {
  position: relative;
  z-index: 1;
  margin: 1.15rem auto 0;
  max-width: 26rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: rgba(240, 230, 212, 0.88);
  text-wrap: balance;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.35);
  animation: brand-in 1.1s var(--ease) 0.62s both;
}

.cta-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 2.15rem;
  animation: brand-in 1.1s var(--ease) 0.75s both;
}

.panel-hero .btn-steel {
  min-width: 9.5rem;
  background:
    linear-gradient(180deg, rgba(220, 170, 100, 0.28), transparent 42%),
    linear-gradient(180deg, #5a3a28, #1a100c);
  border-color: rgba(230, 190, 130, 0.4);
}

.panel-hero .btn-outline {
  min-width: 9.5rem;
  border-color: rgba(240, 230, 212, 0.4);
  backdrop-filter: blur(6px);
  background: rgba(20, 12, 8, 0.28);
}

.scroll-cue {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: 2.85rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(240, 230, 212, 0.5);
  text-decoration: none;
  animation: brand-in 1.1s var(--ease) 0.9s both;
}

.scroll-cue span {
  display: inline-block;
  animation: cue-bob 2.4s var(--ease) 1.4s infinite;
}

@keyframes cue-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(0.28rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand,
  .tagline,
  .lede,
  .cta-row,
  .scroll-cue,
  .scroll-cue span {
    animation: none;
  }
}

.scroll-cue:hover {
  color: var(--wheat);
}

.panel-wide {
  min-height: auto;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.panel-copy {
  min-height: 70vh;
}

.panel-close {
  min-height: 80vh;
  padding-bottom: 8rem;
}

/* —— Type helpers —— */

.eyebrow {
  margin: 0 0 0.65rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wheat);
}

.display {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--cream);
}

.muted {
  color: rgba(240, 230, 212, 0.55);
}

.pull {
  margin: 1.5rem 0 0;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  color: var(--wheat-soft);
  line-height: 1.35;
}

.copy-block {
  max-width: 36rem;
}

.copy-block p {
  margin: 0 0 1rem;
  color: var(--cream-soft);
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

.section-head p:last-child {
  margin: 0;
  color: var(--cream-soft);
}

.section-exit {
  margin-top: 1.75rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-exit a {
  color: var(--wheat);
  text-decoration: none;
}

.section-exit a:hover {
  text-decoration: underline;
}

.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* —— Buttons —— */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(240, 230, 212, 0.28);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 220, 170, 0.08), transparent 45%),
    linear-gradient(180deg, rgba(60, 40, 28, 0.85), rgba(22, 14, 10, 0.95));
  color: var(--cream);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow:
    0 1px 0 rgba(255, 230, 190, 0.1) inset,
    0 10px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(201, 166, 107, 0.55);
  color: var(--wheat-soft);
  outline: none;
}

.btn:focus-visible {
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--focus);
}

.btn-steel {
  background:
    linear-gradient(180deg, rgba(180, 140, 90, 0.2), transparent 40%),
    linear-gradient(180deg, #4a3530, #1e1410);
}

.btn-outline {
  background: transparent;
  box-shadow: none;
}

.btn.is-playing .btn-label::before {
  content: none;
}

@media (max-width: 640px) {
  .jr-mark {
    top: 12%;
    width: 125%;
  }

  .jr-mark span {
    font-size: clamp(8rem, 36vw, 12rem);
  }

  .panel-hero::before {
    top: 12%;
    height: min(48vh, 380px);
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
