/* SpiroDoodle site. The look follows paisleynebula.com (its tokens, type and
   membranes): a dark night sky, bioluminescent accents, Bebas Neue display
   type over IBM Plex Sans. SpiroDoodle's own art supplies the color.
   Mobile first; 16px side gutter; nothing wider than the viewport at 360px. */

@font-face { font-family: 'Bebas Neue'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/bebas-neue-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-600-normal.woff2) format('woff2'); }

:root {
  --abyss: #0D020D;
  --night: #1C0D1D;
  --dusk: #4C2443;
  --membrane: rgba(22, 10, 42, 0.70);
  --membrane-deep: rgba(8, 4, 20, 0.75);
  --plate-rim: #4A2A66;
  --ink: #ECE6FF;
  --ink-dim: #AAA0C8;
  --ink-dark: #0A1428;
  --biolume: #6EF0FF;
  --biolume-fill: rgba(60, 200, 230, 0.92);
  --violet: #BE78FF;
  --pollen: #FFE68C;
  --spore: #96FFDC;
  --ember: #FFB46E;
  --rose: #FF8FC8;

  --font-display: 'Bebas Neue', Impact, sans-serif;
  --font-body: 'IBM Plex Sans', Arial, sans-serif;
  --gutter: 16px;
  --maxw: 1180px;
  --header-h: 64px;
  --focus: 0 0 0 3px rgba(110, 240, 255, 0.55);
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --gutter: 28px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: radial-gradient(1200px 700px at 80% -10%, rgba(190, 120, 255, 0.12), transparent 60%),
              radial-gradient(900px 600px at -10% 110%, rgba(110, 240, 255, 0.07), transparent 60%),
              var(--night);
  background-attachment: fixed;
  color: var(--ink);
  font: 16px/1.6 var(--font-body);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
p { margin: 0 0 1em; }
a { color: var(--biolume); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
::selection { background: rgba(190, 120, 255, 0.45); color: var(--ink); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--biolume-fill); color: var(--ink-dark); padding: 8px 14px; border-radius: 999px; font-weight: 600; }
.skip:focus { left: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: 56px 0; }
section[id] { scroll-margin-top: var(--header-h); }
@media (min-width: 900px) { section { padding: 88px 0; } }

/* ---- type ---- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.05em; line-height: 1; margin: 0 0 0.4em; }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.05em; line-height: 0.95; text-transform: uppercase; }
.title-glow { color: var(--ink); text-shadow: 0 0 22px rgba(190, 120, 255, 0.65), 0 0 2px rgba(190, 120, 255, 0.9); }
.eyebrow { font: 600 12px var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--biolume); margin-bottom: 10px; }
.section-title { font-size: clamp(2rem, 5.5vw, 3rem); color: var(--ink); }
.lead { font-size: 1.12rem; max-width: 62ch; }
.muted { color: var(--ink-dim); }
.small { font-size: 14px; }

/* ---- membranes and buttons ---- */
.membrane {
  background: var(--membrane);
  border: 1.5px solid var(--plate-rim);
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(110, 240, 255, 0.05) inset, 0 18px 50px rgba(13, 2, 13, 0.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.card { padding: 22px; }
@media (min-width: 720px) { .card { padding: 28px; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 16px var(--font-body); text-decoration: none !important;
  color: var(--ink-dark); background: var(--biolume-fill);
  transition: box-shadow 110ms ease-out, background 110ms;
}
.btn:hover { box-shadow: 0 0 18px rgba(110, 240, 255, 0.65); }
.btn:active { background: var(--pollen); }
.btn.ghost { background: rgba(22, 10, 42, 0.55); color: var(--ink); border: 1.5px solid var(--plate-rim); }
.btn.ghost:hover { border-color: var(--biolume); box-shadow: 0 0 14px rgba(110, 240, 255, 0.35); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn svg { width: 20px; height: 20px; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; border: 1px solid rgba(255, 230, 140, 0.5); font-size: 13px; color: var(--pollen); background: rgba(8, 4, 20, 0.5); }

/* ---- header ---- */
.hdr { position: sticky; top: 0; z-index: 50; height: var(--header-h); border-bottom: 1px solid transparent; transition: background 200ms, border-color 200ms; }
.hdr.solid { background: rgba(13, 2, 13, 0.84); border-bottom-color: rgba(74, 42, 102, 0.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hdr .bar { height: 100%; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span { font: 400 26px/1 var(--font-display); letter-spacing: 0.05em; color: var(--ink); text-shadow: 0 0 16px rgba(190, 120, 255, 0.6); }
.menu-btn { margin-left: auto; width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--plate-rim); background: rgba(22, 10, 42, 0.6); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.nav { display: none; }
.nav a { color: var(--ink); font-weight: 500; padding: 10px 4px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--biolume); text-decoration: none; }
.nav a.btn { color: var(--ink-dark); }
.nav.open { display: flex; flex-direction: column; gap: 4px; position: absolute; left: 0; right: 0; top: var(--header-h); padding: 12px var(--gutter) 20px; background: rgba(13, 2, 13, 0.97); border-bottom: 1px solid var(--plate-rim); }
.nav.open a { padding: 12px 4px; font-size: 18px; }
.nav.open a.btn { margin-top: 8px; padding: 0 22px; }
@media (min-width: 860px) {
  .menu-btn { display: none; }
  .nav, .nav.open { display: flex; flex-direction: row; position: static; padding: 0; background: none; border: 0; margin-left: auto; align-items: center; gap: 22px; }
  .nav.open a { font-size: 16px; padding: 10px 4px; }
  .nav.open a.btn, .nav a.btn { margin: 0; padding: 0 18px; }
}

/* ---- hero ---- */
.hero { position: relative; min-height: min(94vh, 900px); display: flex; align-items: center; margin-top: calc(-1 * var(--header-h)); overflow: hidden; padding: calc(var(--header-h) + 40px) 0 64px; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img.collage { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: invert(1) hue-rotate(180deg) saturate(1.3); opacity: 0.22; }
.hero-shade { position: absolute; inset: 0; background:
  radial-gradient(70% 60% at 72% 45%, rgba(190, 120, 255, 0.20), transparent 70%),
  linear-gradient(180deg, rgba(13, 2, 13, 0.6) 0%, rgba(13, 2, 13, 0.15) 35%, rgba(28, 13, 29, 0.7) 75%, var(--night) 100%); }
canvas.motes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; } }
.hero-title { font-size: clamp(4rem, 17vw, 8.6rem); margin: 14px 0 0; }
.hero-tag { margin: 6px 0 18px; font-size: 1.2rem; color: var(--ink-dim); letter-spacing: 0.02em; }
.hero-lead { text-shadow: 0 1px 12px rgba(13, 2, 13, 0.9); margin-bottom: 26px; }
.hero-note { margin-top: 16px; color: var(--ink-dim); font-size: 14.5px; }

/* the spinning mandalas */
.orbit { position: relative; width: min(100%, 520px); aspect-ratio: 1; margin: 0 auto; }
.orbit .halo { position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(circle, rgba(190, 120, 255, 0.35), rgba(110, 240, 255, 0.10) 55%, transparent 70%); filter: blur(10px); }
.orbit .main { position: absolute; inset: 12%; border-radius: 50%; overflow: hidden; box-shadow: 0 0 60px rgba(190, 120, 255, 0.35), 0 0 0 1.5px rgba(110, 240, 255, 0.25); background: #fff; animation: turn 90s linear infinite; }
.orbit .main img { width: 100%; height: 100%; object-fit: cover; transition: opacity 900ms; }
.orbit .moon { position: absolute; width: 24%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 0 24px rgba(110, 240, 255, 0.35); animation: turn 50s linear infinite reverse; }
.orbit .moon img { width: 100%; height: 100%; object-fit: cover; }
.orbit .m1 { top: 0; right: 4%; }
.orbit .m2 { bottom: 2%; left: 0; width: 20%; animation-duration: 70s; }
.orbit .m3 { bottom: 10%; right: -2%; width: 16%; animation-duration: 40s; }
@keyframes turn { to { transform: rotate(360deg); } }

/* ---- try it ---- */
.try-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .try-grid { grid-template-columns: 1fr 1fr; } }
.pad { position: relative; width: min(100%, 520px); aspect-ratio: 1; margin: 0 auto; }
.pad canvas { width: 100%; height: 100%; border-radius: 50%; background: #fff; box-shadow: 0 0 0 10px rgba(74, 42, 102, 0.9), 0 0 0 12px rgba(110, 240, 255, 0.35), 0 0 50px rgba(190, 120, 255, 0.35); touch-action: none; cursor: crosshair; display: block; }
.pad .hint { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: #6d5a80; font-weight: 500; transition: opacity 300ms; text-align: center; padding: 30%; }
.controls { display: grid; gap: 14px; margin-top: 18px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 40px; min-width: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--plate-rim); background: rgba(22, 10, 42, 0.55); color: var(--ink); font: 500 15px var(--font-body); cursor: pointer; }
.seg button[aria-pressed="true"] { border-color: var(--biolume); color: var(--biolume); box-shadow: 0 0 12px rgba(110, 240, 255, 0.3); }
.ctl-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.ctl-row .lbl { font: 600 12px var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); min-width: 56px; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); cursor: pointer; padding: 0; }
.swatches button[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px var(--biolume); }
.swatches .rainbow { background: conic-gradient(#f55, #fb3, #ff6, #5e5, #5cf, #86f, #f5c, #f55); }

/* ---- features ---- */
.features { display: grid; gap: 18px; margin-top: 30px; }
@media (min-width: 700px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature { display: flex; flex-direction: column; gap: 12px; transition: border-color 110ms, box-shadow 110ms; }
.feature:hover { border-color: rgba(110, 240, 255, 0.6); box-shadow: 0 0 22px rgba(110, 240, 255, 0.14); }
.feature h3 { font-size: 1.8rem; margin: 2px 0 0; }
.feature p { color: var(--ink-dim); margin: 0; font-size: 15px; }
.phone { width: 72%; max-width: 230px; margin: 4px auto 6px; border-radius: 30px; padding: 7px; background: linear-gradient(160deg, #3a2a4e, #140a1c); box-shadow: 0 0 0 1.5px rgba(110, 240, 255, 0.25), 0 20px 40px rgba(0, 0, 0, 0.5); }
.phone img { border-radius: 24px; width: 100%; aspect-ratio: 1320 / 2868; object-fit: cover; object-position: top; background: #111; }

/* ---- gallery ---- */
.gallery { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery li.big { grid-column: span 2; grid-row: span 2; }
.tile { position: relative; display: block; width: 100%; padding: 0; border: 1.5px solid var(--plate-rim); border-radius: 18px; overflow: hidden; background: #fff; cursor: zoom-in; aspect-ratio: 1; }
.tile img { width: 100%; height: 100%; object-fit: contain; transition: transform 600ms ease-out; }
.tile:hover img { transform: scale(1.05) rotate(6deg); }
.tile:hover, .tile:focus-visible { border-color: var(--biolume); box-shadow: 0 0 20px rgba(110, 240, 255, 0.3); }

/* ---- coloring pages ---- */
.pages-sec { background: radial-gradient(70% 90% at 20% 50%, rgba(190, 120, 255, 0.10), transparent 70%); }
.strip { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin-top: 28px; }
@media (min-width: 720px) { .strip { grid-template-columns: repeat(6, 1fr); } }
.page { position: relative; aspect-ratio: 1; border-radius: 14px; background: #fff; overflow: hidden; border: 1.5px solid var(--plate-rim); }
.page img { width: 100%; height: 100%; object-fit: contain; padding: 6%; transition: filter 500ms; }
.page::after { content: ''; position: absolute; inset: 0; background: var(--tint, transparent); mix-blend-mode: screen; opacity: 0; transition: opacity 500ms; pointer-events: none; }
.page:hover::after { opacity: 1; }
.steps3 { display: grid; gap: 16px; margin-top: 30px; }
@media (min-width: 800px) { .steps3 { grid-template-columns: repeat(3, 1fr); } }
.steps3 .n { font: 400 2.6rem/1 var(--font-display); color: var(--biolume); text-shadow: 0 0 14px rgba(110, 240, 255, 0.5); }
.steps3 h3 { font-size: 1.6rem; margin: 6px 0 4px; }
.steps3 p { color: var(--ink-dim); margin: 0; }

/* ---- get it ---- */
.getit { text-align: center; }
.getit .membrane { max-width: 760px; margin: 0 auto; padding: 40px 22px; position: relative; overflow: hidden; }
.getit .membrane > *:not(canvas) { position: relative; }
.getit img.icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 14px; box-shadow: 0 0 30px rgba(190, 120, 255, 0.5); }
.getit .actions { justify-content: center; margin-top: 18px; }

/* ---- lightbox ---- */
.lightbox { width: min(900px, 94vw); max-width: none; padding: 12px; border: 1.5px solid var(--plate-rim); border-radius: 18px; background: var(--abyss); color: var(--ink); }
.lightbox::backdrop { background: rgba(13, 2, 13, 0.86); backdrop-filter: blur(4px); }
.lightbox img { width: 100%; max-height: 78vh; object-fit: contain; border-radius: 12px; background: #fff; }
.lb-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 10px; }

/* ---- documents (privacy, terms, support) ---- */
.doc { padding: 40px 0 64px; }
.doc .prose { max-width: 760px; }
.doc h1 { font-size: clamp(2.6rem, 8vw, 3.8rem); }
.doc h2 { font-size: 1.8rem; color: var(--violet); margin-top: 1.5em; }
.doc h3 { font-size: 1.3rem; margin-top: 1.2em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 0.35em 0; }
.doc .updated { color: var(--ink-dim); font-size: 14px; }
.doc .card { margin: 22px 0; }
.faq details { border-bottom: 1px solid rgba(74, 42, 102, 0.7); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--biolume); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '\2013'; }
.faq details p { margin: 10px 0 4px; color: var(--ink-dim); }

/* ---- footer ---- */
.ftr { border-top: 1px solid rgba(74, 42, 102, 0.6); background: linear-gradient(180deg, rgba(13, 2, 13, 0.2), var(--abyss)); padding: 40px 0 28px; }
.ftr .cols { display: grid; gap: 22px; }
@media (min-width: 760px) { .ftr .cols { grid-template-columns: 1fr auto; align-items: start; } }
.ftr .links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.ftr .links a { color: var(--ink); }
.ftr .fine { margin-top: 26px; color: var(--ink-dim); font-size: 13.5px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
