/*
Theme Name: Stride
Theme URI: https://stride.example
Author: Stride Athletics Club
Description: Elite track & field club theme. Speed-line kinetic identity, dual neon accent (orange/cyan), three purposeful WebGL moments (particle speed tunnel hero, 3D lane-perspective timing scene, velocity-blur cursor) plus a canvas speed-streak ambient layer.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: stride
*/

/* ============ Fonts ============ */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:wght@400;500;600;700;800&family=Chivo+Mono:wght@400;500;700&display=swap');

/* ============ Tokens ============ */
:root {
	--bg: #0a0a0a;
	--panel: #121212;
	--panel-2: #1a1a1a;
	--panel-light: #f4f2ec;

	--ink: #f5f5f0;
	--ink-dim: #a8a8a0;
	--ink-mute: #68685f;
	--ink-on-light: #0a0a0a;
	--ink-on-light-dim: #4a4a44;

	--accent: #ff4014;
	--accent-2: #00e0ff;
	--accent-ink: #0a0a0a;

	--line: rgba(245,245,240,.11);
	--line-strong: rgba(245,245,240,.22);

	--ff-head: 'Bebas Neue', 'Archivo Black', Impact, sans-serif;
	--ff-body: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
	--ff-mono: 'Chivo Mono', 'SFMono-Regular', Consolas, monospace;

	--radius: 2px;
	--container: 1380px;
	--shadow-glow: 0 0 40px -8px rgba(255,64,20,.5);
}

* { box-sizing: border-box; }
body {
	margin: 0; background: var(--bg); color: var(--ink);
	font-family: var(--ff-body); font-size: 16px; line-height: 1.6;
	-webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; }
h1, h2, h3, h4 { font-family: var(--ff-head); font-weight: 400; line-height: .96; margin: 0; letter-spacing: .01em; text-transform: uppercase; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 40px; }
.mono { font-family: var(--ff-mono); }

/* ============ Speed-streak ambient canvas ============ */
#bg-fx-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .55; }
.track-lines { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .05;
	background-image: repeating-linear-gradient(115deg, var(--ink) 0px, var(--ink) 1px, transparent 1px, transparent 90px);
}
.grain { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ Progress + preloader ============ */
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); z-index: 9999; transition: width .1s linear; }
#pre { position: fixed; inset: 0; z-index: 9900; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; transition: opacity .6s ease, visibility .6s ease; }
#pre.done { opacity: 0; visibility: hidden; }
.pre-mark { font-family: var(--ff-head); font-size: 44px; letter-spacing: .04em; color: var(--ink); }
.pre-bar { width: 260px; height: 2px; background: var(--line-strong); overflow: hidden; }
.pre-bar span { display: block; height: 100%; width: 0%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.pre-pct { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-mute); letter-spacing: .1em; }

/* ============ Header ============ */
.site-head { position: fixed; top: 0; left: 0; right: 0; z-index: 800; display: flex; align-items: center; justify-content: space-between; padding: 26px 40px; transition: padding .3s ease, background .3s ease, border-color .3s ease; border-bottom: 1px solid transparent; }
.site-head.is-scrolled { padding: 16px 40px; background: rgba(10,10,10,.8); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.brand { font-family: var(--ff-head); font-size: 30px; letter-spacing: .05em; display: flex; align-items: center; gap: 10px; }
.brand .dash { width: 22px; height: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform: skewX(-20deg); }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a { padding: 10px 18px; font-family: var(--ff-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-dim); transition: color .2s ease; position: relative; }
.main-nav a:hover { color: var(--ink); }
.main-nav a::after { content: ''; position: absolute; left: 18px; right: 18px; bottom: 4px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.main-nav a:hover::after { transform: scaleX(1); }
.head-cta { display: flex; align-items: center; gap: 16px; }
.menu-toggle { display: none; }
.mobile-nav { position: fixed; inset: 0; z-index: 890; background: var(--bg); display: flex; flex-direction: column; justify-content: center; padding: 40px; gap: 6px; transform: translateY(-100%); transition: transform .5s cubic-bezier(.76,0,.24,1); }
.mobile-nav.open { transform: translateY(0); }
.mobile-nav a { display: block; font-family: var(--ff-head); font-size: 40px; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* ============ Buttons ============ */
.btn { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 15px 30px; font-family: var(--ff-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%); overflow: hidden; transition: transform .25s cubic-bezier(.2,1,.3,1); }
.btn-primary { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }
.btn-cyan { background: var(--accent-2); color: var(--accent-ink); font-weight: 700; }

/* ============ Hero ============ */
.hero { position: relative; min-height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 150px; background: var(--bg); }
#hero-canvas { position: absolute; inset: 0; z-index: 1; }
.hero-scrim { position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(10,10,10,.05) 0%, rgba(10,10,10,.55) 72%, rgba(10,10,10,.95) 100%); pointer-events: none; }
.hero-inner { position: relative; z-index: 3; padding-bottom: 100px; }
.hero-eyebrow { display: flex; align-items: center; gap: 12px; font-family: var(--ff-mono); font-size: 12.5px; color: var(--accent-2); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 26px; }
.hero-eyebrow .blip { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 10px var(--accent); animation: blip-pulse 1.4s ease-in-out infinite; }
@keyframes blip-pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.hero h1 { font-size: clamp(64px, 10vw, 160px); letter-spacing: .01em; }
.hero h1 .reveal-line { overflow: hidden; display: block; }
.hero h1 .reveal-line span { display: block; transform: translateY(115%) skewY(4deg); transition: transform .85s cubic-bezier(.16,1,.3,1); }
.hero.loaded h1 .reveal-line span { transform: translateY(0) skewY(0); }
.hero h1 .accent-word { color: var(--accent); }
.hero-sub { margin-top: 26px; max-width: 50ch; font-size: 18px; color: var(--ink-dim); }
.hero-cta { display: flex; gap: 16px; margin-top: 40px; }
.hero-meta-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 80px; background: var(--line); }
.hero-meta-row div { background: var(--bg); padding: 20px 0 0; }
.hero-meta-row b { display: block; font-family: var(--ff-head); font-size: 42px; color: var(--ink); }
.hero-meta-row span { display: block; margin-top: 4px; font-family: var(--ff-mono); font-size: 11px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .06em; }

/* ============ Ticker ============ */
.ticker-strip { background: var(--accent); border-top: 2px solid var(--bg); border-bottom: 2px solid var(--bg); padding: 16px 0; overflow: hidden; position: relative; z-index: 2; transform: skewY(-1.4deg); margin: -14px 0; }
.ticker-track { display: flex; white-space: nowrap; width: max-content; animation: ticker-l 22s linear infinite; transform: skewY(1.4deg); }
.ticker-track span { font-family: var(--ff-head); font-size: 26px; color: var(--accent-ink); padding: 0 30px; display: flex; align-items: center; gap: 16px; letter-spacing: .03em; }
.ticker-track span em { font-style: normal; font-family: var(--ff-mono); font-size: 13px; }
@keyframes ticker-l { from { transform: translateX(0) skewY(1.4deg); } to { transform: translateX(-50%) skewY(1.4deg); } }

/* ============ Section shell ============ */
.section { position: relative; z-index: 2; padding: 130px 0; }
.section-light { background: var(--panel-light); color: var(--ink-on-light); }
.section-panel { background: var(--panel); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 60px; }
.section-head .idx { display: flex; align-items: center; gap: 10px; font-family: var(--ff-mono); font-size: 12.5px; color: var(--accent); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.section-head .idx::before { content: ''; width: 20px; height: 2px; background: var(--accent); }
.section-head h2 { font-size: clamp(38px, 5vw, 64px); }
.section-head p { color: var(--ink-dim); font-size: 16px; max-width: 40ch; font-family: var(--ff-body); text-transform: none; }
.section-light .section-head p { color: var(--ink-on-light-dim); }

[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); }
[data-reveal].in { opacity: 1; transform: translateY(0); }

/* ============ Kinetic marquee statement ============ */
.kinetic { padding: 60px 0 20px; overflow: hidden; }
.kinetic-track { display: flex; white-space: nowrap; width: max-content; }
.kinetic-track span { font-family: var(--ff-head); font-size: clamp(50px, 9vw, 130px); padding: 0 40px; color: transparent; -webkit-text-stroke: 1px var(--line-strong); display: flex; align-items: center; gap: 30px; }
.kinetic-track span em { font-style: normal; color: var(--accent); -webkit-text-stroke: 0; }

/* ============ Athlete cards ============ */
.athletes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--line); }
.athlete-card { background: var(--panel); position: relative; overflow: hidden; padding: 0; aspect-ratio: 3/4.2; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%); }
.athlete-card .ac-avatar { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--ff-head); font-size: 64px; color: var(--panel-2); background: linear-gradient(150deg, #1a1a1a, #0a0a0a); transition: transform .5s cubic-bezier(.16,1,.3,1); }
.athlete-card:hover .ac-avatar { transform: scale(1.08); }
.athlete-card .ac-bib { position: absolute; top: 16px; left: 16px; font-family: var(--ff-mono); font-size: 11px; padding: 4px 10px; background: var(--accent); color: var(--accent-ink); }
.athlete-card .ac-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; background: linear-gradient(0deg, rgba(0,0,0,.85), transparent); }
.athlete-card .ac-body b { display: block; font-family: var(--ff-head); font-size: 22px; letter-spacing: .02em; }
.athlete-card .ac-body span { display: block; margin-top: 4px; font-family: var(--ff-mono); font-size: 11px; color: var(--accent-2); text-transform: uppercase; }

/* ============ 3D track / timing section ============ */
.track-scene { position: relative; background: var(--bg); padding: 130px 0; overflow: hidden; }
.track-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px; align-items: center; }
#track-canvas-wrap { position: relative; aspect-ratio: 16/11; }
#track-canvas { position: absolute; inset: 0; }
.timer-board { background: var(--panel); border: 1px solid var(--line-strong); padding: 40px; }
.timer-row { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.timer-row:last-child { border-bottom: none; }
.timer-row .tr-label { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .06em; }
.timer-digits { display: flex; gap: 4px; }
.timer-digit { font-family: var(--ff-mono); font-size: 26px; background: var(--panel-2); padding: 6px 8px; min-width: 30px; text-align: center; color: var(--accent-2); border-radius: 2px; }

/* ============ Programs grid ============ */
.programs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.program-card { background: var(--panel); padding: 44px 36px; position: relative; overflow: hidden; transition: background .3s ease; min-height: 260px; display: flex; flex-direction: column; }
.program-card:hover { background: var(--accent); }
.program-card:hover * { color: var(--accent-ink) !important; }
.program-card .pc-num { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-mute); }
.program-card h3 { font-size: 30px; margin: 50px 0 12px; }
.program-card p { font-size: 14.5px; color: var(--ink-dim); text-transform: none; font-family: var(--ff-body); flex: 1; }

/* ============ Schedule table ============ */
.schedule-list { max-width: 980px; margin: 0 auto; }
.sched-row { display: grid; grid-template-columns: 120px 1fr 160px 120px; gap: 26px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); transition: padding-left .25s ease; }
.sched-row:hover { padding-left: 10px; }
.sched-row .sd-date { font-family: var(--ff-mono); font-size: 13px; color: var(--accent); }
.sched-row h4 { font-family: var(--ff-head); font-size: 22px; letter-spacing: .02em; }
.sched-row .sd-loc { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-mute); text-transform: uppercase; }
.sched-row .sd-status { font-family: var(--ff-mono); font-size: 11px; padding: 5px 12px; text-align: center; border: 1px solid var(--line-strong); text-transform: uppercase; }
.sched-row .sd-status.live { border-color: var(--accent); color: var(--accent); }

/* ============ Records board ============ */
.records-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); }
.record-cell { background: var(--panel); padding: 30px 34px; display: flex; justify-content: space-between; align-items: center; }
.record-cell .rc-event { font-family: var(--ff-head); font-size: 24px; }
.record-cell .rc-holder { font-family: var(--ff-mono); font-size: 11px; color: var(--ink-mute); text-transform: uppercase; margin-top: 4px; }
.record-cell .rc-time { font-family: var(--ff-mono); font-size: 30px; color: var(--accent-2); }

/* ============ News grid ============ */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.news-card { background: var(--panel); padding: 34px 30px; transition: background .25s ease; }
.news-card:hover { background: var(--panel-2); }
.news-card .nc-tag { font-family: var(--ff-mono); font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.news-card h3 { font-size: 22px; margin: 16px 0 12px; text-transform: none; letter-spacing: 0; }
.news-card .nc-date { font-family: var(--ff-mono); font-size: 11.5px; color: var(--ink-mute); }

/* ============ CTA band ============ */
.cta-band { background: linear-gradient(120deg, var(--accent), #ff7a3d); color: var(--accent-ink); padding: 110px 0; text-align: center; clip-path: polygon(0 40px, 100% 0, 100% calc(100% - 40px), 0 100%); }
.cta-band h2 { font-size: clamp(36px, 5.4vw, 68px); max-width: 20ch; margin: 0 auto 36px; }
.cta-band .btn-ghost { border-color: var(--accent-ink); color: var(--accent-ink); }

/* ============ Footer ============ */
.site-foot { background: var(--bg); color: var(--ink-mute); padding: 100px 0 34px; position: relative; z-index: 2; border-top: 1px solid var(--line); }
.foot-top { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 40px; padding-bottom: 60px; border-bottom: 1px solid var(--line); }
.foot-brand .brand { color: var(--ink); }
.foot-brand p { margin-top: 18px; font-size: 14.5px; max-width: 30ch; text-transform: none; font-family: var(--ff-body); }
.foot-col span { display: block; font-family: var(--ff-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); margin-bottom: 18px; }
.foot-col a { display: block; padding: 6px 0; font-size: 14.5px; color: var(--ink); transition: color .2s ease; }
.foot-col a:hover { color: var(--accent); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; font-family: var(--ff-mono); font-size: 11.5px; flex-wrap: wrap; gap: 10px; }

/* ============ Page hero ============ */
.page-hero { padding: 190px 0 60px; position: relative; z-index: 2; }
.page-hero h1 { font-size: clamp(44px, 7vw, 90px); }
.page-hero p { margin-top: 20px; font-size: 17px; color: var(--ink-dim); max-width: 58ch; text-transform: none; font-family: var(--ff-body); }

/* ============ Entry ============ */
.entry { max-width: 74ch; margin: 0 auto; font-size: 17.5px; color: var(--ink-dim); }
.entry p { margin-bottom: 22px; }
.entry h2, .entry h3 { color: var(--ink); margin: 40px 0 16px; text-transform: none; letter-spacing: 0; }

/* ============ Archive list ============ */
.archive-list { max-width: 920px; margin: 0 auto; }
.archive-row { display: grid; grid-template-columns: 140px 1fr auto; gap: 24px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); transition: padding-left .2s ease; }
.archive-row:hover { padding-left: 8px; }
.archive-row .ar-cat { font-family: var(--ff-mono); font-size: 11.5px; color: var(--accent); text-transform: uppercase; }
.archive-row h3 { font-size: 20px; text-transform: none; letter-spacing: 0; }
.archive-row .ar-date { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-mute); }

/* ============ Contact form ============ */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 60px; }
.contact-info ul { margin-top: 24px; }
.contact-info li { padding: 16px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.ci-label { font-family: var(--ff-mono); font-size: 11px; text-transform: uppercase; color: var(--ink-mute); letter-spacing: .06em; }
.ci-val { font-size: 16px; }
.form-row { display: flex; gap: 20px; margin-bottom: 20px; }
.form-field { flex: 1; }
.form-field.full { flex: 1 1 100%; }
.form-field label { display: block; font-family: var(--ff-mono); font-size: 11px; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 8px; }
.form-field input, .form-field select, .form-field textarea { width: 100%; padding: 13px 16px; border: 1px solid var(--line-strong); background: var(--panel); font-family: var(--ff-body); font-size: 15px; color: var(--ink); }
.form-field textarea { min-height: 130px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--accent); }

/* ============ Custom motion-blur cursor ============ */
.cursor-dot { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9998; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; opacity: 0; transition: opacity .2s ease; transform: translate(-50%,-50%); }
#cursorBlurCanvas { position: fixed; inset: 0; z-index: 9997; pointer-events: none; }
.has-cursor .cursor-dot { opacity: 1; }
@media (hover: none) { .cursor-dot, #cursorBlurCanvas { display: none; } }

/* ============ Responsive ============ */
@media (max-width: 1080px) {
	.wrap { padding: 0 24px; }
	.main-nav { display: none; }
	.menu-toggle { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel-2); font-family: var(--ff-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
	.hero-meta-row { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
	.track-layout, .contact-grid { grid-template-columns: 1fr; }
	.athletes-grid, .programs-grid, .records-grid { grid-template-columns: repeat(2, 1fr); }
	.news-grid { grid-template-columns: 1fr; }
	.foot-top { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
	.hero-meta-row, .athletes-grid, .programs-grid, .records-grid { grid-template-columns: 1fr; }
	.sched-row { grid-template-columns: 1fr; gap: 6px; }
	.form-row { flex-direction: column; gap: 0; }
	.section { padding: 90px 0; }
	.foot-top { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	* { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
