/*
Theme Name: Sloop Racing Platform
Theme URI: https://sloopracing.eu
Description: The one-page sales site for Sloop Racing on the Platform site (site 1). Not for club sub-sites.
Author: Sloop Racing
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: sloopracing-platform
*/

:root {
	--ink: #111513;
	--ink-soft: #3d4441;
	--muted: #66706b;
	--line: #e4e8e5;
	--paper: #ffffff;
	--sand: #f6f7f5;
	--tint: #edf9f2;
	--green: #09c269;        /* brand accent: highlights, icons, dots */
	--green-deep: #067a42;   /* buttons and links: readable with white text */
	--green-deeper: #05613a;
	--sea: #0f2a24;          /* dark band */
	--radius: 20px;
	--radius-sm: 12px;
	--shadow: 0 1px 2px rgba(17, 21, 19, .05), 0 12px 32px -12px rgba(17, 21, 19, .18);
	--shadow-lg: 0 2px 4px rgba(17, 21, 19, .04), 0 32px 64px -24px rgba(17, 21, 19, .28);
	--wrap: 1160px;
	--font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 17px/1.65 var(--font);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-deep); }
a:hover { color: var(--green-deeper); }

h1, h2, h3 { color: var(--ink); line-height: 1.12; letter-spacing: -.025em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); font-weight: 800; letter-spacing: -.04em; }
h2 { font-size: clamp(2rem, 3.8vw, 3rem); font-weight: 800; letter-spacing: -.035em; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 100; background: var(--paper); padding: 8px 14px; border-radius: 8px; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	padding: 15px 26px;
	border-radius: 999px;
	font: 600 1rem/1 var(--font);
	text-decoration: none;
	border: 2px solid transparent;
	cursor: pointer;
	transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green-deep); color: #fff; }
.btn-primary:hover { background: var(--green-deeper); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-small { padding: 11px 20px; font-size: .95rem; }

/* ---------- Header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, .88);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid transparent;
	transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }

.wordmark {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 800;
	font-size: 1.25rem;
	letter-spacing: -.03em;
	color: var(--ink);
	text-decoration: none;
}
.wordmark:hover { color: var(--ink); }
.wordmark-mark {
	width: 34px; height: 34px;
	border-radius: 10px;
	background: var(--green);
	display: grid; place-items: center;
}
.wordmark-mark svg { width: 22px; height: 22px; }

.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a:not(.btn) { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .97rem; }
.site-nav a:not(.btn):hover { color: var(--ink); }

.wordmark, .btn { white-space: nowrap; }

@media (max-width: 860px) {
	.site-nav a:not(.btn) { display: none; }
}
@media (max-width: 420px) {
	.site-header .wrap { height: 64px; gap: 12px; }
	.wordmark { font-size: 1.1rem; gap: 8px; }
	.wordmark-mark { width: 30px; height: 30px; }
	.site-nav .btn-small { padding: 9px 14px; font-size: .88rem; }
}

/* ---------- Hero ---------- */

.hero { padding: 72px 0 0; text-align: center; overflow: hidden; }
.badge {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 7px 14px 7px 10px;
	border-radius: 999px;
	background: var(--tint);
	color: var(--green-deeper);
	font-weight: 600; font-size: .9rem;
	margin-bottom: 26px;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(9, 194, 105, .2); }
.hero h1 { max-width: 15ch; margin-inline: auto; }
.hero h1 .hl { color: var(--green-deep); }
.hero .lead { max-width: 40rem; margin: 0 auto 34px; font-size: 1.22rem; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 64px; }

.hero-visual { position: relative; max-width: 1100px; margin-inline: auto; }
.hero-photo {
	border-radius: 28px;
	overflow: hidden;
	box-shadow: var(--shadow-lg);
	aspect-ratio: 16 / 8;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 72%; }

.float-card {
	position: absolute;
	background: var(--paper);
	border-radius: 16px;
	box-shadow: var(--shadow);
	padding: 14px 18px;
	text-align: left;
	font-size: .9rem;
	line-height: 1.4;
}
.float-card strong { display: block; font-size: 1.05rem; letter-spacing: -.01em; }
.float-card .k { color: var(--muted); font-size: .8rem; }
.float-live { left: -18px; bottom: 44px; display: flex; gap: 12px; align-items: center; }
.float-live .pulse { width: 12px; height: 12px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 0 rgba(229, 72, 77, .5); animation: pulse 1.8s infinite; flex: none; }
.float-rank { right: -18px; top: 40px; min-width: 210px; }
.float-rank ol { margin: 6px 0 0; padding: 0; list-style: none; counter-reset: r; }
.float-rank li { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; counter-increment: r; }
.float-rank li::before { content: counter(r); width: 1.3em; color: var(--muted); font-weight: 600; }
.float-rank li span:first-child { flex: 1; }
.float-rank li span:last-child { font-variant-numeric: tabular-nums; color: var(--ink-soft); }

@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(229, 72, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); } }
@media (prefers-reduced-motion: reduce) { .float-live .pulse { animation: none; } html { scroll-behavior: auto; } .btn:hover { transform: none; } }

@media (max-width: 860px) {
	.hero { padding-top: 48px; }
	.hero-photo { aspect-ratio: 4 / 3; border-radius: 20px; }
	.float-rank { display: none; }
	.float-live { left: 12px; bottom: 12px; }
}

/* ---------- Sections ---------- */

.section { padding: 120px 0; }
.section-sand { background: var(--sand); }
.section-tint { background: var(--tint); }

.section-head { max-width: 46rem; margin: 0 auto 64px; text-align: center; }
.section-head .lead { font-size: 1.15rem; color: var(--ink-soft); }
.eyebrow {
	display: inline-block;
	font-weight: 700; font-size: .82rem;
	letter-spacing: .12em; text-transform: uppercase;
	color: var(--green-deep);
	margin-bottom: 14px;
}

@media (max-width: 860px) { .section { padding: 80px 0; } .section-head { margin-bottom: 44px; } }

/* Split rows: text beside a visual, alternating */
.split {
	display: grid;
	grid-template-columns: 1fr 1.1fr;
	gap: 72px;
	align-items: center;
}
.split + .split { margin-top: 112px; }
.split.flip > :first-child { order: 2; }
.split h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -.03em; }
.split p { color: var(--ink-soft); font-size: 1.08rem; }

@media (max-width: 860px) {
	.split { grid-template-columns: 1fr; gap: 36px; }
	.split.flip > :first-child { order: 0; }
	.split + .split { margin-top: 72px; }
}

.checks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 34px; color: var(--ink); font-weight: 500; }
.checks li::before {
	content: "";
	position: absolute; left: 0; top: 3px;
	width: 22px; height: 22px; border-radius: 50%;
	background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23067a42' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.section-tint .checks li::before { background-color: #fff; }

/* Placeholder for screenshots and product photos still to come */
.placeholder {
	position: relative;
	aspect-ratio: 4 / 3;
	border-radius: var(--radius);
	background:
		radial-gradient(circle at 18% 22%, rgba(9, 194, 105, .22), transparent 46%),
		radial-gradient(circle at 85% 80%, rgba(15, 42, 36, .14), transparent 50%),
		linear-gradient(140deg, #dff5e8, #c7ecd8);
	display: grid;
	place-items: center;
	overflow: hidden;
	box-shadow: var(--shadow);
}
.placeholder::before {
	content: "";
	position: absolute; inset: 9%;
	border-radius: 14px;
	background: rgba(255, 255, 255, .72);
	box-shadow: 0 20px 40px -20px rgba(15, 42, 36, .35);
}
.placeholder span {
	position: relative;
	display: inline-flex; align-items: center; gap: 8px;
	font-size: .9rem; font-weight: 600;
	color: var(--green-deeper);
	background: #fff;
	padding: 8px 14px;
	border-radius: 999px;
	box-shadow: 0 1px 2px rgba(17, 21, 19, .08);
}
.placeholder span::before {
	content: "";
	width: 16px; height: 16px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2305613a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center / contain no-repeat;
}
.placeholder.square { aspect-ratio: 1; }
.placeholder.dark {
	background:
		radial-gradient(circle at 25% 25%, rgba(9, 194, 105, .35), transparent 50%),
		linear-gradient(150deg, #173d34, var(--sea));
}
.placeholder.dark::before { background: rgba(255, 255, 255, .08); box-shadow: none; }

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 96px; }
.cards.three { grid-template-columns: repeat(3, 1fr); margin-top: 0; }
.card {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 28px 26px;
	transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card p { color: var(--muted); font-size: .98rem; margin: 0; }
.icon {
	width: 48px; height: 48px;
	border-radius: 14px;
	background: var(--tint);
	display: grid; place-items: center;
	margin-bottom: 20px;
}
.icon svg { width: 24px; height: 24px; stroke: var(--green-deep); }
.section-tint .card { border-color: transparent; }

@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .cards.three { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

/* Tracker section */
.tracker-top { margin-bottom: 72px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.pill {
	display: inline-flex; align-items: center; gap: 8px;
	background: #fff;
	padding: 9px 16px;
	border-radius: 999px;
	font-weight: 600; font-size: .93rem;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

/* Training: photo with stats card */
.training { margin-top: 112px; }
.photo-stack { position: relative; }
.photo-stack .photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; }
.photo-stack .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 60%; }
.stats-card {
	position: absolute;
	right: -22px; bottom: -34px;
	width: min(330px, 80%);
	background: #fff;
	border-radius: 18px;
	box-shadow: var(--shadow-lg);
	padding: 20px 22px;
}
.stats-card .k { color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 14px; }
.stats-grid strong { display: block; font-size: 1.25rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats-grid small { color: var(--muted); font-size: .78rem; }
.spark { width: 100%; height: 56px; display: block; }

@media (max-width: 860px) { .stats-card { right: 12px; bottom: -28px; } .training .split > :last-child { margin-top: 20px; } }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; background: #fff; border-radius: var(--radius); padding: 30px 26px; border: 1px solid var(--line); }
.steps li::before {
	content: counter(step);
	display: grid; place-items: center;
	width: 40px; height: 40px;
	border-radius: 50%;
	background: var(--green-deep); color: #fff;
	font-weight: 800;
	margin-bottom: 20px;
}
.steps p { color: var(--muted); font-size: .98rem; margin: 0; }
.aside-note {
	margin: 36px auto 0;
	max-width: 40rem;
	text-align: center;
	color: var(--muted);
	font-size: .98rem;
}
.aside-note strong { color: var(--ink-soft); }

@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* About: dark band */
.section-dark { background: var(--sea); color: #d5e3dd; }
.section-dark h2 { color: #fff; }
.section-dark .eyebrow { color: var(--green); }
.section-dark .split p { color: #c3d4cd; }
.about-points { display: grid; gap: 18px; margin-top: 28px; }
.about-points div { display: flex; gap: 16px; align-items: flex-start; }
.about-points .icon { background: rgba(9, 194, 105, .15); margin: 0; flex: none; }
.about-points .icon svg { stroke: var(--green); }
.about-points strong { color: #fff; display: block; }
.about-points span { color: #a9bfb6; font-size: .97rem; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: 72px; align-items: start; }
.contact-intro p { color: var(--ink-soft); font-size: 1.1rem; }
.contact-mail { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 600; font-size: 1.05rem; text-decoration: none; }

.form-card {
	background: #fff;
	border-radius: 24px;
	padding: 36px;
	box-shadow: var(--shadow-lg);
	border: 1px solid var(--line);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 7px; }
.field label small { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
	width: 100%;
	font: 400 1rem/1.5 var(--font);
	color: var(--ink);
	background: var(--sand);
	border: 1.5px solid transparent;
	border-radius: var(--radius-sm);
	padding: 13px 15px;
	transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.field input:hover, .field textarea:hover { border-color: var(--line); }
.field input:focus, .field textarea:focus { outline: none; background: #fff; border-color: var(--green-deep); box-shadow: 0 0 0 4px rgba(9, 194, 105, .18); }
.field textarea { min-height: 140px; resize: vertical; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.form-foot small { color: var(--muted); }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.notice { border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 22px; font-weight: 500; }
.notice-ok { background: var(--tint); color: var(--green-deeper); }
.notice-err { background: #fdecec; color: #9b1c1f; }

.thanks { text-align: center; padding: 30px 10px; }
.thanks .icon { margin: 0 auto 18px; width: 64px; height: 64px; border-radius: 50%; }
.thanks .icon svg { width: 30px; height: 30px; }
.thanks p { color: var(--muted); }

@media (max-width: 860px) {
	.contact { grid-template-columns: 1fr; gap: 40px; }
	.form-card { padding: 24px; }
	.form-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 44px 0; color: var(--muted); font-size: .95rem; }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Other pages (index.php) ---------- */

.page-content { padding: 80px 0 120px; }
.page-content .wrap { max-width: 760px; }
.page-content h1 { font-size: clamp(2rem, 4vw, 3rem); }
.page-content table { border-collapse: collapse; width: 100%; }
.page-content th, .page-content td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; }
