/*
Theme Name: Serac
Description: High-altitude mountaineering expedition company.
Version: 1.0
*/

/* ============================================================
   Serac's structural principle: after several themes compressed
   everything into one dense above-the-fold composition, this one
   deliberately goes long — a real multi-scene descent through the
   mountain (terrain flythrough -> live conditions -> route archive
   -> range index -> elevation data -> ice/rock detail -> story ->
   logistics -> team -> press -> journal -> CTA), each scene using
   its own device. The two devices unique to this theme: the
   elevation-profile sparkline (a small drawn SVG line per route,
   not a numeral/timecode/folio/stage-track like prior themes) and
   the grade stamp ("AD+ - 6,190M - EST. 2019"). Palette: glacier-
   navy black + pale ice + a warm alpenglow accent — a hue pairing
   not used before in this project.
   ============================================================ */
:root {
	--glacier: #070B12;
	--panel: #0D1420;
	--panel-2: #111A28;
	--panel-3: #16202F;
	--line: rgba(200, 226, 240, 0.14);
	--line-strong: rgba(200, 226, 240, 0.30);
	--ink: #EAF2F7;
	--ink-dim: #9DB2C2;
	--ink-mute: #5C7080;
	--ice: #BFE7F5;
	--ice-bright: #E3F6FF;
	--glow: #FF9760;
	--glow-bright: #FFB489;
	--font-display: 'League Spartan', sans-serif;
	--font-body: 'Source Sans 3', sans-serif;
	--font-mono: 'Red Hat Mono', monospace;
}

* { box-sizing: border-box; }
body {
	margin: 0;
	background: var(--glacier);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--glow); color: var(--glacier); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.02; text-transform: uppercase; letter-spacing: -0.01em; margin: 0 0 0.4em; color: var(--ink); }
h1 { font-size: clamp(42px, 7vw, 104px); }
h2 { font-size: clamp(28px, 3.6vw, 48px); }
h3 { font-size: clamp(17px, 1.8vw, 21px); text-transform: none; font-weight: 600; }
p { margin: 0 0 1.1em; color: var(--ink-dim); font-family: var(--font-body); }
.mono { font-family: var(--font-mono); }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 40px; }

.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ice); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--ice); }
.eyebrow.glow { color: var(--glow); }
.eyebrow.glow::before { background: var(--glow); }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 32px; border: 1px solid var(--ice); border-radius: 2px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ice); background: transparent; transition: background 0.3s, color 0.3s; cursor: pointer; }
.btn:hover { background: var(--ice); color: var(--glacier); }
.btn.solid { background: var(--glow); color: var(--glacier); border-color: var(--glow); }
.btn.solid:hover { background: var(--glow-bright); border-color: var(--glow-bright); }
.btn.ghost { border-color: var(--line-strong); color: var(--ink-dim); }
.btn.ghost:hover { border-color: var(--ink-dim); color: var(--ink); background: transparent; }

.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.04; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); }

/* ============================================================
   Sitewide ambient snow layer — cheap vertex-driven point sprites,
   analytic motion (no compute/FBO sim), fixed behind everything.
   ============================================================ */
#snowCanvas { position: fixed; inset: 0; z-index: -2; width: 100%; height: 100%; pointer-events: none; }

/* ============================================================
   Header
   ============================================================ */
.site-head { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 24px 0; transition: background 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; }
.site-head.scrolled { background: rgba(7, 11, 18, 0.86); backdrop-filter: blur(12px); border-color: var(--line); }
.head-inner { display: flex; align-items: center; justify-content: space-between; padding: 0 3vw; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 21px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ink); }
.logo-mark { width: 10px; height: 10px; background: var(--glow); clip-path: polygon(50% 0%, 0% 100%, 100% 100%); }
.main-nav ul { list-style: none; display: flex; gap: 32px; margin: 0; padding: 0; }
.main-nav a { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); }
.main-nav a:hover { color: var(--ice); }
.nav-toggle { display: none; background: none; border: 1px solid var(--ice); color: var(--ice); font-size: 11px; letter-spacing: 0.08em; padding: 7px 15px; cursor: pointer; font-family: var(--font-mono); }
.mobile-nav { position: fixed; inset: 0; z-index: 200; background: var(--glacier); transform: translateY(-100%); transition: transform 0.4s cubic-bezier(.7,0,.3,1); display: flex; flex-direction: column; }
.mobile-nav.open { transform: translateY(0); }
.mobile-nav ul { list-style: none; margin: auto 0; padding: 0 40px; }
.mobile-nav li { border-bottom: 1px solid var(--line); }
.mobile-nav a { display: block; padding: 18px 0; font-family: var(--font-display); text-transform: uppercase; font-size: 32px; color: var(--ink); }
.mn-close { position: absolute; top: 24px; right: 34px; background: none; border: 1px solid var(--ice); color: var(--ice); font-size: 20px; padding: 4px 13px; cursor: pointer; }
@media (max-width: 960px) { .main-nav { display: none; } .nav-toggle { display: block; } }

/* ============================================================
   Structural devices: elevation-profile sparkline + grade stamp
   ============================================================ */
.grade-stamp { display: inline-flex; flex-wrap: wrap; gap: 18px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); }
.grade-stamp b { color: var(--glow); font-weight: 500; }
.elev-spark { display: block; width: 100%; height: 44px; }
.elev-spark path { fill: none; stroke: var(--ice); stroke-width: 1.6; }
.elev-spark .fill { fill: url(#elevFillGrad); stroke: none; }

/* ============================================================
   1. Hero — terrain flythrough
   ============================================================ */
.terrain-hero { position: relative; min-height: 100vh; display: flex; align-items: flex-end; overflow: hidden; }
.terrain-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.terrain-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,11,18,0) 40%, rgba(7,11,18,0.55) 85%, var(--glacier) 100%); pointer-events: none; }
.hero-inner { position: relative; z-index: 2; width: 100%; padding: 0 3vw 90px; }
.hero-lede { max-width: 540px; font-size: 18px; margin-top: 18px; }
.hero-cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-hud { position: absolute; top: 130px; right: 3vw; z-index: 2; text-align: right; font-family: var(--font-mono); font-size: 11px; color: var(--ice); }
.hero-hud span { display: block; color: var(--ink-mute); font-size: 10px; margin-top: 4px; }

/* ============================================================
   2. Trust ticker
   ============================================================ */
.trust-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; overflow: hidden; background: var(--panel); }
.trust-track { display: flex; gap: 70px; white-space: nowrap; animation: trust-scroll 30s linear infinite; width: max-content; }
.trust-track span { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); }
@keyframes trust-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   3. Live conditions band
   ============================================================ */
.conditions-band { padding: 90px 0; }
.cond-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; margin-bottom: 40px; }
.cond-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cond-tile { border: 1px solid var(--line); border-radius: 6px; padding: 22px; background: var(--panel); }
.cond-tile .ct-peak { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 14px; display: block; }
.cond-tile .ct-row { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--font-mono); font-size: 13px; }
.cond-tile .ct-row span:first-child { color: var(--ink-mute); }
.cond-tile .ct-row span:last-child { color: var(--ice); }
@media (max-width: 900px) { .cond-grid { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   4. Featured ascents grid
   ============================================================ */
.ascents-section { padding: 40px 0 100px; }
.ascent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 40px; }
.ascent-card { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.3s, transform 0.3s; }
.ascent-card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.ascent-card .ac-media { aspect-ratio: 4/3; overflow: hidden; }
.ascent-card .ac-media img { width: 100%; height: 100%; object-fit: cover; }
.ascent-card .ac-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.ascent-card .ac-range { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--glow); }
@media (max-width: 980px) { .ascent-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .ascent-grid { grid-template-columns: 1fr; } }

/* ============================================================
   5. Explore by range
   ============================================================ */
.range-section { padding: 40px 0 100px; }
.range-nav { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 40px; }
.range-tile { position: relative; aspect-ratio: 3/4; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.range-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.range-tile:hover img { transform: scale(1.06); }
.range-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(7,11,18,0.9) 100%); }
.range-tile span { position: absolute; bottom: 14px; left: 14px; z-index: 2; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
@media (max-width: 980px) { .range-nav { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .range-nav { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   6. Elevation comparison chart
   ============================================================ */
.chart-section { padding: 40px 0 110px; }
.elev-chart-wrap { margin-top: 50px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 40px 30px 20px; overflow-x: auto; }
.elev-chart-wrap svg { display: block; margin: 0 auto; }
.elev-chart-wrap .bar-label { font-family: var(--font-mono); font-size: 10px; fill: var(--ink-mute); text-transform: uppercase; }
.elev-chart-wrap .bar-value { font-family: var(--font-mono); font-size: 11px; fill: var(--ice); }
.elev-chart-wrap rect.bar { fill: var(--panel-3); stroke: var(--line-strong); }

/* ============================================================
   7. Terrain & Ice — CubeCamera reflective 3D scene
   ============================================================ */
.ice-scene { padding: 40px 0 110px; }
.ice-scene-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.ice-viewer { position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; }
.ice-viewer canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ice-copy .stat-row { display: flex; gap: 40px; margin-top: 36px; flex-wrap: wrap; }
.ice-copy .stat-row .stat b { display: block; font-family: var(--font-display); font-size: 32px; color: var(--ice); }
.ice-copy .stat-row .stat span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); }
@media (max-width: 900px) { .ice-scene-grid { grid-template-columns: 1fr; } }

/* ============================================================
   8. Editorial story split
   ============================================================ */
.story-split { padding: 40px 0 110px; display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.story-media { position: relative; }
.story-media img { border-radius: 8px; aspect-ratio: 4/5; object-fit: cover; }
.story-badge { position: absolute; bottom: -20px; left: -20px; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 8px; padding: 18px 22px; backdrop-filter: blur(8px); }
.story-badge b { font-family: var(--font-display); font-size: 24px; color: var(--glow); display: block; }
.story-badge span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); }
.story-copy blockquote { border-left: 2px solid var(--glow); margin: 1.4em 0; padding-left: 22px; font-family: var(--font-display); font-size: 19px; text-transform: none; color: var(--ink); }
@media (max-width: 900px) { .story-split { grid-template-columns: 1fr; } }

/* ============================================================
   9. Gear & logistics
   ============================================================ */
.gear-section { padding: 40px 0 110px; }
.gear-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 40px; }
.gear-card { border: 1px solid var(--line); border-radius: 8px; padding: 26px; background: var(--panel); }
.gear-card .gc-num { font-family: var(--font-mono); font-size: 11px; color: var(--glow); }
.gear-card h3 { margin-top: 14px; }
@media (max-width: 900px) { .gear-grid { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   10. Team grid
   ============================================================ */
.team-section { padding: 40px 0 110px; }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 40px; }
.team-card img { border-radius: 6px; aspect-ratio: 1; object-fit: cover; filter: grayscale(0.35); }
.team-card h4 { margin: 14px 0 2px; font-size: 16px; text-transform: none; font-family: var(--font-body); font-weight: 600; }
.team-card span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); }
@media (max-width: 900px) { .team-grid { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   11. Press band
   ============================================================ */
.press-band { padding: 80px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.press-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.press-quote p { font-family: var(--font-display); font-size: 19px; text-transform: none; color: var(--ink); }
.press-quote span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.06em; }
@media (max-width: 900px) { .press-grid { grid-template-columns: 1fr; } }

/* ============================================================
   12. Journal grid
   ============================================================ */
.journal-section { padding: 40px 0 110px; }
.journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 40px; }
.journal-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); transition: border-color 0.3s; }
.journal-card:hover { border-color: var(--line-strong); }
.journal-card .jc-media { aspect-ratio: 16/10; overflow: hidden; }
.journal-card .jc-media img { width: 100%; height: 100%; object-fit: cover; }
.journal-card .jc-body { padding: 22px; }
.journal-card .jc-date { font-family: var(--font-mono); font-size: 10px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.08em; }
.journal-card h3 { margin: 10px 0 8px; font-size: 18px; }
@media (max-width: 900px) { .journal-grid { grid-template-columns: 1fr; } }

/* ============================================================
   13. CTA band
   ============================================================ */
.cta-band { padding: 130px 0; text-align: center; }
.cta-band h2 { max-width: 720px; margin: 0 auto 30px; }

/* ============================================================
   14. Footer
   ============================================================ */
.site-foot { border-top: 1px solid var(--line); padding: 70px 0 30px; background: var(--panel); }
.foot-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding-bottom: 50px; }
.foot-brand .logo { margin-bottom: 14px; }
.foot-brand p { max-width: 300px; font-size: 14px; }
.foot-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 16px; }
.foot-col .foot-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col .foot-menu a { font-size: 14px; color: var(--ink-dim); }
.foot-col .foot-menu a:hover { color: var(--ice); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; border-top: 1px solid var(--line); flex-wrap: wrap; gap: 12px; }
.foot-bottom span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); }
@media (max-width: 900px) { .foot-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-top { grid-template-columns: 1fr; } }

/* ============================================================
   Inner pages
   ============================================================ */
.page-hero { padding: 150px 0 60px; }
.page-hero .lede { max-width: 640px; font-size: 18px; }
.content-wrap { max-width: 760px; margin: 0 auto; padding: 0 40px 120px; }
.content-wrap h2 { margin-top: 1.4em; text-transform: none; }
.content-wrap blockquote { border-left: 2px solid var(--glow); margin: 2em 0; padding-left: 24px; font-family: var(--font-display); text-transform: none; font-size: 20px; color: var(--ink); }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 0 3vw 120px; }
@media (max-width: 900px) { .archive-grid { grid-template-columns: 1fr; } }
.filter-pills { display: flex; gap: 10px; flex-wrap: wrap; padding: 0 3vw 40px; }
.filter-pills a { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; padding: 8px 16px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink-dim); }
.filter-pills a.active, .filter-pills a:hover { border-color: var(--ice); color: var(--ice); }

.single-ascent-head { padding: 150px 0 50px; }
.single-ascent-meta { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--line); }
.single-ascent-meta .m-item span { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 6px; }
.single-ascent-meta .m-item b { font-family: var(--font-display); font-size: 17px; font-weight: 600; text-transform: none; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding: 0 3vw 120px; }
.contact-form label { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 8px; }
.contact-form input, .contact-form textarea { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; color: var(--ink); font-family: var(--font-body); margin-bottom: 20px; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--ice); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.error-404 { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 0 20px; }
.error-404 .code { font-family: var(--font-mono); font-size: 13px; color: var(--glow); letter-spacing: 0.1em; }

/* ============================================================
   Reveal-on-scroll baseline
   ============================================================ */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.8s cubic-bezier(.2,.7,.3,1), transform 0.8s cubic-bezier(.2,.7,.3,1); }
[data-reveal].shown { opacity: 1; transform: none; }
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; background: var(--glow); z-index: 300; width: 0%; box-shadow: 0 0 8px var(--glow); }

@media (prefers-reduced-motion: reduce) {
	[data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
	.trust-track { animation: none; }
}
