/* HighSpeedRail.TV Styles
   Brand colors matching hsr.fyi: Coral/Salmon, Dark Teal, Cream backgrounds
*/

:root {
  /* Primary colors - matching hsr.fyi */
  --coral: #b34e33;
  --coral-dark: #994228;
  --coral-light: #fdf0ed;
  --coral-on-dark: #f4a58e;
  --teal: #1b4d4a;
  --teal-light: #2a6b67;
  --cream: #fffbf7;
  --cream-dark: #f5ede6;

  /* Neutrals */
  --text-primary: #2d3436;
  --text-secondary: #636e72;
  --text-light: #b2bec3;
  --border: #e8e0d8;
  --white: #ffffff;

  /* Typography */
  --font-sans:
    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  /* Layout */
  --container-width: 1140px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4.5rem;
  --spacing-3xl: 6rem;

  /* Borders & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--teal-light);
}

img {
  max-width: 100%;
  height: auto;
}

/* Container */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* Header */
.site-header {
  background: var(--teal);
  padding: var(--spacing-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.01em;
}

.logo:hover {
  color: var(--white);
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.logo-icon svg {
  display: block;
}

.logo-tv {
  color: var(--coral-on-dark);
}

.logo-arrow {
  display: flex;
  align-items: center;
  color: var(--coral-on-dark);
  margin-left: 0.25rem;
}

.main-nav {
  display: flex;
  gap: var(--spacing-xs);
  align-items: center;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.9rem;
  border-radius: 100px;
  transition: all 0.2s ease;
}

.main-nav a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

/* Shared newsletter callout has no form or background image. */
.subscribe-cta {
  position: relative;
  text-align: center;
  margin-top: var(--spacing-2xl);
}
.subscribe-cta-content {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.subscribe-cta-content h2 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 0.75rem;
}

.subscribe-cta-content > p {
  font-style: italic;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 var(--spacing-lg);
}

/* Footer */
.site-footer {
  background: var(--teal);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--spacing-2xl) 0 var(--spacing-xl);
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-brand {
  padding-right: var(--spacing-lg);
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: var(--spacing-sm);
}

.footer-logo:hover {
  color: var(--white);
}

.footer-brand p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 var(--spacing-md);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.6rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
  color: var(--white);
  font-weight: 500;
}

.footer-bottom a:hover {
  opacity: 0.8;
}

.footer-support-link {
  color: var(--coral-on-dark) !important;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl) var(--spacing-lg);
  }

  .footer-brand {
    grid-column: 1 / -1;
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
}

/* Network Banner */
.network-banner {
  background: #151515;
  padding: 0.85rem 0;
  text-align: center;
}

.network-banner a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.network-banner a:hover {
  color: var(--white);
}

.network-banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.network-banner-icon svg {
  display: block;
}

/* Travel additions retain the .tv palette and spacing without external fonts.
   Shared layouts use these rules; system type keeps the preview self-contained. */
:root {
  --font-sans: system-ui, sans-serif;
  --font-serif: Georgia, serif;
}
.site-main {
  padding-top: 3rem;
  padding-bottom: 4rem;
}
.prose {
  max-width: 48rem;
  margin: auto;
}
.prose h1,
.travel-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.15;
}
.prose h2 {
  margin-top: 2rem;
}
.prose p,
.prose li {
  margin-bottom: 1rem;
}
.prose a,
.newsletter-link,
.guide-card a {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.prose a {
  overflow-wrap: anywhere;
}
.eyebrow {
  color: var(--coral);
  font-weight: 700;
}
.quick-answer {
  background: var(--cream-dark);
  border-left: 4px solid var(--coral);
  padding: 1rem 1.5rem;
  border-radius: 8px;
}
.quick-answer h2 {
  margin-top: 0;
}
.travel-hero {
  max-width: 48rem;
  margin: 0 auto 3rem;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.guide-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
}
.site-footer h2 {
  font-size: 1.2rem;
  color: white;
}
.site-footer ul {
  list-style: none;
  padding: 0;
}
.site-footer li {
  margin-bottom: 0.7rem;
}
a {
  min-height: 24px;
  display: inline-block;
}
:focus-visible {
  outline: 3px solid #b34e33;
  outline-offset: 4px;
}
.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: #ffcf70;
}
.skip-link {
  position: absolute;
  top: -6rem;
  left: 1rem;
  z-index: 200;
  padding: 0.7rem;
  background: white;
  color: #1b4d4a;
}
.skip-link:focus {
  top: 1rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.subscribe-cta {
  background: #1b4d4a;
  padding: 2rem 1rem;
}
.subscribe-cta-content {
  position: relative;
}
.newsletter-link {
  color: #fff;
}
/* Wrap cell text instead of scrolling, so the table never needs a keyboard-unreachable scroll area (WCAG 2.1.1). */
.prose table {
  width: 100%;
  border-collapse: collapse;
}
.prose th,
.prose td {
  padding: 0.65rem;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
@media (max-width: 700px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .site-header .container {
    flex-direction: column;
    gap: 1rem;
  }
  .logo-text {
    font-size: 1.35rem;
  }
  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --cream: #142b2a;
    --cream-dark: #203f3d;
    --white: #ffffff;
    --text-primary: #f7f2eb;
    --text-secondary: #d1d9d7;
    --border: #65817d;
    --coral: #f4a58e;
    --teal: #b5e1d8;
    --teal-light: #d8f4ed;
  }
  .site-header,
  .site-footer {
    background: #123c39;
  }
  a {
    color: #b5e1d8;
  }
  .eyebrow {
    color: #f4a58e;
  }
  :focus-visible {
    outline-color: #ffcf70;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-color-scheme: dark) {
  .guide-card {
    background: #203f3d;
  }
}
