/* Slon6 TO — variant 1: precision workshop side-rail layout */
:root {
  --page: #0c0e12;
  --surface: #161a22;
  --surface-elevated: #1e2430;
  --text: #e8ecf2;
  --muted: #8892a4;
  --accent: #d4842c;
  --accent-alt: #5a8fb8;
  --border: color-mix(in srgb, var(--text) 14%, transparent);
  --border-strong: color-mix(in srgb, var(--accent) 35%, transparent);
  --radius: 6px;
  --rail-width: 280px;
  --content-max: 1280px;
  --section-space: clamp(4rem, 8vw, 6.5rem);
  --font-display: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::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);
  background-image:
    radial-gradient(ellipse 80% 50% at 100% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 100%, color-mix(in srgb, var(--accent-alt) 6%, transparent), transparent 50%);
}

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.03em;
  margin-bottom: 1.25rem;
  font-weight: 700;
}

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

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

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

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

/* Shell: side rail + main */
.page-shell {
  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;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding: 1.5rem 1.25rem 2rem;
  border-right: 1px solid var(--border);
  background: color-mix(in srgb, var(--page) 92%, var(--surface));
  z-index: 40;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1rem;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  max-width: 64px;
  max-height: 64px;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
}

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

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

.site-rail nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.site-rail nav a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.site-rail nav a:hover {
  color: var(--text);
  border-color: var(--border);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

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

.rail-cta {
  margin-top: auto;
  text-align: center;
}

.button-primary, .header-cta {
  background: var(--accent);
  color: #1a1008;
}

.button-primary:hover, .header-cta:hover {
  background: color-mix(in srgb, var(--accent) 85%, white);
}

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

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

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

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

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

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

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

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

.lead {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  max-width: 42rem;
  color: var(--muted);
}

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

.geo-line {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.hero-visual {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 240px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: 0 24px 48px color-mix(in srgb, var(--page) 50%, transparent);
}

/* Sections */
.section {
  padding: var(--section-space) 0;
  border-top: 1px solid var(--border);
}

.section-inner {
  width: 100%;
}

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

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

.fact-disclaimer {
  font-size: 0.78rem !important;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--muted) !important;
}

/* Cards & grids */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  min-width: 0;
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

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

.card p { margin-bottom: 0; }

.card-icon, .step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 0.85rem;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border-radius: 10px;
}

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

.card-label {
  display: block;
  color: var(--accent);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.55rem;
}

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

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.stat {
  padding: 1.25rem 1rem;
  border-top: 2px solid var(--accent);
  background: var(--surface);
  border-radius: 0 0 var(--radius) var(--radius);
}

.stat strong {
  display: block;
  font-size: 1.75rem;
  color: var(--accent);
}

.stat span { font-weight: 700; color: var(--text); }

.stat p { font-size: 0.82rem; margin: 0.4rem 0 0; }

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

.process-list li {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-icon { margin-bottom: 0; flex: 0 0 auto; }

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

.geo-chip {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

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

.geo-chip span {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.35rem;
}

/* Guide */
.guide-body { min-width: 0; }

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

.chapter:last-child { border-bottom: 0; }

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

/* FAQ */
.faq-list { max-width: 52rem; }

.faq-list details {
  border-bottom: 1px solid var(--border);
  padding: 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 p { padding-right: 1rem; margin-bottom: 0; }

/* Forms */
.calc-layout,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

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

.contact-form label,
.calculator-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(--border);
  background: var(--page);
  color: var(--text);
  padding: 0.8rem 0.85rem;
  border-radius: calc(var(--radius) - 1px);
}

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

output {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 700;
}

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

/* Footer */
.site-footer {
  padding: 3.5rem 0 4rem;
  margin-top: 1rem;
  background: color-mix(in srgb, var(--surface) 75%, var(--page));
  border-top: 1px solid var(--border);
}

.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;
  font-size: 0.9rem;
}

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

.site-footer h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

/* Icon motion — min 10s 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.92); opacity: 0.75; } }
@keyframes iconSlide { 50% { transform: translateX(4px); } }
@keyframes iconSpin { to { transform: rotate(360deg); } }

/* Wide desktop balance */
@media (min-width: 1440px) {
  :root {
    --rail-width: 300px;
    --content-max: 1360px;
  }

  .page-shell {
    padding-right: clamp(0px, 4vw, 3rem);
  }

  .cards-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

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

@media (min-width: 1800px) {
  :root { --content-max: 1480px; }

  .hero-frame {
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  }
}

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

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

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

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

  .rail-cta {
    margin-top: 0;
    margin-left: auto;
    order: 2;
  }

  .hero-frame,
  .calc-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

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

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

  .site-rail nav { display: none; }

  .rail-cta {
    width: 100%;
    order: 2;
  }

  .cards-grid,
  .process-list,
  .stats-grid,
  .geo-chips,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

@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; }
}
