/* 4S Gump — marketing site
   Palette and module accents are taken from the app's own design system
   (src/designSystem/tokens) so the site and the product read as one thing. */

:root {
  --ink:      #0F1A2E;
  --ink-soft: #1B2942;
  --paper:    #FFFDF7;
  --white:    #FFFFFF;
  --orange:   #FF9B45;
  --ember:    #D5451B;
  --sage:     #3AA76D;
  --slate:    #5B6577;
  --line:     #E4E2DB;
  --line-dk:  rgba(255, 255, 255, .14);

  /* the four skill modules, as coloured in the app */
  --spika:    #3B82F6;
  --scripta:  #8B5CF6;
  --storia:   #22A06B;
  --sonica:   #EF4444;

  --measure: 34rem;
  --gut: clamp(1.25rem, 4vw, 2.5rem);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", var(--sans);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "cv05" 1, "ss03" 1;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: inherit; }

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

.wrap {
  width: min(72rem, 100% - (var(--gut) * 2));
  margin-inline: auto;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.022em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

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

.site-head {
  position: relative;
  z-index: 2;
  padding-block: 1.4rem;
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -.03em;
  text-decoration: none;
}

.brand .mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--orange);
  color: var(--ink);
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: -.04em;
}

.top {
  display: flex;
  gap: 1.6rem;
  font-size: .95rem;
  font-weight: 500;
}

.top a {
  text-decoration: none;
  opacity: .78;
  padding-block: .2rem;
}

.top a:hover { opacity: 1; }

/* header sitting on the dark hero */

.on-ink { background: var(--ink); color: var(--white); }
.on-ink .top a { color: var(--white); }

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

.hero {
  background: var(--ink);
  color: var(--white);
  padding-block: clamp(2.25rem, 5vw, 3.75rem) clamp(3rem, 7vw, 5rem);
}

.hero .wrap {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 62rem) {
  .hero .wrap { grid-template-columns: 1.05fr .95fr; }
}

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -.035em;
  max-width: 15ch;
}

.hero .lead {
  margin-top: 1.4rem;
  max-width: var(--measure);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: rgba(255, 255, 255, .74);
}

.exams {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-dk);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, .9);
}

.stores {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .8rem 1.3rem;
  border-radius: 999px;
  background: var(--orange);
  color: var(--ink);
  font-weight: 600;
  font-size: .98rem;
  text-decoration: none;
  transition: background .18s ease;
}

.store:hover { background: #FFB570; }

.store.ghost {
  background: transparent;
  color: rgba(255, 255, 255, .82);
  box-shadow: inset 0 0 0 1px var(--line-dk);
}

.store.ghost:hover { color: var(--white); }

/* ---------- the score readout: the one bold element ---------- */

.readout {
  background: var(--ink-soft);
  border-radius: 20px;
  padding: clamp(1.5rem, 3vw, 2.1rem);
  box-shadow: inset 0 0 0 1px var(--line-dk);
}

.readout-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(255, 255, 255, .62);
  font-size: .92rem;
  font-weight: 500;
}

.score {
  display: block;
  margin-top: .4rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.6rem, 9vw, 5rem);
  line-height: 1;
  letter-spacing: -.045em;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.scale {
  margin-top: 1.5rem;
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ember) 0%, var(--orange) 45%, var(--sage) 100%);
  opacity: .9;
}

.marker {
  position: absolute;
  top: 50%;
  left: var(--at, 83%);
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 4px var(--ink-soft);
}

.scale-ends {
  margin-top: .6rem;
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, .5);
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}

.note {
  margin-top: 1.5rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line-dk);
  color: rgba(255, 255, 255, .82);
  font-size: 1rem;
  line-height: 1.55;
}

.note b { color: var(--orange); font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
  .readout .score, .readout .marker { animation: settle .9s .25s cubic-bezier(.2, .7, .3, 1) both; }
  .readout .marker { --from: 42%; }
  @keyframes settle {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ---------- sections ---------- */

section { padding-block: clamp(2.8rem, 5.5vw, 4.25rem); }

.section-head { max-width: 46rem; }

.section-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
}

.section-head p {
  margin-top: .9rem;
  color: var(--slate);
  max-width: var(--measure);
}

/* skills: hairline columns, no boxes */

.skills {
  margin-top: clamp(2rem, 5vw, 3.2rem);
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) { .skills { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 70rem) { .skills { grid-template-columns: repeat(4, 1fr); } }

.skill {
  padding: 1.6rem 0 1.8rem;
  border-top: 1px solid var(--line);
}

@media (min-width: 48rem) {
  .skill { padding-inline: 1.6rem; border-left: 1px solid var(--line); }
  .skill:first-child { padding-left: 0; border-left: 0; }
}

@media (min-width: 70rem) {
  .skill:nth-child(5n) { padding-left: 0; border-left: 0; }
}

.skill::before {
  content: "";
  display: block;
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent, var(--orange));
  margin-bottom: 1.1rem;
}

.skill h3 {
  font-size: 1.35rem;
  display: flex;
  align-items: baseline;
  gap: .6rem;
}

.skill h3 small {
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--slate);
}

.skill p {
  margin-top: .7rem;
  color: var(--slate);
  font-size: .99rem;
}

.s-spika   { --accent: var(--spika); }
.s-scripta { --accent: var(--scripta); }
.s-storia  { --accent: var(--storia); }
.s-sonica  { --accent: var(--sonica); }

/* gump: quieter, denser */

.drills {
  margin-top: clamp(1.8rem, 4vw, 2.6rem);
  display: grid;
  gap: 1.1rem 2.6rem;
  grid-template-columns: 1fr;
  max-width: 58rem;
}

@media (min-width: 46rem) { .drills { grid-template-columns: 1fr 1fr; } }

.drill {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .75rem;
  align-items: baseline;
  padding-block: .55rem;
  border-top: 1px solid var(--line);
}

.drill dt { font-weight: 600; white-space: nowrap; }
.drill dd { margin: 0; color: var(--slate); font-size: .97rem; }

/* exam mode: one wide statement on ink */

.statement {
  background: var(--ink);
  color: var(--white);
  border-radius: 22px;
  padding: clamp(2rem, 5vw, 3.4rem);
  display: grid;
  gap: clamp(1.6rem, 4vw, 3rem);
  grid-template-columns: 1fr;
}

@media (min-width: 56rem) { .statement { grid-template-columns: 1fr 1fr; } }

.statement h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.statement h3 { font-size: 1.2rem; margin-bottom: .6rem; }

.statement p {
  color: rgba(255, 255, 255, .74);
  max-width: var(--measure);
}

/* free line */

.free {
  border-top: 2px solid var(--ink);
  padding-top: 1.5rem;
  display: grid;
  gap: 1rem;
  align-items: start;
  grid-template-columns: 1fr;
}

@media (min-width: 56rem) { .free { grid-template-columns: 1fr 1.4fr; } }

.free h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.free p { color: var(--slate); max-width: var(--measure); }

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

.site-foot {
  border-top: 1px solid var(--line);
  padding-block: 2.2rem 3rem;
  font-size: .93rem;
  color: var(--slate);
}

.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.site-foot nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot .lang a { opacity: .6; }
.site-foot .lang a.on { opacity: 1; font-weight: 600; }

/* ---------- legal pages ---------- */

.legal {
  width: min(46rem, 100% - (var(--gut) * 2));
  margin-inline: auto;
  padding-block: 2.5rem 4rem;
}

.legal h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }

.legal h2 {
  font-size: 1.22rem;
  margin-top: 2.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.legal p, .legal li { margin-top: .9rem; }
.legal ul, .legal ol { padding-left: 1.2rem; }

.legal .meta {
  color: var(--slate);
  font-size: .95rem;
}

.legal table {
  width: 100%;
  margin-top: 1.2rem;
  border-collapse: collapse;
  font-size: .93rem;
  display: block;
  overflow-x: auto;
}

.legal th, .legal td {
  border: 1px solid var(--line);
  padding: .6rem .7rem;
  text-align: left;
  vertical-align: top;
  min-width: 9rem;
}

.legal th { background: #F6F4ED; font-weight: 600; }

.legal a { color: var(--ember); }

/* unresolved owner inputs stay visible until they are filled */
.owner {
  background: #FFF2C9;
  box-shadow: 0 0 0 2px #FFF2C9;
  border-radius: 2px;
}

/* on a phone the in-page anchors crowd the wordmark out; the page is short
   enough to scroll, so keep only the links that leave the page */
@media (max-width: 34rem) {
  .top { gap: 1.1rem; font-size: .9rem; }
  .top a[href^="#"] { display: none; }
  .readout-top { flex-direction: column; align-items: flex-start; gap: .15rem; }
}
