/* snookercareer.com — page styles. Tokens live in tokens.css (copied from the SCS design system). */

html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { overflow-x: hidden; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }

.wrap { max-width: var(--content-max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--accent); color: var(--text-on-accent); padding: 8px 12px; border-radius: var(--radius-sm); }
.skip:focus { left: 8px; }

.icon { width: 1em; height: 1em; flex-shrink: 0; }
.label { font: 600 var(--text-label)/1.2 var(--font-ui); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--accent); }
.display { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: var(--tracking-display); line-height: 1; text-wrap: balance; }
.lede { font: 400 19px/1.5 var(--font-ui); color: var(--text-secondary); text-wrap: pretty; }

/* ---------- Buttons (Button.jsx) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--radius-md); border: 1px solid transparent; cursor: pointer;
  font: 700 16px/1 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-roll), filter var(--dur-fast) var(--ease-roll), background-color var(--dur-fast) var(--ease-roll);
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: scale(0.97); filter: brightness(0.94); }
.btn:focus-visible, .focusable:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.btn .icon { font-size: 18px; }
.btn-primary, .btn-primary:hover { background: var(--accent); color: var(--text-on-accent); }
.btn-ghost, .btn-ghost:hover { background: transparent; color: var(--text-on-felt); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 18px; }
.btn-lg .icon { font-size: 20px; }
.btn[disabled] { opacity: 0.5; cursor: progress; transform: none; }

/* ---------- Badge ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--radius-xs); background: var(--accent); color: var(--text-on-accent); font: 700 11px/1 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; align-self: flex-start; }

/* ---------- Ball ---------- */
.ball { --c: var(--ball-red); width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; box-shadow: var(--shadow-ball);
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,0.8) 0, rgba(255,255,255,0) 22%), radial-gradient(circle at 50% 55%, var(--c) 50%, color-mix(in oklab, var(--c), black 45%) 100%); }
.ball-red { --c: var(--ball-red); } .ball-yellow { --c: var(--ball-yellow); } .ball-green { --c: var(--ball-green); }
.ball-brown { --c: var(--ball-brown); } .ball-blue { --c: var(--ball-blue); } .ball-pink { --c: var(--ball-pink); } .ball-black { --c: var(--ball-black); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(4, 17, 11, 0.8); -webkit-backdrop-filter: var(--blur-bar); backdrop-filter: var(--blur-bar); border-bottom: 1px solid var(--border-subtle); }
.nav .wrap { display: flex; align-items: center; gap: 32px; height: 68px; }
.nav-logo { display: block; flex-shrink: 0; }
.nav-logo img { height: 40px; width: auto; }
.nav-links { display: flex; gap: 28px; flex: 1; }
.nav-links a { color: var(--text-secondary); font: 600 15px/1 var(--font-ui); }
.nav-links a:hover { color: var(--text-primary); text-decoration: none; }
@media (max-width: 860px) { .nav-links { display: none; } .nav .wrap { justify-content: space-between; } }
@media (max-width: 400px) { .nav-logo img { height: 32px; } }

/* ---------- Hero: the table light ---------- */
.hero { background: var(--gradient-table-light); box-shadow: inset 0 -14px 0 var(--mahogany-700); overflow: hidden; color: var(--text-on-felt); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; align-items: center; padding-top: 88px; padding-bottom: 112px; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(48px, 7vw, 88px); line-height: 0.92; }
.hero .lede { color: rgba(251, 248, 240, 0.88); max-width: 520px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { font: 500 14px/1.4 var(--font-ui); color: rgba(251, 248, 240, 0.72); display: flex; gap: 8px; align-items: center; }
.hero-note .icon { color: var(--brass-300); font-size: 16px; }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 80px; gap: 48px; } }

/* Device frames — portrait (menus) and landscape (the table) */
.device { position: relative; background: #050a07; border: 1px solid rgba(243, 238, 223, 0.14); border-radius: 30px; padding: 8px; box-shadow: var(--shadow-3); }
.device img { width: 100%; height: auto; border-radius: 22px; background: var(--surface-2); }
.device-portrait img { aspect-ratio: 9 / 20; object-fit: cover; }
.device-landscape img { aspect-ratio: 20 / 9; object-fit: cover; }

.hero-stage { position: relative; padding: 0 0 56px 0; }
.hero-stage .device-landscape { width: 100%; }
.hero-stage .device-portrait { position: absolute; left: -40px; bottom: -56px; width: 27%; min-width: 140px; transform: rotate(-3deg); }
.hero-stage .toast { position: absolute; right: -8px; bottom: 0; }
@media (max-width: 960px) {
  .hero-stage { max-width: 640px; margin: 0 auto; width: 100%; }
  .hero-stage .device-portrait { left: -8px; }
}
@media (max-width: 560px) {
  .hero-stage { padding-bottom: 120px; }
  .hero-stage .device-portrait { width: 38%; min-width: 0; bottom: 0; }
  .hero-stage .toast { right: 0; bottom: 8px; left: 40%; }
}

/* Toast (Toast.jsx) */
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-lg); background: var(--surface-3); border: 1px solid var(--border-default); box-shadow: var(--shadow-3); max-width: 320px; color: var(--text-primary); }
.toast-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--accent); flex-shrink: 0; font-size: 18px; }
.toast-title { font: 600 15px/1.3 var(--font-ui); }
.toast-msg { font: 400 13px/1.35 var(--font-ui); color: var(--text-secondary); }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--surface-1); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; max-width: 720px; }
.section-head h2 { font-size: clamp(36px, 5vw, 48px); }
@media (max-width: 640px) { .section { padding: 72px 0; } }

/* Feature cards (Card.jsx) */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--surface-2); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-1); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.card-icon { width: 48px; height: 48px; border-radius: 24px; background: var(--felt-soft); color: var(--felt-bright); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.card h3 { font: 700 24px/1.1 var(--font-display); text-transform: uppercase; margin-top: 8px; }
.card p { font: 400 15px/1.5 var(--font-ui); color: var(--text-secondary); }
.card ul { margin: 0; padding-left: 18px; color: var(--text-secondary); font: 400 15px/1.6 var(--font-ui); }

.facts { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border-subtle); color: var(--text-secondary); font: 500 15px/1.3 var(--font-ui); }
.facts span { display: inline-flex; align-items: center; gap: 8px; }
.facts .icon { color: var(--felt-bright); font-size: 18px; }

/* Gallery */
.gallery-wide .device { max-width: 880px; margin: 0 auto; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; max-width: 880px; margin: 48px auto 0; }
.shot { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.shot figcaption { display: flex; flex-direction: column; gap: 4px; }
.shot figcaption b { font: 700 20px/1 var(--font-display); text-transform: uppercase; }
.shot figcaption span { font: 400 14px/1.4 var(--font-ui); color: var(--text-secondary); }
@media (max-width: 960px) {
  .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; max-width: none; margin: 32px -24px 0; padding: 0 24px 12px; scrollbar-width: none; }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery .shot { flex: 0 0 min(62vw, 260px); scroll-snap-align: start; }
}
@media (max-width: 640px) { .gallery { margin: 32px -16px 0; padding: 0 16px 12px; } }

/* Climb the rankings — the points ladder */
.ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; list-style: none; margin: 0; padding: 0; position: relative; }
.ladder::before { content: ""; position: absolute; left: 18px; right: 18px; top: 17px; height: 2px; background: linear-gradient(90deg, var(--border-default), var(--border-strong)); }
.ladder li { display: flex; flex-direction: column; gap: 10px; position: relative; }
.ladder .stage { font: 600 12px/1 var(--font-ui); letter-spacing: 0.08em; color: var(--text-tertiary); text-transform: uppercase; }
.ladder b { font: 700 24px/1 var(--font-display); text-transform: uppercase; }
.ladder span:last-child { font: 400 15px/1.4 var(--font-ui); color: var(--text-secondary); }
@media (max-width: 860px) {
  .ladder { grid-template-columns: 1fr; gap: 28px; }
  .ladder::before { left: 17px; right: auto; top: 18px; bottom: 18px; width: 2px; height: auto; background: var(--border-default); }
  .ladder li { display: grid; grid-template-columns: 36px 1fr; column-gap: 20px; row-gap: 6px; }
  .ladder li .ball { grid-row: span 3; }
}

/* ---------- Beta ---------- */
.beta .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
@media (max-width: 960px) { .beta .wrap { grid-template-columns: 1fr; gap: 40px; } }
.beta-copy { display: flex; flex-direction: column; gap: 20px; }
.beta-copy h2 { font-size: clamp(40px, 6vw, 64px); line-height: 0.95; }
.steps { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 16px; align-items: start; counter-increment: step; }
.steps li::before { content: counter(step); width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--border-default); display: flex; align-items: center; justify-content: center; font: 800 18px/1 var(--font-display); color: var(--accent); }
.steps b { display: block; font: 600 16px/1.3 var(--font-ui); margin-bottom: 2px; }
.steps span { font: 400 15px/1.45 var(--font-ui); color: var(--text-secondary); }

.form-card { background: linear-gradient(180deg, rgba(201,162,78,0.14), rgba(201,162,78,0.02)), var(--surface-2); border: 1px solid rgba(201,162,78,0.45); box-shadow: var(--shadow-2); border-radius: var(--radius-xl); padding: 32px; }
@media (max-width: 640px) { .form-card { padding: 24px 20px; } }
.form-card h3 { font: 800 30px/1 var(--font-display); text-transform: uppercase; margin-bottom: 6px; }
.form-card > p { color: var(--text-secondary); margin-bottom: 24px; }
.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font: 600 12px/1.2 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }
.input { height: 48px; padding: 0 14px; background: var(--surface-2); border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-primary); font: 400 16px/1 var(--font-ui); width: 100%; transition: border-color var(--dur-fast) var(--ease-roll), box-shadow var(--dur-fast) var(--ease-roll); }
.input::placeholder { color: var(--text-tertiary); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input[aria-invalid="true"] { border-color: var(--status-danger); }
.hint { font: 400 13px/1.35 var(--font-ui); color: var(--text-tertiary); }
.error { font: 400 13px/1.35 var(--font-ui); color: var(--status-danger); }
.error:empty { display: none; }

/* Segmented control (SegmentedControl.jsx) built on radio inputs */
.segmented { display: flex; padding: 3px; gap: 3px; background: var(--surface-2); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); margin: 0; }
.segmented legend { padding: 0; margin-bottom: 6px; float: left; width: 100%; }
.segmented label { flex: 1; position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 7px; color: var(--text-tertiary); font: 600 15px/1 var(--font-ui); transition: all var(--dur-fast) var(--ease-roll); }
.segmented input:checked + span { background: var(--surface-3); color: var(--text-primary); box-shadow: var(--shadow-1); }
.segmented input:focus-visible + span { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }

.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font: 400 14px/1.45 var(--font-ui); color: var(--text-secondary); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font: 500 14px/1.4 var(--font-ui); color: var(--status-danger); }
.form-status:empty { display: none; }

.done { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.done[hidden] { display: none; }
.done .toast-icon { width: 56px; height: 56px; font-size: 28px; background: var(--felt-soft); color: var(--felt-bright); }
.done h3 { margin: 8px 0 0; }
.done p { color: var(--text-secondary); }

/* FAQ */
.faq { max-width: 800px; }
.faq details { border-bottom: 1px solid var(--border-subtle); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; display: flex; justify-content: space-between; gap: 16px; font: 600 17px/1.35 var(--font-ui); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 700 24px/0.9 var(--font-display); color: var(--accent); transition: transform var(--dur-base) var(--ease-roll); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 4px; border-radius: 4px; }
.faq details p { padding: 0 0 20px; color: var(--text-secondary); max-width: 680px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border-subtle); padding: 48px 0 56px; }
.footer-top { display: flex; gap: 24px 32px; align-items: center; flex-wrap: wrap; }
.footer-top img { height: 40px; width: auto; }
.footer-links { display: flex; gap: 12px 24px; flex-wrap: wrap; margin-left: auto; }
.footer-links a { color: var(--text-tertiary); font: 500 14px var(--font-ui); }
.footer-links a:hover { color: var(--text-primary); }
.legal { margin-top: 28px; font: 400 13px/1.6 var(--font-ui); color: var(--text-tertiary); max-width: 760px; }
.legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Text pages (privacy, support) ---------- */
.page { padding: 72px 0 96px; }
.page .wrap { max-width: 800px; }
.page h1 { font-size: clamp(40px, 6vw, 64px); margin: 12px 0 8px; }
.page .updated { color: var(--text-tertiary); font-size: 14px; margin-bottom: 40px; }
.prose h2 { font: 700 26px/1.1 var(--font-display); text-transform: uppercase; margin: 44px 0 12px; }
.prose p, .prose li { font: 400 16px/1.65 var(--font-ui); color: var(--text-secondary); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; margin: 12px 0; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--text-primary); font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--border-subtle); vertical-align: top; color: var(--text-secondary); }
.prose th { color: var(--text-primary); font-weight: 600; }
