/* Public site visual layer (landing, product, account forms, demo header).
   Loaded only by app/views/landing.php for public routes, after style.css.
   Members, Workspace, Studio, licences and commerce keep style.css alone. */

/* Light theme: vivid green accents on paper. */
:root {
  --flow: #4f8a3a;
  --flow-text: #3d6d2c;
  --forest: #17392a;
  --grid: rgba(22, 25, 21, .06);
  --glow: rgba(79, 138, 58, .20);
  --card: rgba(239, 241, 233, .55);
  --pulse: rgba(79, 138, 58, .55);
}

/* Dark theme (default in the model): deep forest, vivid lime. */
:root[data-theme="dark"] {
  --paper: #081711;
  --ink: #eaf3ed;
  --muted: #b5c8bb;
  --line: #2c4a38;
  --surface: #0d2118;
  --forest: #123524;
  --flow: #c7fa86;
  --flow-text: #c7fa86;
  --accent: #c7fa86;
  --control: #7fa88a;
  --grid: rgba(199, 250, 134, .05);
  --glow: rgba(32, 77, 50, .75);
  --card: rgba(13, 33, 24, .72);
  --pulse: rgba(199, 250, 134, .55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #081711;
    --ink: #eaf3ed;
    --muted: #b5c8bb;
    --line: #2c4a38;
    --surface: #0d2118;
    --forest: #123524;
    --flow: #c7fa86;
    --flow-text: #c7fa86;
    --accent: #c7fa86;
    --control: #7fa88a;
    --grid: rgba(199, 250, 134, .05);
    --glow: rgba(32, 77, 50, .75);
    --card: rgba(13, 33, 24, .72);
    --pulse: rgba(199, 250, 134, .55);
  }
}

/* Background: subtle grid with a soft green radial light, fixed behind content. */
body.site-public::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 80% 22%, var(--glow) 0, transparent 46%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
}

/* Header navigation: links keep a 44 px minimum touch target in both directions. */
.site-public .header nav a {
  min-width: 44px;
  justify-content: center;
}

/* Language switcher: segmented pill; the current language is marked with aria-current. */
.site-public .languages {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.site-public .languages a {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border-bottom: 0;
  font-weight: 600;
  color: var(--muted);
  transition: color .2s, background-color .2s;
}
.site-public .languages a:hover {
  color: var(--ink);
  background: var(--card);
}
.site-public .languages a[aria-current] {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 0;
}

/* Status pill with a pulsing dot (static under reduced-motion via style.css). */
.site-public .hero .eyebrow {
  display: inline-flex;
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}
.site-public .hero .eyebrow .dot {
  width: 8px;
  height: 8px;
  background: var(--flow);
  animation: ipl-pulse 2.4s ease-out infinite;
}
@keyframes ipl-pulse {
  0% { box-shadow: 0 0 0 0 var(--pulse); }
  80%, 100% { box-shadow: 0 0 0 9px transparent; }
}

/* Orbital composition: slow rings around the hero strands (decorative, aria-hidden in markup). */
.site-public .orbit-ring {
  transform-origin: 320px 315px;
  animation: ipl-spin 90s linear infinite;
}
.site-public .orbit-ring-slow {
  animation-duration: 140s;
  animation-direction: reverse;
}
.site-public .orbit-ring > circle:not(.ring-node) {
  fill: none;
  stroke: var(--flow);
  stroke-width: .8;
  opacity: .42;
}
.site-public .orbit-ring > circle:first-child {
  stroke-dasharray: 2 8;
}
.site-public .orbit-ring > .ring-node {
  fill: var(--paper);
  stroke: var(--flow);
  stroke-width: 1.5;
}
.site-public .flow.paused .orbit-ring {
  animation-play-state: paused;
}
@keyframes ipl-spin {
  to { transform: rotate(360deg); }
}

/* Thin-bordered cards with translucent fill for the principles and ecosystem items. */
.site-public .principles article,
.site-public .platforms article {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  padding: 26px 24px 28px;
}
.site-public .platforms article {
  padding-right: 24px;
}
.site-public .edition-offer {
  background: rgba(248, 248, 244, .04);
  border-radius: 12px;
}

/* Footer emblem: small, muted brand mark (decorative, aria-hidden in markup). Hero keeps the Neural Flow composition. */
.site-public .footer-emblem {
  width: 124px;
  height: auto;
  display: block;
  flex-shrink: 0;
  overflow: visible;
}
@media (max-width: 760px) {
  .site-public .footer-emblem {
    width: 92px;
  }
}
/* Animated footer emblem: rings and arcs turn slowly in opposite directions; nodes breathe. Centre wordmark stays still. */
.site-public .emblem-spin-slow {
  transform-origin: 231px 287px;
  animation: ipl-spin 60s linear infinite;
}
.site-public .emblem-spin-rev {
  transform-origin: 231px 287px;
  animation: ipl-spin 90s linear infinite reverse;
}
.site-public .emblem-node {
  animation: ipl-breathe 3.6s ease-in-out infinite alternate;
}
@keyframes ipl-breathe {
  from { opacity: .3; }
  to { opacity: 1; }
}

/* Reduced motion: nothing animates, including the rings and the pulse. */
@media (prefers-reduced-motion: reduce) {
  .site-public .orbit-ring,
  .site-public .hero .eyebrow .dot,
  .site-public .emblem-spin-slow,
  .site-public .emblem-spin-rev,
  .site-public .emblem-node {
    animation: none !important;
  }
}
