/* Unit Circle · CurieCub. No JavaScript, no third-party requests. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lexend";
  src: url("/fonts/lexend-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #13113a;
  --night-2: #1d1a52;
  --night-3: #2b2773;
  --ink: #17153d;
  --paper: #f6f5fd;
  --star: #ffd166;
  --star-deep: #f5b82e;
  --coral: #ff7a59;
  --mint: #2fc98a;
  --sky: #7cc6fe;
  --lilac: #b8a4ff;
  --text: #ecebff;
  --muted: #bdbae8;
  --line: rgba(236, 235, 255, 0.16);
  --radius: 22px;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Lexend", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  background-color: var(--night);
  background-image:
    radial-gradient(1.4px 1.4px at 24px 38px, rgba(255, 255, 255, 0.85) 50%, transparent 52%),
    radial-gradient(1px 1px at 140px 92px, rgba(255, 255, 255, 0.55) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 210px 18px, rgba(255, 209, 102, 0.7) 50%, transparent 52%),
    radial-gradient(1px 1px at 76px 176px, rgba(255, 255, 255, 0.5) 50%, transparent 52%),
    radial-gradient(1.6px 1.6px at 188px 214px, rgba(184, 164, 255, 0.7) 50%, transparent 52%),
    radial-gradient(1px 1px at 250px 150px, rgba(255, 255, 255, 0.45) 50%, transparent 52%),
    radial-gradient(1.1px 1.1px at 60px 300px, rgba(124, 198, 254, 0.6) 50%, transparent 52%),
    radial-gradient(1px 1px at 300px 260px, rgba(255, 255, 255, 0.5) 50%, transparent 52%),
    radial-gradient(ellipse 80% 55% at 75% -5%, rgba(184, 164, 255, 0.16), transparent 70%),
    radial-gradient(ellipse 70% 50% at 0% 40%, rgba(124, 198, 254, 0.08), transparent 70%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 55%, var(--night) 100%);
  background-size: 320px 320px, 320px 320px, 320px 320px, 320px 320px, 320px 320px, 320px 320px, 320px 320px, 320px 320px, 100% 100%, 100% 100%, 100% 100%;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

img, svg { max-width: 100%; }

a { color: var(--sky); text-underline-offset: 0.2em; }
a:hover { color: var(--star); }
:focus-visible { outline: 3px solid var(--star); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--star); color: var(--ink); padding: 0.6rem 1rem; border-radius: 999px; font-weight: 600;
}
.skip:focus { top: 1rem; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; min-height: 44px; }
.brand:hover { color: var(--text); }
.mark { width: 34px; height: 34px; }
.wordmark { display: block; height: 26px; width: auto; }
.mark-axes { stroke: currentColor; stroke-opacity: 0.35; stroke-width: 1.5; fill: none; }
.mark-ring { stroke: currentColor; stroke-width: 2; fill: none; }
.mark-star { fill: var(--star); }
.top ul { display: flex; align-items: center; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.top nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 0.95rem; padding: 0.6rem 0.2rem; display: inline-block; }
.top nav a:not(.btn):hover { color: var(--text); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.8rem 1.4rem; border-radius: 999px; font-weight: 600; text-decoration: none; font-size: 1rem; transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-star { background: var(--star); color: var(--ink); }
.btn-star:hover { background: #ffdb84; color: var(--ink); }
.btn-ghost { color: var(--text); border: 1.5px solid rgba(236, 235, 255, 0.35); }
.btn-ghost:hover { color: var(--text); border-color: var(--star); }
.btn-small { min-height: 44px; padding: 0.55rem 1.1rem; font-size: 0.95rem; }

/* Type */
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-weight: 800; font-size: clamp(2.5rem, 6vw, 4.6rem); line-height: 1.02; }
h1 em { font-style: normal; color: var(--star); display: block; }
h2 { font-weight: 750; font-size: clamp(1.9rem, 3.8vw, 2.9rem); line-height: 1.08; }
h3 { font-weight: 700; font-size: 1.25rem; line-height: 1.25; }
p { margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem; font-weight: 600; color: var(--lilac); margin-bottom: 0.9rem; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 34rem; margin-top: 1.4rem; }
.note { margin-top: 1.1rem; font-size: 0.9rem; color: var(--muted); }
.note::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); margin-right: 0.55rem; vertical-align: 0.08em; box-shadow: 0 0 0 4px rgba(47, 201, 138, 0.18); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: clamp(2rem, 5vw, 4rem); padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3rem, 8vw, 6rem); }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

/* The unit circle */
@property --t { syntax: "<angle>"; inherits: true; initial-value: 40deg; }

.orbit-figure { margin: 0; display: grid; justify-items: center; gap: 1.25rem; }
.orbit { --size: min(84vw, 440px); --r: calc(var(--size) * 0.38); position: relative; width: var(--size); aspect-ratio: 1; }
.orbit-grid { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orbit-grid .halo { fill: rgba(184, 164, 255, 0.06); stroke: none; }
.orbit-grid .axis { stroke: rgba(236, 235, 255, 0.28); stroke-width: 0.35; fill: none; }
.orbit-grid .ring { stroke: rgba(236, 235, 255, 0.55); stroke-width: 0.6; fill: none; }
.orbit-grid .origin { fill: var(--text); }
.orbit-grid .tick { fill: var(--muted); font-family: var(--body); font-size: 3.6px; }

.arm, .cos, .sin, .dot { position: absolute; display: block; }
.arm { left: 50%; top: calc(50% - 1px); width: var(--r); height: 2px; background: rgba(236, 235, 255, 0.8); transform-origin: 0 50%; transform: rotate(-40deg); border-radius: 2px; }
.cos { left: 50%; top: calc(50% - 2.5px); width: var(--r); height: 5px; background: var(--sky); transform-origin: 0 50%; transform: scaleX(0.766); border-radius: 3px; }
.sin { left: calc(50% + var(--r) * 0.766 - 2.5px); bottom: 50%; width: 5px; height: var(--r); background: var(--mint); transform-origin: 50% 100%; transform: scaleY(0.643); border-radius: 3px; }
.dot { left: calc(50% + var(--r) * 0.766); top: calc(50% - var(--r) * 0.643); width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: var(--star); box-shadow: 0 0 0 6px rgba(255, 209, 102, 0.18), 0 0 28px 6px rgba(255, 209, 102, 0.45); }

@supports (width: calc(1px * cos(0deg))) {
  .orbit { animation: orbit 18s linear infinite; }
  .arm { transform: rotate(calc(-1 * var(--t))); }
  .cos { transform: scaleX(cos(var(--t))); }
  .sin { left: calc(50% + var(--r) * cos(var(--t)) - 2.5px); transform: scaleY(sin(var(--t))); }
  .dot { left: calc(50% + var(--r) * cos(var(--t))); top: calc(50% - var(--r) * sin(var(--t))); }
}
@keyframes orbit { from { --t: 40deg; } to { --t: 400deg; } }

.orbit-figure figcaption { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem 0.75rem; max-width: 26rem; text-align: center; }
.key { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.9rem; font-weight: 600; }
.key::before { content: ""; width: 18px; height: 5px; border-radius: 3px; }
.key-cos::before { background: var(--sky); }
.key-sin::before { background: var(--mint); }
.caption { flex-basis: 100%; color: var(--muted); font-size: 0.92rem; }

/* Sections */
.section { padding-block: clamp(2.75rem, 6vw, 4.75rem); }
.section > h2 { max-width: 40rem; }

.thesis { padding-block: clamp(4rem, 9vw, 7rem); background: linear-gradient(180deg, rgba(43, 39, 115, 0) 0%, rgba(43, 39, 115, 0.45) 50%, rgba(43, 39, 115, 0) 100%); text-align: center; }
.thesis .big { font-size: clamp(1.15rem, 2vw, 1.45rem); color: var(--text); margin-top: 1.5rem; line-height: 1.6; }

.steps { list-style: none; margin: 2.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; counter-reset: none; }
.step { position: relative; padding: 1.6rem 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(29, 26, 82, 0.55); }
.step h3 { margin-top: 1rem; }
.step p { margin-top: 0.5rem; color: var(--muted); font-size: 0.98rem; }
.badge { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-family: var(--display); font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.badge-star { background: var(--star); }
.badge-coral { background: var(--coral); }
.badge-sky { background: var(--sky); }
.badge-mint { background: var(--mint); }

.cards { margin-top: 2.75rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.card { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 1.7rem 1.6rem 1.8rem; box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.6); }
.card h3 { margin-top: 1rem; color: var(--ink); }
.card p { margin-top: 0.55rem; color: #3d3a6b; font-size: 0.98rem; }
.icon { width: 48px; height: 48px; padding: 10px; border-radius: 14px; }
.icon .stroke, .icon .ring-only { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.icon > :not(.stroke):not(.ring-only) { fill: currentColor; }
.icon-lilac { background: #efeaff; color: #6b4fe0; }
.icon-mint { background: #dff7ec; color: #12875a; }
.icon-coral { background: #ffe9e2; color: #c8401d; }
.icon-sky { background: #e4f3ff; color: #1f74b8; }
.icon-star { background: #fff4d6; color: #a86d00; }

.panels { margin-top: 2.75rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; background: rgba(29, 26, 82, 0.55); }
.panel p { margin-top: 0.9rem; color: var(--muted); }
.pill { display: inline-block; font-family: var(--body); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.35rem 0.8rem; border-radius: 999px; color: var(--ink); }
.pill-mint { background: var(--mint); }
.pill-lilac { background: var(--lilac); }

.privacy { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; padding: clamp(1.8rem, 4vw, 3rem); border-radius: calc(var(--radius) + 6px); background: linear-gradient(140deg, var(--night-3), var(--night-2)); border: 1px solid var(--line); }
.privacy h2 + p { margin-top: 1.1rem; color: var(--muted); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.checks li { position: relative; padding-left: 2.2rem; color: var(--muted); }
.checks li strong { color: var(--text); font-weight: 600; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.2rem; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='%2317153d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 72% no-repeat; }

.cta { text-align: center; padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3rem); border-radius: calc(var(--radius) + 6px); background: radial-gradient(ellipse 70% 80% at 50% 0%, rgba(255, 209, 102, 0.14), transparent 70%), var(--night-2); border: 1px solid var(--line); }
.cta-mark { width: 64px; height: 64px; color: var(--text); margin-bottom: 1.2rem; }
.cta h2 { margin-inline: auto; }
.cta p { max-width: 36rem; margin: 1rem auto 0; color: var(--muted); }
.cta .email { margin-top: 0.6rem; }
.cta .email a { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2rem); color: var(--star); text-decoration: none; overflow-wrap: anywhere; }
.cta .email a:hover { text-decoration: underline; }

/* Footer */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem 1.5rem; padding-block: 2rem 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.foot ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }

/* 404 */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding-block: 4rem; }
.lost .mark { width: 96px; height: 96px; margin-bottom: 1.5rem; }
.lost p { color: var(--muted); margin: 1rem auto 1.75rem; max-width: 28rem; }

/* Responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .orbit { --size: min(84vw, 400px); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .privacy { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .wordmark { height: 22px; }
  .steps, .cards, .panels { grid-template-columns: 1fr; }
  .wrap { width: min(1120px, 100% - 2rem); }
  .narrow { width: min(760px, 100% - 2rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orbit { animation: none; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}
