/* ─── Ipsion AI — Editorial Gradient design system ─────────────── */
:root {
    --bg: #FFFFFF;
    --ink: #101014;
    --text-secondary: #71717A;
    --border: #ECECF2;
    --brand: #FE6B35;
    --violet: #8B5CF6;
    --grad: linear-gradient(90deg, #FE6B35, #F43F5E, #8B5CF6);
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --max-w: 1080px;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --transition: color 0.2s var(--ease-out), background-color 0.2s var(--ease-out),
                  border-color 0.2s var(--ease-out), transform 0.25s var(--ease-out),
                  box-shadow 0.25s var(--ease-out);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2 { font-family: var(--font-display); letter-spacing: -0.025em; line-height: 1.1; }
a { color: var(--ink); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--brand); }

/* Signature gradient — key phrases only */
.grad-text {
    background: var(--grad);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: grad-flow 6s linear infinite alternate;
}
@keyframes grad-flow { from { background-position: 0% 0; } to { background-position: 100% 0; } }

/* ─── Nav ─── */
.site-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 14px 24px;
    display: flex; justify-content: space-between; align-items: center;
}
.brand {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
    color: var(--ink); letter-spacing: -0.01em;
}
.brand-mark { width: 28px; height: 28px; }
.nav-contact { font-weight: 500; font-size: 0.95rem; position: relative; }
.nav-contact::after {
    content: ""; position: absolute; left: 0; bottom: -3px; height: 2px; width: 0;
    background: var(--grad); transition: width 0.25s var(--ease-out);
}
.nav-contact:hover::after { width: 100%; }

/* ─── Sections shared ─── */
main > * { padding: 96px 24px; }
main > section { border-top: 1px solid var(--border); }
.thesis > *, .loop > *, .principles > *, .contact > * {
    max-width: var(--max-w); margin-left: auto; margin-right: auto;
}
h2 { font-size: clamp(1.7rem, 3.8vw, 2.5rem); margin-bottom: 20px; }

/* Scroll reveal — only when JS is running; no-JS sees everything */
.js .reveal { opacity: 0; transform: translateY(26px); }
.js .reveal.in {
    opacity: 1; transform: none;
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

/* ─── Hero ─── */
.hero { text-align: center; padding-top: 176px; padding-bottom: 112px; }
.hero-flavor {
    color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 28px;
    letter-spacing: 0.01em;
}
.hero h1 {
    font-size: clamp(2.5rem, 6.5vw, 4.5rem);
    max-width: 900px; margin: 0 auto 26px;
}
.hero-sub {
    color: var(--text-secondary); font-size: clamp(1.05rem, 2vw, 1.25rem);
    max-width: 640px; margin: 0 auto 38px;
}
/* One-time staggered load-in */
.hero > * { animation: rise-in 0.8s var(--ease-out) both; }
.hero .hero-flavor { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.15s; }
.hero .hero-sub { animation-delay: 0.3s; }
.hero .cta { animation-delay: 0.45s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* ─── CTA button (pill) ─── */
.cta {
    display: inline-block; background: var(--ink); color: #fff;
    font-weight: 600; font-size: 1rem; padding: 14px 34px; border-radius: 999px;
}
.cta:hover {
    background: #000; color: #fff; transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 30px rgba(16, 16, 20, 0.18);
}

/* ─── Thesis ─── */
.thesis { text-align: center; }
.thesis p { color: var(--text-secondary); font-size: 1.1rem; max-width: 680px; }

/* ─── Improvement loop — orbital ring ─── */
.loop h2 { text-align: center; margin-bottom: 56px; }
.orbit-stage { position: relative; width: min(800px, 100%); aspect-ratio: 1; margin: 0 auto; }
.orbit-ring {
    position: absolute; inset: 240px;
    border: 1.5px dashed #D9D9E3; border-radius: 50%;
}
.orbit-dot { position: absolute; inset: 240px; animation: orbit-spin 12s linear infinite; }
.orbit-dot::before {
    content: ""; position: absolute; top: -8px; left: 50%; margin-left: -8px;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--grad);
    box-shadow: 0 0 16px rgba(244, 63, 94, 0.55);
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }
.orbit-core {
    position: absolute; inset: 300px; border-radius: 50%;
    background: radial-gradient(circle, rgba(254, 107, 53, 0.12), rgba(139, 92, 246, 0.05) 72%);
    display: flex; align-items: center; justify-content: center; text-align: center;
    font-size: 0.85rem; color: var(--text-secondary); line-height: 1.4;
}
.orbit-station {
    position: absolute; width: 220px;
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    padding: 18px 18px 16px; text-align: left;
    animation: station-pulse 12s var(--ease-out) infinite;
}
.st1 { top: 0; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.st2 { right: 0; top: 50%; transform: translateY(-50%); animation-delay: 3s; }
.st3 { bottom: 0; left: 50%; transform: translateX(-50%); animation-delay: 6s; }
.st4 { left: 0; top: 50%; transform: translateY(-50%); animation-delay: 9s; }
@keyframes station-pulse {
    0%, 16%, 100% { border-color: var(--border); box-shadow: none; }
    6% { border-color: var(--violet); box-shadow: 0 10px 28px rgba(139, 92, 246, 0.20); }
}
.station-num {
    display: inline-block; font-family: var(--font-display); font-weight: 700;
    font-size: 0.85rem; color: #fff; background: var(--grad);
    border-radius: 50%; width: 26px; height: 26px; line-height: 26px;
    text-align: center; margin-bottom: 10px;
}
.orbit-station h3 { font-size: 1.05rem; margin-bottom: 6px; }
.orbit-station p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.5; }

/* ─── Day / night learning ─── */
.daynight h2 { text-align: center; margin-bottom: 18px; }
.daynight-intro {
    text-align: center; color: var(--text-secondary); font-size: 1.05rem;
    max-width: 640px; margin: 0 auto 48px;
}
.daynight-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dn-card { border-radius: 16px; padding: 36px 32px; position: relative; overflow: hidden; }
.dn-glyph { font-size: 1.5rem; display: block; margin-bottom: 14px; }
.dn-card h3 { font-size: 1.2rem; margin-bottom: 10px; font-family: var(--font-display); }
.dn-card p { font-size: 0.98rem; }
.dn-day { background: #fff; border: 1px solid var(--border); }
.dn-day .dn-glyph { color: var(--brand); }
.dn-day p { color: var(--text-secondary); }
.dn-night { background: var(--ink); color: #fff; }
.dn-night::before {
    content: ""; position: absolute; inset: -60%;
    background:
        radial-gradient(38% 32% at 70% 25%, rgba(139, 92, 246, 0.45), transparent 60%),
        radial-gradient(32% 28% at 25% 75%, rgba(254, 107, 53, 0.28), transparent 60%);
    filter: blur(28px);
    animation: dream-drift 11s ease-in-out infinite alternate;
}
@keyframes dream-drift {
    from { transform: translate3d(-4%, -3%, 0) scale(1); }
    to   { transform: translate3d(4%, 3%, 0) scale(1.07); }
}
.dn-night > * { position: relative; }
.dn-night .dn-glyph { color: #C4B5FD; }
.dn-night p { color: rgba(255, 255, 255, 0.78); }

/* ─── Principles ─── */
.principles h2 { text-align: center; margin-bottom: 48px; }
.principle-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    padding: 32px 28px; transition: var(--transition);
}
.card:hover {
    transform: translateY(-4px);
    border-color: transparent;
    background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box;
    box-shadow: 0 14px 34px rgba(16, 16, 20, 0.08);
}
.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { color: var(--text-secondary); font-size: 0.98rem; }

/* ─── Contact ─── */
.contact { text-align: center; }
.contact p { color: var(--text-secondary); max-width: 560px; margin-bottom: 28px; }
.contact-email { margin-top: 24px; font-size: 0.98rem; color: var(--ink); }
#email-text { user-select: all; }
#copy-email {
    margin-left: 10px; font: 500 0.85rem var(--font-body);
    color: var(--ink); background: none; border: 1px solid var(--border);
    border-radius: 6px; padding: 4px 12px; cursor: pointer; transition: var(--transition);
}
#copy-email:hover { border-color: var(--brand); color: var(--brand); }

/* ─── Footer ─── */
.site-footer {
    border-top: 1px solid var(--border); text-align: center;
    padding: 32px 24px; color: var(--text-secondary); font-size: 0.9rem;
}

/* ─── Responsive ─── */
@media (max-width: 879px) {
    .orbit-ring, .orbit-dot, .orbit-core { display: none; }
    .orbit-stage { width: 100%; aspect-ratio: auto; display: grid; gap: 16px; }
    .orbit-station { position: static; transform: none; width: 100%; animation: none; }
    .principle-cards { grid-template-columns: 1fr; }
    .daynight-cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    main > * { padding: 64px 20px; }
    .hero { padding-top: 140px; }
}

/* ─── Reduced motion: everything static ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    .js .reveal { opacity: 1; transform: none; }
    .hero > * { opacity: 1; transform: none; }
}
