/* Altitude-inspired side-rail layout — mechanized plaster landing */
:root {
  --gl-bg: #050b16;
  --gl-bg-alt: #04305c;
  --gl-surface: rgba(0, 0, 0, 0.35);
  --gl-ink: #ffffff;
  --gl-ink-muted: rgba(255, 255, 255, 0.7);
  --gl-ink-subtle: rgba(255, 255, 255, 0.45);
  --gl-accent: #ffe5ac;
  --gl-accent-cool: #8ccfff;
  --gl-accent-ink: #000000;
  --gl-line: rgba(255, 255, 255, 0.18);
  --gl-glow: #ffd75a;
  --gl-radius: 1.8125rem;
  --gl-radius-lg: 4.375rem;
  --rail-width: 280px;
  --content-max: 1480px;
  --section-space: clamp(4rem, 8vw, 7rem);
  --font-display: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--gl-ink);
  background:
    radial-gradient(ellipse 120% 80% at 70% -10%, rgba(4, 48, 92, 0.55), transparent 55%),
    radial-gradient(circle at 20% 100%, rgba(255, 215, 90, 0.06), transparent 40%),
    var(--gl-bg);
}

body, button, input, select, textarea {
  font: inherit;
}

img, svg, video, canvas, iframe {
  display: block;
  max-width: 100%;
  height: auto;
}

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

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 0.85rem;
}

h3 {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.25;
}

p {
  color: var(--gl-ink-muted);
}

/* ── Page shell: fixed side rail + fluid canvas ── */
.page-frame {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  min-height: 100vh;
  max-width: 2160px;
  margin: 0 auto;
}

.site-rail {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  min-height: 100vh;
  max-height: 100vh;
  padding: 1.5rem 1.25rem 2rem;
  border-right: 1px solid var(--gl-line);
  background: rgba(5, 11, 22, 0.82);
  backdrop-filter: blur(18px);
  z-index: 40;
  overflow: hidden;
}

.rail-brand-row,
.rail-nav,
.rail-cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}

.rail-brand-row .brand {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  min-width: 0;
}

.rail-brand-row .brand-logo {
  width: 56px;
  height: 56px;
  max-width: 64px;
  max-height: 64px;
  flex: 0 0 56px;
  border-radius: 14px;
  overflow: hidden;
}

.rail-brand-row .brand-logo svg {
  width: 100%;
  height: 100%;
}

.rail-brand-row .brand small {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--gl-ink-subtle);
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-nav {
  flex: 1 1 auto;
  margin-top: 0.5rem;
}

.rail-nav a {
  display: block;
  padding: 0.55rem 0.85rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gl-ink-muted);
  border: 1px solid transparent;
  border-radius: calc(var(--gl-radius) * 0.45);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.rail-nav a:hover {
  color: var(--gl-ink);
  border-color: var(--gl-line);
  background: rgba(255, 255, 255, 0.04);
}

.rail-cta-row .header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1rem;
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: var(--gl-radius);
  background: linear-gradient(104deg, var(--gl-accent) 0%, #97bdde 100%);
  color: var(--gl-accent-ink);
  border: none;
  text-align: center;
}

.page-canvas {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.page-main {
  width: min(var(--content-max), calc(100% - clamp(1.5rem, 4vw, 4rem)));
  margin: 0 auto;
  padding-bottom: 2rem;
}

/* ── Hero band: asymmetric split ── */
.hero-band {
  padding: clamp(2rem, 5vw, 4.5rem) 0 var(--section-space);
}

.hero-band .hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}

.hero-band .hero-copy {
  min-width: 0;
  order: 1;
}

.hero-band .hero-visual {
  order: 2;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--gl-radius-lg);
  border: 1px solid var(--gl-line);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.hero-band .hero-visual > svg {
  width: 100%;
  height: 100%;
}

.hero-band .hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eyebrow,
.section-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--gl-glow);
}

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  max-width: 42rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 1rem;
}

.geo-line {
  font-size: 0.82rem;
  color: var(--gl-ink-subtle);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.button,
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--gl-radius);
  border: 1px solid var(--gl-line);
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.button-primary {
  background: linear-gradient(104deg, var(--gl-accent) 0%, #97bdde 100%);
  color: var(--gl-accent-ink);
  border-color: transparent;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--gl-ink);
}

.button:hover,
.header-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

/* ── Sections ── */
.content-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.section {
  padding: var(--section-space) 0;
  border-top: 1px solid var(--gl-line);
}

.section-heading {
  max-width: 52rem;
  margin-bottom: 2.25rem;
}

.section-heading > p {
  font-size: 1.05rem;
}

/* Services & cards — bento mosaic */
.component-services .cards-grid,
.component-benefits .cards-grid,
.component-scenarios .cards-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.component-services .card,
.component-benefits .card,
.component-scenarios .card {
  grid-column: span 4;
  min-width: 0;
  padding: 1.5rem;
  border-radius: var(--gl-radius);
  background: var(--gl-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--gl-line);
  transition: transform 250ms ease, border-color 250ms ease;
}

.component-services .card:nth-child(1),
.component-benefits .card:nth-child(1) {
  grid-column: span 6;
}

.component-services .card:nth-child(2),
.component-benefits .card:nth-child(2) {
  grid-column: span 6;
}

.component-services .card:hover,
.component-benefits .card:hover,
.component-scenarios .card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 229, 172, 0.35);
}

.card p {
  margin-bottom: 0;
}

.card-icon,
.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  color: var(--gl-glow);
  border: 1px solid rgba(255, 215, 90, 0.25);
  background: rgba(255, 215, 90, 0.08);
  border-radius: 12px;
}

.card-icon svg,
.step-icon svg {
  width: 26px;
  height: 26px;
}

.card-label {
  display: block;
  font-family: var(--font-mono);
  color: var(--gl-accent-cool);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.65rem;
}

.card-value {
  display: block;
  margin-top: 1rem;
  color: var(--gl-glow);
  font-size: 1.05rem;
  font-weight: 600;
}

.card small {
  display: block;
  color: var(--gl-ink-subtle);
  margin-top: 0.35rem;
  font-size: 0.82rem;
}

/* Process — vertical timeline */
.component-process .process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  counter-reset: step;
}

.component-process .process-list li {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 1rem;
  padding: 1.35rem 1.35rem 1.35rem 1.75rem;
  background: var(--gl-surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--gl-line);
  border-radius: var(--gl-radius);
  min-width: 0;
}

.component-process .process-list li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gl-ink-subtle);
}

.component-process .step-icon {
  margin-bottom: 0;
}

/* Geography — stacked panels */
.component-geography .geo-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.component-geography .geo-chip {
  padding: 1.35rem;
  border-radius: var(--gl-radius);
  background: linear-gradient(145deg, rgba(4, 48, 92, 0.5), rgba(0, 0, 0, 0.35));
  border: 1px solid var(--gl-line);
}

.component-geography .geo-chip strong,
.component-geography .geo-chip span {
  display: block;
}

.component-geography .geo-chip span {
  margin-top: 0.5rem;
  color: var(--gl-ink-muted);
  font-size: 0.9rem;
}

/* Guide — two-column chapters */
.component-guide .guide-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  min-width: 0;
}

.component-guide .chapter {
  padding: 1.35rem;
  border-radius: var(--gl-radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--gl-line);
  min-width: 0;
}

.component-guide .chapter li {
  color: var(--gl-ink-muted);
  margin: 0.45rem 0;
}

/* FAQ */
.component-faq .faq-list {
  max-width: 56rem;
  display: grid;
  gap: 0;
}

.component-faq details {
  border-bottom: 1px solid var(--gl-line);
  padding: 1rem 0;
}

.component-faq summary {
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font-display);
  list-style: none;
}

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

.component-faq p {
  padding-right: 1.5rem;
  margin-bottom: 0;
}

/* Contact */
.component-contact .contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--gl-radius-lg);
  background: var(--gl-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--gl-line);
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--gl-ink-muted);
}

input, select, textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--gl-line);
  background: rgba(5, 11, 22, 0.75);
  color: var(--gl-ink);
  padding: 0.85rem 1rem;
  border-radius: calc(var(--gl-radius) * 0.55);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.form-message {
  color: var(--gl-glow);
  margin: 0;
}

/* Footer */
.site-footer {
  margin-top: var(--section-space);
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--gl-line);
  background: rgba(0, 0, 0, 0.25);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.site-footer a {
  display: block;
  color: var(--gl-ink-muted);
  margin: 0.35rem 0;
  font-size: 0.9rem;
}

.site-footer a:hover {
  color: var(--gl-ink);
}

/* Icon motion — slow loops */
.icon-draw path {
  stroke-dasharray: 34 8;
  animation: iconDraw 12s linear infinite;
}

.icon-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: iconPulse 12s ease-in-out infinite;
}

.icon-slide {
  animation: iconSlide 12s ease-in-out infinite;
}

.icon-spin {
  transform-box: fill-box;
  transform-origin: center;
  animation: iconSpin 14s linear infinite;
}

@keyframes iconDraw {
  to { stroke-dashoffset: -84; }
}

@keyframes iconPulse {
  50% { transform: scale(0.9); opacity: 0.75; }
}

@keyframes iconSlide {
  50% { transform: translateX(3px); }
}

@keyframes iconSpin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .page-frame {
    grid-template-columns: 1fr;
  }

  .site-rail {
    position: relative;
    min-height: auto;
    max-height: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.25rem;
    padding: 1rem 1.25rem;
    border-right: none;
    border-bottom: 1px solid var(--gl-line);
  }

  .rail-brand-row {
    flex: 1 1 auto;
    min-width: 200px;
  }

  .rail-brand-row .brand {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .rail-brand-row .brand-logo {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .rail-nav {
    flex: 1 1 100%;
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 0;
  }

  .rail-nav a {
    flex: 1 1 auto;
    text-align: center;
  }

  .rail-cta-row {
    flex: 0 0 auto;
  }

  .rail-cta-row .header-cta {
    width: auto;
    white-space: nowrap;
  }

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

  .hero-band .hero-visual {
    order: -1;
    max-width: 640px;
    justify-self: center;
  }

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

  .component-services .card,
  .component-benefits .card,
  .component-scenarios .card {
    grid-column: span 1 !important;
  }

  .component-process .process-list {
    grid-template-columns: 1fr;
  }

  .component-geography .geo-chips {
    grid-template-columns: 1fr 1fr;
  }

  .component-guide .guide-body {
    grid-template-columns: 1fr;
  }

  .component-contact .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .page-main {
    width: min(100% - 1.5rem, var(--content-max));
  }

  .site-rail {
    flex-direction: column;
    align-items: stretch;
  }

  .rail-nav {
    flex-direction: column;
  }

  .rail-cta-row .header-cta {
    width: 100%;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .component-services .cards-grid,
  .component-benefits .cards-grid,
  .component-scenarios .cards-grid,
  .component-geography .geo-chips,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
    text-align: center;
  }
}

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

  .icon-draw path,
  .icon-pulse,
  .icon-slide,
  .icon-spin,
  .card-icon,
  .step-icon {
    animation: none !important;
  }

  .button:hover,
  .header-cta:hover,
  .component-services .card:hover,
  .component-benefits .card:hover,
  .component-scenarios .card:hover {
    transform: none;
  }
}
