/* ==========================================================================
   LOOK: FLOW
   Not in Figma. Green silk that moves as you scroll: a short video turned
   into still pictures and played by the scroll bar (flow.js), with a fine
   dither over it so it stays crisp on any screen. Light type on deep green.
   Everything uses the same fonts and layout as the other looks.
   ========================================================================== */
html[data-look="flow"] {
  --color-text: #f2fff9;
  --color-page: #06261f;
  /* The results and deep-dive colours, lightened so they glow on the green */
  --color-pink: #ffa3dc;
  --color-violet: #c3b8ff;
  --color-sky: #94d4ff;
  --color-green: #9dffa0;
  --color-orange: #ffb27a;
  --color-neon: #b6ff9e;
  --color-link: #b9f5ff;
}

/* A soft shadow lifts the type off the brightest parts of the silk */
html[data-look="flow"] .content { text-shadow: 0 1px 24px rgba(2, 30, 24, 0.45); }

/* The silk. Fixed behind everything, and it never intercepts clicks. */
html[data-look="flow"] #flow,
html[data-look="flow"] #flow-grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100lvh;
  z-index: -1;
  display: block;
  pointer-events: none;
}
/* A fine, even speckle over the top (the CSS dither). Turn it down with --flow-grain (0 to 1). */
html[data-look="flow"] #flow-grain {
  
  z-index: -1;
  opacity: var(--flow-grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Crect x='0' y='0' width='1' height='1' fill='%23ffffff' fill-opacity='0.22'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%23002b28' fill-opacity='0.28'/%3E%3C/svg%3E");
  background-size: 4px 4px;
  image-rendering: pixelated;
  mix-blend-mode: soft-light;
}

/* Until the first picture arrives, and if WebGL isn't available: deep green with one still frame */
html[data-look="flow"] body.no-webgl {
  background: linear-gradient(180deg, rgba(3, 38, 31, 0.55), rgba(3, 38, 31, 0.7)), var(--flow-still, none) center / cover fixed, #06261f;
}

/* The black icons (arrows, chevrons) turn white */
html[data-look="flow"] :is(.accordion-toggle img, .lead-arrow img, .dive-arrow img, .step-title--icon img) { filter: invert(1); }

/* Nav and menus: dark glass instead of light */
html[data-look="flow"] .nav::before { background: rgba(3, 38, 31, 0.06); }
@media (max-width: 1200px) {
  html[data-look="flow"].js .nav-links { background: rgba(4, 36, 30, 0.82); }
  html[data-look="flow"].js .nav:has(.is-open)::before { background: rgba(4, 36, 30, 0.82); }
  html[data-look="flow"].js .nav-group { border-bottom-color: rgba(255, 255, 255, 0.22); }
}

/* Buttons that sit on light glass keep dark ink, and the email button goes light */
html[data-look="flow"] .glass-button { color: #06261f; text-shadow: none; }
html[data-look="flow"] .email-button { background: #f2fff9; color: #06261f; text-shadow: none; }
html[data-look="flow"] .email-button:hover { background: #ffffff; }
html[data-look="flow"] .copy-email:hover { background: rgba(255, 255, 255, 0.14); }

/* ---- Silk controls, bottom right: dark frosted glass, like the Rainbows light controls ---- */
html[data-look="flow"] #flow-controls {
  --panel-ink: #f2fff9;
  --panel-soft: rgba(242, 255, 249, 0.65);
  --panel-line: rgba(242, 255, 249, 0.18);
  position: fixed; right: 16px; bottom: 16px; z-index: 10;
  width: 288px; max-height: calc(100svh - var(--nav-height) - 32px); overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 20px;
  background: linear-gradient(to bottom, rgba(4, 36, 30, 0.72), rgba(4, 36, 30, 0.55));
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), 0 18px 48px -18px rgba(0, 10, 8, 0.6);
  color: var(--panel-ink);
  text-shadow: none;
  font: 500 13px/1.3 var(--font-body);
  scrollbar-width: thin;
}
html[data-look="flow"] #flow-controls button { font: inherit; color: inherit; cursor: pointer; }
html[data-look="flow"] #flow-controls .head {
  position: sticky; top: 0; z-index: 1; width: 100%; padding: 12px 16px; border: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: none; text-align: left;
  font-family: var(--font-display); font-size: 15px; line-height: 1;
}
html[data-look="flow"] #flow-controls .sign { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); font-size: 16px; line-height: 1; }
html[data-look="flow"] #flow-controls .head:hover .sign { background: rgba(255, 255, 255, 0.3); }
html[data-look="flow"] #flow-controls .body { padding: 0 16px 16px; }
html[data-look="flow"] #flow-controls[data-closed="true"] { width: auto; border-radius: var(--radius-pill); }
html[data-look="flow"] #flow-controls[data-closed="true"] .body { display: none; }
html[data-look="flow"] #flow-controls h4 {
  margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid var(--panel-line);
  font-family: var(--font-display); font-size: 14px; font-weight: 400; line-height: 1;
}
html[data-look="flow"] #flow-controls .pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
html[data-look="flow"] #flow-controls .pick span { flex: 1 0 100%; }
html[data-look="flow"] #flow-controls .pick button { flex: 1 0 0; min-width: 0; padding: 7px 0; border: 1px solid var(--panel-line); border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.08); }
html[data-look="flow"] #flow-controls .pick button[aria-pressed="true"] { background: var(--panel-ink); border-color: var(--panel-ink); color: #06261f; }
html[data-look="flow"] #flow-controls label { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; margin-bottom: 8px; }
html[data-look="flow"] #flow-controls output { font-variant-numeric: tabular-nums; color: var(--panel-soft); }
html[data-look="flow"] #flow-controls input[type="range"] { -webkit-appearance: none; appearance: none; grid-column: 1 / -1; width: 100%; height: 22px; margin: 0; background: none; cursor: pointer; }
html[data-look="flow"] #flow-controls input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); }
html[data-look="flow"] #flow-controls input[type="range"]::-moz-range-track { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); }
html[data-look="flow"] #flow-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7.5px; border-radius: 50%;
  background: #ffffff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14), 0 3px 8px -2px rgba(0, 10, 8, 0.5);
}
html[data-look="flow"] #flow-controls input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #ffffff; }
html[data-look="flow"] #flow-controls .buttons { display: grid; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--panel-line); }
html[data-look="flow"] #flow-controls .buttons button { padding: 9px 8px; border: 1px solid var(--panel-line); border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.08); }
html[data-look="flow"] #flow-controls .buttons button:hover { background: rgba(255, 255, 255, 0.18); }
html[data-look="flow"] #flow-controls .buttons .wide { border-color: var(--panel-ink); background: var(--panel-ink); color: #06261f; }
html[data-look="flow"] #flow-controls .buttons .wide:hover { background: #ffffff; }
html[data-look="flow"] #flow-controls textarea { display: none; width: 100%; height: 150px; margin-top: 8px; padding: 8px; border: 1px solid var(--panel-line); border-radius: 10px; background: rgba(0, 0, 0, 0.3); color: inherit; font: 11px/1.35 ui-monospace, Menlo, monospace; }
html[data-look="flow"] #flow-controls :is(button, input):focus-visible { outline: 2px solid var(--panel-ink); outline-offset: 2px; border-radius: 10px; }
