@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* Design tokens — sync with THEME.md */
:root {
    /* Colors */
    --color-bg-primary: #141414;
    --color-bg-secondary: #0f0f0f;
    --color-bg-tertiary: #1a1a1a;
    --color-bg-card: #1f1f1f;
    --color-text-primary: #ffffff;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #94a3b8;
    --color-accent: #22c55e;
    --color-accent-light: #DFF8EB;
    --color-accent-dim: rgba(34, 197, 94, 0.15);
    --color-border-subtle: rgba(255, 255, 255, 0.08);
    --color-border-medium: rgba(255, 255, 255, 0.2);

    /* Typography */
    --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
    --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
    --text-base: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
    --text-lg: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
    --text-xl: clamp(1.3rem, 1.15rem + 0.75vw, 1.5rem);
    --text-2xl: clamp(1.6rem, 1.35rem + 1.25vw, 2rem);
    --text-3xl: clamp(1.8rem, 1.4rem + 2vw, 2.6rem);
    --text-4xl: clamp(2.4rem, 1.7rem + 3.5vw, 4rem);

    --leading-tight: 1.1;
    --leading-snug: 1.3;
    --leading-normal: 1.5;

    /* Spacing */
    --space-1: clamp(0.25rem, 0.2rem + 0.25vw, 0.35rem);
    --space-2: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
    --space-3: clamp(0.75rem, 0.6rem + 0.75vw, 1rem);
    --space-4: clamp(1rem, 0.8rem + 1vw, 1.5rem);
    --space-5: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
    --space-6: clamp(2rem, 1.5rem + 2.5vw, 3rem);
    --space-8: clamp(3rem, 2rem + 5vw, 5rem);
    --space-10: clamp(4rem, 2.5rem + 7.5vw, 7rem);

    /* Layout */
    --nav-height: clamp(60px, 5vw + 40px, 80px);
    --container-max: 1200px;
    --container-padding: clamp(20px, 3vw + 10px, 60px);

    /* Geometry */
    --hex-stroke: 3px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Motion */
    --duration-fast: 200ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
    --duration-slower: 800ms;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-index */
    --z-bg: 0;
    --z-content: 10;
    --z-nav: 1000;
}

/* Reset & base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    font-family: var(--font-primary);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: var(--leading-normal);
    -webkit-font-smoothing: antialiased;
    overflow-y: scroll;
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--container-padding);
    z-index: var(--z-nav);
    background: linear-gradient(to bottom, rgba(20, 20, 20, 0.9), rgba(20, 20, 20, 0));
    transition: background var(--duration-fast) ease;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
    color: var(--color-text-primary);
}

.nav-dot {
    color: var(--color-accent);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: clamp(16px, 3vw, 30px);
    align-items: center;
}

.nav-links a {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color var(--duration-fast) ease;
}

.nav-links a:hover {
    color: var(--color-text-primary);
}

/* Parallax deco */
.parallax-item {
    position: absolute;
    pointer-events: none;
    z-index: var(--z-bg);
    will-change: transform;
    transform: translateY(var(--parallax-offset, 0));
}

.deco-shape {
    display: block;
}

.shape-tri {
    width: clamp(90px, 12vw, 150px);
    height: clamp(78px, 10.4vw, 130px);
    background: var(--color-accent);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    opacity: 0.07;
    animation: driftShape 16s ease-in-out infinite;
}

.shape-circ {
    width: clamp(80px, 10vw, 130px);
    height: clamp(80px, 10vw, 130px);
    border: 2px solid var(--color-text-muted);
    border-radius: 50%;
    opacity: 0.06;
    animation: pulseShape 14s ease-in-out infinite;
}

.shape-hex {
    width: clamp(90px, 12vw, 150px);
    height: clamp(104px, 13.9vw, 174px);
    background: var(--color-accent-light);
    clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
    opacity: 0.06;
    animation: floatShape 15s ease-in-out infinite;
}

.parallax-item-br { right: clamp(16px, 4vw, 56px); bottom: 6%; }
.parallax-item-tr { top: 14%; right: clamp(16px, 4vw, 56px); }
.parallax-item-bl { left: clamp(16px, 4vw, 56px); bottom: 6%; }
.parallax-item-tl { top: 14%; left: clamp(16px, 4vw, 56px); }

/* Hero */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: var(--color-bg-primary);
}

.hero-inner {
    position: relative;
    z-index: var(--z-content);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-5);
    text-align: center;
    padding: calc(var(--nav-height) + var(--space-6)) var(--container-padding) var(--space-6);
    max-width: var(--container-max);
}

.headline {
    font-size: var(--text-4xl);
    font-weight: 800;
    line-height: var(--leading-tight);
    animation: fadeInHeadline 1.4s var(--ease-out) 0s backwards;
}

.hexagon-container {
    width: clamp(70px, 9vw, 100px);
    height: clamp(80px, 10.4vw, 115px);
    animation: fadeInHexagon 1.4s ease 0.8s backwards;
}

.hexagon-svg {
    width: 100%;
    height: 100%;
    transform-origin: center;
    animation: floatSway 6s ease-in-out infinite;
}

.hex-stroke {
    fill: none;
    stroke: var(--color-accent-light);
    stroke-width: var(--hex-stroke);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: drawLine 2s ease-in-out 0.8s forwards;
}

.scroll-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-4);
    color: var(--color-text-primary);
    animation: fadeIn 1.6s ease 1.6s backwards;
    transition: border-color var(--duration-fast) ease;
}

.scroll-indicator:hover {
    border-color: var(--color-accent);
}

.scroll-hint {
    font-size: var(--text-sm);
}

.triangle-container {
    width: 12px;
    height: 12px;
    animation: chill 3s infinite;
}

.triangle-svg {
    width: 100%;
    height: 100%;
}

.triangle-fill {
    fill: var(--color-accent-light);
    stroke: none;
}

/* Tools */
.products-section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: var(--color-bg-secondary);
    padding: calc(var(--nav-height) + var(--space-6)) var(--container-padding) var(--space-8);
}

.products-inner,
.privacy-inner {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    gap: var(--space-8);
}

.content-title-text {
    font-size: var(--text-3xl);
    font-weight: 800;
    line-height: var(--leading-tight);
    color: var(--color-text-primary);
    white-space: pre-line;
}

.content-sub {
    margin-top: var(--space-4);
    max-width: 420px;
    color: var(--color-text-muted);
    font-size: var(--text-base);
    line-height: var(--leading-snug);
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: transform var(--duration-normal) var(--ease-out),
        border-color var(--duration-normal) ease,
        box-shadow var(--duration-normal) ease;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.product-icon {
    width: clamp(44px, 5vw, 56px);
    height: clamp(48px, 5.5vw, 62px);
}

.product-icon .hex-stroke {
    stroke: var(--color-accent-light);
}

.product-icon .triangle-fill {
    fill: var(--color-accent-light);
}

.product-name {
    font-size: var(--text-xl);
    font-weight: 700;
}

.product-domain {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.product-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.product-tags li {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-full);
    padding: 6px 12px;
}

.product-cta {
    margin-top: auto;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-accent);
}

/* Privacy */
.privacy-section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: var(--color-bg-primary);
    padding: calc(var(--nav-height) + var(--space-6)) var(--container-padding) var(--space-8);
}

.privacy-title {
    font-size: var(--text-3xl);
    font-weight: 800;
    line-height: var(--leading-tight);
    white-space: pre-line;
}

.privacy-list {
    display: grid;
    gap: var(--space-4);
}

.privacy-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-4);
    align-items: start;
    border-top: 1px solid var(--color-border-subtle);
    padding-top: var(--space-4);
}

.privacy-num {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.1em;
}

.privacy-item p {
    color: var(--color-text-secondary);
    max-width: 480px;
}

/* Education */
.education-section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: var(--color-bg-primary);
    padding: calc(var(--nav-height) + var(--space-6)) var(--container-padding) var(--space-8);
}

.education-inner {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    gap: var(--space-8);
}

.education-title {
    font-size: var(--text-3xl);
    font-weight: 800;
    line-height: var(--leading-tight);
    white-space: pre-line;
}

.education-list {
    display: grid;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.education-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-4);
    align-items: start;
    border-top: 1px solid var(--color-border-subtle);
    padding-top: var(--space-4);
}

.education-num {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.1em;
}

.education-item p {
    color: var(--color-text-secondary);
    max-width: 480px;
}

.video-card {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border-subtle);
    overflow: hidden;
    background: var(--color-bg-tertiary);
}

.video-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    width: 100%;
    height: 100%;
    color: var(--color-text-primary);
}

.video-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 15, 15, 0.8), rgba(15, 15, 15, 0.15));
}

.video-play {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-bg-secondary);
    transition: transform var(--duration-normal) var(--ease-out),
        background var(--duration-fast) ease;
}

.video-play svg {
    width: 22px;
    height: 22px;
}

.video-link:hover .video-play {
    transform: scale(1.08);
    background: var(--color-accent-light);
}

.video-caption {
    position: relative;
    font-size: var(--text-sm);
    color: var(--color-text-primary);
}

/* Promise */
.promise-section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: var(--color-bg-primary);
    padding: calc(var(--nav-height) + var(--space-6)) var(--container-padding) var(--space-6);
}

.promise-inner {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    text-align: center;
}

.promise-eyebrow {
    font-size: var(--text-xs);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-accent);
    font-weight: 600;
}

.promise-title {
    font-size: var(--text-3xl);
    font-weight: 800;
    line-height: var(--leading-tight);
}

.promise-lede {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    line-height: var(--leading-snug);
    max-width: 480px;
}

.promise-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.promise-list li {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-full);
    padding: 6px 14px;
}

/* Footer */
.footer-section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: var(--color-bg-secondary);
    padding: var(--space-10) var(--container-padding);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

.footer-logo {
    font-size: var(--text-xl);
    font-weight: 800;
}

.footer-tagline {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.footer-links {
    list-style: none;
    display: flex;
    gap: var(--space-5);
}

.footer-links a {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    transition: color var(--duration-fast) ease;
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-copy {
    color: var(--color-text-muted);
    font-size: var(--text-xs);
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--duration-slower) var(--ease-out),
        transform var(--duration-slower) var(--ease-out);
}

/* No-JS fallback: show content if JS fails */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Keyframes */
@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

@keyframes floatSway {
    0% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-12px) rotate(2.5deg); }
    100% { transform: translateY(0) rotate(-2deg); }
}

@keyframes floatShape {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(3deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

@keyframes driftShape {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(8px, -8px) rotate(5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes pulseShape {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0.85; }
    100% { transform: scale(1); opacity: 0.5; }
}

@keyframes fadeInHeadline {
    0% { opacity: 0; clip-path: inset(0 100% 0 0); transform: translateX(30px); }
    100% { opacity: 1; clip-path: inset(0 0 0 0); transform: translateX(0); }
}

@keyframes fadeInHexagon {
    0% { opacity: 0; transform: translateX(15px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    50% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes chill {
    0% { transform: translate(0, 0) rotate(0deg); }
    30% { transform: translate(0, -2px) rotate(1deg); }
    70% { transform: translate(0, 2px) rotate(-1deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* Responsive */
@media (min-width: 768px) {
    .products-inner,
    .privacy-inner,
    .education-inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
        align-items: start;
        column-gap: var(--space-10);
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .privacy-list,
    .education-list {
        gap: var(--space-5);
    }

    .privacy-item,
    .education-item {
        padding-top: var(--space-5);
    }
}

@media (min-width: 1024px) {
    .products-inner,
    .privacy-inner,
    .education-inner {
        column-gap: var(--space-10);
    }
}

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

    .reveal {
        opacity: 1;
        transform: none;
    }
}