:root {
  --color-bg: #fafaf7;
  --color-text: #1a1a1a;
  --color-text-muted: #5a5a5a;
  --color-accent: #2d6a4f;
  --color-accent-light: #40916c;
  --color-accent-bg: #f0f7f4;
  --color-accent-deep: #1b4332;
  --color-border: #d4d4c8;
  --color-white: #ffffff;
  --color-warm: #f5f0e8;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1100px;
  --max-width-narrow: 760px;
  /* Organic motion: settle like a plant finding rest, bloom with a slight overshoot */
  --ease-grow: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bloom: cubic-bezier(0.34, 1.35, 0.64, 1);
  /* Leaf radii: asymmetric two-corner rounding, the cell-membrane shape family */
  --radius-leaf-a: 1.5rem 0.6rem 1.5rem 0.6rem;
  --radius-leaf-b: 0.6rem 1.5rem 0.6rem 1.5rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-accent-light);
}

/* ========================================
   Navigation
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.nav.scrolled {
  border-bottom-color: var(--color-border);
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
  font-size: 1.5rem;
  line-height: 1;
}

/* ========================================
   Hero
   ======================================== */

.hero-wrap {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* Disable browser double-tap zoom inside the hero so the double-tap
   awaken gesture works; pan and pinch zoom remain available. */
.hero-wrap,
.hero-wrap * {
  touch-action: manipulation;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero-compact {
  min-height: auto;
  padding: 8rem 2rem 4rem;
}

.evolution-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-badge,
.hero h1,
.hero p,
.hero-cta {
  position: relative;
  z-index: 2;
}

/* Not a chip: a quiet label held between two filament ends,
   quoting the connection lines of the network canvas. */
.hero-badge {
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--color-accent);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-bottom: 2rem;
  white-space: nowrap;
}

.hero-badge::before,
.hero-badge::after {
  content: '';
  display: inline-block;
  width: 26px;
  height: 1px;
  vertical-align: middle;
  margin: 0 0.75rem;
  background: linear-gradient(to right, rgba(64, 145, 108, 0), var(--color-accent-light));
}

.hero-badge::after {
  background: linear-gradient(to left, rgba(64, 145, 108, 0), var(--color-accent-light));
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero h1 .accent {
  color: var(--color-accent);
}

.hero p {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Touch-only affordance for the dormant network; toggled via .is-visible */
.hero-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2.5rem;
  z-index: 2;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}

.hero-hint.is-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease;
}

@media (prefers-reduced-motion: reduce) {
  .hero-hint {
    display: none;
  }
}

/* ========================================
   Buttons
   ======================================== */

/* Buttons carry the leaf shape; hovering flips the leaf,
   a tissue response instead of the stock translateY lift. */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 1.25rem 0.5rem 1.25rem 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s,
    border-radius 0.45s var(--ease-bloom);
  cursor: pointer;
  border: none;
  font-family: var(--font-main);
}

.btn:hover {
  border-radius: 0.5rem 1.25rem 0.5rem 1.25rem;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-accent-light);
  color: var(--color-white);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

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

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.82rem;
}

/* ========================================
   Sections
   ======================================== */

section {
  padding: 6rem 2rem;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.container-narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* Section labels are nodes in the network: the same soft-glow dot
   as the hero canvas nodes, carried through the whole page. */
.section-label::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.55rem;
  vertical-align: 8%;
  background: var(--color-accent-light);
  box-shadow: 0 0 0 3px var(--color-accent-bg), 0 0 10px rgba(64, 145, 108, 0.45);
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 3rem;
}

.section-alt {
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-warm {
  background: var(--color-warm);
}

/* ========================================
   Principles Grid
   ======================================== */

.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.principle-card {
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-white);
  transition: border-color 0.2s, transform 0.2s;
}

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

.principle-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.principle-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.principle-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ========================================
   Holons Grid (home + overview)
   ======================================== */

.holons-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 2rem;
}

.pillar {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-white);
  overflow: hidden;
}

.pillar-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-accent-bg);
}

.pillar-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-accent-deep);
}

.pillar-header p {
  font-size: 0.82rem;
  color: var(--color-accent);
  margin-top: 0.25rem;
}

.pillar-body {
  padding: 1rem;
}

.holon-link {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-text);
  transition: background 0.15s, color 0.15s;
  font-size: 0.9rem;
}

.holon-link:hover {
  background: var(--color-accent-bg);
  color: var(--color-accent);
}

.holon-link .holon-name {
  font-weight: 500;
  display: block;
}

.holon-link .holon-desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: block;
  margin-top: 0.15rem;
}

.holon-link .holon-sub {
  font-size: 0.75rem;
  color: var(--color-accent);
  display: block;
  margin-top: 0.25rem;
}

/* Full Holon Cards (used on holons/index.html) */

.holons-full-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.holon-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-white);
  padding: 2rem;
  transition: border-color 0.2s, transform 0.2s;
}

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

.holon-card-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--color-accent-bg);
  color: var(--color-accent);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.holon-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.holon-card h3 a {
  color: var(--color-text);
  text-decoration: none;
}

.holon-card h3 a:hover {
  color: var(--color-accent);
}

.holon-card p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.holon-card .sub-holons {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.holon-card .sub-holons h4 {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.holon-card .sub-holons ul {
  list-style: none;
}

.holon-card .sub-holons li {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  padding: 0.2rem 0;
}

.holon-card .sub-holons li a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.holon-card .sub-holons li a:hover {
  color: var(--color-accent);
}

/* ========================================
   Holon Detail Pages
   ======================================== */

.page-header {
  padding: 8rem 2rem 3rem;
  text-align: center;
}

.page-header .breadcrumb {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.page-header .breadcrumb a {
  color: var(--color-accent);
  text-decoration: none;
}

.page-header h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.page-header .lead {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

.page-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.meta-item {
  text-align: center;
}

.meta-item dt {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.meta-item dd {
  font-size: 0.9rem;
  color: var(--color-text);
}

/* Long preformatted lines (license texts, code) scroll inside their
   own box instead of stretching the page sideways on small screens. */
pre {
  max-width: 100%;
  overflow-x: auto;
}

/* Content prose */

.prose {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 3rem 0 1rem;
  line-height: 1.3;
}

.prose h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

.prose p {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.prose ul,
.prose ol {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  font-size: 0.95rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: 1.25rem;
  margin: 2rem 0;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ========================================
   About Page
   ======================================== */

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-details {
  padding: 2rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.about-detail-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.about-detail-item:last-child {
  border-bottom: none;
}

.about-detail-item dt {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.about-detail-item dd {
  font-size: 0.95rem;
  color: var(--color-text);
}

/* Governance / Philosophy cards */

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.philosophy-card {
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-white);
  transition: border-color 0.2s, transform 0.2s;
}

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

.philosophy-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.philosophy-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.philosophy-card p:last-child {
  margin-bottom: 0;
}

/* ========================================
   Capital / Focus Grid
   ======================================== */

.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.focus-card {
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-white);
  transition: border-color 0.2s, transform 0.2s;
}

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

.focus-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.focus-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ========================================
   Holonic Tree / Visual Map
   ======================================== */

.holon-tree {
  max-width: 900px;
  margin: 0 auto;
}

.tree-root {
  text-align: center;
  margin-bottom: 2rem;
}

.tree-root-label {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: 100px;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.tree-branches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}

.tree-branches::before {
  content: '';
  position: absolute;
  top: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 1rem;
  background: var(--color-border);
}

.tree-branch {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-white);
  overflow: hidden;
}

.tree-branch-header {
  padding: 1.25rem 1.5rem;
  background: var(--color-accent-bg);
  border-bottom: 1px solid var(--color-border);
}

.tree-branch-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent-deep);
}

.tree-branch-header span {
  font-size: 0.8rem;
  color: var(--color-accent);
}

.tree-leaves {
  padding: 0.75rem;
  list-style: none;
}

.tree-leaf {
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: background 0.15s;
}

.tree-leaf:hover {
  background: var(--color-accent-bg);
}

.tree-leaf a {
  color: var(--color-text);
  text-decoration: none;
  display: block;
}

.tree-leaf a:hover {
  color: var(--color-accent);
}

.tree-leaf .leaf-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ========================================
   Newsletter
   ======================================== */

.newsletter {
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.newsletter-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--color-accent);
}

.newsletter-form input[type="email"]::placeholder {
  color: #aaa;
}

.newsletter-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
}

.newsletter-msg {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
  min-height: 1.2em;
}

.newsletter-msg.is-success {
  color: var(--color-accent-deep);
}

.newsletter-msg.is-error {
  color: #9c3b2e;
}

.newsletter-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========================================
   Back link
   ======================================== */

.back-link {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--color-border);
}

.back-link a {
  color: var(--color-accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link a:hover {
  text-decoration: underline;
}

/* ========================================
   Footer
   ======================================== */

.footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer a {
  color: var(--color-accent);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

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

/* ========================================
   Status badges
   ======================================== */

.status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-active {
  background: #d4edda;
  color: #155724;
}

.status-draft {
  background: #fff3cd;
  color: #856404;
}

.status-vision {
  background: #e8e0f0;
  color: #4a2c7a;
}

.status-legacy {
  background: var(--color-accent-bg);
  color: var(--color-accent);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 900px) {
  .holons-pillars {
    grid-template-columns: 1fr;
  }

  .tree-branches {
    grid-template-columns: 1fr;
  }
}

/* Nav collapses to a hamburger well above the general 768px "mobile"
   breakpoint below: with 11 links + the CTA button, the row needs
   ~1220px of natural width, so anything narrower than that (most
   laptop windows included) must not try to render it inline. */
@media (max-width: 1280px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(250, 250, 247, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 2rem 1.5rem;
    gap: 0.75rem;
    border-bottom: 1px solid var(--color-border);
    max-height: calc(100vh - 100%);
    overflow-y: auto;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 0.95rem;
  }

  .nav-links li:last-child {
    margin-top: 0.25rem;
  }

  .nav-links li:last-child .btn {
    display: inline-block;
    width: 100%;
    text-align: center;
  }

  .nav-toggle {
    display: block;
  }
}

@media (max-width: 768px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  section {
    padding: 4rem 1.5rem;
  }

  .page-meta {
    gap: 1.25rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ========================================
   Organic system — the network grows
   through the page (homepage)
   ======================================== */

/* --- Hero accent swash: a hand-drawn tendril under the key phrase --- */

.accent-swash {
  position: relative;
  white-space: nowrap;
}

.swash {
  position: absolute;
  left: 0;
  bottom: -0.2em;
  width: 100%;
  height: 0.3em;
  overflow: visible;
}

.swash path {
  fill: none;
  stroke: var(--color-accent-light);
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.55;
}

@media (prefers-reduced-motion: no-preference) {
  .swash path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: swash-draw 1.1s var(--ease-grow) 0.5s forwards;
  }
}

@keyframes swash-draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* --- Connective tissue: filaments joining the sections --- */

.filament {
  width: 60px;
  margin: -2.75rem auto 1.5rem;
}

.filament svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.filament path {
  fill: none;
  stroke: var(--color-accent-light);
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.55;
}

.filament circle {
  fill: var(--color-accent-light);
  opacity: 0.7;
}

/* --- Organic asymmetry: the principles grid grows in rings --- */

@media (min-width: 901px) {
  .grid-organic {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.75rem 2rem;
  }

  .grid-organic .principle-card {
    grid-column: span 3;
  }

  .grid-organic .principle-card:nth-child(2) {
    margin-top: 1.75rem;
  }

  .grid-organic .principle-card:nth-child(3),
  .grid-organic .principle-card:nth-child(4),
  .grid-organic .principle-card:nth-child(5) {
    grid-column: span 2;
  }

  .grid-organic .principle-card:nth-child(4) {
    margin-top: 1.5rem;
  }

  .grid-organic .principle-card:nth-child(6) {
    grid-column: 2 / span 4;
  }
}

.grid-organic .principle-card {
  transition: border-color 0.3s, transform 0.5s var(--ease-bloom),
    border-radius 0.5s var(--ease-bloom);
}

.grid-organic .principle-card:nth-child(odd) {
  border-radius: var(--radius-leaf-a);
}

.grid-organic .principle-card:nth-child(even) {
  border-radius: var(--radius-leaf-b);
}

.grid-organic .principle-card:nth-child(1) {
  background: var(--color-accent-bg);
}

.grid-organic .principle-card:nth-child(4) {
  background: var(--color-warm);
}

.grid-organic .principle-card:hover {
  transform: scale(1.015);
  border-radius: 1rem;
}

/* Principle icons sit in a soft node glow, quoting the canvas nodes */
.grid-organic .principle-icon {
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--color-accent);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(64, 145, 108, 0.18) 0%, rgba(64, 145, 108, 0.05) 60%, transparent 100%);
}

/* --- Living pillar map: three cells branching from one root --- */

.holarchy-root {
  max-width: var(--max-width);
  margin: 0 auto -0.5rem;
}

.holarchy-root svg {
  display: block;
  width: 100%;
  height: 90px;
}

.holarchy-root path {
  fill: none;
  stroke: var(--color-accent-light);
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.5;
}

.holarchy-root .root-core {
  fill: var(--color-accent);
}

.holarchy-root .root-glow {
  fill: var(--color-accent-light);
  opacity: 0.2;
}

@media (max-width: 900px) {
  .holarchy-root {
    display: none;
  }
}

.holons-pillars {
  align-items: start;
}

.holons-pillars .pillar:nth-child(1) {
  border-radius: 1.75rem 0.9rem 1.5rem 0.9rem;
}

.holons-pillars .pillar:nth-child(2) {
  border-radius: 0.9rem 1.75rem 0.9rem 1.5rem;
}

.holons-pillars .pillar:nth-child(3) {
  border-radius: 1.5rem 0.9rem 1.75rem 0.9rem;
}

@media (min-width: 901px) {
  .holons-pillars .pillar:nth-child(2) {
    margin-top: 2.25rem;
  }

  .holons-pillars .pillar:nth-child(3) {
    margin-top: 0.75rem;
  }
}

/* Holon links become nodes on a stem inside each pillar cell */
.holons-pillars .pillar-body {
  position: relative;
}

.holons-pillars .pillar-body::before {
  content: '';
  position: absolute;
  top: 1.4rem;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 1px;
  background: linear-gradient(to bottom, var(--color-accent-light), rgba(64, 145, 108, 0.05));
  opacity: 0.5;
}

.holons-pillars .holon-link {
  position: relative;
  padding-left: 2rem;
}

.holons-pillars .holon-link::before {
  content: '';
  position: absolute;
  left: 0.28rem;
  top: 1.25rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-white);
  border: 1.5px solid var(--color-accent-light);
  transition: background 0.25s, box-shadow 0.25s;
}

.holons-pillars .holon-link:hover::before {
  background: var(--color-accent-light);
  box-shadow: 0 0 8px rgba(64, 145, 108, 0.6);
}

/* Tendril underline: grows from the left on hover */
.holons-pillars .holon-link .holon-name {
  width: fit-content;
  background-image: linear-gradient(var(--color-accent), var(--color-accent));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.45s var(--ease-grow);
}

.holons-pillars .holon-link:hover .holon-name {
  background-size: 100% 1px;
}

.section-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* --- Section titles: a root-line grows beneath on arrival --- */

[data-underline].section-title::after {
  content: '';
  display: block;
  width: 76px;
  height: 3px;
  margin-top: 0.6rem;
  border-radius: 2px;
  background: linear-gradient(to right, var(--color-accent-light), rgba(64, 145, 108, 0));
  transform-origin: left;
}

.newsletter-inner [data-underline].section-title::after {
  margin-left: auto;
  margin-right: auto;
  transform-origin: center;
}

/* --- Scroll growth: reveal states exist only when JS opted in
       (html.grow-ready) and reduced motion is not requested --- */

.grow-ready [data-grow] {
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  transition: opacity 0.8s var(--ease-grow) var(--grow-delay, 0ms),
    transform 0.8s var(--ease-grow) var(--grow-delay, 0ms);
}

.grow-ready [data-grow].is-grown {
  opacity: 1;
  transform: none;
}

/* Filaments and the holarchy root draw their strokes instead of fading */
.grow-ready .filament[data-grow],
.grow-ready .holarchy-root[data-grow] {
  opacity: 1;
  transform: none;
}

.grow-ready .filament path,
.grow-ready .holarchy-root path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.4s var(--ease-grow) 0.1s;
}

.grow-ready .filament.is-grown path,
.grow-ready .holarchy-root.is-grown path {
  stroke-dashoffset: 0;
}

.grow-ready .filament circle {
  opacity: 0;
  transition: opacity 0.5s ease 1.2s;
}

.grow-ready .filament.is-grown circle {
  opacity: 0.7;
}

.grow-ready [data-underline].section-title::after {
  transform: scaleX(0);
  transition: transform 0.9s var(--ease-grow) 0.25s;
}

.grow-ready [data-underline].section-title.is-grown::after {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .grid-organic .principle-card,
  .holon-link .holon-name,
  .holons-pillars .holon-link::before {
    transition: none;
  }
}

/* Print: reveal everything, whether or not it was scrolled into view */
@media print {
  .grow-ready [data-grow] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 900px) {
  .filament {
    margin: -2rem auto 1rem;
    width: 48px;
  }
}

/* Narrow phones: the hero clips (overflow: hidden), so the badge and
   accent phrase must wrap rather than run past the edge. The filament
   ends and the tendril swash step back where there is no room. */
@media (max-width: 420px) {
  .hero-badge {
    white-space: normal;
  }

  .hero-badge::before,
  .hero-badge::after {
    display: none;
  }
}

@media (max-width: 380px) {
  .accent-swash {
    white-space: normal;
  }

  .swash {
    display: none;
  }
}
