/* URSI Hub — newsroom landing (light/dark via data-theme) */
:root {
  --bg: #fafbfc;
  --surface: #ffffff;
  --text: #1a2332;
  --text-muted: #5c6678;
  --navy: #0f2744;
  --navy-soft: #1e3a5f;
  --accent: #c41e3a;
  --accent-hover: #a01830;
  --border: #e2e6ec;
  --shadow: rgba(15, 39, 68, 0.08);
  --ticker-bg: #0f2744;
  --ticker-text: #f0f3f7;
  --transition-theme: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #161b22;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --navy: #c9d1d9;
  --navy-soft: #8b949e;
  --border: #30363d;
  --shadow: rgba(0, 0, 0, 0.35);
  --ticker-bg: #161b22;
  --ticker-text: #e6edf3;
}

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

html {
  scroll-behavior: smooth;
}

body.legal-subpage {
  padding-top: 0;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  transition: var(--transition-theme);
  padding-top: 40px;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, .font-serif {
  font-family: "Source Serif Pro", Georgia, serif;
  font-weight: 600;
}

/* ---- Live ticker (sticky) ---- */
.news-ticker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--ticker-bg);
  color: var(--ticker-text);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  overflow: hidden;
  border-bottom: 2px solid var(--accent);
  transition: background-color 0.35s ease, color 0.35s ease;
}

.news-ticker__track {
  display: flex;
  width: max-content;
  animation: ticker-marquee 45s linear infinite;
  padding: 10px 0;
}

.news-ticker__track:hover {
  animation-play-state: paused;
}

.news-ticker__item {
  padding: 0 3rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.news-ticker__item::before {
  content: "●";
  color: var(--accent);
  margin-right: 0.75rem;
  font-size: 0.5rem;
  vertical-align: middle;
}

@keyframes ticker-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 40px;
  z-index: 900;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: var(--transition-theme);
}

.site-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
}

.logo-link:hover {
  text-decoration: none;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: "Source Serif Pro", Georgia, serif;
  font-weight: 700;
  font-size: 1.35rem;
  position: relative;
  flex-shrink: 0;
}

[data-theme="dark"] .logo-mark {
  background: var(--surface);
  border: 2px solid var(--accent);
  color: var(--accent);
}

.logo-waves {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 18px;
}

.logo-waves span {
  width: 3px;
  background: var(--accent);
  border-radius: 1px;
  animation: wave 1.2s ease-in-out infinite;
}

.logo-waves span:nth-child(1) { height: 8px; animation-delay: 0s; }
.logo-waves span:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.logo-waves span:nth-child(3) { height: 10px; animation-delay: 0.3s; }
.logo-waves span:nth-child(4) { height: 16px; animation-delay: 0.45s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.85); opacity: 0.85; }
  50% { transform: scaleY(1.15); opacity: 1; }
}

.logo-text {
  font-family: "Source Serif Pro", Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo-tag {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-main a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-main a:hover {
  color: var(--accent);
}

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-main {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
    display: none;
  }
  .nav-main.is-open { display: flex; }
}

/* ---- Hero ---- */
.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 2rem;
  }
  .hero__cta-row { justify-content: center; }
  .hero__mock { justify-self: center; }
}

.hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.cycling-headline {
  position: relative;
  min-height: 5.5rem;
  margin: 0 0 1rem;
}

.cycling-headline span {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  font-family: "Source Serif Pro", Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
}

[data-theme="dark"] .cycling-headline span {
  color: var(--text);
}

.cycling-headline span.is-visible {
  opacity: 1;
}

.hero__lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 32rem;
  margin: 0 0 1.5rem;
}

.hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.hero__trust {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.hero__mock {
  position: relative;
  width: min(280px, 90vw);
  justify-self: end;
}

.phone-frame {
  background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
  border-radius: 36px;
  padding: 12px;
  box-shadow:
    0 24px 48px var(--shadow),
    inset 0 1px 0 rgba(255,255,255,0.12);
}

.phone-notch {
  height: 22px;
  background: #000;
  border-radius: 18px 18px 0 0;
  margin: -4px -4px 0;
}

.phone-screen {
  background: var(--surface);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 420px;
}

.phone-screen-inner {
  padding: 10px;
  font-size: 0.58rem;
  line-height: 1.35;
  color: var(--text);
}

.phone-columns {
  column-count: 3;
  column-gap: 8px;
  column-rule: 1px solid var(--border);
}

.phone-columns h4 {
  font-family: "Source Serif Pro", Georgia, serif;
  margin: 0 0 4px;
  font-size: 0.62rem;
  break-inside: avoid;
}

.phone-columns p {
  margin: 0 0 6px;
  color: var(--text-muted);
}

.phone-columns .byline {
  font-style: italic;
  font-size: 0.5rem;
  color: var(--accent);
  margin-bottom: 8px;
}

/* ---- Sections ---- */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.section__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
  color: var(--navy);
}

[data-theme="dark"] .section__title {
  color: var(--text);
}

.section__subtitle {
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 560px;
}

/* ---- How it works ---- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .steps-grid { grid-template-columns: 1fr; }
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: var(--transition-theme), transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
  box-shadow: 0 12px 32px var(--shadow);
}

.step-num {
  width: 36px;
  height: 36px;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

[data-theme="dark"] .step-num {
  background: var(--accent);
  color: #fff;
}

.step-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.step-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ---- Features ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.feature-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  transition: var(--transition-theme);
}

.feature-pill strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--navy);
}

[data-theme="dark"] .feature-pill strong {
  color: var(--text);
}

.feature-pill span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---- Multi-step form ---- */
.signup-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 560px;
  margin: 0 auto;
  transition: var(--transition-theme);
}

.signup-progress {
  margin-bottom: 1.5rem;
}

.signup-progress__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.signup-progress__bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.signup-progress__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 33.33%;
  transition: width 0.35s ease;
}

.form-step {
  display: none;
}

.form-step.is-active {
  display: block;
}

.form-step label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.form-step input[type="email"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.topic-grid label.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 400;
  cursor: pointer;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
}

.topic-grid label.checkbox-label:hover {
  border-color: var(--accent);
}

.freq-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  margin-bottom: 0.65rem;
  cursor: pointer;
}

.form-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

.form-success {
  text-align: center;
  padding: 2rem 1rem;
  display: none;
}

.form-success.is-visible {
  display: block;
}

/* ---- Newspaper preview ---- */
.newspaper-wrap {
  background: #f5f2eb;
  color: #1a1a1a;
  border: 1px solid #c4bfb5;
  border-radius: 4px;
  padding: 1.5rem 1.75rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
}

[data-theme="dark"] .newspaper-wrap {
  background: #252019;
  color: #eae6dc;
  border-color: #4a4338;
}

.newspaper-masthead {
  text-align: center;
  border-bottom: 3px double #1a1a1a;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

[data-theme="dark"] .newspaper-masthead {
  border-bottom-color: #eae6dc;
}

.newspaper-masthead h2 {
  font-family: "Source Serif Pro", Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

.newspaper-meta {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.35rem;
  opacity: 0.85;
}

.newspaper-columns {
  column-count: 3;
  column-gap: 1.75rem;
  column-rule: 1px solid rgba(0,0,0,0.2);
  font-size: 0.875rem;
  line-height: 1.5;
}

[data-theme="dark"] .newspaper-columns {
  column-rule-color: rgba(255,255,255,0.2);
}

.newspaper-columns .lead-story {
  break-inside: avoid;
  margin-bottom: 1rem;
}

.newspaper-columns h3 {
  font-family: "Source Serif Pro", Georgia, serif;
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.newspaper-columns .deck {
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.newspaper-columns .byline {
  font-style: italic;
  font-size: 0.75rem;
  margin: 0.35rem 0 0.65rem;
  opacity: 0.85;
}

.newspaper-columns p {
  margin: 0 0 0.65rem;
  text-align: justify;
  hyphens: auto;
}

.newspaper-disclaimer {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0,0,0,0.15);
  font-size: 0.65rem;
  text-align: center;
  font-style: italic;
}

[data-theme="dark"] .newspaper-disclaimer {
  border-top-color: rgba(255,255,255,0.15);
}

@media (max-width: 768px) {
  .newspaper-columns {
    column-count: 1;
    column-rule: none;
  }
}

/* ---- Pricing ---- */
.pricing-toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.plan-switch {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}

.plan-switch button {
  border: none;
  background: transparent;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  color: var(--text-muted);
}

.plan-switch button.is-active {
  background: var(--navy);
  color: #fff;
}

[data-theme="dark"] .plan-switch button.is-active {
  background: var(--accent);
  color: #fff;
}

.billing-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.switch {
  position: relative;
  width: 48px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s;
}

.slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
}

.switch input:checked + .slider {
  background: var(--accent);
}

.switch input:checked + .slider::before {
  transform: translateX(22px);
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .pricing-cards { grid-template-columns: 1fr; }
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  transition: var(--transition-theme);
}

.price-card--featured {
  border-color: var(--accent);
  box-shadow: 0 8px 28px var(--shadow);
}

.price-card h3 {
  margin: 0 0 0.25rem;
}

.price-card .price {
  font-size: 2rem;
  font-weight: 700;
  font-family: "Source Serif Pro", Georgia, serif;
  margin: 0.75rem 0;
}

.price-card .price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.price-card ul {
  margin: 1rem 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.price-card li {
  margin-bottom: 0.4rem;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--navy);
  color: #e8ecf1;
  padding: 3rem 1.25rem 2rem;
  margin-top: 2rem;
  transition: background-color 0.35s ease;
}

[data-theme="dark"] .site-footer {
  background: #0d1117;
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: #fff;
  opacity: 0.9;
}

.site-footer a:hover {
  color: #ffb4be;
}

.footer-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand .logo-text {
  color: #fff;
}

.footer-brand p {
  font-size: 0.875rem;
  opacity: 0.85;
  margin-top: 0.75rem;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 1rem;
  opacity: 0.7;
}

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

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-contact address {
  font-style: normal;
  font-size: 0.875rem;
  line-height: 1.6;
}

.social-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-row a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  text-decoration: none;
}

.social-row a:hover {
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

.theme-toggle-footer {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.theme-toggle-footer button {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}

.theme-toggle-footer button:hover {
  background: rgba(255,255,255,0.2);
}

.footer-bottom {
  max-width: 1120px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.8125rem;
  text-align: center;
  opacity: 0.75;
}

.disclaimer-strip {
  max-width: 1120px;
  margin: 0 auto 1.5rem;
  padding: 1rem 1.25rem;
  font-size: 0.75rem;
  line-height: 1.5;
  opacity: 0.85;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
}

/* ---- Cookie banner ---- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
  box-shadow: 0 -8px 32px var(--shadow);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  transition: var(--transition-theme);
}

.cookie-banner.is-visible {
  display: flex;
}

.cookie-banner p {
  margin: 0;
  flex: 1;
  min-width: 200px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.cookie-banner .cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ---- Scroll animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-inview {
  opacity: 1;
  transform: translateY(0);
}
