/* ========================================================================
   PANAKIA — Design System v2
   Palette: white · aqua green · celeste blue · deep ink
   Type: Manrope (sans) + JetBrains Mono (technical accents)
   ======================================================================== */

:root {
  /* Surfaces */
  --paper: #ffffff;
  --paper-2: oklch(0.985 0.005 200);
  --paper-3: oklch(0.965 0.01 200);

  /* Ink */
  --ink: oklch(0.22 0.025 230);
  --ink-2: oklch(0.40 0.02 230);
  --ink-3: oklch(0.55 0.02 230);
  --ink-4: oklch(0.72 0.015 230);

  /* Rules */
  --rule: oklch(0.93 0.01 200);
  --rule-2: oklch(0.86 0.012 200);

  /* Brand teal — matches PANAKIA product labels #46969e */
  --aqua: oklch(0.72 0.07 200);
  --aqua-hi: oklch(0.78 0.07 200);
  --aqua-deep: oklch(0.59 0.07 200);
  --aqua-soft: oklch(0.93 0.035 200);
  --aqua-mist: oklch(0.97 0.018 200);

  --celeste: oklch(0.74 0.07 220);
  --celeste-hi: oklch(0.80 0.07 220);
  --celeste-deep: oklch(0.55 0.10 220);
  --celeste-soft: oklch(0.93 0.04 220);
  --celeste-mist: oklch(0.97 0.02 220);

  /* Single "brand" handle (defaults to aqua) */
  --brand: var(--aqua-deep);
  --brand-hi: var(--aqua);
  --brand-soft: var(--aqua-soft);

  --warn: oklch(0.68 0.13 60);

  /* Type */
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: 24px;
  --max: 1440px;

  --radius: 4px;
  --radius-lg: 12px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
  /* Ambient atmosphere: two diffused points of brand color over paper.
     Fixed attachment so the glow stays put as the page scrolls. */
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 70% 55% at 85% 6%,
      color-mix(in oklch, var(--aqua) 22%, transparent) 0%,
      transparent 60%),
    radial-gradient(ellipse 65% 60% at 6% 96%,
      color-mix(in oklch, var(--celeste) 18%, transparent) 0%,
      transparent 62%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  position: relative;
  min-height: 100vh;
}

/* Optional film grain to keep the diffused color from looking like a flat blur. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.045 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.55;
  mix-blend-mode: multiply;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; padding: 0; }

/* Typography classes */
.mono { font-family: var(--mono); }
.sans { font-family: var(--sans); }

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.label--ink { color: var(--ink); }
.label--brand { color: var(--brand); }

.kbd-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid var(--rule-2);
  border-radius: 100px;
  color: var(--ink-2);
  background: var(--paper);
}
.kbd-tag .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
  display: inline-block;
}

/* Layout */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}

/* Utility strip */
.utility-strip {
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  background: var(--paper);
}
.utility-strip .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 34px;
}
.utility-strip .left,
.utility-strip .right {
  display: flex;
  gap: 18px;
  align-items: center;
}
.utility-strip .live::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
  margin-right: 7px;
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--brand) 25%, transparent);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.lang-switch {
  display: flex;
  gap: 4px;
  align-items: center;
}
.lang-switch button {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  color: var(--ink-3);
  border-radius: 3px;
  transition: background 0.15s, color 0.15s;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.active {
  color: var(--ink);
  background: var(--paper-3);
}
.lang-switch .sep { color: var(--rule-2); }

/* Navigation */
.nav {
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  z-index: 50;
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.brand-mark {
  width: 36px;
  height: 36px;
  position: relative;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aqua) 0%, var(--celeste) 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.brand-mark::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--paper);
  border-radius: 50%;
}
.brand-mark::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--paper);
  border-radius: 50%;
}
.brand-word {
  font-family: var(--sans);
  font-size: 18px;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--ink);
}
.brand-suffix {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  border-left: 1px solid var(--rule-2);
  padding-left: 10px;
  margin-left: 4px;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  gap: 2px;
}
.nav-links a {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 9px 16px;
  color: var(--ink-2);
  border-radius: 100px;
  transition: color 0.15s, background 0.15s;
  cursor: pointer;
  position: relative;
}
.nav-links a:hover { color: var(--ink); background: var(--paper-3); }
.nav-links a.active {
  color: var(--ink);
  background: var(--aqua-soft);
}
.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 13px 22px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: 100px;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: oklch(0.30 0.025 230); }
.btn .arrow {
  display: inline-block;
  transition: transform 0.15s;
}
.btn:hover .arrow { transform: translateX(3px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-2);
}
.btn--ghost:hover { background: var(--paper-3); border-color: var(--ink-3); }
.btn--brand {
  background: var(--aqua-deep);
  border-color: var(--aqua-deep);
  color: var(--paper);
  box-shadow: 0 1px 3px color-mix(in oklch, var(--aqua-deep) 35%, transparent);
}
.btn--brand:hover {
  background: oklch(0.50 0.10 185);
  border-color: oklch(0.50 0.10 185);
  box-shadow: 0 4px 12px color-mix(in oklch, var(--aqua-deep) 35%, transparent);
}
.btn--sm { padding: 9px 16px; font-size: 13px; }

/* Section structure */
.section {
  border-top: 1px solid var(--rule);
  padding: 112px 0;
  position: relative;
  /* Per-section ambient color halos — each section gets its own diffused
     color point that scrolls with it, so every "white" surface breathes.
     Variants are applied via :nth-of-type below to add rhythm. */
  background-image:
    radial-gradient(ellipse 55% 45% at 90% 12%,
      color-mix(in oklch, var(--aqua) 22%, transparent) 0%,
      transparent 60%),
    radial-gradient(ellipse 50% 50% at 6% 92%,
      color-mix(in oklch, var(--celeste) 18%, transparent) 0%,
      transparent 62%);
}
.section--tight { padding: 72px 0; }
.section--no-border { border-top: 0; }

/* Alternate ambient placements so sections don't all look the same. */
.section:nth-of-type(2n) {
  background-image:
    radial-gradient(ellipse 55% 45% at 8% 18%,
      color-mix(in oklch, var(--celeste) 22%, transparent) 0%,
      transparent 62%),
    radial-gradient(ellipse 50% 50% at 95% 90%,
      color-mix(in oklch, var(--aqua) 18%, transparent) 0%,
      transparent 60%);
}
.section:nth-of-type(3n) {
  background-image:
    radial-gradient(ellipse 65% 50% at 50% 100%,
      color-mix(in oklch, var(--aqua) 20%, transparent) 0%,
      transparent 60%),
    radial-gradient(ellipse 45% 40% at 50% 0%,
      color-mix(in oklch, var(--celeste) 16%, transparent) 0%,
      transparent 60%);
}

/* Sections that already paint their own atmosphere (dark or colored)
   should not be overridden by the per-section halos. */
.section.reach,
.section.video-section,
.section.about-hero-section {
  background-image: none;
}
.section-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--gutter);
  margin-bottom: 64px;
  align-items: end;
}
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 6px 12px;
  background: var(--aqua-soft);
  color: var(--aqua-deep);
  border-radius: 100px;
}
.section-eyebrow .num { font-weight: 600; }
.section-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--aqua-deep);
  display: inline-block;
}
.section-title {
  font-family: var(--sans);
  font-size: clamp(34px, 4.4vw, 56px);
  letter-spacing: -0.025em;
  font-weight: 600;
  line-height: 1.02;
  margin: 20px 0 0;
  max-width: 18ch;
  text-wrap: balance;
  color: var(--ink);
}
.section-title em {
  font-style: normal;
  background: linear-gradient(110deg, var(--aqua-deep), var(--celeste-deep));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.section-lede {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 46ch;
  text-wrap: pretty;
}

/* Footer */
.footer {
  border-top: 1px solid var(--rule);
  background: linear-gradient(180deg, oklch(0.16 0.025 225) 0%, oklch(0.12 0.025 225) 100%);
  color: var(--paper);
  padding: 96px 0 28px;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -100px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--aqua) 0%, transparent 65%);
  opacity: 0.18;
  filter: blur(20px);
}
.footer::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: 10%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--celeste) 0%, transparent 65%);
  opacity: 0.15;
  filter: blur(20px);
}
.footer .wrap { position: relative; z-index: 1; }
.footer .grid-12 { row-gap: 48px; }
.footer h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: oklch(0.72 0.04 200);
  margin: 0 0 18px;
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { font-family: var(--sans); font-size: 14.5px; padding: 5px 0; color: oklch(0.88 0.02 200); }
.footer li a { cursor: pointer; transition: color 0.15s; }
.footer li a:hover { color: var(--aqua-hi); }
.footer-bottom {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid oklch(0.30 0.02 225);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: oklch(0.62 0.02 225);
}
.footer-mark {
  font-family: var(--sans);
  font-size: clamp(56px, 8vw, 96px);
  letter-spacing: -0.045em;
  font-weight: 700;
  line-height: 1;
  color: var(--paper);
  grid-column: span 12;
  margin-bottom: 24px;
}
.footer-mark .dot {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--aqua-hi);
  margin-bottom: 8px;
  margin-left: 4px;
  vertical-align: baseline;
}

/* Placeholder image — refined aqua/celeste gradient */
.ph {
  position: relative;
  background:
    linear-gradient(135deg,
      var(--aqua-soft) 0%,
      var(--celeste-soft) 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
}
.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in oklch, var(--aqua) 30%, transparent) 0%, transparent 55%),
    radial-gradient(circle at 70% 80%, color-mix(in oklch, var(--celeste) 30%, transparent) 0%, transparent 55%);
  z-index: 0;
}
.ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg,
      transparent 0,
      transparent 23px,
      color-mix(in oklch, var(--ink) 4%, transparent) 23px,
      color-mix(in oklch, var(--ink) 4%, transparent) 24px),
    repeating-linear-gradient(90deg,
      transparent 0,
      transparent 23px,
      color-mix(in oklch, var(--ink) 4%, transparent) 23px,
      color-mix(in oklch, var(--ink) 4%, transparent) 24px);
  z-index: 1;
}
/* When an actual image fills the placeholder, hide the decorative gradient/grid */
.ph--has-img { background: var(--paper); }
.ph--has-img::before,
.ph--has-img::after { display: none; }
.ph .ph-label {
  position: absolute;
  top: 14px;
  left: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  padding: 5px 9px;
  border-radius: 100px;
  z-index: 3;
  border: 1px solid color-mix(in oklch, var(--paper) 50%, transparent);
}
.ph .ph-dim {
  position: absolute;
  bottom: 14px;
  right: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  padding: 5px 9px;
  border-radius: 100px;
  z-index: 3;
  border: 1px solid color-mix(in oklch, var(--paper) 50%, transparent);
}
/* SVG composition placeholders */
.ph-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 14.5px;
}
.data-table th,
.data-table td {
  text-align: left;
  padding: 16px 12px;
  border-bottom: 1px solid var(--rule);
}
.data-table th {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  border-bottom: 1px solid var(--ink);
}
.data-table tr { transition: background 0.15s; }
.data-table tr:hover td { background: var(--aqua-mist); }

/* Card */
.card {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 28px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.15s, transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--rule-2);
  box-shadow: 0 12px 32px -16px color-mix(in oklch, var(--celeste-deep) 20%, transparent);
  transform: translateY(-2px);
}
.card .card-id {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
}
.card .card-id .dot {
  width: 6px; height: 6px;
  background: var(--brand);
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}
.card h3 {
  font-family: var(--sans);
  font-size: 22px;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 10px;
  line-height: 1.15;
}
.card p {
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 24px;
  text-wrap: pretty;
}
.card .card-foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.card .card-foot .arrow { transition: transform 0.15s; }
.card:hover .card-foot .arrow { transform: translateX(4px); color: var(--brand); }

/* Hairline */
.hr { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* Spacing helpers */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }

.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
.start-2 { grid-column-start: 2; }
.start-6 { grid-column-start: 6; }
.start-7 { grid-column-start: 7; }
.start-8 { grid-column-start: 8; }

/* Page transitions */
.page { animation: fadeIn 0.4s ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Marquee */
.marquee {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 20px 0;
  overflow: hidden;
  background: linear-gradient(90deg, var(--aqua-mist), var(--celeste-mist), var(--aqua-mist));
}
.marquee-track {
  display: flex;
  gap: 48px;
  animation: scroll 50s linear infinite;
  white-space: nowrap;
  width: max-content;
}
.marquee-item {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 48px;
}
.marquee-item .star { color: var(--brand); font-size: 18px; }
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Mobile */
@media (max-width: 880px) {
  :root { --gutter: 16px; }
  .nav .wrap { height: 60px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 16px;
    gap: 4px;
  }
  .mobile-toggle { display: inline-flex; }
  .section { padding: 64px 0; }
  .section-head { grid-template-columns: 1fr; margin-bottom: 32px; }
  .span-6, .span-5, .span-4, .span-3, .span-7, .span-8 { grid-column: span 12; }
  .start-2, .start-6, .start-7, .start-8 { grid-column-start: auto; }
  .utility-strip .wrap { font-size: 10px; gap: 8px; height: 30px; }
  .utility-strip .left .hide-sm { display: none; }
  .footer-bottom { flex-direction: column; gap: 14px; align-items: flex-start; }
}
.mobile-toggle { display: none; flex-direction: column; gap: 5px; width: 28px; padding: 6px; }
.mobile-toggle span { height: 1.5px; background: var(--ink); display: block; }

/* Soft gradient surfaces */
.surf-aqua { background: linear-gradient(180deg, var(--paper) 0%, var(--aqua-mist) 100%); }
.surf-celeste { background: linear-gradient(180deg, var(--paper) 0%, var(--celeste-mist) 100%); }
.surf-mix { background: linear-gradient(135deg, var(--aqua-mist), var(--celeste-mist)); }

.no-soft-bg .surf-aqua,
.no-soft-bg .surf-celeste,
.no-soft-bg .surf-mix { background: var(--paper); }
