:root {
  --bg: #060a10;
  --bg-alt: #0c121c;
  --surface: #101822;
  --surface-2: #162030;
  --ink: #e8f2f8;
  --muted: #7a8f9e;
  --line: rgba(232, 242, 248, 0.1);
  --line-strong: rgba(232, 242, 248, 0.22);
  --accent: #22d3ee;
  --accent-soft: #0891b2;
  --accent-glow: rgba(34, 211, 238, 0.35);
  --pin: #67e8f9;
  --max-width: 1440px;
  --rail-width: 280px;
  --gutter: clamp(1rem, 2.5vw, 2.5rem);
  --section-pad: clamp(3rem, 6vw, 5.5rem);
  --radius: 2px;
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  --font-display: var(--font-sans);
  --hero-max-h-desktop: 55vh;
  --hero-max-h-tablet: 44vh;
  --hero-max-h-mobile: 38vh;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.page-shell {
  display: grid;
  grid-template-columns: minmax(220px, var(--rail-width)) minmax(0, 1fr);
  min-height: 100vh;
  max-width: 2160px;
  margin: 0 auto;
}

.side-rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  z-index: 40;
}

.rail-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  height: 100%;
  padding: var(--gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-logo {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  max-width: 64px;
  max-height: 64px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 35%, var(--accent-glow), transparent 55%),
    linear-gradient(145deg, var(--surface-2), var(--bg-alt));
  position: relative;
}

.brand-logo::after {
  content: "";
  position: absolute;
  inset: 30%;
  border: 1px solid var(--accent);
  border-radius: 999px;
  transform: rotate(45deg);
}

.brand span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  min-width: 0;
}

.brand small {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.side-rail nav {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.side-rail nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s ease;
}

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

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease;
}

.header-cta:hover {
  background: var(--accent);
  color: var(--bg);
}

.page-canvas {
  min-width: 0;
}

.main-flow {
  width: 100%;
}

.section-inner {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-pad);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.section-kicker,
.eyebrow,
.card-label,
.geo-line {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "●";
  color: var(--accent);
  margin-right: 0.55rem;
}

h1, h2, h3 {
  margin: 0.35rem 0 0.75rem;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.85rem, 4.2vw, 3.4rem);
  max-width: 18ch;
}

h2 { font-size: clamp(1.45rem, 2.8vw, 2.35rem); }
h3 { font-size: clamp(1.05rem, 1.8vw, 1.35rem); }

.lead, .section-heading p, .guide-body p, .card p, .geo-chip span, .contact-grid p {
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
}

.bento-grid {
  display: grid;
  gap: clamp(0.75rem, 1.5vw, 1rem);
}

.hero-bento {
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.hero {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.bento-cell {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(1rem, 2vw, 1.5rem);
}

.hero-copy-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.button-primary {
  border-color: var(--accent);
  color: var(--accent);
}

.button-primary:hover {
  background: var(--accent);
  color: var(--bg);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-visual-cell {
  padding: 0;
  overflow: hidden;
  min-height: 220px;
}

.hero-visual {
  position: relative;
  width: 100%;
  height: min(var(--hero-max-h-desktop), 100%);
  max-height: var(--hero-max-h-desktop);
  max-width: 100%;
  overflow: hidden;
  clip-path: inset(0 round var(--radius));
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(34, 211, 238, 0.12), transparent 55%),
    linear-gradient(180deg, var(--surface-2), var(--bg-alt));
}

.services-bento .cards-grid,
.benefits-bento .cards-grid,
.scenarios-bento .cards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 100%;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.card:hover {
  border-color: var(--accent-soft);
  transform: translateY(-2px);
}

.card-icon {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  position: relative;
}

.card-icon::before {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
}

.card-icon[data-icon="compass"]::before { transform: rotate(45deg); }
.card-icon[data-icon="train"]::before { border-radius: 2px; inset: 0.55rem 0.35rem; }
.card-icon[data-icon="forest"]::before { border-radius: 0; clip-path: polygon(50% 10%, 90% 90%, 10% 90%); border: none; background: var(--accent); opacity: 0.7; }
.card-icon[data-icon="backpack"]::before { border-radius: 4px 4px 2px 2px; }
.card-icon[data-icon="binoculars"]::before { box-shadow: -0.35rem 0 0 0 var(--accent); opacity: 0.75; }
.card-icon[data-icon="mountain"]::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); border: none; background: var(--accent); opacity: 0.65; }
.card-icon[data-icon="tent"]::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 0; }
.card-icon[data-icon="camera"]::before { border-radius: 999px; inset: 0.5rem; }
.card-icon[data-icon="sailboat"]::before { clip-path: polygon(0 100%, 50% 20%, 100% 100%); border: none; background: var(--accent); opacity: 0.65; }
.card-icon[data-icon="lighthouse"]::before { inset: 0.35rem 0.65rem; border-radius: 2px; }

.card small {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.guide-body {
  display: grid;
  gap: 1rem;
}

.chapter {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1rem 1.1rem;
}

.chapter ul {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
}

.chapter li + li { margin-top: 0.35rem; }

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

.process-list li {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1rem;
  display: grid;
  gap: 0.65rem;
}

.step-icon {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.geo-constellation {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.geo-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1rem;
  position: relative;
}

.geo-chip::before {
  content: "";
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--pin);
  box-shadow: 0 0 12px var(--accent-glow);
}

.geo-chip strong {
  display: block;
  margin-bottom: 0.45rem;
}

.faq-list details {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.85rem 1rem;
}

.faq-list details + details { margin-top: 0.65rem; }

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq-list summary::-webkit-details-marker { display: none; }

.contact-bento-grid {
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.contact-form {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
}

.contact-form label span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--bg-alt);
  color: var(--ink);
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.contact-form textarea { min-height: 5.5rem; resize: vertical; }

.tripscan-disclaimer {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.site-footer {
  padding-block: var(--section-pad);
  background: var(--bg-alt);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 1rem;
}

.footer-grid h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-grid a {
  display: block;
  min-height: 1px;
}

.footer-coverage { color: var(--muted); }

@media (max-width: 1200px) {
  .services-bento .cards-grid,
  .benefits-bento .cards-grid,
  .scenarios-bento .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .side-rail {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .rail-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    height: auto;
    padding-block: 1rem;
  }

  .side-rail nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    order: 3;
    width: 100%;
  }

  .header-cta { margin-left: auto; }

  .hero-bento { grid-template-columns: 1fr; }

  .hero-visual {
    max-height: var(--hero-max-h-tablet);
    height: min(var(--hero-max-h-tablet), 44vw);
  }

  .contact-bento-grid { grid-template-columns: 1fr; }
  .process-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .services-bento .cards-grid,
  .benefits-bento .cards-grid,
  .scenarios-bento .cards-grid,
  .geo-constellation,
  .process-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    max-height: var(--hero-max-h-mobile);
    height: min(var(--hero-max-h-mobile), 72vw);
  }

  .brand-logo { width: 40px; height: 40px; }
}

@media (min-width: 1441px) {
  .section-inner {
    width: min(calc(100% - var(--rail-width)), var(--max-width));
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .card:hover { transform: none; }
}
