/* Signed-out landing page (views/landing.erb). Loaded after style.css, so
   it reuses that file's color tokens, type scale and the .auth-card form
   styles inside the Log in / Join modal. */

body.landing {
  display: block;
  height: auto;
  min-height: 100%;
  overflow: auto;
  line-height: 1.5;
}

.landing main { overflow-x: hidden; }

.landing h1,
.landing h2,
.landing h3 {
  font-family: Georgia, "Iowan Old Style", serif;
  line-height: 1.15;
  color: var(--ink);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn--lg { padding: 0.75rem 1.35rem; font-size: var(--text-base); }

.btn--gold { background: var(--gold); color: var(--on-accent); }
.btn--gold:hover { background: var(--gold-dark); }

/* Sign out is a form button (POST /logout), so undo style.css's button look. */
button.btn {
  margin: 0;
  font-family: inherit;
  line-height: inherit;
  cursor: pointer;
  box-shadow: none;
}

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--parchment-dark); }

.btn--outline { border-color: var(--border); background: var(--surface); color: var(--ink); }
.btn--outline:hover { border-color: var(--route); color: var(--route); }

.btn--on-dark { border-color: rgba(246, 241, 231, 0.45); color: #f6f1e7; }
.btn--on-dark:hover { background: rgba(246, 241, 231, 0.12); }

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

.landing-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--parchment) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--ink);
  text-decoration: none;
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: var(--text-lg);
  font-weight: 700;
}

.landing-nav { display: flex; gap: 1.25rem; }
.landing-nav a {
  color: var(--muted-strong);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}
.landing-nav a:hover { color: var(--route); }

.landing-header__actions {
  margin-left: auto;
  display: flex;
  gap: var(--space-3);
}
.landing-header__signout { display: contents; }

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) clamp(16px, 4vw, 48px);
}

.eyebrow {
  margin: 0 0 var(--space-4);
  color: var(--route);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero__lede {
  max-width: 34rem;
  margin: 1.25rem 0 1.75rem;
  color: var(--muted-strong);
  font-size: var(--text-lg);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.hero__fine {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}
.hero__fine a { color: var(--route); font-weight: 600; }

/* Illustration: a stylized version of the app's map view. */
.hero__art {
  position: relative;
  margin: 0;
}

.route-art {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(27, 36, 48, 0.16), 0 2px 6px rgba(27, 36, 48, 0.1);
}
.route-art__ground { fill: var(--parchment-dark); }
.route-art__contours path { stroke: var(--border); stroke-width: 1.5; }
.route-art__band {
  stroke: var(--gold);
  stroke-opacity: 0.22;
  stroke-width: 64;
  stroke-linecap: round;
}
.route-art__casing { stroke: var(--ink); stroke-width: 13; stroke-linecap: round; }
.route-art__road { stroke: var(--route); stroke-width: 9; stroke-linecap: round; }
.route-art__dash { stroke: var(--parchment); stroke-width: 1.5; stroke-dasharray: 6 7; }
/* Pins are <use> copies of #pin, whose shadow trees CSS selectors can't
   reach -- so colors are set on the group and inherited (dot = color). */
.route-art__pin { stroke-width: 2; }
.route-art__pin--near { fill: var(--gold); stroke: var(--ink); color: var(--ink); }
.route-art__pin--far { fill: var(--fainter); stroke: var(--faint); color: var(--faint); }
.route-art__ring {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
  transform: translateY(-22px);
}
.route-art__stop { fill: var(--surface); stroke: var(--ink); stroke-width: 4; }
.route-art__stop--end { fill: var(--gold); }

.hero__card {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.65rem 0.9rem;
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-float);
  font-size: var(--text-sm);
}
.hero__card strong { color: var(--ink); }
.hero__card span { color: var(--muted); font-size: var(--text-xs); }
.hero__card .hero__card-label {
  color: var(--route);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: var(--text-2xs);
}
.hero__card--route { top: 6%; left: -4%; }
.hero__card--near { right: -3%; bottom: 8%; border-left: 4px solid var(--gold); }

/* ---------- Sections ---------- */

.compare,
.steps {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(16px, 4vw, 48px);
}

.compare h2,
.steps h2,
.cta-band h2 {
  margin: 0 auto 2.25rem;
  max-width: 40rem;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  text-align: center;
  text-wrap: balance;
}

.compare__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.compare__col {
  padding: 1.5rem 1.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.compare__col h3 { margin: 0 0 1rem; font-size: var(--text-lg); }
.compare__col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.7rem; }
.compare__col li {
  position: relative;
  padding-left: 1.9rem;
  font-size: var(--text-md);
}
.compare__col li::before {
  position: absolute;
  left: 0;
  top: 0.05em;
  display: grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  font-size: var(--text-xs);
  font-weight: 700;
}

.compare__col--before { background: var(--surface); color: var(--muted-strong); }
.compare__col--before li::before { content: "✕"; background: var(--danger-soft); color: var(--danger); }

.compare__col--after { background: var(--route-soft); border-color: var(--route); }
.compare__col--after li::before { content: "✓"; background: var(--route); color: #fff; }

.steps__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  padding: 1.5rem;
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}
.step__num {
  color: var(--route);
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.step__icon {
  display: block;
  width: 2.4rem;
  height: 2.4rem;
  margin: 0.8rem 0 0.6rem;
  padding: 0.5rem;
  border-radius: 10px;
  background: var(--map-accent-soft);
  color: var(--gold-dark);
}
.step h3 { margin: 0 0 0.25rem; font-size: var(--text-xl); }
.step p { margin: 0 0 0.75rem; color: var(--muted-strong); font-size: var(--text-md); }
.step ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: var(--text-sm);
  display: grid;
  gap: 0.3rem;
}

/* The one deliberately dark block -- fixed colors, so it stays a dark band
   in both themes. */
.cta-band {
  margin: clamp(1rem, 4vw, 2.5rem) clamp(16px, 4vw, 48px) 0;
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  border-radius: 16px;
  background: #1b2430;
  text-align: center;
}
.landing .cta-band h2 { margin-bottom: 1.5rem; color: #f6f1e7; }
.cta-band .hero__ctas { justify-content: center; }

.landing-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 1.75rem clamp(16px, 4vw, 48px);
  color: var(--muted);
  font-size: var(--text-xs);
}

/* ---------- Log in / Join modal ---------- */

.auth-modal {
  width: min(400px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-warm);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  overflow: auto;
}
.auth-modal::backdrop {
  background: rgba(27, 36, 48, 0.55);
  backdrop-filter: blur(2px);
}

.auth-modal__close-form { position: absolute; top: 0.6rem; right: 0.6rem; margin: 0; }
.auth-modal__close {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}
.auth-modal__close:hover { background: var(--parchment-dark); color: var(--ink); }
.auth-modal__close svg { width: 1.1rem; height: 1.1rem; }

.auth-modal__title {
  margin: 0 0 1rem;
  font-size: var(--text-xl);
  text-align: center;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  padding: 0.25rem;
  border-radius: 8px;
  background: var(--parchment-dark);
}
.auth-tabs a {
  padding: 0.45rem;
  border-radius: 6px;
  color: var(--muted-strong);
  font-size: var(--text-sm);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.auth-tabs a[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

/* The panes reuse .auth-card for their form styling, minus the card box. */
.auth-modal .auth-card {
  max-width: none;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}
.auth-modal .stacked-form { gap: 0.8rem; }

.auth-modal [data-pane-title],
.auth-modal [data-auth-pane] { display: none; }
.auth-modal[data-mode="login"] [data-pane-title="login"],
.auth-modal[data-mode="signup"] [data-pane-title="signup"] { display: inline; }
.auth-modal[data-mode="login"] [data-auth-pane="login"],
.auth-modal[data-mode="signup"] [data-auth-pane="signup"] { display: block; }

/* ---------- Narrow screens ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero__card--route { left: 3%; }
  .hero__card--near { right: 3%; }
  .steps__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .landing-nav { display: none; }
  .landing-header { gap: var(--space-3); }
  .landing-brand span { display: none; }
  .compare__grid,
  .steps__list { grid-template-columns: 1fr; }
  .hero__card { font-size: var(--text-xs); padding: 0.5rem 0.7rem; }
  .hero__card--route { top: 3%; }
}
