/* Custom layer on top of Tailwind CDN. Kept minimal — handles effects that
   are awkward to express directly as utility classes. */

:root {
    --accent: #4ade80;
    --accent-2: #22c55e;
    --bg: #0a0b0e;
    --bg-elev: #121318;
    --text: #f5f5f7;
    --text-dim: rgba(245, 245, 247, 0.66);
    --text-muted: rgba(245, 245, 247, 0.42);
    --line: rgba(255, 255, 255, 0.08);
    --accent-glow: rgba(74, 222, 128, 0.35);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg);
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display",
                 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-feature-settings: "ss01", "cv11";
    overflow-x: hidden;
}

.font-display {
    font-family: "Fraunces", "Inter", Georgia, serif;
    font-feature-settings: "ss01", "ss03";
    letter-spacing: -0.03em;
}

.font-mono {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ——— gradient headline ——— */
.gradient-text {
    background: linear-gradient(180deg, #ffffff 0%, #b6b6bb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.gradient-accent {
    background: linear-gradient(120deg, #86efac 0%, #4ade80 50%, #34d399 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ——— Animated mesh backdrop ——— */
.mesh-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.mesh-bg::before,
.mesh-bg::after {
    content: '';
    position: absolute;
    border-radius: 9999px;
    filter: blur(100px);
    opacity: 0.55;
    mix-blend-mode: screen;
    animation: meshFloat 16s ease-in-out infinite;
}
.mesh-bg::before {
    width: 640px; height: 640px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.45), transparent 60%);
    top: -18%;
    left: 50%;
    transform: translateX(-50%);
}
.mesh-bg::after {
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25), transparent 60%);
    top: 30%;
    left: 20%;
    animation-delay: 4s;
}
@keyframes meshFloat {
    0%,100% { transform: translate(-50%, 0) scale(1); }
    50%     { transform: translate(-50%, -30px) scale(1.06); }
}

/* Grain overlay */
.grain {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
    mix-blend-mode: overlay;
}

/* ——— Glass panel ——— */
.glass {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
}
.glass-hover {
    transition: border-color 250ms ease, transform 250ms ease, background 250ms ease;
}
.glass-hover:hover {
    border-color: rgba(74, 222, 128, 0.28);
    background: rgba(74, 222, 128, 0.04);
    transform: translateY(-3px);
}

/* ——— Nav blur ——— */
.nav-blur {
    background: rgba(10, 11, 14, 0.72);
    backdrop-filter: saturate(180%) blur(22px);
    -webkit-backdrop-filter: saturate(180%) blur(22px);
    border-bottom: 1px solid var(--line);
}

/* ——— App icon with halo ——— */
.app-icon {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 28px;
    background: linear-gradient(135deg, #16a34a 0%, #4ade80 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 64px var(--accent-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.app-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.app-icon svg {
    width: 70px; height: 70px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

/* ——— Download pill ——— */
.cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    color: #0a0b0e;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: 0 14px 40px var(--accent-glow);
    transition: transform 200ms ease, box-shadow 200ms ease;
}
.cta-primary:hover { transform: translateY(-1px); box-shadow: 0 18px 48px var(--accent-glow); }
.cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: background 200ms ease, border-color 200ms ease;
}
.cta-secondary:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.14); }

/* ——— Phone mockup ——— */
.phone-shell {
    position: relative;
    width: 100%;
    max-width: 280px;
    aspect-ratio: 9 / 19.5;
    border-radius: 42px;
    background: linear-gradient(160deg, #1b1d24 0%, #0f1015 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.4);
}
/* No fake notch — real iPhone screenshots already include the status bar
   and Dynamic Island. Leaving `::before` empty so we can re-introduce a
   sizing class later if needed without layout shift. */
.phone-screen {
    width: 100%; height: 100%;
    border-radius: 34px;
    background: #000;
    overflow: hidden;
    position: relative;
}
.phone-screen img {
    width: 100%; height: 100%; object-fit: cover;
    display: block;
}
.phone-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.5px;
    background: radial-gradient(circle at 50% 0%, #12161d 0%, #000 100%);
    padding: 40px 20px;
    text-align: center;
}

/* ——— Watch mockup ——— */
.watch-shell {
    width: 180px;
    height: 220px;
    border-radius: 48px;
    background: linear-gradient(160deg, #252932 0%, #0f1015 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 14px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
    position: relative;
}
.watch-shell::before,
.watch-shell::after {
    content: '';
    position: absolute;
    right: -6px;
    width: 6px;
    background: #444;
    border-radius: 2px;
}
.watch-shell::before { top: 56px; height: 24px; }
.watch-shell::after  { top: 96px; height: 16px; }
.watch-screen {
    width: 100%; height: 100%;
    border-radius: 34px;
    background: #000;
    overflow: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.watch-screen img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.watch-screen.synthetic { padding: 20px 14px; }

/* Smaller watch thumbnails for the trio strip */
.watch-mini {
    width: 120px;
    height: 148px;
    border-radius: 32px;
    background: linear-gradient(160deg, #252932 0%, #0f1015 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.watch-mini:hover { transform: translateY(-4px) scale(1.04); }
.watch-mini .watch-screen {
    border-radius: 24px;
}

/* ——— Feature icon chip ——— */
.icon-chip {
    width: 46px; height: 46px;
    border-radius: 14px;
    background: rgba(74, 222, 128, 0.12);
    color: var(--accent);
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.22);
}
.icon-chip svg { width: 22px; height: 22px; }

/* ——— Scroll reveal ——— */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 800ms cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 800ms cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* Stagger children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 600ms ease, transform 600ms ease;
}
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 400ms; }
.reveal-stagger.in > *      { opacity: 1; transform: translateY(0); }

/* ——— Tuner-mimic live animation (hero) ——— */
@keyframes slide-note {
    0%, 100% { transform: translateX(-14%); }
    50%      { transform: translateX(12%); }
}
.live-scale {
    display: inline-flex;
    gap: 24px;
    animation: slide-note 5.5s ease-in-out infinite;
}
.live-tick {
    width: 2px;
    border-radius: 2px;
    background: rgba(255,255,255,0.3);
}

/* ——— FAQ accordion ——— */
.faq-item {
    border-bottom: 1px solid var(--line);
}
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 22px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.01em;
    color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary svg {
    transition: transform 250ms ease;
    flex-shrink: 0;
    color: var(--accent);
}
.faq-item[open] summary svg { transform: rotate(45deg); }
.faq-item .answer {
    color: var(--text-dim);
    padding-bottom: 22px;
    font-size: 15.5px;
    line-height: 1.65;
}

/* ——— Marquee ——— */
.marquee {
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.marquee-track {
    display: flex;
    gap: 56px;
    width: max-content;
    animation: marquee 40s linear infinite;
}
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.marquee-item {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(22px, 3vw, 36px);
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    gap: 56px;
}
.marquee-item::after {
    content: '•';
    color: var(--accent);
    margin-left: 56px;
}

/* ——— Tilt-on-hover helper ——— */
.tilt {
    transition: transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-style: preserve-3d;
}

/* ——— Doc pages ——— */
.doc-content h2 {
    font-size: 22px; font-weight: 700; letter-spacing: -0.01em;
    margin: 40px 0 12px;
}
.doc-content h3 {
    font-size: 17px; font-weight: 650;
    margin: 24px 0 8px;
}
.doc-content p, .doc-content li {
    color: var(--text-dim);
    font-size: 16px; line-height: 1.75;
    margin-bottom: 12px;
}
.doc-content ul { padding-left: 24px; }
.doc-content ul li::marker { color: var(--accent); }
.doc-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.doc-content strong { color: var(--text); }

/* Mobile tweaks */
@media (max-width: 640px) {
    .phone-shell { transform: scale(0.92); }
    .watch-shell { transform: scale(0.9); }
}
