/* wheel.wheelder.com — landing page.
   Self-hosted only: no CDN fonts, no external anything (strict CSP). */

/* Light, unconditionally. There is deliberately no dark-mode media query here:
   the owner asked for a light page, and honouring the OS preference would have
   kept serving the old dark one to every phone set to dark — which is most of
   them. `color-scheme: light` in the HTML head keeps form controls and
   scrollbars light to match. */
:root {
  --bg:      #ffffff;
  --bg-2:    #f5f7fb;
  --surface: #ffffff;
  --line:    #e3e7f0;
  --text:    #12141c;
  --muted:   #545c70;   /* 4.9:1 on white */
  --accent:  #2a6df5;
  --accent-2:#7b3fe4;
  --ok:      #15803d;   /* #4ade80 was 1.4:1 on white — unreadable */
  --shadow:  0 18px 44px -26px rgba(16, 24, 48, .30);
  --radius: 16px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap { width: min(var(--wrap), calc(100% - 2.5rem)); margin-inline: auto; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.1rem, 6vw, 4.2rem); font-weight: 700; text-wrap: balance; overflow-wrap: break-word; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 650; margin-bottom: .6rem; }
h3 { font-size: 1.08rem; font-weight: 620; }
p  { margin: 0 0 1rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

.eyebrow {
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .55rem;
}
.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { color: var(--muted); max-width: 62ch; font-size: 1.05rem; }
.fineprint { color: var(--muted); font-size: .85rem; margin-top: .9rem; }

/* ───────────────────────────────────────────────────────── nav */

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .85rem max(1.25rem, calc((100vw - var(--wrap)) / 2));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); font-weight: 640; letter-spacing: -0.01em; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; }
.nav-links { display: flex; align-items: center; gap: 1.35rem; }
/* :not(.btn) matters — `.nav-links a` (0,1,1) otherwise outranks `.btn` (0,1,0)
   and paints the CTA's label muted grey on the gradient, which is what the
   first render showed. */
.nav-links a:not(.btn) { color: var(--muted); font-size: .93rem; }
.nav-links a:not(.btn):hover { color: var(--text); text-decoration: none; }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }

/* ───────────────────────────────────────────────────────── buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .72rem 1.35rem; border-radius: 999px;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 560; font-size: .95rem; border: 0; cursor: pointer;
  transition: transform .16s ease, filter .16s ease;
}
.btn:hover { filter: brightness(1.09); transform: translateY(-1px); text-decoration: none; }
.btn-lg { padding: .95rem 1.9rem; font-size: 1.02rem; }
.btn-sm { padding: .5rem 1rem; font-size: .88rem; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); filter: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* ───────────────────────────────────────────────────────── hero */

.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center;
  width: min(var(--wrap), calc(100% - 2.5rem)); margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
}
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 720px; z-index: -1;
  background:
    radial-gradient(52rem 30rem at 78% 12%, color-mix(in srgb, var(--accent) 17%, transparent), transparent 62%),
    radial-gradient(38rem 24rem at 12% 4%, color-mix(in srgb, var(--accent-2) 13%, transparent), transparent 60%);
  pointer-events: none;
}
.lede { color: var(--muted); font-size: 1.09rem; max-width: 56ch; margin-top: 1.1rem; }
.lede strong { color: var(--text); font-weight: 600; }

/* Grid items default to min-width:auto, so a 1fr track refuses to shrink below
   its content and the children punch out of the container — measured at 479px
   inside a 350px parent on a 390px viewport. min-width:0 lets them shrink. */
.hero > * { min-width: 0; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-wheel { order: -1; }
}

/* ───────────────────────────────────────────────────────── the wheel */

.wheel-stage { position: relative; display: grid; place-items: center; }
#wheel { width: min(100%, 520px); height: auto; overflow: visible; }

#segments path {
  cursor: pointer;
  transition: transform .22s cubic-bezier(.2,.7,.3,1), opacity .22s ease;
  transform-origin: 200px 200px;
  stroke: var(--bg); stroke-width: 2.5; stroke-linejoin: round;
}
#segments path:hover, #segments path.is-active { transform: scale(1.055); }
#segments g.dim path:not(:hover):not(.is-active) { opacity: .32; }

/* Label colour is set per-segment in JS from the fill's luminance — white on
   amber/cyan/green fails contrast badly. */
#segments text {
  font-size: 13.5px; font-weight: 650; pointer-events: none;
  letter-spacing: .02em;
}

.hub      { fill: var(--bg-2); stroke: var(--line); stroke-width: 1.5; }
.hub-ring { fill: none; stroke: color-mix(in srgb, var(--accent) 45%, transparent); stroke-width: 1.2; stroke-dasharray: 3 5; }
.hub-label{ fill: var(--text); font-size: 17px; font-weight: 700; letter-spacing: .1em; }
.hub-sub  { fill: var(--muted); font-size: 9.5px; letter-spacing: .06em; }

.wheel-hint {
  margin: 1rem 0 0; min-height: 1.6em; text-align: center;
  color: var(--muted); font-size: .92rem; transition: color .2s;
}
.wheel-hint strong { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  #segments path, .hub-ring { transition: none !important; animation: none !important; }
}

/* ───────────────────────────────────────────────────────── bands */

.band { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.band.alt { background: var(--bg-2); border-block: 1px solid var(--line); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; gap: 2.2rem; } }

/* areas */
.area-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: .9rem; margin-top: 2.2rem;
}
.area {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.15rem 1.25rem;
  border-left: 3px solid var(--area, var(--accent));
  transition: transform .18s ease, border-color .18s ease;
}
.area:hover { transform: translateY(-3px); }
.area h3 { margin-bottom: .3rem; }
.area p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ticks */
.ticks { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.ticks li {
  position: relative; padding-left: 1.8rem; margin-bottom: .7rem;
  color: var(--muted); font-size: 1rem;
}
.ticks li strong { color: var(--text); font-weight: 600; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .48em;
  width: 1.05rem; height: .55rem; border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}

/* today mock card */
.today-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.tc-head {
  display: flex; align-items: center; gap: .4rem;
  padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: var(--bg-2);
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.tc-title { margin-left: .5rem; color: var(--muted); font-size: .78rem; }
.tc-body { padding: 1.3rem 1.4rem 1.5rem; }
.tc-eyebrow { color: var(--muted); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 .3rem; }
.tc-gap { margin-top: 1.5rem; }
.tc-goal { font-size: 1.2rem; font-weight: 640; margin: 0 0 .8rem; }
.tc-bar { height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; }
.tc-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.tc-meta { color: var(--muted); font-size: .84rem; margin: .55rem 0 0; }
.tc-task { display: flex; align-items: center; gap: .65rem; padding: .5rem 0; color: var(--text); font-size: .95rem; }
.tc-task input { width: 17px; height: 17px; accent-color: var(--accent); }
.tc-task input:checked + span { color: var(--muted); text-decoration: line-through; }

/* steps */
.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; margin-top: 2.2rem; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.5rem; }
.step-n { display: block; font-size: .78rem; letter-spacing: .16em; color: var(--accent); margin-bottom: .7rem; font-weight: 650; }
.step p { color: var(--muted); font-size: .95rem; margin: .45rem 0 0; }

/* apps */
.app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; margin-top: 2.2rem; }
.app-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem;
  color: var(--text); transition: transform .18s ease, border-color .18s ease;
}
a.app-card:hover { transform: translateY(-4px); border-color: var(--accent); text-decoration: none; }
.app-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.app-head svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app-card p { color: var(--muted); font-size: .93rem; margin: .35rem 0 1rem; }
.app-link { font-size: .88rem; color: var(--accent); font-weight: 550; }
.tag {
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .25rem .6rem; border-radius: 99px; border: 1px solid var(--line); color: var(--muted);
}
.tag-live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 42%, transparent); }

/* final cta */
.final { padding: clamp(4rem, 9vw, 7rem) 0; text-align: center; }
.final p { color: var(--muted); max-width: 46ch; margin-inline: auto; font-size: 1.06rem; }
.final .btn { margin-top: 1.6rem; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 2.6rem 0 1.6rem; background: var(--bg-2); }
.foot-in { display: flex; flex-wrap: wrap; gap: 1.6rem; justify-content: space-between; align-items: flex-start; }
.logo-foot { margin-bottom: .5rem; }
.foot-tag { color: var(--muted); font-size: .9rem; margin: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.3rem; }
.foot-links a { color: var(--muted); font-size: .92rem; }
.foot-links a:hover { color: var(--text); }
.foot-legal { text-align: center; color: var(--muted); font-size: .8rem; margin: 2.2rem 0 0; }
