/* CareerForge marketing site.
 *
 * Hand-written, zero JavaScript, themed only by prefers-color-scheme — the
 * whole page must satisfy the no-third-party CSP Caddy stamps on it
 * (default-src 'none'; style-src 'self'; font-src 'self'; img-src 'self'),
 * which is also why the fonts are the app's own subsetted Roboto and the
 * hero animation is pure CSS.
 *
 * Palette mirrors careerforge_flutter/lib/ui/common/app_colors.dart:
 * kcPrimaryColor has deliberately no light variant (AA on both grounds).
 */

:root {
  --purple: #9600ff;
  --ground: #101114;      /* kcSurfaceSunken */
  --surface: #1a1b1e;     /* kcSurface */
  --raised: #22242a;      /* kcSurfaceRaised */
  --border: #2f323a;      /* kcBorderColor */
  --border-strong: #454956;
  --ink: #ffffff;
  --muted: #a9b0bd;
}

@media (prefers-color-scheme: light) {
  :root {
    --ground: #e9ebf0;    /* kcSurfaceSunkenLight */
    --surface: #f2f3f6;
    --raised: #fafbfc;
    --border: #d8dce3;
    --border-strong: #a8afbc;
    --ink: #14161a;       /* kcOnSurfaceLight — deliberately not pure black */
    --muted: #5a6270;
  }
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Roboto-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Roboto-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Roboto-Bold.woff2') format('woff2');
}

* {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ground);
  color: var(--ink);
  font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 66rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a {
  color: var(--ink);
  text-decoration-color: var(--purple);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--purple);
}

h1,
h2,
h3 {
  line-height: 1.15;
  font-weight: 700;
  text-wrap: balance;
}

h2 {
  font-size: 1.9rem;
  margin-bottom: 1rem;
}

section {
  padding: 4rem 0;
}

section + section {
  border-top: 1px solid var(--border);
}

p + p {
  margin-top: 1rem;
}

.muted {
  color: var(--muted);
}

/* ---------- header ---------- */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.brand svg {
  width: 30px;
  height: 30px;
  color: var(--purple);
}

/* Two navs, one idiom. The switcher answers "which prices?" and the site
 * nav answers "which page?", so they are separate landmarks — but a
 * reader sees one row of pills, and they must not drift apart. */
.markets,
.site-nav {
  display: flex;
  gap: 0.25rem;
  font-size: 0.9rem;
}

/* Pushes both navs to the right against the brand, which
 * justify-content: space-between would otherwise spread across the whole
 * header once there are three children rather than two. */
.site-nav {
  margin-inline-start: auto;
}

.markets a,
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.markets a:hover,
.site-nav a:hover {
  color: var(--ink);
  border-color: var(--border);
}

.markets a[aria-current='true'],
.site-nav a[aria-current='page'] {
  color: var(--ink);
  border-color: var(--border-strong);
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  align-items: center;
  gap: 2.5rem;
  padding: 4.5rem 0 5rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.4rem);
  margin-bottom: 1.25rem;
}

.hero .sub {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 34em;
}

.hero .cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* The app CTA. It pointed at the waitlist while there was no app to open;
 * since the closed beta it links into /forge/, and the note under the row
 * carries the "you still need a code" half rather than the button. */
.cta-primary {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--purple);
  color: #ffffff;
  font-weight: 500;
}

.cta-primary:hover {
  color: #ffffff;
  filter: brightness(1.12);
}

.cta-primary .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffffff;
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.cta-row .secondary {
  color: var(--muted);
  text-decoration: none;
}

.cta-row .secondary:hover {
  color: var(--purple);
}

/* The condition on the CTA above it. Under the row rather than inside the
 * button: "open the app" is what somebody wants to do, and "you need a
 * code" is what they need to know a second later, not instead. */
.cta-note {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.cta-note a {
  color: inherit;
}

/* The forging mark: the app splash's hand-authored strike animation
 * (careerforge_flutter/web/index.html), verbatim keyframes, renamed. */
.hero-art {
  display: grid;
  place-items: center;
  position: relative;
}

.hero-art::before {
  content: '';
  position: absolute;
  inset: -18%;
  background: radial-gradient(
    closest-side,
    rgba(150, 0, 255, 0.22),
    transparent 70%
  );
  pointer-events: none;
}

.forge-mark {
  width: min(240px, 55vw);
  height: auto;
  color: var(--ink);
  position: relative;
}

/* The animated groups otherwise get composited from a raster cached at the
 * wrong scale (visibly soft next to crisp text); own layers per group make
 * the browser rasterize each at the device scale. */
.forge-anvil,
.forge-hammer,
.forge-sparks {
  will-change: transform;
}

.forge-hammer {
  transform-box: view-box;
  transform-origin: 186px 80px;
  animation: forge-strike 1300ms linear infinite;
}

/* The swing is a rotation about the grip and nothing else: the hammer's drawn
 * pose in the mark is the hover, so every keyframe is an angle away from it.
 * -22deg brings the head onto the page with the handle still visibly
 * diagonal. Timings mirror the app splash (careerforge_flutter/web/index.html)
 * so the two read as one animation. */
@keyframes forge-strike {
  0%,
  10% {
    transform: rotate(0deg);
    animation-timing-function: cubic-bezier(0.55, 0, 0.9, 0.35);
  }
  25%,
  31% {
    transform: rotate(-22deg);
    animation-timing-function: cubic-bezier(0.08, 0.6, 0.3, 1);
  }
  43% {
    transform: rotate(-6deg);
    animation-timing-function: cubic-bezier(0.3, 0.3, 0.6, 1);
  }
  51% {
    transform: rotate(-8deg);
    animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1);
  }
  79%,
  100% {
    transform: rotate(0deg);
  }
}

/* One edge treatment for all three shapes: each shape's own outline in the
 * border colour, drawn under its fill so only the outer half shows. It lifts
 * the flat silhouette off the purple glow behind the hero, and it is what
 * keeps the hammer legible where it crosses the page mid-strike. Weight and
 * colour are the whole knob: heavier reads as an outlined logo, lighter
 * disappears on the dark ground. */
.forge-rim {
  stroke: var(--border-strong);
  stroke-width: 4;
  stroke-linejoin: round;
}

.forge-anvil {
  transform-box: view-box;
  animation: forge-jolt 1300ms ease-out infinite;
}

@keyframes forge-jolt {
  0%,
  25% {
    transform: translate(0, 0);
  }
  27% {
    transform: translate(0, 3px);
  }
  33%,
  100% {
    transform: translate(0, 0);
  }
}

.forge-sparks {
  transform-box: view-box;
  transform-origin: 70px 84px;
  opacity: 0;
  animation: forge-sparks 1300ms ease-out infinite;
}

@keyframes forge-sparks {
  0%,
  25% {
    opacity: 0;
    transform: scale(0.3);
  }
  29% {
    opacity: 1;
    transform: scale(1);
  }
  44% {
    opacity: 0;
    transform: scale(1.7);
  }
  100% {
    opacity: 0;
    transform: scale(0.3);
  }
}

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

  .forge-hammer,
  .forge-anvil,
  .cta-primary .dot,
  .node.building,
  .tick.building {
    animation: none;
  }

  .forge-sparks {
    display: none;
  }
}

/* ---------- trust strip ---------- */

.trust {
  padding: 3rem 0 4rem;
}

.trust .strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.trust .item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
}

.trust .item strong {
  display: block;
  margin-bottom: 0.3rem;
}

.trust .item span {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.card-icon {
  display: block;
  width: 28px;
  height: 28px;
  color: var(--purple);
  margin-bottom: 0.9rem;
}

.card p {
  color: var(--muted);
  font-size: 0.98rem;
}

.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--purple);
  border: 1px solid var(--purple);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  margin-bottom: 0.75rem;
}

/* ---------- pricing ---------- */

.prices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.price {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
}

.price .amount {
  font-size: 2.4rem;
  font-weight: 700;
}

.price .amount small {
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
}

.price ul {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.98rem;
}

.price li {
  padding-left: 1.4rem;
  position: relative;
  margin-top: 0.45rem;
}

.price li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.55em;
  height: 0.28em;
  border-left: 2px solid var(--purple);
  border-bottom: 2px solid var(--purple);
  transform: rotate(-45deg);
}

.pricing-note {
  margin-top: 1.5rem;
  color: var(--muted);
}

/* ---------- FAQ ---------- */

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq details:first-of-type {
  border-top: 1px solid var(--border);
}

.faq summary {
  cursor: pointer;
  font-weight: 500;
  padding: 1.1rem 2rem 1.1rem 0;
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--purple);
  font-size: 1.4rem;
  font-weight: 400;
}

.faq details[open] summary::after {
  content: '\2212';
}

.faq details p {
  color: var(--muted);
  padding: 0 0 1.25rem;
  max-width: 46em;
}

/* ---------- waitlist ---------- */

.waitlist form {
  margin-top: 1.5rem;
  max-width: 34rem;
}

.waitlist .field-row {
  display: flex;
  gap: 0.75rem;
}

.waitlist input[type='email'] {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
}

.waitlist input[type='email']:focus {
  outline: 2px solid var(--purple);
  outline-offset: 1px;
  border-color: transparent;
}

.waitlist button {
  font: inherit;
  font-weight: 500;
  color: #ffffff;
  background: var(--purple);
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
}

.waitlist button:hover {
  filter: brightness(1.12);
}

.small {
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

/* Brevo's honeypot: must be present and empty, never seen, never focused. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 46rem) {
  .waitlist .field-row {
    flex-direction: column;
  }
}

/* ---------- roadmap ---------- */

/* The roadmap page only. Each stage is its own section with its own
 * heading, and that heading is what states a milestone's status: the
 * timeline's dots are decoration, carry no text, and are aria-hidden. No
 * status may live only in the colour or the animation of a dot — someone
 * printing the page, reading it in a screen reader, or overriding colours
 * has to get the same answer. */

/* The bar is the milestone list drawn small: one tick each, in stage
 * order, so the proportions are right without a single computed width —
 * which matters, because the production CSP has no 'unsafe-inline' and a
 * style= attribute would never apply. */
.glance-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 2.25rem;
}

.tick {
  flex: 1;
  height: 9px;
  border-radius: 999px;
  background: var(--border-strong);
}

.tick.built {
  background: var(--purple);
}

/* Hollow, like the timeline's in-progress dot. An inset shadow rather
 * than a border so the tick keeps its full width in the flex row. */
.tick.building {
  background: var(--ground);
  box-shadow: inset 0 0 0 2px var(--purple);
  animation: pulse 2.2s ease-in-out infinite;
}

.glance-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem;
}

/* The number is the point of the card, so it gets display size and the
 * heading underneath stops competing for it. */
.stat .count {
  display: block;
  font-size: 2.9rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--border-strong);
}

.stat.built .count,
.stat.building .count {
  color: var(--purple);
}

/* A label, not a heading: these three sit above the real section
 * headings and would otherwise put "Built" in the page outline twice,
 * meaning two different things. */
.stat .label {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0.55rem 0 0.25rem;
}

.stat p {
  color: var(--muted);
  font-size: 0.95rem;
}

.stage h2 {
  margin-bottom: 0.5rem;
}

.stage .lead {
  color: var(--muted);
  max-width: 46em;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  position: relative;
}

.milestone {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  align-items: start;
  padding-bottom: 1.75rem;
  position: relative;
}

/* Each item draws the rail from its own node down to the next one, rather
 * than the list drawing one line behind them all. It costs a pseudo per
 * item and buys the two ends for free: the line starts at the first node
 * and stops at the last, with no magic offset that a longer or shorter
 * final milestone would break. A line running past the last node reads as
 * content that failed to load. */
.milestone::before {
  content: '';
  position: absolute;
  inset-inline-start: 10px;
  top: 11px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.milestone:last-child {
  padding-bottom: 0;
}

.milestone:last-child::before {
  display: none;
}

.milestone h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.milestone p {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 46em;
}

/* The node punches a hole in the rail rather than sitting on top of it:
 * the ground-coloured border is what makes the line stop and start again,
 * so no separate mask or per-item background is needed.
 *
 * Three states, not four. "Next" and "later" look identical on purpose —
 * the difference between them is order, which the section headings
 * already say, and inventing a third shade of grey to encode it would
 * only make the two hardest-to-see dots harder to tell apart. */
.node {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  /* Positioned so it paints over the rail its neighbour draws, rather
   * than the line running through the dot's lower half. */
  position: relative;
  box-sizing: content-box;
  border: 4px solid var(--ground);
  background: var(--ground);
  box-shadow: inset 0 0 0 2px var(--border-strong);
}

.node.built {
  background: var(--purple);
  box-shadow: none;
}

.node.building {
  box-shadow: inset 0 0 0 3px var(--purple);
  animation: pulse 2.2s ease-in-out infinite;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 3rem;
  color: var(--muted);
  font-size: 0.95rem;
}

footer .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Its own class rather than `footer a`, which would also catch the market
 * switcher's pills and fight their hover rule on specificity. */
.footer-link {
  color: var(--muted);
}

.footer-link:hover {
  color: var(--purple);
}

/* ---------- extension install ---------- */

/* Numbered steps. The pricing list's ticks and the roadmap's dots are the
 * two list markers already here and neither carries an ordinal, which
 * install instructions need: "I'm stuck on step 3" is how somebody asks for
 * help. A counter rather than a bare <ol> because the reset at the top of
 * this file strips list spacing anyway, so the rule has to exist either way.
 */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.25rem;
  margin-top: 0.75rem;
  color: var(--muted);
  max-width: 46rem;
}

.steps li strong {
  color: var(--ink);
  font-weight: 500;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  display: grid;
  place-items: center;
}

/* An address the reader has to type themselves.
 *
 * chrome://extensions cannot be a link — every Chromium browser blocks a web
 * page navigating to a chrome:// URL, and it fails silently, so an anchor
 * here would look like a broken link rather than a refused one. `user-select:
 * all` is the closest thing to a copy button that survives the CSP, which
 * forbids the JavaScript a real one would need.
 */
.copy-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.1rem 0.4rem;
  color: var(--ink);
  user-select: all;
  white-space: nowrap;
}

/* ---------- narrow screens ---------- */

@media (max-width: 46rem) {
  /* Brand on the first line, both navs on the second. Three children in
   * one row fit a laptop and not a phone, and a wrapped header is better
   * than pills squeezed to unreadable. */
  header {
    flex-wrap: wrap;
  }

  .site-nav {
    margin-inline-start: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 2.5rem 0 3rem;
  }

  .hero-art {
    order: -1;
  }

  .trust .strip,
  .cards,
  .prices {
    grid-template-columns: 1fr;
  }

  /* The three stats stay side by side where the cards do not: they are a
   * number and a word each, and stacking them puts the roadmap's own
   * summary three screens tall. Only the notes underneath are dropped. */
  .glance-stats {
    gap: 0.5rem;
  }

  .stat {
    padding: 1rem;
  }

  .stat .count {
    font-size: 2rem;
  }

  .stat .label {
    font-size: 0.95rem;
  }

  .stat p {
    display: none;
  }

  section {
    padding: 3rem 0;
  }
}
