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

:root {
    --bg: #090909; --surface: #111113; --card: #18181B;
    --border: #27272A; --border-light: #3F3F46;
    --orange: #FF6130; --violet: #A855F7; --green: #22C55E;
    --blue: #3B82F6; --red: #EF4444;
    --text-1: #F4F4F5; --text-2: #A1A1AA; --text-3: #52525B; --text-4: #3F3F46;
    --mono: 'JetBrains Mono', monospace;
    --sans: 'Inter', -apple-system, sans-serif;
    --radius: 16px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--bg); color: var(--text-1); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }

/* ─── Noise / Particles ────────────────────────────── */
.noise { position: fixed; inset: 0; pointer-events: none; z-index: 9999; opacity: 0.03; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.particles { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.particle { position: absolute; border-radius: 50%; animation: float linear infinite; }
@keyframes float { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(-100vh); opacity: 0; } }

/* ─── Logo Component (reusable) ────────────────────── */
.logo-mark { position: relative; display: flex; align-items: center; justify-content: center; }
.logo-sm { width: 34px; height: 34px; }
.logo-lg { width: 72px; height: 72px; }
.logo-xs { width: 24px; height: 24px; }

.logo-ring-outer {
    position: absolute; inset: 0; border-radius: 50%;
    border: 1px solid rgba(255,97,48,0.15);
}
.logo-ring-inner {
    position: absolute; border-radius: 50%;
    border: 2px solid var(--orange);
}
.logo-sm .logo-ring-inner { inset: 4px; }
.logo-lg .logo-ring-inner { inset: 8px; }
.logo-xs .logo-ring-inner { inset: 2px; border-width: 1.5px; }

.logo-letter {
    position: relative; z-index: 1; font-weight: 900; line-height: 1;
    background: linear-gradient(180deg, var(--text-1), var(--text-2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo-sm .logo-letter { font-size: 16px; }
.logo-lg .logo-letter { font-size: 34px; }
.logo-xs .logo-letter { font-size: 11px; }

.logo-glow {
    position: absolute; inset: -20px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,97,48,0.15), transparent 70%);
    pointer-events: none;
}

/* ─── Navigation ───────────────────────────────────── */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 12px 0; backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); background: rgba(9,9,9,0.7); border-bottom: 1px solid rgba(39,39,42,0.5); }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo-text { font-weight: 900; font-size: 20px; letter-spacing: 2px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 14px; color: var(--text-2); transition: color 0.2s; font-weight: 500; }
.nav-links a:hover { color: var(--text-1); }
.nav-cta { font-size: 13px; font-weight: 600; padding: 8px 20px; border-radius: 99px; background: var(--orange); color: white; transition: all 0.2s; }
.nav-cta:hover { background: #ff7a4d; box-shadow: 0 4px 20px rgba(255,97,48,0.3); }

/* ─── Hero ─────────────────────────────────────────── */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; padding: 100px 24px 60px; overflow: hidden; }
.hero-glow { position: absolute; width: 700px; height: 700px; top: -150px; left: 50%; transform: translateX(-50%); background: radial-gradient(circle, rgba(255,97,48,0.12) 0%, rgba(168,85,247,0.06) 40%, transparent 70%); pointer-events: none; }
.hero-glow-2 { position: absolute; width: 500px; height: 500px; bottom: -80px; right: -150px; background: radial-gradient(circle, rgba(168,85,247,0.08), transparent 70%); pointer-events: none; }
.hero-content { max-width: 800px; text-align: center; position: relative; z-index: 1; }
.phone-screen { text-align: left; }

.hero-badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 3px; color: var(--orange); padding: 6px 14px; border: 1px solid rgba(255,97,48,0.25); border-radius: 99px; background: rgba(255,97,48,0.06); margin-bottom: 24px; }
.hero-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:0.5; transform:scale(1.5); } }

.hero-title { font-size: clamp(44px, 7vw, 72px); font-weight: 900; line-height: 1.05; letter-spacing: -2px; margin-bottom: 20px; }
.hero-title-line { display: block; }
.hero-title-gradient { display: block; background: linear-gradient(135deg, var(--orange), #FF3D00, var(--violet)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { font-size: 17px; color: var(--text-2); line-height: 1.7; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 48px; }

/* ─── Buttons ──────────────────────────────────────── */
.btn-primary { display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px; border-radius: 14px; font-weight: 600; font-size: 15px; color: white; background: linear-gradient(135deg, var(--orange), #FF3D00); box-shadow: 0 4px 24px rgba(255,97,48,0.3), inset 0 1px 0 rgba(255,255,255,0.15); transition: all 0.3s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(255,97,48,0.4), inset 0 1px 0 rgba(255,255,255,0.15); }
.btn-lg { padding: 18px 36px; font-size: 17px; border-radius: 16px; }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 14px; font-weight: 600; font-size: 15px; color: var(--text-2); border: 1px solid var(--border); transition: all 0.3s; }
.btn-ghost:hover { color: var(--text-1); border-color: var(--border-light); background: rgba(255,255,255,0.03); }

/* ─── Phone Mockup ─────────────────────────────────── */
.hero-phone { position: relative; display: flex; justify-content: center; }

.phone-frame {
    width: 290px; background: #000; border-radius: 44px;
    border: 3px solid #2A2A2E; padding: 10px;
    position: relative; overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 40px 80px -20px rgba(0,0,0,0.8), 0 0 60px rgba(255,97,48,0.05);
    transition: transform 0.3s;
}

.phone-dynamic-island {
    width: 90px; height: 26px; background: #000; border-radius: 99px;
    margin: 0 auto 0; position: relative; z-index: 2;
}

.phone-screen {
    background: var(--bg); padding: 12px 12px 16px; border-radius: 34px;
    overflow: hidden;
}

.phone-glow {
    position: absolute; width: 300px; height: 300px; bottom: -60px; left: 50%; transform: translateX(-50%);
    background: radial-gradient(circle, rgba(255,97,48,0.12), transparent 70%); pointer-events: none; z-index: -1;
}

/* Phone header */
.ph-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.ph-header-left { }
.ph-greeting { font-family: var(--mono); font-size: 8px; color: var(--text-3); letter-spacing: 1px; margin-bottom: 3px; display: flex; align-items: center; gap: 5px; }
.ph-day { font-size: 7px; font-weight: 600; color: var(--orange); background: rgba(255,97,48,0.12); padding: 1px 4px; border-radius: 2px; border: 1px solid rgba(255,97,48,0.25); }
.ph-title { font-size: 18px; font-weight: 700; }
.ph-ring { position: relative; width: 40px; height: 40px; flex-shrink: 0; }
.ph-ring-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 9px; font-weight: 600; }

/* Phone health cards — match app's HealthMetricCard layout */
.ph-health { display: flex; gap: 6px; margin-bottom: 12px; }
.ph-hcard {
    flex: 1; background: var(--card); border-radius: 10px;
    padding: 10px; border: 1px solid var(--border);
    display: flex; flex-direction: column;
}
.ph-hcard-head {
    display: flex; align-items: center; gap: 4px; margin-bottom: 7px;
    font-family: var(--mono); font-size: 7px; color: var(--text-3); letter-spacing: 1.5px;
}
.ph-hcard-dot { width: 4px; height: 4px; border-radius: 50%; flex-shrink: 0; }
.ph-hcard-val { font-size: 17px; font-weight: 800; margin-bottom: 2px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ph-hcard-sub { font-size: 8px; margin-bottom: 8px; line-height: 1; }
.ph-hcard-track { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: auto; }
.ph-hcard-fill { height: 100%; border-radius: 2px; }

/* Phone section label */
.ph-label { font-family: var(--mono); font-size: 7px; color: var(--text-3); letter-spacing: 2px; margin-bottom: 8px; }

/* Phone blocks — match app's ProtocolBlockRow layout */
.ph-blocks { display: flex; flex-direction: column; gap: 5px; }
.ph-block { display: flex; gap: 6px; align-items: flex-start; }
.ph-block-time {
    font-family: var(--mono); font-size: 7px; color: var(--text-3);
    width: 36px; text-align: right; padding-top: 10px;
    display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0;
}
.ph-now {
    font-size: 5px; font-weight: 700; color: var(--orange);
    background: rgba(255,97,48,0.15); padding: 1px 3px; border-radius: 2px; letter-spacing: 0.5px;
}
.ph-block--active .ph-block-time span:first-child { color: var(--orange); }

.ph-block-body {
    flex: 1; display: flex; gap: 8px; align-items: center;
    padding: 10px; background: var(--card); border-radius: 10px;
    border: 1px solid var(--border); min-width: 0;
}
.ph-block--active .ph-block-body {
    border-color: rgba(255,97,48,0.3);
    box-shadow: 0 0 10px rgba(255,97,48,0.05);
}

.ph-block-ico {
    width: 28px; height: 28px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; flex-shrink: 0; line-height: 1;
}

.ph-block-txt { min-width: 0; flex: 1; }
.ph-block-name { font-size: 10px; font-weight: 600; line-height: 1.3; }
.ph-block-meta { font-size: 7px; color: var(--text-3); margin-top: 1px; }
.ph-block-cnt {
    font-family: var(--mono); font-size: 7px; color: var(--text-3);
    flex-shrink: 0; align-self: center;
}

/* Phone blocks — bottom fade across last block + ghosts */
.ph-blocks {
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0,0,0,0.5) 75%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0,0,0,0.5) 75%, transparent 100%);
}

/* Phone fade hint — ghost rows */
.ph-fade-hint { position: relative; margin-top: 2px; }
.ph-ghost-row {
    display: flex; gap: 6px; align-items: center; margin-bottom: 5px;
}
.ph-ghost-row--dim { opacity: 0.5; }
.ph-ghost-time {
    width: 36px; height: 6px; border-radius: 3px;
    background: var(--border); opacity: 0.5; flex-shrink: 0;
}
.ph-ghost-card {
    flex: 1; display: flex; gap: 8px; align-items: center;
    padding: 10px; background: var(--card); border-radius: 10px;
    border: 1px solid var(--border); opacity: 0.6;
}
.ph-ghost-ico {
    width: 28px; height: 28px; border-radius: 8px;
    background: var(--border); opacity: 0.4; flex-shrink: 0;
}
.ph-ghost-lines { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ph-ghost-lines div:first-child { width: 60%; height: 7px; border-radius: 3px; background: var(--border); opacity: 0.5; }
.ph-ghost-lines div:last-child { width: 40%; height: 5px; border-radius: 3px; background: var(--border); opacity: 0.3; }

.ph-more-count {
    text-align: center; font-family: var(--mono); font-size: 7px;
    color: var(--orange); letter-spacing: 1px; padding-top: 2px; opacity: 0.8;
}

/* ─── Sections ─────────────────────────────────────── */
.section-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section-label { font-family: var(--mono); font-size: 11px; letter-spacing: 3px; color: var(--orange); margin-bottom: 12px; text-align: center; }
.section-title { font-size: clamp(28px, 4.5vw, 44px); font-weight: 900; letter-spacing: -1px; text-align: center; margin-bottom: 12px; line-height: 1.15; }
.section-sub { font-size: 16px; color: var(--text-2); text-align: center; max-width: 500px; margin: 0 auto 36px; line-height: 1.6; }
.gradient-text { background: linear-gradient(135deg, var(--orange), var(--violet)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ─── Protocol Timeline ────────────────────────────── */
.protocol { padding: 80px 0; background: linear-gradient(180deg, var(--bg), var(--surface), var(--bg)); }
.protocol-timeline { max-width: 560px; margin: 0 auto; position: relative; padding-left: 84px; }
.protocol-timeline::before { content: ''; position: absolute; left: 74px; top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, var(--border), transparent); }
.protocol-item { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 12px; position: relative; }
.protocol-time { font-family: var(--mono); font-size: 11px; color: var(--text-3); width: 54px; text-align: right; padding-top: 14px; position: absolute; left: -84px; }
.protocol-card { flex: 1; display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); transition: all 0.3s; }
.protocol-card:hover { border-color: color-mix(in srgb, var(--accent) 30%, transparent); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.protocol-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex-shrink: 0; box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 50%, transparent); }
.protocol-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.protocol-desc { font-size: 13px; color: var(--text-2); line-height: 1.5; }

/* ─── CTA ──────────────────────────────────────────── */
.cta { padding: 80px 0; text-align: center; position: relative; overflow: hidden; }
.cta-glow { position: absolute; width: 500px; height: 500px; top: 50%; left: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(255,97,48,0.1), transparent 70%); pointer-events: none; }

.cta-logo-wrap {
    position: relative; width: 120px; height: 120px;
    margin: 0 auto 24px; display: flex; align-items: center; justify-content: center;
}

.cta-pulse-ring {
    position: absolute; inset: 0; border-radius: 50%;
    border: 1px solid var(--orange);
}
.cta-pulse-1 { animation: ctaPulse 3s ease-out infinite; }
.cta-pulse-2 { animation: ctaPulse 3s ease-out 1.5s infinite; }

@keyframes ctaPulse {
    0% { transform: scale(0.6); opacity: 0.5; }
    100% { transform: scale(1.3); opacity: 0; }
}

.cta-title { font-size: clamp(28px, 4.5vw, 44px); font-weight: 900; margin-bottom: 10px; letter-spacing: -1px; }
.cta-sub { font-size: 16px; color: var(--text-2); margin-bottom: 28px; }

/* ─── Footer ───────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 24px 0; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; letter-spacing: 1px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--text-3); transition: color 0.2s; }
.footer-links a:hover { color: var(--text-2); }
.footer-copy { font-family: var(--mono); font-size: 11px; color: var(--text-4); letter-spacing: 1px; }

/* ─── Scroll Reveal ────────────────────────────────── */
.protocol-item { opacity: 0; transform: translateY(24px); transition: opacity 0.5s ease, transform 0.5s ease; }
.protocol-item.visible { opacity: 1; transform: translateY(0); }

/* ─── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-actions { flex-direction: column; align-items: center; }
    .protocol-timeline { padding-left: 68px; }
    .protocol-timeline::before { left: 58px; }
    .protocol-time { left: -68px; width: 46px; }
    .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
}
