/* Slon12 variant 1 — warm workshop side-rail layout */
:root {
  --page: #0c0e12;
  --surface: #161a22;
  --surface-alt: #1e2430;
  --surface-elevated: #252b38;
  --text: #f4efe6;
  --muted: #9a9488;
  --accent: #d4a054;
  --accent-alt: #e8c078;
  --accent-ink: #1a1408;
  --line: color-mix(in srgb, var(--text) 14%, transparent);
  --line-strong: color-mix(in srgb, var(--accent) 35%, transparent);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --rail-width: 272px;
  --content-max: 1680px;
  --section-space: clamp(4rem, 8vw, 7rem);
  --font-display: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  --shadow-soft: 0 24px 64px color-mix(in srgb, var(--page) 55%, transparent);
  --shadow-accent: 0 16px 48px color-mix(in srgb, var(--accent) 18%, transparent);
}

*,
*::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.65;
  background: var(--page);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 70% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%),
    radial-gradient(ellipse 60% 40% at 10% 100%, color-mix(in srgb, var(--accent-alt) 8%, transparent), transparent 50%),
    linear-gradient(180deg, var(--page), color-mix(in srgb, var(--surface) 40%, var(--page)));
}

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

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

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

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

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.8vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
  font-weight: 800;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
  font-weight: 700;
}

h3 {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.25;
  font-weight: 700;
}

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

/* ── Shell & side rail ── */
.page-shell {
  position: relative;
  z-index: 1;
  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;
  width: var(--rail-width);
  min-height: 100vh;
  max-height: 100vh;
  padding: 1.5rem 1.25rem 1.75rem;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, var(--page));
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.rail-brand-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.site-rail .brand {
  display: grid;
  grid-template-columns: minmax(0, 64px) minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: normal;
  min-width: 0;
}

.site-rail .brand-logo {
  display: block;
  width: 56px;
  height: 56px;
  max-width: 64px;
  max-height: 64px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  background: var(--surface-alt);
}

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

.site-rail .brand small {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.15rem;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow: auto;
  padding-right: 0.15rem;
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
}

.rail-cta-wrap {
  flex: 0 0 auto;
  min-width: 0;
}

.rail-cta-wrap .header-cta {
  display: flex;
  width: 100%;
  justify-content: center;
  text-align: center;
  white-space: normal;
}

.page-canvas {
  min-width: 0;
  display: flex;
  justify-content: center;
}

.page-main {
  width: 100%;
  max-width: calc(var(--content-max) - var(--rail-width));
  padding: 0 clamp(1.25rem, 3vw, 2.5rem);
}

/* ── Shared primitives ── */
.section-inner {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.eyebrow,
.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: var(--accent);
}

.lead {
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  max-width: 52ch;
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
}

.geo-line {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.button,
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.82rem 1.35rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary,
.header-cta {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-alt) 70%, var(--accent)));
  color: var(--accent-ink);
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}

.button-primary:hover,
.header-cta:hover {
  transform: translateY(-2px);
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.button-secondary:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

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

.section-heading {
  max-width: 68ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

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

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

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

.hero-copy {
  min-width: 0;
}

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

.hero-visual {
  overflow: hidden;
  width: 100%;
  min-height: 0;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface-alt);
  box-shadow: var(--shadow-soft);
}

.hero-visual img,
.hero-visual > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

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

.component-services .card {
  grid-column: span 4;
  min-width: 0;
}

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

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

/* ── Process timeline ── */
.component-process .process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
  position: relative;
}

.component-process .process-list::before {
  content: "";
  position: absolute;
  left: 1.35rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 20%, transparent));
}

.component-process .process-list li {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.35rem 0 1.35rem 0.25rem;
  border-bottom: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
}

.component-process .process-list li:last-child {
  border-bottom: none;
}

.component-process .step-icon {
  position: relative;
  z-index: 1;
  margin: 0;
  background: var(--surface);
  border: 2px solid var(--accent);
}

/* ── Cards ── */
.card {
  min-width: 0;
  padding: 1.45rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.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(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: var(--radius-sm);
}

.card-icon svg,
.step-icon svg {
  width: 28px;
  height: 28px;
  overflow: visible;
}

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

.card small {
  display: block;
  color: var(--muted);
  margin-top: 0.55rem;
  font-size: 0.82rem;
}

/* Icon motion */
.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(4px); }
}

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

/* ── Benefits mosaic ── */
.component-benefits .cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.component-benefits .card:nth-child(3n+2) {
  background: color-mix(in srgb, var(--surface-alt) 90%, var(--accent) 5%);
}

/* ── Scenarios ── */
.component-scenarios .cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.component-scenarios .card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: calc(50% - 0.5rem);
}

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

.geo-chip {
  padding: 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--surface), var(--surface-alt));
}

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

.geo-chip strong {
  color: var(--text);
  margin-bottom: 0.5rem;
}

.geo-chip span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Guide ── */
.component-guide {
  background: color-mix(in srgb, var(--surface) 50%, var(--page));
}

.component-guide .guide-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
  min-width: 0;
}

.chapter {
  min-width: 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

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

/* ── FAQ ── */
.faq-list {
  max-width: 100%;
  display: grid;
  gap: 0;
}

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

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}

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

.faq-list summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-family: var(--font-mono);
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list p {
  padding-right: 2rem;
  margin-top: 0.75rem;
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

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

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

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--page);
  color: var(--text);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
}

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

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

/* ── Footer ── */
.site-footer {
  padding: var(--section-space) 0 3rem;
  background: color-mix(in srgb, var(--surface) 70%, var(--page));
  border-top: 1px solid var(--line-strong);
}

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

.footer-brand {
  font-size: 1.35rem;
  color: var(--text);
}

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

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

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

  .site-rail {
    position: relative;
    width: 100%;
    min-height: auto;
    max-height: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem clamp(1rem, 3vw, 1.5rem);
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

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

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

  .site-rail .brand-logo {
    width: 48px;
    height: 48px;
  }

  .rail-nav {
    flex: 1 1 100%;
    flex-direction: row;
    flex-wrap: wrap;
    order: 3;
  }

  .rail-nav a {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 2.25rem;
    font-size: 0.76rem;
  }

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

  .rail-cta-wrap .header-cta {
    width: auto;
    padding: 0.65rem 1rem;
    white-space: nowrap;
  }

  .page-main {
    max-width: 100%;
  }

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

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

  .component-services .card {
    grid-column: auto;
  }

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

  .component-scenarios .card:last-child:nth-child(odd) {
    max-width: none;
  }

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

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

/* ── Mobile ── */
@media (max-width: 640px) {
  .page-main {
    padding: 0 1rem;
  }

  .site-rail {
    padding: 0.85rem 1rem;
  }

  .rail-nav {
    gap: 0.25rem;
  }

  .rail-nav a {
    padding: 0.45rem 0.55rem;
    font-size: 0.72rem;
  }

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

  h2 {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

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

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

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

  .card {
    padding: 1.15rem;
  }

  .section {
    padding: 3.5rem 0;
  }
}

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

  .card-icon,
  .step-icon,
  .card-icon svg,
  .step-icon svg,
  .card-icon path,
  .step-icon path,
  .card {
    animation: none !important;
    transition: none !important;
  }

  .button-primary:hover,
  .header-cta:hover,
  .card:hover {
    transform: none;
  }
}
