/* ==========================================================================
   MakeCube — makecube.io
   Brand: MakeCube (operated by Jennison Holdings LLC)
   Palette derived from the MakeCube cube mark: orange #FC5501, green #3E8334
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces — charcoal family */
  --bg:            #141513;
  --bg-deep:       #0E0F0D;
  --surface:       #1B1C19;
  --surface-2:     #212320;
  --line:          #2B2C28;
  --line-strong:   #3A3B36;

  /* Type */
  --fg:            #F1EFE9;
  --fg-dim:        #A5A39B;
  --fg-faint:      #74726B;

  /* Brand accents (sampled from the logo) */
  --orange:        #FC5501;
  --orange-deep:   #C34100;
  --orange-wash:   rgba(252, 85, 1, 0.10);
  --green:         #3E8334;
  --green-lift:    #71C25D;
  --green-wash:    rgba(62, 131, 52, 0.12);

  /* Typography */
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "IBM Plex Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Metrics */
  --header-h:     72px;
  --radius:       2px;
  --ease:         cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; }
img { height: auto; border: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* Utility ------------------------------------------------------------------ */
.wrap {
  width: min(1200px, 100% - 2.75rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  background: var(--orange);
  color: var(--bg);
  padding: 0.7rem 1.1rem;
  font-weight: 600;
  transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 1rem; }

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

/* --------------------------------------------------------------------------
   3. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  padding: 0.85rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease),
              color 0.16s var(--ease);
}

.btn--primary {
  background: var(--orange);
  color: #141513;
}
.btn--primary:hover { background: #ff6a20; }

.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--fg-faint); background: rgba(255,255,255,0.03); }

.btn--sm { padding: 0.65rem 1.1rem; font-size: 0.875rem; }

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(20, 21, 19, 0.86);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(20, 21, 19, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(1200px, 100% - 2.75rem);
  margin-inline: auto;
}

/* Brand lockup — logo size is hard-constrained here and can never render raw */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand__logo {
  display: block;
  height: 32px;
  width: auto;
  max-height: 32px;
  max-width: 34px;
  flex: 0 0 auto;
}
.brand__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 108%;
  font-size: 1.28rem;
  letter-spacing: -0.025em;
  color: var(--fg);
}

/* Desktop navigation */
.nav { display: none; }
.nav ul {
  display: flex;
  align-items: center;
  gap: 1.85rem;
}
.nav a {
  position: relative;
  font-size: 0.9375rem;
  color: var(--fg-dim);
  text-decoration: none;
  padding-block: 0.35rem;
  transition: color 0.16s var(--ease);
}
.nav a:hover { color: var(--fg); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease);
}
.nav a:hover::after,
.nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--fg); }

.header-cta { display: none; }

/* Mobile toggle */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 40px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--fg);
  transition: transform 0.2s var(--ease), opacity 0.15s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile panel */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  z-index: 99;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0 1.5rem;
  display: none;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block;
  padding: 0.95rem 0;
  font-size: 1.0625rem;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a.btn {
  display: flex;
  width: 100%;
  margin-top: 1.35rem;
  padding: 0.95rem 1.5rem;
  border-bottom: 0;
  color: #141513;
}

@media (min-width: 940px) {
  .nav { display: block; }
  .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* --------------------------------------------------------------------------
   5. Section scaffolding
   -------------------------------------------------------------------------- */
.section { padding-block: clamp(4.5rem, 8.5vw, 8rem); }
.section--tint { background: var(--bg-deep); }
.section--ruled { border-top: 1px solid var(--line); }

.sec-head { max-width: 62ch; }
.sec-head h2 {
  font-size: clamp(1.95rem, 4.1vw, 3.05rem);
  margin-bottom: 1.35rem;
}
.sec-head p { color: var(--fg-dim); max-width: 60ch; }
.sec-head--wide { max-width: none; }

.lede { font-size: 1.125rem; color: var(--fg-dim); }

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 7vw, 6.5rem) clamp(4rem, 8vw, 7rem);
  overflow: hidden;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
}

/* Faint isometric field, echoing the cube mark */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(30deg,  var(--line) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(-30deg, var(--line) 0 1px, transparent 1px 72px);
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(120% 90% at 78% 40%, #000 0%, transparent 68%);
          mask-image: radial-gradient(120% 90% at 78% 40%, #000 0%, transparent 68%);
  pointer-events: none;
}

.hero-inner { position: relative; }

.hero__head { margin-bottom: clamp(2.25rem, 4.5vw, 3.25rem); }

.hero__body {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.5rem);
  font-weight: 800;
  font-stretch: 116%;
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-bottom: 1.6rem;
}
.hero h1 .line { display: block; }

.hero__sub {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  color: var(--fg-dim);
  max-width: 54ch;
  margin-bottom: 2.25rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero__rule {
  width: 60px;
  height: 3px;
  margin-bottom: 2rem;
  background: linear-gradient(90deg, var(--orange) 0 60%, var(--green) 60% 100%);
}

@media (min-width: 1000px) {
  .hero__body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    align-items: start;
  }
  .hero__visual { margin-top: -1rem; }
  .hero__copy { padding-top: 0.5rem; }
}

/* --- Hero system stack (SVG, desktop/tablet) ------------------------------ */
.stack-fig { margin: 0; max-width: 470px; }
.stack-svg { display: block; width: 100%; height: auto; }

.stack-layer polygon { stroke-width: 1; }
.stack-face-l  { fill: #171815; stroke: var(--line); }
.stack-face-r  { fill: #212320; stroke: var(--line-strong); }
.stack-face-l--o { fill: #2B1608; stroke: rgba(252,85,1,0.55); }
.stack-face-r--o { fill: #40200A; stroke: rgba(252,85,1,0.8); }
.stack-face-l--g { fill: #16220F; stroke: rgba(113,194,93,0.35); }
.stack-face-r--g { fill: #1E3018; stroke: rgba(113,194,93,0.5); }

.stack-top { fill: url(#topFace); stroke: #4A4B44; stroke-width: 1; }
.stack-spine { stroke: var(--line-strong); stroke-width: 1; }
.stack-leader { stroke: var(--line-strong); stroke-width: 1; }

.stack-label {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  fill: var(--fg-dim);
}
.stack-label--o { fill: var(--orange); }
.stack-label--g { fill: var(--green-lift); }

.stack-caption {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--fg-faint);
  padding-left: 2px;
}

/* Load-in: one orchestrated moment */
.stack-layer, .stack-cap { opacity: 0; }
.js .stack-layer { animation: layerIn 0.55s var(--ease) forwards; }
.js .stack-cap   { animation: layerIn 0.55s var(--ease) 0.44s forwards; }
.js .stack-layer:nth-child(1) { animation-delay: 0.38s; }
.js .stack-layer:nth-child(2) { animation-delay: 0.32s; }
.js .stack-layer:nth-child(3) { animation-delay: 0.26s; }
.js .stack-layer:nth-child(4) { animation-delay: 0.20s; }
.js .stack-layer:nth-child(5) { animation-delay: 0.14s; }
.js .stack-layer:nth-child(6) { animation-delay: 0.08s; }
.js .stack-layer:nth-child(7) { animation-delay: 0.02s; }

@keyframes layerIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mobile flow (HTML fallback for the SVG) */
.flow-list { display: none; }
.flow-list li {
  position: relative;
  padding: 0 0 1.35rem 2.25rem;
  color: var(--fg-dim);
  font-size: 0.975rem;
}
.flow-list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 0.42em;
  width: 12px; height: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  transform: rotate(45deg) skewY(-8deg);
}
.flow-list li::after {
  content: "";
  position: absolute;
  left: 10px; top: 1.6em; bottom: 0.1em;
  width: 1px;
  background: var(--line);
}
.flow-list li:last-child { padding-bottom: 0; }
.flow-list li:last-child::after { display: none; }
.flow-list li:first-child::before { background: var(--orange); border-color: var(--orange); }
.flow-list li:last-child::before  { background: var(--green);  border-color: var(--green); }

@media (max-width: 719px) {
  .stack-fig { display: none; }
  .flow-list { display: block; }
}

/* --------------------------------------------------------------------------
   7. Problem
   -------------------------------------------------------------------------- */
.problem-grid {
  display: grid;
  gap: clamp(2.25rem, 5vw, 4rem);
}
@media (min-width: 900px) {
  .problem-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
}

.fragments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.fragments li {
  font-size: 0.875rem;
  color: var(--fg-dim);
  padding: 0.45rem 0.85rem;
  border: 1px dashed var(--line-strong);
  background: var(--surface);
}

.gap-note {
  border-left: 3px solid var(--orange);
  padding: 0.25rem 0 0.25rem 1.35rem;
  margin-top: 1.75rem;
}
.gap-note strong { font-weight: 600; color: var(--fg); }

/* --------------------------------------------------------------------------
   8. What we build — spec grid
   -------------------------------------------------------------------------- */
.modules {
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 620px)  { .modules { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .modules { grid-template-columns: repeat(3, 1fr); } }

.module {
  background: var(--bg);
  padding: clamp(1.5rem, 2.6vw, 2.1rem);
  transition: background-color 0.18s var(--ease);
}
.module:hover { background: var(--surface); }

.module__mark {
  display: block;
  width: 13px; height: 15px;
  margin-bottom: 1.05rem;
  background: var(--line-strong);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.module__mark--o { background: var(--orange); }
.module__mark--g { background: var(--green); }
.module h3 {
  font-size: 1.0625rem;
  font-stretch: 104%;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.module p {
  font-size: 0.9375rem;
  color: var(--fg-dim);
  margin: 0;
}

.modules-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  color: var(--fg-faint);
}
.modules-legend li { display: flex; align-items: center; gap: 0.5rem; }
.modules-legend i {
  width: 9px; height: 11px;
  display: inline-block;
  background: var(--line-strong);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.modules-legend i.is-o { background: var(--orange); }
.modules-legend i.is-g { background: var(--green); }

/* Principle + product glyphs */
.glyph-top  { fill: #24251F; stroke: var(--line-strong); stroke-width: 1; }
.glyph-l    { fill: #191A17; stroke: var(--line-strong); stroke-width: 1; }
.glyph-r    { fill: #212320; stroke: var(--line-strong); stroke-width: 1; }
.glyph-edge { fill: none; stroke: var(--orange); stroke-width: 1.6; stroke-linejoin: round; }
.glyph-r--g { fill: rgba(62,131,52,0.45); stroke: var(--green-lift); stroke-width: 1; }
.glyph-top--g { fill: rgba(62,131,52,0.35); stroke: var(--green-lift); stroke-width: 1; }
.glyph-band { stroke: var(--green-lift); stroke-width: 1.2; }

/* --------------------------------------------------------------------------
   9. How it works — sequence
   -------------------------------------------------------------------------- */
.how-grid { display: grid; gap: clamp(2.25rem, 5vw, 4rem); }
@media (min-width: 900px) {
  .how-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; }
}

.steps {
  position: relative;
  margin-top: 0.4rem;
}
.steps::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6rem; bottom: 1.2rem;
  width: 2px;
  background: linear-gradient(180deg, var(--orange), var(--green));
  opacity: 0.75;
}

.step {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  gap: 0 1rem;
  padding: 0 0 2.35rem 0;
  align-items: start;
}
.step:last-child { padding-bottom: 0; }

.step__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 118%;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--fg-faint);
  padding-left: 1.05rem;
  letter-spacing: -0.03em;
}
@supports (-webkit-text-stroke: 1px #000) {
  .step__num {
    color: transparent;
    -webkit-text-stroke: 1.2px var(--line-strong);
  }
}

.step h3 { font-size: 1.1875rem; font-stretch: 106%; margin-bottom: 0.3rem; }
.step p { color: var(--fg-dim); font-size: 0.9688rem; margin: 0; }

@media (min-width: 900px) {
  .step { grid-template-columns: 5.5rem minmax(0, 1fr); padding-bottom: 2.1rem; }
  .step__num { font-size: 2.15rem; }
}

/* --------------------------------------------------------------------------
   10. Industry systems
   -------------------------------------------------------------------------- */
.systems-grid {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 1000px) { .systems-grid { grid-template-columns: repeat(2, 1fr); } }

.system-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(62,131,52,0.07), transparent 55%),
    var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: clamp(1.75rem, 3.4vw, 2.5rem);
  display: flex;
  flex-direction: column;
}
.system-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
}
.system-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 110%;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 0 0 0.55rem;
}
.system-card__name em {
  font-style: normal;
  color: var(--green-lift);
}
.system-card__meta {
  font-size: 0.875rem;
  color: var(--fg-faint);
  margin: 0;
}
.system-card__glyph { flex: 0 0 auto; width: 54px; height: 60px; }
.system-card h4 {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 0.35rem;
}
.system-card p { color: var(--fg-dim); font-size: 0.9688rem; }
.system-card__actions { margin-top: auto; padding-top: 1.75rem; }

.system-note {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(1.75rem, 3.4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--fg-dim);
  font-size: 0.9688rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.015), transparent);
}
.system-note h3 {
  font-size: 1.125rem;
  font-stretch: 106%;
  margin-bottom: 0.65rem;
  color: var(--fg);
}

/* --------------------------------------------------------------------------
   11. Approach
   -------------------------------------------------------------------------- */
.principles {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  gap: 2.25rem;
}
@media (min-width: 800px) { .principles { grid-template-columns: repeat(3, 1fr); gap: 2.75rem; } }

.principle { border-top: 2px solid var(--line-strong); padding-top: 1.5rem; }
.principle:nth-child(1) { border-top-color: var(--orange); }
.principle:nth-child(3) { border-top-color: var(--green); }
.principle svg { width: 40px; height: 44px; display: block; margin-bottom: 1.15rem; }
.principle h3 { font-size: 1.1875rem; font-stretch: 106%; margin-bottom: 0.55rem; }
.principle p { color: var(--fg-dim); font-size: 0.9688rem; margin: 0; }

/* --------------------------------------------------------------------------
   12. Who we work with
   -------------------------------------------------------------------------- */
.audience-grid { display: grid; gap: clamp(2.25rem, 5vw, 4rem); }
@media (min-width: 900px) {
  .audience-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
}

.criteria { border-top: 1px solid var(--line); }
.criteria li {
  border-bottom: 1px solid var(--line);
  padding: 1.15rem 0 1.15rem 2rem;
  position: relative;
  color: var(--fg-dim);
  font-size: 1rem;
}
.criteria li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.55rem;
  width: 10px; height: 12px;
  background: var(--orange);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

/* --------------------------------------------------------------------------
   13. About + final CTA
   -------------------------------------------------------------------------- */
.about-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 900px) { .about-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.about-body p { color: var(--fg-dim); }
.about-body p:first-child { color: var(--fg); font-size: 1.125rem; }

.final-cta {
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(4rem, 7.5vw, 6.5rem);
  position: relative;
  overflow: hidden;
}
.final-cta::after {
  content: "";
  position: absolute;
  right: -140px; top: 50%;
  width: 420px; height: 420px;
  transform: translateY(-50%) rotate(45deg) skewY(-12deg);
  border: 1px solid var(--line);
  opacity: 0.7;
  pointer-events: none;
}
.final-cta__inner { position: relative; max-width: 44ch; }
.final-cta h2 { font-size: clamp(1.95rem, 4.1vw, 3.05rem); margin-bottom: 1.25rem; }
.final-cta p { color: var(--fg-dim); margin-bottom: 2rem; }

/* --------------------------------------------------------------------------
   14. Contact
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; }
}

.form-grid { display: grid; gap: 1.15rem; }
@media (min-width: 560px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.875rem; font-weight: 500; color: var(--fg-dim); }
.field .req { color: var(--orange); }

.field input,
.field textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  width: 100%;
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:hover, .field textarea:hover { border-color: var(--fg-faint); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: var(--surface-2);
}
.field input::placeholder, .field textarea::placeholder { color: #5F5D57; }

.form-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.35rem;
}
.form-foot .btn { min-width: 190px; }

.form-status {
  grid-column: 1 / -1;
  font-size: 0.9375rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-strong);
  border-left-width: 3px;
  background: var(--surface);
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-error { border-left-color: var(--orange); color: var(--fg); }
.form-status.is-ok { border-left-color: var(--green-lift); color: var(--fg); }

.contact-aside p { color: var(--fg-dim); font-size: 0.9688rem; }
.contact-aside .aside-list { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.contact-aside .aside-list li {
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
  font-size: 0.9375rem;
  color: var(--fg-dim);
}

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-deep);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  font-size: 0.9375rem;
}
.footer-top {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 2.75rem;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 800px) {
  .footer-top { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 3rem; }
}

.footer-brand .brand { margin-bottom: 1rem; }
.footer-brand p { color: var(--fg-dim); max-width: 40ch; font-size: 0.9375rem; }

.footer-col h2 {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg-faint);
  margin-bottom: 1rem;
  text-transform: none;
}
.footer-col li { margin-bottom: 0.7rem; }
.footer-col a { color: var(--fg-dim); text-decoration: none; }
.footer-col a:hover { color: var(--fg); }

.footer-legal {
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  color: var(--fg-faint);
  font-size: 0.875rem;
}
.footer-legal p { margin: 0; }

/* --------------------------------------------------------------------------
   16. Legal document pages
   -------------------------------------------------------------------------- */
.doc {
  padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 8vw, 6rem);
}
.doc__head { border-bottom: 1px solid var(--line); padding-bottom: 2rem; margin-bottom: 2.75rem; }
.doc__head h1 { font-size: clamp(2.1rem, 5vw, 3.25rem); margin-bottom: 0.9rem; }
.doc__head p { color: var(--fg-faint); font-size: 0.9375rem; margin: 0; }

.doc__body { max-width: 72ch; }
.doc__body h2 {
  font-size: 1.3125rem;
  font-stretch: 106%;
  margin: 2.75rem 0 0.85rem;
}
.doc__body h2:first-child { margin-top: 0; }
.doc__body h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
  letter-spacing: 0;
}
.doc__body p, .doc__body li { color: var(--fg-dim); }
.doc__body ul { list-style: none; margin: 0 0 1.15em; }
.doc__body li { position: relative; padding-left: 1.35rem; margin-bottom: 0.55rem; }
.doc__body li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72em;
  width: 7px; height: 8px;
  background: var(--line-strong);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.doc__body a { color: var(--orange); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.doc__body strong { color: var(--fg); font-weight: 600; }

.doc__back {
  display: inline-block;
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 0.9375rem;
}
.doc__back:hover { color: var(--fg); }

/* --------------------------------------------------------------------------
   17. Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .stack-layer, .stack-cap { opacity: 1; }
}

/* No-JS safety: never leave the hero visual hidden */
.no-js .stack-layer, .no-js .stack-cap { opacity: 1; }
