:root {
  --bg: #f1f8f3;
  --bg-elevated: #e6f0e8;
  --surface: #ffffff;
  --surface-hover: #f5fbf7;
  --text: #132a1f;
  --muted: #4a6356;
  --accent: #1a6b4c;
  --accent-soft: #2d9668;
  --accent-bright: #4dbd86;
  --accent-dim: #134d37;
  --sky: #0d8599;
  --warm: #b8894a;
  --warm-soft: #d4b896;
  --warm-mist: rgba(212, 184, 150, 0.2);
  --accent-glow: rgba(45, 150, 104, 0.16);
  --glow: rgba(45, 150, 104, 0.07);
  --border: rgba(19, 42, 31, 0.09);
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --header-h: 4.25rem;
  --radius: 16px;
  --shadow-sm: 0 1px 3px rgba(19, 42, 31, 0.05);
  --shadow-md: 0 10px 36px rgba(19, 42, 31, 0.07);
  --shadow-lg: 0 22px 56px rgba(19, 42, 31, 0.09);
  --r-max: min(1140px, 92vw);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-frame::after,
  .flow-step {
    animation: none !important;
  }

  .pillar {
    transition: none !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -5%, var(--accent-glow), transparent 58%),
    radial-gradient(ellipse 50% 35% at 100% 8%, rgba(13, 133, 153, 0.06), transparent 55%),
    radial-gradient(ellipse 55% 45% at 0% 85%, var(--warm-mist), transparent 52%),
    radial-gradient(ellipse 45% 40% at 0% 75%, rgba(77, 189, 134, 0.05), transparent 50%),
    linear-gradient(180deg, #fdfefb 0%, var(--bg) 38%, #e9f3eb 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Ccircle cx='8' cy='10' r='1.2' fill='%231b6e4f' fill-opacity='0.07'/%3E%3Ccircle cx='40' cy='44' r='1' fill='%230e7490' fill-opacity='0.06'/%3E%3Cpath fill='none' stroke='%231b6e4f' stroke-opacity='0.05' d='M0 28h56M28 0v56'/%3E%3C/svg%3E");
  background-size: 56px 56px;
}

body > * {
  position: relative;
  z-index: 1;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
  border-radius: 8px;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.wrap {
  width: var(--r-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 1.75rem);
}

h1,
h2,
.page-hero h1,
.cta-band h2 {
  font-family: var(--font-display);
}

/* --- Header --- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text);
  flex-shrink: 0;
}

.logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.logo span {
  color: var(--accent);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1.15;
  flex-shrink: 0;
}

.brand .logo {
  line-height: 1.1;
}

.brand-strap {
  display: none;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  font-style: italic;
  color: var(--warm);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

@media (min-width: 1180px) {
  .brand-strap {
    display: block;
  }
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle:hover {
  background: var(--surface-hover);
}

.nav-toggle .bar {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

@media (min-width: 880px) {
  .nav-toggle {
    display: none;
  }
}

header nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 4vw 1rem;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

header nav.is-open {
  display: flex;
}

header nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

header nav a:last-child {
  border-bottom: none;
}

header nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

@media (min-width: 880px) {
  header .wrap {
    flex-wrap: nowrap;
  }

  header nav {
    display: flex !important;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1;
    justify-content: center;
    gap: 0.85rem 1.1rem;
    padding: 0;
    background: transparent;
    border: none;
    align-items: center;
  }

  header nav a {
    padding: 0;
    border: none;
  }

  .logo {
    flex-shrink: 0;
  }

  .header-actions {
    flex-shrink: 0;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang-switch button {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.38rem 0.55rem;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}

.lang-switch button:hover {
  color: var(--accent);
  background: var(--surface-hover);
}

.lang-switch button.is-active {
  background: rgba(45, 150, 104, 0.14);
  color: var(--accent-dim);
  font-weight: 600;
}

.header-cta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(27, 110, 79, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.6);
}

.header-cta:hover {
  color: var(--accent-soft);
  border-color: rgba(27, 110, 79, 0.35);
  background: #fff;
  text-decoration: none;
}

header nav a[aria-current="page"],
header nav a[aria-current="true"] {
  color: var(--accent);
  font-weight: 600;
}

/* --- Hero --- */
.hero {
  padding: clamp(1.75rem, 5vw, 3.5rem) 0 2.5rem;
  display: grid;
  gap: 2.25rem;
  align-items: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(236, 246, 239, 0.6));
  border: 1px solid rgba(19, 42, 31, 0.06);
  box-shadow: 0 14px 40px rgba(19, 42, 31, 0.06);
  z-index: -1;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr 1.08fr;
    gap: 3rem;
    padding-top: clamp(2rem, 7vw, 4.5rem);
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-dim);
  background: rgba(47, 157, 106, 0.12);
  border: 1px solid rgba(27, 110, 79, 0.18);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(47, 157, 106, 0.25);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 4.8vw, 2.95rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.hero h1 .line-accent {
  background: linear-gradient(120deg, var(--accent-dim) 0%, var(--accent-soft) 40%, var(--sky) 75%, var(--warm) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 500;
  font-style: italic;
  color: var(--warm);
  margin: -0.25rem 0 1.25rem;
  letter-spacing: 0.01em;
  max-width: 36ch;
  line-height: 1.35;
}

.hero .lede {
  margin: 0 0 1.35rem;
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 44ch;
  line-height: 1.55;
}

.hero .lede strong {
  color: var(--text);
  font-weight: 600;
}

.stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  margin-bottom: 1.5rem;
}

.stat-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.45rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(19, 42, 31, 0.08);
  box-shadow: 0 4px 14px rgba(19, 42, 31, 0.05);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.35rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(145deg, var(--accent-soft) 0%, var(--accent) 55%, var(--accent-dim) 100%);
  color: #fff;
  box-shadow: var(--shadow-md);
  letter-spacing: 0.02em;
  border: 1px solid rgba(19, 42, 31, 0.2);
}

.btn-primary:hover {
  box-shadow: var(--shadow-lg);
  color: #fff;
  filter: brightness(1.03);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--accent);
  border-color: rgba(27, 110, 79, 0.25);
  background: #fff;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.hero-visual {
  position: relative;
  border-radius: var(--radius);
  padding: 3px;
  background: linear-gradient(
    145deg,
    rgba(47, 157, 106, 0.45),
    rgba(14, 116, 144, 0.2) 50%,
    rgba(47, 157, 106, 0.25)
  );
  box-shadow: var(--shadow-lg);
}

.hero-frame {
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  background: var(--surface);
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.hero-frame img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.65rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  border-radius: 0 0 calc(var(--radius) - 2px) calc(var(--radius) - 2px);
}

.mono-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 1.75rem;
  line-height: 1.55;
  opacity: 0.9;
}

/* --- Motto (people → food) --- */
.motto-band {
  padding: clamp(2rem, 5vw, 2.75rem) 4vw;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 120% at 50% 0%, rgba(45, 150, 104, 0.09), transparent 55%),
    radial-gradient(ellipse 50% 80% at 0% 50%, var(--warm-mist), transparent 60%),
    linear-gradient(175deg, #fefcfa 0%, #f3f9f4 50%, #ecf5ee 100%);
}

.motto-band .wrap {
  text-align: center;
  padding-inline: 0;
}

.motto-lead {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.2vw, 1.55rem);
  font-weight: 700;
  font-style: normal;
  color: var(--accent-dim);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.motto-quote {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  font-weight: 600;
  font-style: italic;
  color: var(--text);
  letter-spacing: -0.015em;
  line-height: 1.28;
}

.motto-quote em {
  font-style: italic;
  color: var(--accent-dim);
}

.motto-sub {
  margin: 0 auto;
  max-width: 36rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
}

/* --- Sections --- */
section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--border);
}

section.alt {
  background:
    radial-gradient(ellipse 100% 120% at 0% 20%, rgba(45, 150, 104, 0.07), transparent 65%),
    rgba(228, 240, 230, 0.62);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin: 0 0 0.5rem;
}

.section-kicker::before {
  content: "";
  width: 4px;
  height: 0.9em;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-bright), var(--warm));
  flex-shrink: 0;
}

section h2 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.35rem, 2.8vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.prose {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 70ch;
  line-height: 1.65;
}

.prose:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose-lead {
  font-size: 1.1rem;
  color: #355a48;
  max-width: 62ch;
}

.prose code,
p code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* --- Pillars --- */
.pillars-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .pillars-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pillar {
  padding: 1.5rem 1.35rem;
  border-radius: var(--radius);
  background: linear-gradient(165deg, var(--surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .pillar:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(19, 42, 31, 0.14);
  }
}

.pillar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent-bright), var(--sky));
  opacity: 0.9;
}

.pillar-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent-soft);
}

.pillar h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.pillar p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

/* --- Section figures (placeholder art · swap for photos later) --- */
.section-figure {
  margin: 1.75rem auto 0;
  max-width: min(920px, 100%);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, #fff 0%, var(--bg-elevated) 100%);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .section-figure:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(19, 42, 31, 0.14);
  }
}

.section-figure img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.figure-cap {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-dim);
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
}

.layout-split {
  display: grid;
  gap: 1.75rem;
  align-items: start;
  margin-top: 1.5rem;
}

@media (min-width: 880px) {
  .layout-split {
    grid-template-columns: 1fr 1.05fr;
    align-items: center;
  }

  .layout-split.layout-split-reverse {
    grid-template-columns: 1.05fr 1fr;
  }

  .layout-split.layout-split-reverse .section-figure {
    order: -1;
  }
}

.layout-split .section-figure {
  margin-top: 0;
}

.section-figure-panorama img {
  max-height: min(220px, 40vw);
  width: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.section-figure-compact {
  max-width: min(640px, 100%);
}

.motto-visual {
  margin-top: 1.25rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  opacity: 0.95;
}

.motto-visual img {
  display: block;
  width: 100%;
  height: auto;
}

/* --- Flow pipeline --- */
.flow-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}

@media (min-width: 720px) {
  .flow-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
  }
}

.flow-step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1rem;
  box-shadow: var(--shadow-sm);
}

.flow-step::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(160deg, rgba(47, 157, 106, 0.2), transparent 55%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@media (min-width: 720px) {
  .flow-step:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -0.55rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-dim);
    font-size: 0.85rem;
    z-index: 2;
  }
}

.flow-step-num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
  letter-spacing: 0.06em;
}

.flow-step h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
}

.flow-step p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}

/* --- Topology --- */
.topology {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .topology {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem 0.75rem;
  }
}

.topology-box {
  flex: 1 1 200px;
  max-width: 320px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.1rem;
  box-shadow: var(--shadow-md);
}

.topology-box h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--text);
}

.topology-box p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

.topology-box .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 0.22rem 0.5rem;
  border-radius: 4px;
  background: rgba(47, 157, 106, 0.12);
  color: var(--accent);
  margin-bottom: 0.55rem;
  letter-spacing: 0.04em;
}

.topology-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.25rem 0;
}

@media (min-width: 768px) {
  .topology-connector {
    flex: 0 0 auto;
    align-self: center;
    padding: 0 0.25rem;
  }
}

.topology-row-bench {
  width: 100%;
  flex-basis: 100%;
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}

.topology-row-bench .topology-box {
  max-width: min(540px, 100%);
  flex: 1 1 100%;
}

/* --- Cards --- */
.grid-3 {
  display: grid;
  gap: 1.35rem;
}

@media (min-width: 700px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: linear-gradient(165deg, var(--surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent-bright), var(--sky));
  opacity: 0.78;
}

.card:hover {
  border-color: rgba(27, 110, 79, 0.22);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 2.35rem;
  height: 2.35rem;
  margin-bottom: 0.85rem;
  color: var(--accent-soft);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.card p strong {
  color: var(--text);
}

/* --- Dashboard showcase (concept UI) --- */
.dashboard-split {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
  align-items: start;
}

@media (min-width: 900px) {
  .dashboard-split {
    grid-template-columns: 1fr 1.05fr;
    gap: 2.5rem;
    align-items: center;
  }
}

.dashboard-mock {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.dm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: linear-gradient(180deg, #f6fbf8 0%, #eef6f0 100%);
}

.dm-dots {
  display: flex;
  gap: 5px;
}

.dm-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
}

.dm-dots span:first-child {
  background: #ef4444;
  opacity: 0.85;
}
.dm-dots span:nth-child(2) {
  background: #eab308;
  opacity: 0.85;
}
.dm-dots span:nth-child(3) {
  background: var(--accent-dim);
  opacity: 0.85;
}

.dm-mode {
  color: var(--accent-soft);
  font-weight: 500;
}

.dm-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  min-height: 220px;
}

.dm-panel {
  background: #f8fcf9;
  padding: 1rem;
}

.dm-panel-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.dm-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 100px;
  padding-top: 0.5rem;
}

.dm-bar {
  flex: 1;
  align-self: flex-end;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent-dim));
  opacity: 0.88;
  min-height: 8px;
}

.dm-events {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dm-event {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  border-left: 2px solid var(--accent-dim);
}

.dm-event strong {
  color: var(--accent);
  font-weight: 600;
}

.dm-footer {
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  text-align: center;
  opacity: 0.9;
  background: rgba(240, 247, 242, 0.8);
}

/* --- Doc cards --- */
.doc-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.35rem;
}

@media (min-width: 640px) {
  .doc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.doc-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.2rem;
  min-height: 100%;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

a.doc-card:hover {
  border-color: rgba(27, 110, 79, 0.28);
  transform: translateY(-2px);
  text-decoration: none;
}

div.doc-card {
  cursor: default;
}

div.doc-card:hover {
  transform: none;
}

.doc-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--text);
}

.doc-card p {
  margin: 0 0 1rem;
  flex: 1;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.doc-card .doc-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-dim);
}

/* --- CTA band --- */
.cta-band {
  text-align: center;
  padding: 3.5rem 1.25rem;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(ellipse 75% 70% at 50% 100%, rgba(47, 157, 106, 0.14), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(228, 240, 230, 0.9));
}

.cta-band h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 700;
}

.cta-band > p {
  margin: 0 0 1.35rem;
  color: var(--muted);
  max-width: 44ch;
  margin-inline: auto;
  font-size: 1.05rem;
}

/* --- Footer --- */
footer {
  padding: 2.25rem 0 3rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 600px) {
  footer .wrap {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
  }
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
}

footer a {
  color: var(--muted);
}

footer a:hover {
  color: var(--accent);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-title {
  font-weight: 600;
  color: var(--text);
}

.footer-motto {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-style: italic;
  color: var(--warm);
}

/* --- Page hero (subpages) --- */
.page-hero {
  padding: 2.75rem 0 2.25rem;
  border-bottom: 1px solid var(--border);
}

.page-hero-motto {
  font-family: var(--font-display);
  font-size: clamp(0.98rem, 2vw, 1.08rem);
  font-style: italic;
  font-weight: 500;
  color: var(--warm);
  margin: -0.2rem 0 1rem;
  max-width: 40ch;
  line-height: 1.35;
}

.page-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.page-hero .lede {
  margin: 0;
  color: var(--muted);
  max-width: 58ch;
  font-size: 1.05rem;
  line-height: 1.6;
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.mt-lg {
  margin-top: 1.75rem;
}

.dashboard-aside-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* --- Minimal header (404, etc.) --- */
header.header-simple .nav-toggle {
  display: none !important;
}

header.header-simple nav {
  display: flex !important;
  position: static;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 0;
  background: transparent;
  border: none;
  flex: 1;
  justify-content: flex-end;
}

header.header-simple .header-actions {
  display: none;
}

header.header-simple .wrap {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

header.header-simple .lang-switch-simple {
  flex-shrink: 0;
}

/* --- Architecture diagram --- */
.arch-stack {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.arch-row {
  display: grid;
  gap: 0.75rem;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

@media (min-width: 640px) {
  .arch-row {
    grid-template-columns: 140px 1fr;
  }
}

.arch-row:last-child {
  border-bottom: none;
}

.arch-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-dim);
}

.arch-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.arch-node {
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
}

.arch-node-muted {
  color: var(--muted);
  font-size: 0.8rem;
}

.arch-join {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  padding: 0.35rem 1rem;
  background: rgba(47, 157, 106, 0.08);
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.04em;
}

/* --- Architecture: IoT map + step explainer --- */
.arch-iot-figure {
  background: #0a1210;
  border-color: rgba(45, 150, 104, 0.28);
  box-shadow: 0 12px 40px rgba(10, 18, 16, 0.35);
}

.arch-iot-figure .figure-cap {
  background: rgba(12, 22, 18, 0.92);
  color: #8fd4b0;
  border-top-color: rgba(45, 150, 104, 0.22);
}

.arch-video-figure video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0b1110;
  border-radius: 0;
}

.arch-story-figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  cursor: zoom-in;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(5, 10, 9, 0.88);
  display: grid;
  place-items: center;
  padding: 2rem;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox img {
  max-width: min(1200px, 94vw);
  max-height: 88vh;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.image-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(13, 21, 19, 0.9);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 640px) {
  .image-lightbox {
    padding: 1rem;
  }

  .image-lightbox-close {
    top: 0.6rem;
    right: 0.6rem;
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.2rem;
  }
}

.arch-how-section {
  padding: 2.5rem 0 2rem;
}

.arch-how-grid {
  display: grid;
  gap: 2rem;
  margin-top: 1.75rem;
  align-items: start;
}

@media (min-width: 900px) {
  .arch-how-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
  }
}

.arch-how-copy {
  min-width: 0;
}

.arch-how-step {
  margin: 0;
}

.arch-how-step h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.arch-how-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.arch-how-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.arch-how-toolbar .btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.arch-how-timing {
  margin: 1rem 0 0;
  font-size: 0.82rem;
}

.arch-how-live-static {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .arch-how-live-auto {
    display: none;
  }

  .arch-how-live-static {
    display: inline;
  }
}

.arch-how-visual {
  --arch-dim: 0.38;
  position: relative;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, #0f1a16 0%, #0a1210 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  min-height: 220px;
}

.arch-how-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: radial-gradient(circle at 20% 30%, rgba(45, 150, 104, 0.12), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(13, 133, 153, 0.1), transparent 42%);
  pointer-events: none;
}

.arch-how-rows {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.arch-how-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.65rem;
}

.arch-how-node {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(45, 150, 104, 0.25);
  background: rgba(15, 28, 24, 0.85);
  color: #7a9e8c;
  opacity: var(--arch-dim);
  transition: opacity 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease, color 0.45s ease;
}

.arch-how-node strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #b8d4c4;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.arch-how-node small {
  display: block;
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  color: #5c7a6a;
  text-transform: none;
}

.arch-how-connector {
  width: 28px;
  height: 2px;
  border-radius: 1px;
  background: rgba(45, 150, 104, 0.2);
  flex-shrink: 0;
  opacity: 0.35;
  transition: opacity 0.45s ease, background 0.45s ease, box-shadow 0.45s ease;
}

.arch-how-visual[data-phase="0"] [data-node="ux"],
.arch-how-visual[data-phase="0"] [data-node="core"],
.arch-how-visual[data-phase="1"] [data-node="core"],
.arch-how-visual[data-phase="1"] [data-node="ledger"],
.arch-how-visual[data-phase="2"] [data-node="mqtt"],
.arch-how-visual[data-phase="2"] [data-node="hub"],
.arch-how-visual[data-phase="3"] [data-node="hub"],
.arch-how-visual[data-phase="3"] [data-node="edge"],
.arch-how-visual[data-phase="4"] [data-node="ux"],
.arch-how-visual[data-phase="4"] [data-node="core"],
.arch-how-visual[data-phase="4"] [data-node="ledger"],
.arch-how-visual[data-phase="4"] [data-node="mqtt"],
.arch-how-visual[data-phase="4"] [data-node="hub"],
.arch-how-visual[data-phase="4"] [data-node="edge"] {
  opacity: 1;
  border-color: rgba(77, 189, 134, 0.55);
  color: #9ecfb8;
  box-shadow: 0 0 0 1px rgba(45, 150, 104, 0.15), 0 6px 20px rgba(13, 133, 153, 0.12);
}

.arch-how-visual[data-phase="0"] .arch-how-connector.c-ux-core,
.arch-how-visual[data-phase="1"] .arch-how-connector.c-core-pg,
.arch-how-visual[data-phase="2"] .arch-how-connector.c-mq-hub,
.arch-how-visual[data-phase="3"] .arch-how-connector.c-hub-edge {
  background: linear-gradient(90deg, #2d9668, #0d8599);
  opacity: 1;
  box-shadow: 0 0 10px rgba(13, 133, 153, 0.35);
}

@keyframes arch-signal {
  0% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.35;
  }
}

.arch-how-visual[data-phase="4"] .arch-how-connector {
  animation: arch-signal 2.4s ease-in-out infinite;
}

.arch-how-visual[data-phase="4"] .c-ux-core {
  animation-delay: 0s;
}

.arch-how-visual[data-phase="4"] .c-core-pg {
  animation-delay: 0.35s;
}

.arch-how-visual[data-phase="4"] .c-mq-hub {
  animation-delay: 0.7s;
}

.arch-how-visual[data-phase="4"] .c-hub-edge {
  animation-delay: 1.05s;
}

@media (prefers-reduced-motion: reduce) {
  .arch-how-visual[data-phase="4"] .arch-how-connector {
    animation: none;
    opacity: 0.75;
  }
}

/* --- Error page --- */
.error-layout {
  min-height: calc(70vh - var(--header-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.25rem 4rem;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 14vw, 6.5rem);
  font-weight: 800;
  line-height: 1;
  margin: 0 0 0.35rem;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-layout h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.error-layout .prose {
  margin-inline: auto;
  max-width: 36ch;
}

.error-actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* --- Small viewports --- */
@media (max-width: 520px) {
  section {
    padding: 2.75rem 0;
  }

  .hero {
    gap: 1.75rem;
    padding-bottom: 2rem;
  }

  .hero .lede {
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .cta-row {
    flex-direction: column;
  }

  .cta-row .btn {
    width: 100%;
  }
}

.product-grid {
  margin-top: 1.25rem;
}

.product-card {
  position: relative;
  padding-top: 2.1rem;
}

.product-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.product-status--shipped {
  background: #e8f3ec;
  color: var(--accent-dim);
}

.product-status--progress {
  background: #fff4e5;
  color: #8a5a12;
}

.product-status--planned {
  background: #eef1f4;
  color: #4a5568;
}
