/* ============================================
   goWebPerf Landing Page — Style System
   ============================================ */

/* --- CSS Variables --- */
:root {
	--bg-primary: #0a0a0a;
	--bg-card: #141414;
	--bg-hover: #1e1e1e;
	--text-primary: #e5e5e5;
	--text-secondary: #a3a3a3;
	--text-muted: #525252;
	--accent: #00ff41;
	--accent-hover: #00cc33;
	--accent-dim: rgba(0, 255, 65, 0.15);
	--accent-glow: rgba(0, 255, 65, 0.3);
	--border: #262626;
	--border-hover: #404040;
	--score-good: #00ff41;
	--score-avg: #fbbf24;
	--score-poor: #ef4444;
	--font-display: 'Inter', sans-serif;
	--font-mono: 'JetBrains Mono', monospace;
	--max-width: 1200px;
	--nav-height: 64px;
	--radius: 8px;
	--radius-lg: 12px;
}

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

html {
	scroll-behavior: smooth;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family: var(--font-display);
	background: var(--bg-primary);
	color: var(--text-primary);
	line-height: 1.6;
	overflow-x: hidden;
}

a {
	color: inherit;
	text-decoration: none;
}

ul {
	list-style: none;
}

img {
	max-width: 100%;
	display: block;
}

button,
input {
	font-family: inherit;
	border: none;
	outline: none;
	background: none;
	color: inherit;
}

/* --- Utilities --- */
.container {
	width: 100%;
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 24px;
}

.section {
	padding: 96px 0;
}

.section-label {
	font-family: var(--font-mono);
	font-size: 0.8125rem;
	color: var(--accent);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: 12px;
}

.section-title {
	font-size: 2rem;
	font-weight: 700;
	margin-bottom: 16px;
	line-height: 1.2;
}

.section-subtitle {
	color: var(--text-secondary);
	font-size: 1.125rem;
	max-width: 640px;
}

.section-header {
	text-align: center;
	margin-bottom: 64px;
}

.section-header .section-subtitle {
	margin: 0 auto;
}

/* Fade-in animation */
.fade-in {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
	opacity: 1;
	transform: translateY(0);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: var(--nav-height);
	background: rgba(10, 10, 10, 0.85);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border);
	z-index: 1000;
	display: flex;
	align-items: center;
}

.navbar .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.navbar-logo {
	font-size: 1.25rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 2px;
}

.navbar-logo .go {
	color: var(--text-primary);
}

.navbar-logo .webperf {
	color: var(--accent);
}

.navbar-links {
	display: flex;
	align-items: center;
	gap: 32px;
}

.navbar-links a {
	font-size: 0.875rem;
	color: var(--text-secondary);
	transition: color 0.2s;
}

.navbar-links a:hover {
	color: var(--text-primary);
}

.navbar-right {
	display: flex;
	align-items: center;
	gap: 16px;
}

.lang-switch {
	font-family: var(--font-mono);
	font-size: 0.8125rem;
	color: var(--text-muted);
	padding: 4px 10px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: border-color 0.2s, color 0.2s;
}

.lang-switch:hover {
	border-color: var(--text-muted);
	color: var(--text-secondary);
}

.btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	background: var(--accent);
	color: #0a0a0a;
	font-weight: 600;
	font-size: 0.875rem;
	border-radius: var(--radius);
	cursor: pointer;
	transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.btn-primary:hover {
	background: var(--accent-hover);
	box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:active {
	transform: scale(0.97);
}

.btn-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	background: transparent;
	color: var(--accent);
	font-weight: 600;
	font-size: 0.875rem;
	border: 1px solid var(--accent);
	border-radius: var(--radius);
	cursor: pointer;
	transition: background 0.2s, box-shadow 0.2s;
}

.btn-secondary:hover {
	background: var(--accent-dim);
	box-shadow: 0 0 20px var(--accent-glow);
}

/* Hamburger */
.hamburger {
	display: none;
	flex-direction: column;
	gap: 5px;
	cursor: pointer;
	padding: 4px;
}

.hamburger span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--text-primary);
	border-radius: 2px;
	transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
	opacity: 0;
}

.hamburger.active span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
.mobile-nav {
	display: none;
	position: fixed;
	top: var(--nav-height);
	left: 0;
	right: 0;
	background: rgba(10, 10, 10, 0.95);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border);
	padding: 24px;
	z-index: 999;
}

.mobile-nav.open {
	display: block;
}

.mobile-nav a {
	display: block;
	padding: 12px 0;
	color: var(--text-secondary);
	font-size: 1rem;
	border-bottom: 1px solid var(--border);
}

.mobile-nav a:last-child {
	border-bottom: none;
}

.mobile-nav a:hover {
	color: var(--text-primary);
}

.mobile-nav .mobile-actions {
	margin-top: 16px;
	display: flex;
	gap: 12px;
	align-items: center;
}

/* ============================================
   HERO
   ============================================ */
.hero {
	padding-top: calc(var(--nav-height) + 80px);
	padding-bottom: 80px;
	text-align: center;
}

.hero-title {
	font-size: 3.25rem;
	font-weight: 800;
	line-height: 1.1;
	margin-bottom: 20px;
	letter-spacing: -0.02em;
}

.hero-title .highlight {
	color: var(--accent);
}

.hero-subtitle {
	font-size: 1.25rem;
	color: var(--text-secondary);
	max-width: 600px;
	margin: 0 auto 40px;
	line-height: 1.6;
}

/* Early Access Form */
.early-access-form {
	max-width: 520px;
	margin: 0 auto 56px;
}

.form-row {
	display: flex;
	gap: 10px;
	margin-bottom: 10px;
}

.form-row input {
	flex: 1;
	padding: 14px 16px;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-size: 0.9375rem;
	color: var(--text-primary);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.form-row input::placeholder {
	color: var(--text-muted);
}

.form-row input:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-submit-row {
	display: flex;
}

.form-submit-row .btn-primary {
	width: 100%;
	padding: 14px;
	font-size: 1rem;
	font-family: var(--font-mono);
	font-weight: 700;
	letter-spacing: 0.02em;
}

.form-success {
	display: none;
	padding: 20px;
	background: var(--accent-dim);
	border: 1px solid var(--accent);
	border-radius: var(--radius);
	color: var(--accent);
	font-family: var(--font-mono);
	font-size: 0.9375rem;
	text-align: center;
	animation: fadeInUp 0.4s ease;
}

.form-success.show {
	display: block;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Screenshot placeholder */
.screenshot-placeholder {
	position: relative;
	border: 2px dashed var(--accent);
	border-radius: var(--radius-lg);
	background: var(--bg-card);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.screenshot-placeholder span {
	font-family: var(--font-mono);
	font-size: 0.8125rem;
	color: var(--text-muted);
	padding: 16px;
	text-align: center;
}

/* When a real image is inside, hide placeholder text and fill the space */
.screenshot-placeholder img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: calc(var(--radius-lg) - 2px);
}

.screenshot-placeholder:has(img) span {
	display: none;
}

.screenshot-placeholder:has(img) {
	border-style: solid;
	border-color: var(--border);
}

.screenshot-16-9 {
	aspect-ratio: 16 / 9;
}

.screenshot-4-3 {
	aspect-ratio: 4 / 3;
}

.hero-screenshot {
	max-width: 900px;
	margin: 0 auto;
}

.hero-screenshot .screenshot-placeholder {
	aspect-ratio: 16 / 10;
}

/* ============================================
   WHAT WE MEASURE
   ============================================ */
.measure-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
}

.measure-card {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 32px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.measure-card:hover {
	border-color: var(--accent);
	box-shadow: 0 0 24px var(--accent-dim);
}

.measure-card-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
}

.measure-icon {
	width: 48px;
	height: 48px;
	border-radius: var(--radius);
	background: var(--accent-dim);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.measure-icon svg {
	width: 24px;
	height: 24px;
	stroke: var(--accent);
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.measure-card h3 {
	font-size: 1.125rem;
	font-weight: 600;
}

.measure-card p {
	color: var(--text-secondary);
	font-size: 0.9375rem;
	margin-bottom: 20px;
}

.measure-gauge {
	display: flex;
	justify-content: center;
}

/* SVG Gauge */
.gauge {
	position: relative;
	width: 80px;
	height: 80px;
}

.gauge svg {
	transform: rotate(-90deg);
}

.gauge-bg {
	fill: none;
	stroke: var(--border);
	stroke-width: 6;
}

.gauge-fill {
	fill: none;
	stroke-width: 6;
	stroke-linecap: round;
	stroke-dasharray: 226.19;
	stroke-dashoffset: 226.19;
	transition: stroke-dashoffset 1.2s ease-out;
}

.gauge-label {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-mono);
	font-size: 1.125rem;
	font-weight: 700;
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.steps {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	position: relative;
}

.steps::before {
	content: '';
	position: absolute;
	top: 40px;
	left: calc(12.5% + 12px);
	right: calc(12.5% + 12px);
	height: 2px;
	background: var(--border);
	z-index: 0;
}

.step {
	text-align: center;
	position: relative;
	z-index: 1;
}

.step-number {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: var(--bg-card);
	border: 2px solid var(--accent);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px;
}

.step-number svg {
	width: 32px;
	height: 32px;
	stroke: var(--accent);
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.step h3 {
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 8px;
}

.step p {
	color: var(--text-secondary);
	font-size: 0.875rem;
	line-height: 1.5;
}


/* ============================================
   REAL RESULTS (Examples)
   ============================================ */
#examples {
	background: var(--bg-card);
}

.examples-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.screenshot-placeholder .zoom-icon {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
}

.example-card {
	background: var(--bg-primary);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: border-color 0.2s, transform 0.2s;
}

.example-card:hover {
	border-color: var(--accent);
	transform: translateY(-4px);
}

.example-card-header {
	padding: 24px 24px 16px;
}

.example-card-header h3 {
	font-size: 1.125rem;
	font-weight: 700;
	margin-bottom: 4px;
}

.example-card-header .example-url {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: var(--text-muted);
}

.example-device {
	font-family: var(--font-mono);
	font-size: 0.625rem;
	color: var(--score-avg);
	border: 1px solid var(--score-avg);
	border-radius: 20px;
	padding: 2px 8px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	vertical-align: middle;
	margin-left: 6px;
}

.example-scores {
	display: flex;
	justify-content: space-around;
	padding: 16px 24px;
}

.example-score {
	text-align: center;
}

.example-score .gauge {
	width: 64px;
	height: 64px;
	margin-bottom: 6px;
}

.example-score .gauge .gauge-bg,
.example-score .gauge .gauge-fill {
	stroke-width: 5;
}

.example-score .gauge .gauge-label {
	font-size: 0.875rem;
}

.example-score-name {
	font-size: 0.6875rem;
	color: var(--text-muted);
	font-family: var(--font-mono);
	text-transform: uppercase;
}

.example-screenshot {
	margin: 0 16px 16px;
}

.example-screenshot .screenshot-placeholder {
	aspect-ratio: 16 / 10;
}

/* ============================================
   KEY FEATURES
   ============================================ */
.features-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.feature-card {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 28px;
	transition: border-color 0.2s;
}

.feature-card:hover {
	border-color: var(--accent);
}

.feature-icon {
	width: 40px;
	height: 40px;
	border-radius: var(--radius);
	background: var(--accent-dim);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 16px;
}

.feature-icon svg {
	width: 20px;
	height: 20px;
	stroke: var(--accent);
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.feature-card h3 {
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 8px;
}

.feature-card p {
	color: var(--text-secondary);
	font-size: 0.875rem;
	line-height: 1.5;
}

/* ============================================
   DEPLOYMENT OPTIONS
   ============================================ */
#deployment {
	background: var(--bg-card);
}

.deploy-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
	max-width: 900px;
	margin: 0 auto;
}

.deploy-card {
	background: var(--bg-primary);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 36px;
	position: relative;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.deploy-card:hover {
	border-color: var(--accent);
	box-shadow: 0 0 24px var(--accent-dim);
}

.deploy-card-coming {
	opacity: 0.75;
}

.deploy-card-coming:hover {
	opacity: 1;
}

.deploy-icon {
	width: 56px;
	height: 56px;
	border-radius: var(--radius);
	background: var(--accent-dim);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
}

.deploy-icon svg {
	width: 28px;
	height: 28px;
	stroke: var(--accent);
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.deploy-badge {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 0.6875rem;
	color: var(--accent);
	border: 1px solid var(--accent);
	border-radius: 20px;
	padding: 3px 12px;
	margin-bottom: 16px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.badge-coming {
	color: var(--score-avg);
	border-color: var(--score-avg);
}

.deploy-card h3 {
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 12px;
}

.deploy-card p {
	color: var(--text-secondary);
	font-size: 0.9375rem;
	line-height: 1.6;
	margin-bottom: 20px;
}

.deploy-features {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.deploy-features li {
	font-size: 0.875rem;
	color: var(--text-secondary);
	padding-left: 20px;
	position: relative;
}

.deploy-features li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 7px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent);
}

.deploy-card-coming .deploy-features li::before {
	background: var(--score-avg);
}

/* ============================================
   FINAL CTA
   ============================================ */
.final-cta {
	background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(0, 255, 65, 0.03) 50%, var(--bg-primary) 100%);
	text-align: center;
}

.final-cta .section-title {
	font-size: 2.5rem;
}

.final-cta .early-access-form {
	margin-top: 40px;
	margin-bottom: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
	border-top: 1px solid var(--border);
	background: var(--bg-card);
	padding: 48px 0 32px;
}

.footer-inner {
	max-width: 800px;
	margin: 0 auto;
	text-align: center;
}

.footer-logo {
	font-size: 1.125rem;
	font-weight: 700;
	margin-bottom: 20px;
	display: inline-flex;
	align-items: center;
	gap: 2px;
}

.footer-logo .go {
	color: var(--text-primary);
}

.footer-logo .webperf {
	color: var(--accent);
}

.footer-lines {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.footer-lines p {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: var(--text-muted);
	line-height: 1.7;
}

.footer-lines a {
	color: var(--text-secondary);
	transition: color 0.2s;
}

.footer-lines a:hover {
	color: var(--accent);
}

.footer-tech {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--border);
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
}

.footer-tech-item {
	font-family: var(--font-mono);
	font-size: 0.6875rem;
	color: var(--text-muted);
	padding: 3px 10px;
	border: 1px solid var(--border);
	border-radius: 20px;
	white-space: nowrap;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.9);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px;
	cursor: zoom-out;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.open {
	opacity: 1;
	visibility: visible;
}

.lightbox-overlay img {
	max-width: 100%;
	max-height: 100%;
	border-radius: var(--radius-lg);
	border: 1px solid var(--border);
	box-shadow: 0 0 60px rgba(0, 255, 65, 0.1);
	transform: scale(0.95);
	transition: transform 0.3s ease;
}

.lightbox-overlay.open img {
	transform: scale(1);
}

/* ============================================
   ZOOMABLE THUMBNAILS + ZOOM ICON
   ============================================ */
.zoomable-thumb {
	position: relative;
	margin-top: 16px;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--border);
	background: var(--bg-card);
	cursor: zoom-in;
	transition: border-color 0.2s;
}

.zoomable-thumb:hover {
	border-color: var(--accent);
}

.zoomable-thumb img {
	width: 100%;
	display: block;
	transition: transform 0.3s ease;
}

.zoomable-thumb:hover img {
	transform: scale(1.02);
}

.zoom-icon {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	background: rgba(0, 0, 0, 0.7);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s;
	pointer-events: none;
}

.zoomable-thumb:hover .zoom-icon,
.screenshot-placeholder:hover .zoom-icon {
	opacity: 1;
}

.zoom-icon svg {
	width: 16px;
	height: 16px;
	stroke: var(--accent);
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Add zoom icon to screenshot placeholders too */
.screenshot-placeholder {
	cursor: zoom-in;
}

.screenshot-placeholder:hover {
	border-color: var(--accent);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
	.features-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.examples-grid {
		grid-template-columns: repeat(2, 1fr);
	}

}


@media (max-width: 768px) {
	.section {
		padding: 64px 0;
	}

	.hero-title {
		font-size: 2.25rem;
	}

	.hero-subtitle {
		font-size: 1.0625rem;
	}

	.section-title {
		font-size: 1.625rem;
	}

	.navbar-links,
	.navbar-right .btn-primary,
	.navbar-right .lang-switch {
		display: none;
	}

	.hamburger {
		display: flex;
	}

	.mobile-nav .lang-switch,
	.mobile-nav .btn-primary {
		display: inline-flex;
	}

	.measure-grid {
		grid-template-columns: 1fr;
	}

	.steps {
		grid-template-columns: repeat(2, 1fr);
		gap: 32px 24px;
	}

	.steps::before {
		display: none;
	}

	.features-grid {
		grid-template-columns: 1fr;
	}

	.examples-grid {
		grid-template-columns: 1fr;
	}

	.deploy-grid {
		grid-template-columns: 1fr;
	}

	.form-row {
		flex-direction: column;
	}

	.final-cta .section-title {
		font-size: 1.75rem;
	}

	.footer-tech {
		gap: 8px;
	}
}

@media (max-width: 480px) {
	.hero {
		padding-top: calc(var(--nav-height) + 48px);
		padding-bottom: 48px;
	}

	.hero-title {
		font-size: 1.75rem;
	}

	.hero-subtitle {
		font-size: 1rem;
		margin-bottom: 32px;
	}

	.section-title {
		font-size: 1.5rem;
	}

	.steps {
		grid-template-columns: 1fr;
	}

	.example-scores {
		flex-wrap: wrap;
		gap: 12px;
	}

	.container {
		padding: 0 16px;
	}

	.section {
		padding: 48px 0;
	}

	.section-header {
		margin-bottom: 40px;
	}

	.early-access-form {
		margin-bottom: 40px;
	}
}
