/* ============================================
   IDR — Interplanetary Data Reserve
   Site Stylesheet v2 — With Animations
   ============================================ */

/* === FONTS === */
@font-face { font-family: 'IDR Wide'; src: url('../fonts/IDR_Display_Wide.woff2') format('woff2'), url('../fonts/IDR_Display_Wide.ttf') format('truetype'); font-weight: 100; font-display: swap; }
@font-face { font-family: 'IDR Display'; src: url('../fonts/IDR_Display.woff2') format('woff2'), url('../fonts/IDR_Display.ttf') format('truetype'); font-weight: 100; font-display: swap; }
@font-face { font-family: 'IDR Condensed'; src: url('../fonts/IDR_Display_Condensed.woff2') format('woff2'), url('../fonts/IDR_Display_Condensed.ttf') format('truetype'); font-weight: 100; font-display: swap; }
@font-face { font-family: 'IDR Wide'; src: url('../fonts/IDR_Display_Wide_Medium.woff2') format('woff2'), url('../fonts/IDR_Display_Wide_Medium.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IDR Display'; src: url('../fonts/IDR_Display_Medium.woff2') format('woff2'), url('../fonts/IDR_Display_Medium.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IDR Condensed'; src: url('../fonts/IDR_Display_Condensed_Medium.woff2') format('woff2'), url('../fonts/IDR_Display_Condensed_Medium.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IDR Wide'; src: url('../fonts/IDR_Display_Wide_Heavy.woff2') format('woff2'), url('../fonts/IDR_Display_Wide_Heavy.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'IDR Display'; src: url('../fonts/IDR_Display_Heavy.woff2') format('woff2'), url('../fonts/IDR_Display_Heavy.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'IDR Condensed'; src: url('../fonts/IDR_Display_Condensed_Heavy.woff2') format('woff2'), url('../fonts/IDR_Display_Condensed_Heavy.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap');

:root {
    --black: #0a0a0a; --black-card: #0e0e0e;
    --gold-dark: #b8943f; --gold-mid: #c9a84c; --gold-light: #dfc678; --gold-bright: #e8d48b;
    --white: rgba(255,255,255,0.88); --white-dim: rgba(255,255,255,0.5);
    --white-faint: rgba(255,255,255,0.28); --white-ghost: rgba(255,255,255,0.08);
    --gold-grad: linear-gradient(135deg, #b8943f, #dfc678 35%, #c9a84c 55%, #e8d48b 75%, #b8943f);
    --font-d: 'IDR Display', monospace; --font-dw: 'IDR Wide', monospace; --font-dc: 'IDR Condensed', monospace;
    --font-b: 'DM Sans', -apple-system, sans-serif;
    --max-w: 1100px; --gut: 40px;
}
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
a { color: inherit; }
a:visited { color: inherit; }
html { scroll-behavior: smooth; }
body { background:var(--black); color:var(--white); font-family:var(--font-b); font-weight:300; font-size:16px; line-height:1.75; -webkit-font-smoothing:antialiased; overflow-x:hidden; }
body::after { content:''; position:fixed; inset:0; background:repeating-linear-gradient(0deg,transparent,transparent 1px,rgba(255,255,255,0.003) 1px,rgba(255,255,255,0.003) 2px); pointer-events:none; z-index:9999; }

.container { max-width:var(--max-w); margin:0 auto; padding:0 var(--gut); }
.gold-text { background:var(--gold-grad); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.gold-rule { width:0; height:1px; background:linear-gradient(90deg,var(--gold-mid),transparent); margin:24px 0; transition:width 1s ease; }
.gold-rule.visible { width:60px; }
.gold-rule-center { width:0; height:1px; background:linear-gradient(90deg,transparent,var(--gold-mid),transparent); margin:24px auto; transition:width 1.2s ease; }
.gold-rule-center.visible { width:80px; }

/* Scroll reveal */
.reveal { opacity:0; transform:translateY(40px); transition:opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity:1; transform:translateY(0); }
.reveal-left { opacity:0; transform:translateX(-60px); transition:opacity 0.8s ease, transform 0.8s ease; }
.reveal-left.visible { opacity:1; transform:translateX(0); }
.reveal-right { opacity:0; transform:translateX(60px); transition:opacity 0.8s ease, transform 0.8s ease; }
.reveal-right.visible { opacity:1; transform:translateX(0); }
.stagger { transition-delay: calc(var(--i, 0) * 0.12s); }

/* Nav */
nav { position:fixed; top:0; left:0; right:0; z-index:100; background:rgba(10,10,10,0.7); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); border-bottom:1px solid transparent; transition:all 0.4s ease; }
nav.scrolled { background:rgba(10,10,10,0.95); border-bottom-color:var(--white-ghost); }
nav .nav-inner { max-width:var(--max-w); margin:0 auto; padding:0 var(--gut); display:flex; align-items:center; justify-content:space-between; height:64px; }
nav .logo { font-family:var(--font-dc); font-weight:400; font-size:22px; letter-spacing:0.15em; text-decoration:none; background:var(--gold-grad); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
nav .nav-links { display:flex; gap:32px; list-style:none; }
nav .nav-links a { font-family:var(--font-b); font-weight:400; font-size:11px; letter-spacing:0.2em; text-transform:uppercase; color:var(--white-dim); text-decoration:none; position:relative; transition:color 0.3s; }
nav .nav-links a::after { content:''; position:absolute; bottom:-4px; left:50%; width:0; height:1px; background:var(--gold-mid); transition:width 0.3s, left 0.3s; }
nav .nav-links a:hover, nav .nav-links a.active { color:var(--gold-mid); }
nav .nav-links a:hover::after, nav .nav-links a.active::after { width:100%; left:0; }
.nav-toggle { display:none; background:none; border:none; cursor:pointer; padding:8px; }
.nav-toggle span { display:block; width:20px; height:1px; background:var(--gold-mid); margin:5px 0; }

/* Hero */
.hero { min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; position:relative; overflow:hidden; padding:120px var(--gut) 80px; }
#particles-canvas { position:absolute; inset:0; z-index:0; pointer-events:none; }
.hero-watermark { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); font-family:var(--font-dw); font-weight:100; font-size:clamp(150px,25vw,280px); letter-spacing:0.15em; color:transparent; background:linear-gradient(155deg,rgba(255,255,255,0.015),rgba(255,255,255,0.04) 30%,rgba(255,255,255,0.012) 50%,rgba(255,255,255,0.045) 70%,rgba(255,255,255,0.015)); -webkit-background-clip:text; background-clip:text; pointer-events:none; user-select:none; will-change:transform; }
.hero-org { font-family:var(--font-d); font-weight:400; font-size:clamp(14px,2.5vw,22px); letter-spacing:0.25em; background:var(--gold-grad); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; position:relative; z-index:2; opacity:0; animation:heroIn 1.2s ease 0.3s forwards; }
.hero-tagline { font-family:var(--font-b); font-weight:300; font-size:clamp(14px,1.8vw,18px); color:var(--white-dim); max-width:600px; line-height:1.8; margin-top:20px; position:relative; z-index:2; opacity:0; animation:heroIn 1.2s ease 0.8s forwards; }
@keyframes heroIn { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
.hero-stat-row { display:flex; gap:48px; margin-top:48px; position:relative; z-index:2; flex-wrap:wrap; justify-content:center; }
.hero-stat { text-align:center; opacity:0; animation:heroIn 1s ease calc(1.2s + var(--i,0)*0.2s) forwards; }
.hero-stat .num { font-family:var(--font-dc); font-weight:400; font-size:clamp(28px,4vw,42px); letter-spacing:0.08em; background:var(--gold-grad); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.hero-stat .label { font-size:10px; letter-spacing:0.2em; text-transform:uppercase; color:var(--white-faint); margin-top:4px; }
.hero-scroll { position:absolute; bottom:32px; left:50%; transform:translateX(-50%); font-size:9px; letter-spacing:0.3em; text-transform:uppercase; color:var(--white-faint); text-decoration:none; animation:pulse 2s ease-in-out infinite; z-index:2; }
@keyframes pulse { 0%,100%{opacity:0.3} 50%{opacity:0.8} }

/* Sections */
section { padding:100px 0; position:relative; }
section + section { border-top:1px solid var(--white-ghost); }
.section-label { font-size:9px; letter-spacing:0.35em; text-transform:uppercase; color:var(--gold-mid); margin-bottom:12px; }
.section-title { font-family:var(--font-d); font-weight:400; font-size:clamp(20px,3vw,32px); letter-spacing:0.12em; color:var(--white); margin-bottom:16px; }
.section-subtitle { font-weight:300; font-size:15px; color:var(--white-dim); max-width:640px; line-height:1.8; margin-bottom:48px; }
.section-body p { font-weight:300; font-size:15px; color:var(--white-dim); line-height:1.85; margin-bottom:20px; max-width:720px; }
.section-body p strong { color:var(--white); font-weight:400; }

/* Pathway cards */
.pathway-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:24px; margin-top:40px; }
.pathway-card { background:var(--black-card); border:1px solid var(--white-ghost); padding:32px; transition:border-color 0.4s, box-shadow 0.4s, transform 0.3s; }
.pathway-card:hover { border-color:rgba(201,168,76,0.25); box-shadow:0 0 40px rgba(201,168,76,0.05),inset 0 0 30px rgba(201,168,76,0.02); transform:translateY(-2px); }
.pathway-num { font-family:var(--font-dc); font-weight:400; font-size:36px; letter-spacing:0.05em; background:var(--gold-grad); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; margin-bottom:12px; }
.pathway-name { font-family:var(--font-b); font-weight:500; font-size:13px; letter-spacing:0.15em; text-transform:uppercase; color:var(--white); margin-bottom:8px; }
.pathway-desc { font-size:13px; font-weight:300; color:var(--white-dim); line-height:1.7; }
.pathway-lifespan { font-size:10px; letter-spacing:0.15em; text-transform:uppercase; color:var(--gold-mid); margin-top:16px; opacity:0.7; }

/* Research cards */
.research-grid { display:grid; gap:20px; margin-top:40px; }
.research-card { background:var(--black-card); border:1px solid var(--white-ghost); padding:28px 32px; display:flex; justify-content:space-between; align-items:center; gap:24px; transition:border-color 0.4s, transform 0.3s; }
.research-card:hover { border-color:rgba(201,168,76,0.2); transform:translateX(4px); }
.rc-num { font-family:var(--font-dc); font-weight:400; font-size:24px; background:var(--gold-grad); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; flex-shrink:0; width:36px; }
.rc-info { flex:1; }
.rc-title { font-weight:400; font-size:14px; color:var(--white); margin-bottom:4px; }
.rc-meta { font-size:11px; color:var(--white-faint); letter-spacing:0.05em; }
.rc-desc { margin-top:8px; font-size:13px; color:var(--white-dim); font-weight:300; line-height:1.7; }
.rc-link { font-size:10px; letter-spacing:0.15em; text-transform:uppercase; color:var(--gold-mid); text-decoration:none; flex-shrink:0; transition:color 0.2s; }
.rc-link:hover { color:var(--gold-light); }

/* Cost table */
.cost-row { display:flex; justify-content:space-between; align-items:baseline; padding:12px 0; border-bottom:1px solid var(--white-ghost); }
.cost-row:last-child { border-bottom:none; padding-top:16px; }
.cost-label { font-size:14px; color:var(--white-dim); font-weight:300; }
.cost-value { font-family:var(--font-dc); font-weight:700; font-size:18px; letter-spacing:0.05em; background:var(--gold-grad); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }

/* Contact */
.contact-grid { display:grid; grid-template-columns:1fr 1fr; gap:48px; margin-top:40px; }
.contact-item { margin-bottom:20px; }
.ci-label { font-size:9px; letter-spacing:0.25em; text-transform:uppercase; color:var(--gold-mid); margin-bottom:4px; }
.ci-value { font-size:14px; color:var(--white-dim); font-weight:300; }
.ci-value a { color:var(--white-dim); text-decoration:none; transition:color 0.2s; }
.ci-value a:hover { color:var(--gold-mid); }

/* CTA link */
.cta-link { font-size:10px; letter-spacing:0.25em; text-transform:uppercase; color:var(--gold-mid); text-decoration:none; transition:color 0.3s; }
.cta-link:hover { color:var(--gold-light); }

/* CTA quote */
.cta-quote { font-family:var(--font-d); font-weight:400; font-size:clamp(14px,2vw,20px); letter-spacing:0.15em; color:var(--white-dim); max-width:700px; margin:0 auto; line-height:2; }

/* Footer */
footer { border-top:1px solid var(--white-ghost); padding:40px 0; text-align:center; }
.footer-logo { font-family:var(--font-dc); font-weight:700; font-size:17px; letter-spacing:0.2em; background:var(--gold-grad); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; margin-bottom:12px; }
.footer-text { font-size:11px; color:var(--white-faint); letter-spacing:0.05em; }

/* Page header */
.page-header { padding:140px 0 60px; border-bottom:1px solid var(--white-ghost); }

/* Responsive */
@media (max-width:768px) {
    :root { --gut:24px; }
    nav .nav-links { display:none; }
    .nav-toggle { display:block; }
    nav .nav-links.open { display:flex; flex-direction:column; position:absolute; top:64px; left:0; right:0; background:rgba(10,10,10,0.96); padding:24px var(--gut); gap:20px; border-bottom:1px solid var(--white-ghost); }
    .hero-stat-row { gap:28px; }
    .pathway-grid { grid-template-columns:1fr; }
    .contact-grid { grid-template-columns:1fr; }
    .research-card { flex-wrap:wrap; }
}
