/* QuillGear: a horizontal journey through the Pacific Northwest */

:root {
  --card: #fffaf3;
  --card-ink: #16181d;
  --card-soft: #4a4f5a;
  --card-line: rgb(255 255 255 / 0.55);
  --studio: #b5532a;
  --studio-tint: #f7e4d8;
  --industrial: #1f6a85;
  --industrial-tint: #dcebf1;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* scene colors; journey.js blends these as you travel */
  --fg: #14181f;
  --sky-1: #9fb8cf;
  --sky-2: #f6d9c0;
  --far: #a6b3c4;
  --snow: #fdf3ec;
  --ridge: #7d8fa0;
  --forest-far: #4f6866;
  --forest-near: #2b4240;
  --ground: #1d2e2c;
  --mist: #f3e3d6;
  --glow: #ffc977;
}

@media (prefers-color-scheme: dark) {
  :root {
    --card: #151a23;
    --card-ink: #eceae5;
    --card-soft: #a8adb8;
    --card-line: rgb(255 255 255 / 0.12);
    --studio: #e8916a;
    --studio-tint: #3a251c;
    --industrial: #6cc0dc;
    --industrial-tint: #15303a;
  }
}

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

html, body { margin: 0; }

body {
  background: var(--ground);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
svg { display: block; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.45em;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.9rem); }
h3 { font-size: 1.2rem; line-height: 1.25; }
p { margin: 0 0 1em; }

h1 em, h2 em { font-style: italic; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 0.9rem;
}

.lede { font-size: clamp(1.02rem, 1.5vw, 1.2rem); opacity: 0.85; }

.accent-studio { color: var(--studio); }
.accent-industrial { color: var(--industrial); }

/* scene-colored accents need extra pop on the dark half of the journey */
.panel[data-palette="golden"] .lead .accent-studio { color: #a2421d; }
.panel[data-palette="dusk"] .lead .accent-industrial { color: #8fd6ef; }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 68px;
  padding: 0 clamp(16px, 4vw, 48px);
  color: var(--fg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
}

.brand .mark { width: 30px; height: 30px; flex-shrink: 0; }

.nav {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.16);
  border: 1px solid rgb(255 255 255 / 0.28);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
}

.nav a {
  padding: 7px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.8;
}

.nav a:hover { opacity: 1; }

.nav a[aria-current="true"] {
  opacity: 1;
  background: var(--fg);
  color: var(--sky-2);
}

@media (max-width: 640px) {
  .nav .hide-sm { display: none; }
  .nav a { padding: 6px 10px; font-size: 0.82rem; }
  .brand { font-size: 1.1rem; gap: 8px; }
  .brand .mark { width: 26px; height: 26px; }
}

/* ---------- journey mechanics ---------- */

.journey { position: relative; }

.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow-x: auto;   /* without JS, scroll sideways natively */
  overflow-y: hidden;
}

.js .stage {
  position: sticky;
  top: 0;
  overflow: hidden;
}

.world,
.world > * {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sky { background: linear-gradient(var(--sky-1) 0%, var(--sky-2) 78%); }

.stars {
  opacity: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 60%, transparent),
    radial-gradient(1px 1px at 27% 8%, #fff 60%, transparent),
    radial-gradient(1.5px 1.5px at 41% 24%, #fff 60%, transparent),
    radial-gradient(1px 1px at 55% 12%, #fff 60%, transparent),
    radial-gradient(2px 2px at 68% 30%, #fff 60%, transparent),
    radial-gradient(1px 1px at 79% 6%, #fff 60%, transparent),
    radial-gradient(1.5px 1.5px at 88% 20%, #fff 60%, transparent),
    radial-gradient(1px 1px at 6% 36%, #fff 60%, transparent),
    radial-gradient(1px 1px at 34% 40%, #fff 60%, transparent),
    radial-gradient(1.5px 1.5px at 61% 44%, #fff 60%, transparent),
    radial-gradient(1px 1px at 94% 42%, #fff 60%, transparent),
    radial-gradient(1px 1px at 20% 52%, #fff 60%, transparent);
  background-size: 640px 520px;
}

.sun,
.moon {
  inset: auto;
  width: clamp(70px, 9vw, 120px);
  aspect-ratio: 1;
  border-radius: 50%;
  left: 0;
  top: 0;
  will-change: transform;
}

.sun {
  background: radial-gradient(circle, #fff6dc 0 38%, #ffd88f 60%, rgb(255 200 120 / 0) 71%);
  filter: drop-shadow(0 0 40px rgb(255 205 130 / 0.7));
}

.moon {
  width: clamp(44px, 5vw, 70px);
  opacity: 0;
  background: radial-gradient(circle at 38% 38%, #fbf7ee 0 55%, #d9d4c8 70%);
  box-shadow: 0 0 60px 10px rgb(220 230 255 / 0.25);
}

.layers svg {
  position: absolute;
  left: 0;
  bottom: 0;
  will-change: transform;
}

.track {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  width: max-content;
  will-change: transform;
}

/* ---------- panels ---------- */

.panel {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  gap: clamp(24px, 3vw, 40px);
  min-width: 100vw;
  height: 100%;
  padding: calc(68px + clamp(32px, 9vh, 110px)) clamp(20px, 8vw, 120px) 0;
}

.panel.landmark { padding-right: clamp(260px, 42vw, 640px); }

.lead {
  position: relative;
  flex: 0 0 auto;
  width: min(560px, 84vw);
  text-shadow: 0 1px 24px color-mix(in srgb, var(--sky-2) 55%, transparent);
}

#home .lead { width: min(640px, 86vw); }
#northwest .lead { width: min(620px, 84vw); margin-left: 4vw; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  text-shadow: none;
  transition: transform 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--fg); color: var(--sky-2); }
.btn.ghost { border: 1.5px solid var(--fg); }

.scroll-hint {
  position: absolute;
  right: clamp(20px, 6vw, 90px);
  top: 50%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.scroll-hint svg { width: 48px; animation: nudge 1.6s ease-in-out infinite; }

@keyframes nudge {
  50% { transform: translateX(10px); }
}

@media (max-width: 760px) {
  .scroll-hint { top: auto; bottom: 26vh; right: 20px; }
}

/* ---------- cards ---------- */

.cards {
  display: flex;
  align-items: stretch;
  gap: 18px;
  flex: 0 0 auto;
  margin-top: clamp(0px, 4vh, 48px);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: 270px;
  min-height: 230px;
  padding: 26px;
  border-radius: 20px;
  color: var(--card-ink);
  background: color-mix(in srgb, var(--card) 80%, transparent);
  border: 1px solid var(--card-line);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 20px 50px -24px rgb(0 0 0 / 0.45);
  text-decoration: none;
  transition: transform 0.2s ease;
}

.card.wide { width: 380px; }
.card p { color: var(--card-soft); font-size: 0.95rem; margin: 0; }
.card h3 { margin-bottom: 0.5em; }

a.card:hover { transform: translateY(-6px); }

.card .num {
  font-family: var(--serif);
  font-size: 1rem;
  opacity: 0.7;
  margin-bottom: auto;
  padding-bottom: 28px;
}

.tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: auto;
}

.tag + h3 { margin-top: 28px; }

.company.studio .tag, .tag.studio { background: var(--studio-tint); color: var(--studio); }
.company.industrial .tag { background: var(--industrial-tint); color: var(--industrial); }

.company .more { margin-top: 18px; font-weight: 600; font-size: 0.95rem; }
.company.studio .more { color: var(--studio); }
.company.industrial .more { color: var(--industrial); }

.card.link { justify-content: flex-end; min-height: 160px; align-self: flex-end; }
.card.link .label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--card-soft);
}
.card.link .addr { font-weight: 600; font-size: 1.05rem; overflow-wrap: anywhere; }

.fineprint {
  position: absolute;
  left: clamp(20px, 8vw, 120px);
  bottom: 4vh;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* short screens: tighten so cards stay above the forest */
@media (max-height: 760px) {
  .panel { padding-top: calc(68px + 4vh); }
  .card { min-height: 200px; padding: 22px; }
  .lede { font-size: 1rem; }
}

@media (max-width: 760px) {
  .cards { margin-top: 0; }
  .card { width: 240px; }
  .panel { flex-wrap: nowrap; }
}

/* ---------- progress ---------- */

.progress {
  position: absolute;
  z-index: 5;
  left: clamp(16px, 4vw, 48px);
  right: clamp(16px, 4vw, 48px);
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #f4f1ec;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-label { white-space: nowrap; min-width: 9.5em; }
.progress-label b { font-family: var(--serif); font-size: 1rem; margin-right: 6px; }

.progress-bar {
  flex: 1;
  height: 2px;
  background: rgb(255 255 255 / 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: #f4f1ec;
  transform-origin: left;
  transform: scaleX(0);
}

html:not(.js) .progress { display: none; }

@media (prefers-reduced-motion: reduce) {
  .scroll-hint svg { animation: none; }
  .card, .btn { transition: none; }
}

:root { --halo: 0.2; --water: #9db4c4; --water-hi: #e9eef0; }

.ferry .bob { animation: bob 3.2s ease-in-out infinite; }

@keyframes bob {
  50% { transform: translateY(1.5px); }
}

.beacon { animation: blink 2.4s steps(1) infinite; }

@keyframes blink {
  50% { opacity: 0.15; }
}

@media (prefers-reduced-motion: reduce) {
  .beacon, .ferry .bob { animation: none; }
}
