:root {
  --home-bg: #f7f5f0;
  --home-ink: #182326;
  --home-muted: #63716c;
  --home-accent: #1c5b45;
  --home-gold: #c8a96e;
  --home-surface: #ffffff;
  --home-border: #e1e6e4;
  --home-max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

body.home-body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--home-ink);
  background: var(--home-bg);
  line-height: 1.6;
}

.home-shell { max-width: var(--home-max); margin: 0 auto; padding: 0 24px 96px; }

.home-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; width: 100%; max-width: 100%; box-sizing: border-box;
  padding: 20px clamp(16px, 3vw, 32px); border-bottom: 1px solid var(--home-border);
  position: sticky; top: 0; background: var(--home-bg); z-index: 10;
  isolation: isolate;
}
.home-brand { flex: 0 0 auto; font-weight: 800; letter-spacing: -0.03em; font-size: 1.15rem; color: var(--home-accent); text-decoration: none; }
.home-nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; align-items: center; min-width: 0; }
.home-nav-links a { color: var(--home-muted); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.home-nav-links a:hover, .home-nav-links a:focus { color: var(--home-accent); }
.home-lang-switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--home-muted);
  font-size: 0.82rem;
}
.home-lang-switch button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--home-muted);
  padding: 4px 2px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.home-lang-switch button.is-active {
  color: var(--home-gold);
  border-bottom-color: var(--home-gold);
  box-shadow: inset 0 -2px 0 var(--home-gold);
}

.home-section { margin-top: 56px; }
.home-section h2 { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.03em; margin: 0 0 12px; }
.home-section .lead { color: var(--home-muted); max-width: 62ch; margin: 0 0 24px; }

.home-hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
  padding-top: 48px;
}
.home-eyebrow { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800; color: var(--home-muted); margin: 0 0 12px; }
.home-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.08; letter-spacing: -0.05em;
  margin: 0 0 18px; white-space: pre-line;
}
.home-hero-visual {
  background: var(--home-surface); border: 1px solid var(--home-border);
  border-radius: 18px; overflow: hidden; box-shadow: 0 18px 50px #21342b0f;
}
.home-hero-visual img { display: block; width: 100%; height: auto; }

.home-cta {
  display: inline-block; margin-top: 8px; padding: 14px 22px; border-radius: 10px;
  background: var(--home-accent); color: #fff; text-decoration: none; font-weight: 750;
}
.home-cta.secondary { background: transparent; color: var(--home-accent); border: 1px solid var(--home-border); }

.home-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.home-card {
  background: var(--home-surface); border: 1px solid var(--home-border); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column; min-height: 100%;
}
.home-card-media { aspect-ratio: 16/10; background: #f0ede6; overflow: hidden; }
.home-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-media-fallback { padding: 24px; color: #8b7355; text-align: center; }

.home-shell { contain: layout style; }
.home-card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.home-card-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.home-badge, .home-status {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 4px 8px; border-radius: 999px;
}
.home-badge { background: #edf5f1; color: var(--home-accent); }
.home-status { background: #f7f0e3; color: #7a5c1e; }
.home-card h3 { margin: 0; font-size: 1.05rem; letter-spacing: -0.02em; }
.home-card p { margin: 0; color: var(--home-muted); font-size: 0.92rem; flex: 1; }
.home-card a.card-link { margin-top: auto; color: var(--home-accent); font-weight: 700; text-decoration: none; font-size: 0.9rem; }

.home-explore-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.home-explore-card {
  background: var(--home-surface); border: 1px solid var(--home-border); border-radius: 14px;
  padding: 22px; display: flex; flex-direction: column; gap: 12px;
}
.home-explore-card h3 { margin: 0; font-size: 1.15rem; }
.home-explore-card p { margin: 0; color: var(--home-muted); font-size: 0.92rem; flex: 1; }

.home-pattern-box {
  background: var(--home-surface); border: 1px solid var(--home-border); border-radius: 16px;
  padding: 28px; display: grid; gap: 16px;
}
.home-pattern-notation {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.1rem; color: var(--home-accent); font-weight: 700;
}
.home-keywords { display: flex; flex-wrap: wrap; gap: 8px; }
.home-keywords span {
  padding: 6px 10px; border-radius: 999px; background: #f0ede6; color: #52645d; font-size: 0.82rem;
}
.home-question { font-size: 1.05rem; font-weight: 600; margin: 0; }

.home-flow {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0;
}
.home-flow-step {
  padding: 10px 14px; border-radius: 10px; background: var(--home-surface);
  border: 1px solid var(--home-border); font-weight: 700; font-size: 0.88rem;
}
.home-flow-arrow { color: var(--home-gold); font-weight: 800; }

.home-lenses { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.home-lens {
  padding: 16px; border-radius: 12px; background: var(--home-surface); border: 1px solid var(--home-border);
  font-weight: 650;
}

.home-ethics-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.home-ethics-list li {
  padding: 16px 18px; border-radius: 12px; background: var(--home-surface);
  border-left: 4px solid var(--home-gold); border-top: 1px solid var(--home-border);
  border-right: 1px solid var(--home-border); border-bottom: 1px solid var(--home-border);
}

.home-gallery-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.home-gallery-filters button {
  border: 1px solid var(--home-border); background: var(--home-surface); color: var(--home-muted);
  border-radius: 999px; padding: 8px 12px; font-size: 0.82rem; font-weight: 650; cursor: pointer;
}
.home-gallery-filters button.active { background: var(--home-accent); color: #fff; border-color: var(--home-accent); }

.home-footer { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--home-border); color: var(--home-muted); font-size: 0.85rem; }

@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; }
  .home-explore-grid { grid-template-columns: 1fr; }
  .home-lenses { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .home-nav { flex-direction: column; align-items: flex-start; }
  .home-shell { padding-inline: 16px; }
}
