/* ============================================================
   Commute Union — style.css
   ============================================================ */

:root {
  /* Colors */
  --navy: #0f2c4d;
  --navy-700: #16375f;
  --navy-100: #e7edf5;
  --green: #1f9d67;
  --green-600: #178a5a;
  --green-100: #e4f4ec;
  --gray-50: #f6f8fa;
  --gray-100: #eef1f5;
  --gray-200: #e2e7ee;
  --gray-400: #9aa6b5;
  --gray-600: #5b6775;
  --ink: #14202e;
  --white: #ffffff;

  /* Tokens */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 44, 77, 0.06), 0 1px 3px rgba(15, 44, 77, 0.05);
  --shadow-md: 0 6px 18px rgba(15, 44, 77, 0.08);
  --shadow-lg: 0 20px 45px rgba(15, 44, 77, 0.14);
  --maxw: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background: var(--white);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0 0 1rem;
  color: var(--gray-600);
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  z-index: 200;
  background: var(--navy);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* Focus visibility for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container-narrow {
  max-width: 780px;
}

.section {
  padding: 5rem 0;
}
.section-alt {
  background: var(--gray-50);
}

.section-head {
  max-width: 640px;
  margin: 0 auto 2.75rem;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-600);
  margin: 0 0 0.75rem;
}
.eyebrow-on-dark {
  color: #7fe3b4;
}

.accent {
  color: var(--green);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}
.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--navy-700);
}
.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--gray-200);
}
.btn-secondary:hover {
  border-color: var(--navy);
}
.btn-accent {
  background: var(--green);
  color: var(--white);
}
.btn-accent:hover {
  background: var(--green-600);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--gray-100);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--white);
}
.brand-name {
  font-size: 1.1rem;
}

.main-nav {
  display: flex;
  align-items: center;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--gray-600);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-links a:hover {
  color: var(--navy);
  background: var(--gray-100);
}
.nav-cta a {
  color: var(--white);
}
.nav-cta a:hover {
  color: var(--white);
  background: var(--navy-700);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  width: 20px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 3rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.2vw, 3.5rem);
  font-weight: 800;
}
.lead {
  font-size: 1.15rem;
  color: var(--gray-600);
  max-width: 34ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 1rem;
}
.hero-note {
  font-size: 0.9rem;
  color: var(--gray-400);
  margin: 0;
}
.hero-media img {
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  filter: drop-shadow(0 24px 48px rgba(15, 44, 77, 0.12));
  animation: floatIn 0.7s ease both;
}
@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Why ---------- */
.why-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: start;
}
.why-copy h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.35rem);
}
.why-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.why-highlights li {
  display: flex;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.why-highlights h3 {
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}
.why-highlights p {
  margin: 0;
  font-size: 0.95rem;
}
.hl-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--green-100);
  color: var(--green-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hl-icon svg {
  width: 22px;
  height: 22px;
}

/* ---------- Cards (shared) ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  counter-reset: step;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--navy-100);
  color: var(--navy);
  font-weight: 800;
  margin-bottom: 1rem;
}
.step h3 {
  font-size: 1.1rem;
}
.step p {
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--navy-100);
  color: var(--navy);
  margin-bottom: 1rem;
}
.feature-icon svg {
  width: 24px;
  height: 24px;
}
.feature h3 {
  font-size: 1.15rem;
}
.feature p {
  margin: 0;
}
.feature-wide {
  grid-column: 1 / -1;
}

/* ---------- Pricing ---------- */
.pricing-inner {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 3rem;
  align-items: center;
}
.pricing-copy h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.35rem);
}
.disclaimer {
  font-size: 0.9rem;
  color: var(--gray-400);
  border-left: 3px solid var(--gray-200);
  padding-left: 0.9rem;
}
.pricing-table-wrap {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.pricing-table {
  width: 100%;
  border-collapse: collapse;
}
.pricing-table th,
.pricing-table td {
  text-align: left;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
}
.pricing-table thead th {
  background: var(--navy);
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.pricing-table tbody th {
  font-weight: 600;
  color: var(--ink);
}
.pricing-table tbody td {
  font-weight: 800;
  color: var(--green-600);
  font-size: 1.1rem;
}
.pricing-table tbody tr:last-child th,
.pricing-table tbody tr:last-child td {
  border-bottom: 0;
}
.pricing-table tbody tr:hover {
  background: var(--green-100);
}

/* ---------- Waitlist ---------- */
.waitlist {
  padding: 4rem 0;
}
.waitlist-card {
  background: var(--navy);
  color: var(--white);
  border-radius: 24px;
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.waitlist-card h2 {
  color: var(--white);
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
}
.waitlist-lead {
  color: #c6d4e5;
  max-width: 52ch;
  margin: 0 auto 1.75rem;
}
.waitlist-form {
  max-width: 480px;
  margin: 0 auto;
}
.field {
  display: flex;
  gap: 0.6rem;
}
.waitlist-form input {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
  color: var(--ink);
}
.waitlist-form input::placeholder {
  color: var(--gray-400);
}
.waitlist-form input[aria-invalid="true"] {
  outline: 3px solid #ff8a8a;
  outline-offset: 1px;
}

.form-message {
  min-height: 1.25rem;
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  font-weight: 500;
}
.waitlist-form .form-message {
  color: #7fe3b4;
}
.form-message.is-error {
  color: #ffb4b4 !important;
}
.contact-form .form-message {
  color: var(--green-600);
}
.contact-form .form-message.is-error {
  color: #c0392b !important;
}

/* ---------- FAQ ---------- */
.faq-list {
  display: grid;
  gap: 0.75rem;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item h3 {
  margin: 0;
}
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 1.1rem 1.25rem;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--navy);
  font-family: inherit;
}
.faq-trigger:hover {
  background: var(--gray-50);
}
.faq-icon {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: var(--green-600);
  border-radius: 2px;
  transition: transform 0.2s ease;
}
.faq-icon::before {
  top: 8px;
  left: 0;
  width: 18px;
  height: 2px;
}
.faq-icon::after {
  top: 0;
  left: 8px;
  width: 2px;
  height: 18px;
}
.faq-trigger[aria-expanded="true"] .faq-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}
.faq-panel {
  padding: 0 1.25rem 1.2rem;
}
.faq-panel p {
  margin: 0;
}

/* ---------- Contact ---------- */
.contact-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: start;
}
.contact-copy h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.35rem);
}
.contact-email {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 700;
  color: var(--green-600);
}
.contact-email:hover {
  text-decoration: underline;
}
.contact-form {
  display: grid;
  gap: 1rem;
}
.field-block {
  display: grid;
  gap: 0.4rem;
}
.field-block label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--green);
}
.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
  border-color: #c0392b;
}
.contact-form .btn {
  justify-self: start;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #c6d4e5;
  padding-top: 3rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 2rem;
}
.brand-footer {
  color: var(--white);
}
.brand-footer .brand-mark {
  background: var(--white);
  color: var(--navy);
}
.footer-tagline {
  margin: 0.75rem 0 0;
  color: #9fb4cc;
  max-width: 34ch;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-links a {
  color: #c6d4e5;
  font-size: 0.95rem;
}
.footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.25rem 1.25rem;
}
.footer-bottom p {
  margin: 0;
  font-size: 0.88rem;
  color: #8fa6bf;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner,
  .why-inner,
  .pricing-inner,
  .contact-inner {
    grid-template-columns: 1fr;
  }
  .hero-media {
    order: -1;
  }
  .hero-media img {
    max-width: 400px;
  }
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .why-inner {
    gap: 2rem;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 3.5rem 0;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
    box-shadow: var(--shadow-md);
    padding: 0.75rem 1.25rem 1.25rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }
  .nav-links.open {
    max-height: 460px;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    padding: 0.7rem 0.75rem;
  }
  .nav-cta {
    margin-top: 0.35rem;
  }
  .nav-cta a {
    text-align: center;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .steps {
    grid-template-columns: 1fr;
  }
  .field {
    flex-direction: column;
  }
  .waitlist-form .btn {
    width: 100%;
  }
}

/* ---------- Legal pages (Privacy / Terms) ---------- */
.legal-hero {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 3.5rem 0 2.5rem;
}
.legal-hero .eyebrow {
  color: var(--green);
}
.legal-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.5rem;
}
.legal-updated {
  color: var(--gray-400);
  font-size: 0.9rem;
  margin: 0;
}
.legal-body {
  padding: 3rem 0 4rem;
}
.legal-content {
  max-width: 760px;
}
.legal-content .legal-intro {
  font-size: 1.05rem;
  color: var(--gray-600);
}
.legal-content h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 0.75rem;
}
.legal-content h2:first-of-type {
  margin-top: 0.5rem;
}
.legal-content h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
}
.legal-content ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--gray-600);
}
.legal-content li {
  margin-bottom: 0.5rem;
}
.legal-content a {
  color: var(--green-600);
  font-weight: 500;
}
.legal-note {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--green-100);
  border-left: 4px solid var(--green);
  border-radius: var(--radius-sm);
}
.legal-note p {
  margin: 0;
  color: var(--navy-700);
  font-size: 0.95rem;
}
