/* knewit.in — landing page
   Palette from the logo: butter, lavender, black, white. */

:root {
  --ink: #000000;
  --paper: #ffffff;
  --butter: #f9e3a1;
  --butter-deep: #e9c661;
  --lavender: #9b7ff0;
  --lavender-deep: #5b3fc4;   /* lavender dark enough for text on white */
  --lavender-mist: #f2eefe;
  --lavender-soft: #cdbfff;   /* lavender light enough for text on black */
  --stone: #55516a;           /* muted text, 7:1 on white */
  --line: #e4e0ee;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --gutter: clamp(16px, 5vw, 56px);
  --max: 1180px;
  --radius-xl: clamp(28px, 6vw, 44px);
  --radius-l: 24px;
  --radius-m: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-optical-sizing: auto;
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.025em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--lavender-deep); outline-offset: 3px; border-radius: 8px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 600; font-size: 1.02rem; text-decoration: none;
  border: 2px solid var(--ink);
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.btn:active { transform: scale(.98); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--lavender-deep); border-color: var(--lavender-deep); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--ink); }
.btn-wide { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding-block: max(12px, env(safe-area-inset-top)) 12px;
  /* line the nav up with the page content on wide screens */
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; font-size: 1.4rem; letter-spacing: -0.04em; }
.nav-links { display: none; gap: 28px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--stone); font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.nav-signin {
  margin-left: auto; text-decoration: none; font-weight: 600;
  padding: 9px 18px; border-radius: 999px; border: 2px solid var(--ink);
}
.nav-signin:hover { background: var(--ink); color: var(--paper); }
@media (min-width: 820px) {
  .nav-links { display: flex; }
  .nav-signin { margin-left: 8px; }
}

/* ---------- Layout ---------- */
main > section { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 9vw, 128px) var(--gutter) 0; }
.section-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(1.85rem, 1.25rem + 2.6vw, 3.15rem); line-height: 1.05; max-width: 22ch; }
.section-head p { color: var(--stone); max-width: 60ch; font-size: clamp(1.02rem, .98rem + .25vw, 1.15rem); }

/* ---------- Hero ---------- */
.hero {
  display: grid; gap: clamp(48px, 7vw, 72px);
  padding-top: clamp(28px, 6vw, 72px) !important;
  align-items: center;
}
.hero-copy { display: grid; gap: 22px; }
.hero h1 {
  font-size: clamp(2.55rem, 1.4rem + 5.4vw, 5.6rem);
  line-height: .98;
  letter-spacing: -0.045em;
  font-weight: 760;
  max-width: 12ch;
}
.lede { font-size: clamp(1.08rem, 1rem + .45vw, 1.3rem); color: var(--stone); max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero-actions .btn { flex: 1 1 220px; }
.hero-note { font-size: .95rem; color: var(--stone); }

@media (min-width: 960px) {
  .hero { grid-template-columns: 1.05fr .95fr; padding-top: clamp(56px, 7vw, 104px) !important; padding-bottom: 32px; }
  .hero-actions .btn { flex: 0 0 auto; }
}

/* ---------- The deck (hero card) ---------- */
.deck-wrap { display: grid; justify-items: center; gap: 22px; }
.deck {
  --w: min(100%, 460px);
  --h: clamp(300px, 64vw, 360px);
  position: relative;
  width: var(--w); height: calc(var(--h) + 64px);
  perspective: 1400px;
}
.slab, .card { position: absolute; left: 0; right: 0; height: var(--h); border-radius: var(--radius-xl); }
.slab-butter { top: 0; background: var(--butter); }
.slab-lavender { top: 30px; background: var(--lavender); transform: rotate(2.6deg); transform-origin: 20% 50%; }
.card {
  top: 64px;
  transform-style: preserve-3d;
  transform: rotate(-2.4deg);
  transition: transform .7s cubic-bezier(.2,.75,.15,1), opacity .35s ease;
}
.card.flipped { transform: rotate(-2.4deg) rotateY(180deg); }
.card.leaving { transform: rotate(-2.4deg) rotateY(180deg) translateY(-28px) scale(.96); opacity: 0; transition-duration: .35s; }
.card.entering { transition: none; transform: rotate(-2.4deg) translateY(18px); opacity: 0; }

.face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: clamp(22px, 5vw, 34px);
  border-radius: inherit;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  text-align: left;
}
.face-front {
  background: var(--ink); color: var(--paper);
  border: 0; cursor: pointer; gap: 14px;
}
.face-back {
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink);
  transform: rotateY(180deg); gap: 14px;
}
.card-meta { font-size: .86rem; font-weight: 600; letter-spacing: .01em; }
.face-front .card-meta { color: var(--lavender-soft); }
.face-back .card-meta { color: var(--lavender-deep); }
.card-q {
  font-family: var(--serif); font-size: clamp(1.35rem, 1.05rem + 1.4vw, 1.75rem);
  line-height: 1.28; font-weight: 500; letter-spacing: -0.005em; max-width: 22ch;
}
.card-a {
  font-family: var(--serif); font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem);
  line-height: 1.32; flex: 1; max-width: 26ch;
}
.card-hint {
  margin-top: auto; display: inline-flex; align-items: center; gap: 10px;
  font-size: .92rem; color: rgba(255,255,255,.72);
}
.card-hint::before {
  content: ""; width: 14px; height: 14px; background: var(--paper);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.rate { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rate button {
  display: grid; gap: 1px; justify-items: center;
  padding: 10px 4px; border-radius: var(--radius-m);
  border: 1.5px solid var(--line); background: var(--paper);
  font-weight: 650; font-size: .95rem; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.rate button small { font-weight: 500; font-size: .74rem; color: var(--stone); }
.rate button:hover { border-color: var(--ink); }
.rate .rate-good { background: var(--lavender-mist); border-color: var(--lavender); }

.deck-status { font-size: .95rem; color: var(--stone); text-align: center; min-height: 1.5em; }
.deck-status b { color: var(--ink); }

/* ---------- Timeline ---------- */
.timeline { margin: 0; padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-l); background: var(--lavender-mist); }
.timeline figcaption { font-weight: 650; margin-bottom: 28px; }
.track { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; display: grid; gap: 22px; }
.track::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--lavender); }
.track li { position: relative; display: grid; gap: 2px; }
.track li::before {
  content: ""; position: absolute; left: -26px; top: 5px;
  width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 3px solid var(--lavender-mist);
}
.track li:last-child::before { width: 20px; height: 20px; left: -29px; top: 2px; background: var(--lavender-deep); }
.track b { font-size: 1.15rem; }
.track span { color: var(--stone); font-size: .95rem; }
.timeline-note { margin-top: 28px; color: var(--stone); max-width: 62ch; }

@media (min-width: 720px) {
  .track { padding: 34px 0 0; height: 96px; display: block; margin: 0; }
  .track::before { left: 0; right: 0; top: 6px; bottom: auto; width: auto; height: 2px; }
  .track li { position: absolute; top: 34px; left: calc(var(--at) * 100%); white-space: nowrap; }
  .track li::before { left: 0; top: -34px; }
  .track li:last-child::before { left: auto; right: -3px; top: -37px; }
  .track li:last-child { transform: translateX(-100%); text-align: right; }
  .track li:last-child::before { right: -3px; }
}

/* ---------- Sessions ---------- */
.session-pair { display: grid; gap: 16px; }
@media (min-width: 760px) { .session-pair { grid-template-columns: 1fr 1fr; } }
.session {
  display: grid; gap: 18px; align-content: start;
  padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-xl);
}
.session-morning { background: var(--butter); color: var(--ink); }
.session-evening { background: var(--ink); color: var(--paper); }
.session-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.session h3 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); }
.session-time { font-weight: 600; font-size: .95rem; }
.session-evening .session-time { color: var(--lavender-soft); }
.session p { max-width: 42ch; }
.session-evening p { color: rgba(255,255,255,.78); }
.notif {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 8px; padding: 14px 16px; border-radius: 18px;
  background: rgba(255,255,255,.92); color: var(--ink);
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
  max-width: 380px;
}
.session-evening .notif { background: #1c1a22; color: var(--paper); }
.notif img { border-radius: 7px; background: var(--paper); flex: none; }
.notif div { display: grid; gap: 2px; font-size: .92rem; line-height: 1.35; }
.notif span { opacity: .78; }
.sessions-foot { margin-top: 22px; color: var(--stone); }

/* ---------- Subjects ---------- */
.subject-groups { columns: 1; column-gap: clamp(24px, 4vw, 56px); }
@media (min-width: 640px) { .subject-groups { columns: 2; } }
@media (min-width: 1000px) { .subject-groups { columns: 3; } }
.sg { break-inside: avoid; padding: 18px 0 26px; border-top: 2px solid var(--ink); margin-bottom: 8px; }
.sg h3 { font-size: .98rem; font-weight: 600; color: var(--lavender-deep); letter-spacing: 0; margin-bottom: 10px; }
.sg ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sg li { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.75rem); font-weight: 650; letter-spacing: -0.025em; line-height: 1.2; }

/* ---------- Own cards ---------- */
.share-levels { display: grid; gap: 0; margin: 0; }
.share-levels > div { display: grid; gap: 6px; padding: 22px 0; border-top: 1px solid var(--line); }
.share-levels dt { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 12px; }
.share-levels dt::before { content: ""; width: 14px; height: 14px; border-radius: 50%; flex: none; }
.share-levels > div:nth-child(1) dt::before { background: var(--ink); }
.share-levels > div:nth-child(2) dt::before { background: var(--lavender); box-shadow: 10px 0 0 var(--lavender); margin-right: 10px; }
.share-levels > div:nth-child(3) dt::before { background: var(--butter-deep); box-shadow: 10px 0 0 var(--butter-deep), 20px 0 0 var(--butter-deep); margin-right: 20px; }
.share-levels dd { margin: 0; color: var(--stone); max-width: 46ch; }
@media (min-width: 860px) {
  .share-levels { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .share-levels > div { border-top: 2px solid var(--ink); }
}

/* ---------- Devices ---------- */
.device-row { display: flex; align-items: flex-end; justify-content: center; gap: clamp(14px, 3vw, 32px); padding: 8px 0 0; }
.dev { border: 2.5px solid var(--ink); background: var(--paper); position: relative; }
.dev span { position: absolute; inset: 26% 14% auto; height: 44%; border-radius: 10px; background: var(--ink); box-shadow: 0 -8px 0 -3px var(--lavender), 0 -15px 0 -6px var(--butter); }
.dev-phone { width: clamp(64px, 14vw, 104px); aspect-ratio: 9 / 19; border-radius: 16px; }
.dev-tablet { width: clamp(118px, 26vw, 220px); aspect-ratio: 3 / 4; border-radius: 20px; }
.dev-laptop { width: clamp(150px, 34vw, 340px); aspect-ratio: 16 / 10; border-radius: 14px 14px 4px 4px; margin-bottom: 10px; }
.dev-laptop::after { content: ""; position: absolute; left: -9%; right: -9%; bottom: -12px; height: 10px; background: var(--ink); border-radius: 0 0 10px 10px; }

/* ---------- Pricing ---------- */
.price-card {
  display: grid; gap: clamp(28px, 5vw, 56px);
  padding: clamp(26px, 5vw, 56px);
  border-radius: var(--radius-xl);
  background: var(--lavender-mist);
  border: 2px solid var(--ink);
}
@media (min-width: 900px) { .price-card { grid-template-columns: 1.15fr .85fr; align-items: center; } }
.price-main { display: grid; gap: 18px; }
.price-main h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.3rem); }
.price-sub { color: var(--stone); }
.prices { display: grid; gap: 12px; }
@media (min-width: 560px) { .prices { grid-template-columns: 1fr 1.3fr; } }
.price { display: grid; gap: 4px; align-content: start; padding: 18px 20px; border-radius: var(--radius-l); background: var(--paper); }
.price-box { background: var(--ink); color: var(--paper); }
.amount { font-size: clamp(2.2rem, 1.7rem + 2vw, 3rem); font-weight: 760; letter-spacing: -0.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.price-label { font-size: .95rem; color: var(--stone); }
.price-box .price-label { color: rgba(255,255,255,.75); }
.code-sample {
  justify-self: start; margin-top: 8px;
  padding: 6px 12px; border-radius: 10px;
  border: 1.5px dashed var(--butter); color: var(--butter);
  font-weight: 650; letter-spacing: .12em; font-size: .92rem;
}
.pay-note { font-size: .92rem; color: var(--stone); text-align: center; }
.includes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.includes li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; }
.includes li::before {
  content: ""; width: 18px; height: 16px; margin-top: 4px; background: var(--ink);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

/* ---------- FAQ ---------- */
.faq { max-width: 860px !important; }
.faq h2 { font-size: clamp(1.85rem, 1.25rem + 2.6vw, 3.15rem); margin-bottom: 22px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; font-weight: 650; font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.6rem; font-weight: 400; line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--stone); max-width: 64ch; }

/* ---------- Footer ---------- */
.foot {
  max-width: var(--max); margin: clamp(72px, 10vw, 128px) auto 0;
  padding: 28px var(--gutter) max(28px, env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px;
  border-top: 1px solid var(--line); color: var(--stone); font-size: .95rem;
}
.foot .brand { color: var(--ink); font-size: 1.2rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }
.foot p { margin-left: auto; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .card.flipped, .card.leaving { transition: opacity .2s ease; }
  .card.flipped .face-front { visibility: hidden; }
}

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 88px) var(--gutter) 0; }
.legal h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.2rem); line-height: 1.05; margin-bottom: 12px; }
.legal .updated { color: var(--stone); margin-bottom: 36px; }
.legal h2 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); margin: 40px 0 12px; letter-spacing: -0.015em; }
.legal p, .legal li { color: #2b2838; max-width: 68ch; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 1.2em; display: grid; gap: 8px; margin: 12px 0 0; }
.legal a { color: var(--lavender-deep); }
.legal .summary { background: var(--lavender-mist); border-radius: var(--radius-l); padding: 20px 22px; margin-bottom: 8px; }
.legal .summary p { color: var(--ink); }

.tier-list { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; gap: 6px; }
.tier-list li { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: baseline; }
.tier-list b { font-size: 1.45rem; font-weight: 760; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--butter); }
.tier-list span { font-size: .88rem; color: rgba(255,255,255,.78); }
.sg li a { color: inherit; text-decoration: none; border-bottom: 1.5px solid transparent; }
.sg li a:hover { border-bottom-color: currentColor; }
.section-head p a { color: var(--lavender-deep); font-weight: 650; }

/* ---------- Hero: centred copy + floating card collage ---------- */
main > section.hx { max-width: 1120px; padding-top: clamp(40px, 8vw, 96px); text-align: center; display: grid; justify-items: center; gap: clamp(36px, 6vw, 64px); overflow: visible; }
.hx-copy { display: grid; justify-items: center; gap: 18px; }
.hx h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2.3rem, 1.2rem + 4.2vw, 4.4rem); line-height: 1.08; letter-spacing: -0.02em; max-width: 24ch; text-wrap: balance; }
.hx-lede { color: var(--stone); font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem); line-height: 1.55; max-width: 44ch; }
.hx-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 8px; }
.hx-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 24px; border-radius: 99px; font-weight: 650; font-size: .98rem; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }
.hx-btn-ink { background: var(--ink); color: var(--paper); box-shadow: 0 6px 18px -8px rgba(0,0,0,.45); }
.hx-btn-ink:hover { transform: translateY(-1px); background: #1c1830; }
.hx-btn-line { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1.5px var(--line), 0 4px 14px -10px rgba(0,0,0,.3); }
.hx-btn-line:hover { box-shadow: 0 0 0 1.5px var(--ink); }
.hx-note { font-size: .86rem; font-weight: 600; color: var(--stone); }

/* the collage: positions are percentages of the stage so it scales with the screen */
.hx-stage { position: relative; width: min(100%, 1000px); aspect-ratio: 1000 / 440; margin-bottom: clamp(8px, 3vw, 24px); }
.hx-card { position: absolute; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: clamp(10px, 1.8vw, 20px);
  border-radius: clamp(14px, 2.2vw, 26px); text-align: left; overflow: hidden; box-shadow: 0 18px 40px -22px rgba(20, 12, 60, .45), 0 2px 6px -2px rgba(20, 12, 60, .12);
  opacity: 0; animation: hxIn .8s cubic-bezier(.2, .7, .2, 1) var(--d) forwards, hxFloat var(--f) ease-in-out calc(var(--d) + .8s) infinite; }
.hx-card b { font-family: var(--display); font-size: clamp(.78rem, .55rem + .75vw, 1.15rem); line-height: 1.2; letter-spacing: -0.01em; }
.hx-card small { font-size: clamp(.6rem, .5rem + .35vw, .82rem); font-weight: 600; opacity: .8; }
.hx-k { font-size: clamp(.55rem, .45rem + .3vw, .74rem); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .75; }
.hx-big { font-size: clamp(1.4rem, .8rem + 2.6vw, 3rem) !important; letter-spacing: -0.04em !important; line-height: 1 !important; }
.hx-q { font-family: var(--serif) !important; font-weight: 500; font-size: clamp(.95rem, .6rem + 1.25vw, 1.75rem) !important; line-height: 1.22 !important; }
.hx-rate { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-top: auto; }
/* the centre card: question at the top, buttons bottom-right, clear of the answer card that overlaps its lower left */
.hx-c6 { justify-content: flex-start; gap: clamp(8px, 1.4vw, 16px); }
.hx-c6 .hx-q { max-width: 100%; }
.hx-rate i { font-style: normal; font-size: clamp(.55rem, .45rem + .3vw, .78rem); font-weight: 650; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.85); }
.hx-rate i.on { background: var(--butter); color: #15121f; }
.hx-card ul { margin: 0; padding-left: 16px; font-family: var(--serif); font-size: clamp(.62rem, .5rem + .45vw, .95rem); line-height: 1.35; }

/* cards partly behind others keep their words in the part that stays visible */
.hx-c1, .hx-c2, .hx-c3, .hx-c4 { justify-content: flex-start; }
.hx-c7 { justify-content: flex-start; gap: 8px; }
.hx-c7 ul { margin-top: auto; }
/* same seven shapes and overlaps as the reference collage */
.hx-c1 { left: 0;     top: 30%; width: 24%; height: 58%; z-index: 1; }   /* far left */
.hx-c2 { left: 17%;   top: -2%; width: 26%; height: 34%; z-index: 1; }   /* top left, behind */
.hx-c3 { left: 47%;   top: -3%; width: 25%; height: 34%; z-index: 1; }   /* top right, behind */
.hx-c4 { left: 64%;   top: 30%; width: 24%; height: 56%; z-index: 2; padding-left: 4.6%; }   /* right */
.hx-c5 { left: 85%;   top: 8%;  width: 15%; height: 40%; z-index: 3; }   /* far right, over the right card */
.hx-c6 { left: 27%;   top: 18%; width: 41%; height: 82%; z-index: 3; }   /* centre, the big one */
.hx-c7 { left: 16%;   top: 56%; width: 28%; height: 46%; z-index: 4; }   /* bottom left, in front */

.hx-ink   { background: linear-gradient(160deg, #1d1838, #000); color: #fff; }
.hx-ink .hx-k { color: var(--lavender-soft); opacity: 1; }
.hx-paper { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1.5px var(--line), 0 22px 44px -22px rgba(20, 12, 60, .5); }
.hx-paper b { color: var(--lavender-deep); }
.hx-butter { background: linear-gradient(160deg, var(--butter), #fff1c9); color: #15121f; }
.hx-gold  { background: linear-gradient(160deg, var(--butter-deep), var(--butter)); color: #15121f; justify-content: center; align-items: flex-start; }
.hx-mist  { background: linear-gradient(160deg, var(--lavender-mist), var(--lavender-soft)); color: #15121f; }
.hx-soft  { background: linear-gradient(160deg, #fdf3ff, #efe6ff); color: #15121f; box-shadow: 0 0 0 1.5px var(--line), 0 18px 40px -22px rgba(20, 12, 60, .4); }
.hx-deep  { background: linear-gradient(160deg, var(--lavender), var(--lavender-deep)); color: #fff; }

@keyframes hxIn { from { opacity: 0; transform: translateY(26px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes hxFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hx-card { will-change: transform; }

@media (max-width: 640px) {
  .hx-stage { aspect-ratio: 360 / 300; }
  .hx-c1 { left: 0;   top: 34%; width: 30%; height: 48%; }
  .hx-c2 { left: 4%;  top: -2%; width: 42%; height: 32%; }
  .hx-c3 { left: 54%; top: -2%; width: 44%; height: 32%; }
  .hx-c4 { left: 64%; top: 36%; width: 36%; height: 46%; padding-left: 15%; }
  .hx-c5 { display: none; }
  .hx-c6 { left: 22%; top: 20%; width: 56%; height: 70%; }
  .hx-c7 { left: 6%;  top: 64%; width: 44%; height: 38%; }
  .hx-card ul li:nth-child(2), .hx-rate i:nth-child(2), .hx-rate i:nth-child(4) { display: none; }
  .hx-c1 .hx-k { letter-spacing: .01em; font-size: .5rem; }
}
@media (prefers-reduced-motion: reduce) { .hx-card { animation: hxIn .01s forwards; } }

/* live counts under the hero buttons */
.hx-stats { display: flex; justify-content: center; gap: clamp(36px, 8vw, 88px); margin: 14px 0 0; }
.hx-stats[hidden] { display: none; }
.hx-stats div { display: flex; flex-direction: column-reverse; align-items: center; gap: 2px; }
.hx-stats dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); letter-spacing: -0.03em; line-height: 1; color: var(--lavender-deep); font-variant-numeric: tabular-nums; }
.hx-stats dt { font-size: .92rem; font-weight: 600; color: var(--stone); }

/* ---------- Pricing: three product cards + "I have a code" switch ---------- */
main > section.pc-wrap { position: relative; display: grid; gap: clamp(28px, 4vw, 44px); justify-items: center; text-align: center; }
.pc-head { display: grid; gap: 14px; justify-items: center; max-width: 640px; }
.pc-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 1.3rem + 2.8vw, 3.4rem); line-height: 1.08; letter-spacing: -0.02em; }
.pc-head p { color: var(--stone); font-size: clamp(1rem, .95rem + .25vw, 1.12rem); line-height: 1.55; }
.pc-toggle { display: inline-flex; align-items: center; gap: 12px; margin-top: 6px; cursor: pointer; font-weight: 650; font-size: .98rem; user-select: none; }
.pc-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pc-switch { position: relative; width: 46px; height: 26px; border-radius: 99px; background: var(--line); transition: background .2s; flex: none; }
.pc-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s cubic-bezier(.3,1.4,.5,1); }
.pc-toggle input:checked + .pc-switch { background: var(--lavender-deep); }
.pc-toggle input:checked + .pc-switch::after { transform: translateX(20px); }
.pc-toggle input:focus-visible + .pc-switch { outline: 3px solid var(--lavender-soft); outline-offset: 2px; }
.pc-toggle em { font-style: normal; font-weight: 700; color: var(--lavender-deep); margin-left: 4px; }

.pc-grid { display: grid; gap: 18px; width: 100%; max-width: 1040px; align-items: center; }
.pc { position: relative; display: grid; gap: 14px; text-align: left; padding: clamp(22px, 3vw, 30px); border-radius: var(--radius-l); background: var(--paper);
  box-shadow: 0 0 0 1.5px var(--line), 0 20px 40px -30px rgba(20, 12, 60, .35); transition: transform .25s, box-shadow .25s;
  opacity: 0; transform: translateY(24px); }
.pc.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1), box-shadow .25s; }
.pc:hover { box-shadow: 0 0 0 1.5px var(--lavender-soft), 0 26px 48px -28px rgba(20, 12, 60, .45); }
.pc-pop-card { background: var(--ink); color: var(--paper); box-shadow: 0 30px 60px -30px rgba(20, 12, 60, .7); padding-top: clamp(30px, 4vw, 38px); }
.pc-pop { position: absolute; top: 14px; right: 14px; font-size: .74rem; font-weight: 750; letter-spacing: .04em; padding: 5px 10px; border-radius: 99px; background: var(--butter); color: #15121f; }
.pc-name { font-size: .82rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--stone); }
.pc-pop-card .pc-name { color: var(--lavender-soft); }
.pc-price { display: flex; align-items: baseline; gap: 4px; line-height: 1; }
.pc-rs { font-size: 1.5rem; font-weight: 700; }
.pc-price b { font-family: var(--display); font-size: clamp(2.6rem, 2rem + 2vw, 3.4rem); font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.pc-per { margin-left: 6px; font-size: .9rem; font-weight: 600; color: var(--stone); }
.pc-pop-card .pc-per, .pc-pop-card .pc-sub { color: rgba(255,255,255,.7); }
.pc-sub { font-size: .9rem; color: var(--stone); min-height: 2.6em; }
.pc-was { text-decoration: line-through; opacity: .6; margin-right: 6px; }
.pc-feat { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; font-size: .95rem; }
.pc-feat li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; }
.pc-feat li::before { content: "✓"; font-weight: 800; color: var(--lavender-deep); }
.pc-pop-card .pc-feat li::before { color: var(--butter); }
.pc-feat li:last-child { font-weight: 650; }
.pc-btn { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; border-radius: 99px; margin-top: 6px; font-weight: 700; text-decoration: none;
  background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink); transition: background .15s, transform .15s; }
.pc-btn:hover { background: var(--lavender-mist); }
.pc-pop-card .pc-btn { background: var(--butter); color: #15121f; box-shadow: none; }
.pc-pop-card .pc-btn:hover { background: #fff; }
.pc-foot { color: var(--stone); font-size: .92rem; max-width: 60ch; }
.pc-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
@media (min-width: 900px) {
  .pc-grid { grid-template-columns: 1fr 1.08fr 1fr; gap: 22px; }
  .pc-pop-card { transform: translateY(24px) scale(1.04); }
  .pc-pop-card.in { transform: scale(1.04); }
  .pc-side:first-child.in { transform: translateX(6px); }
  .pc-side:last-child.in { transform: translateX(-6px); }
}
@media (prefers-reduced-motion: reduce) { .pc, .pc.in { opacity: 1; transform: none; transition: none; } }
.pc-foot .code-sample { display: inline-block; font-family: ui-monospace, Consolas, monospace; font-weight: 700; letter-spacing: .08em; color: var(--ink); background: var(--soft-2, #efedf4); border: 0; padding: 2px 8px; border-radius: 6px; }
@media (max-width: 899px) { .pc-pop-card { order: -1; } .pc-toggle { text-align: left; } }

/* ---------- Hero cards v2: same premium language as the study card ---------- */
.hx-card { --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.hx-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background-image: var(--grain); opacity: .07; mix-blend-mode: overlay;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .35); }
.hx-card > * { position: relative; z-index: 1; }
.hx-ink { background:
    radial-gradient(120% 85% at 88% -5%, rgba(155, 127, 240, .45), transparent 55%),
    radial-gradient(80% 60% at -5% 105%, rgba(249, 227, 161, .16), transparent 60%),
    linear-gradient(160deg, #1d1740 0%, #0d0a1c 62%, #07060f 100%);
  box-shadow: 0 40px 70px -36px rgba(30, 18, 90, .7), 0 12px 26px -14px rgba(30, 18, 90, .35); }
.hx-ink::before { opacity: .1; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 1px 0 rgba(255, 255, 255, .16); }
.hx-ink .hx-k { display: inline-block; align-self: flex-start; padding: 5px 11px 5px 9px; border-radius: 99px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); color: #e9e3ff; letter-spacing: .03em; }
.hx-ink .hx-k::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; vertical-align: 1px; border-radius: 50%; background: var(--butter); box-shadow: 0 0 8px var(--butter); }
.hx-ink .hx-q { margin: clamp(4px, 1vw, 12px) 0 0; font-weight: 700 !important; text-wrap: balance; }
.hx-ink .hx-serial { position: absolute; top: clamp(12px, 2vw, 22px); right: clamp(12px, 2vw, 22px); font: 600 clamp(.5rem, .4rem + .3vw, .7rem)/1 ui-monospace, Consolas, monospace; letter-spacing: .18em; color: rgba(255, 255, 255, .5); }
.hx-rate i { border-radius: 10px; padding: 5px 10px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.hx-rate i.on { box-shadow: 0 6px 16px -8px rgba(249, 227, 161, .9); }
.hx-paper { background: linear-gradient(180deg, #fffdf8, #faf6ec); padding-left: clamp(14px, 2.2vw, 26px); }
.hx-paper::before { mix-blend-mode: multiply; opacity: .05; box-shadow: inset 0 0 0 1px rgba(30, 18, 90, .08); }
.hx-paper::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, var(--lavender), var(--lavender-deep) 55%, var(--butter-deep)); }
.hx-paper b { font-family: var(--serif); font-weight: 700; color: #15121f; }
.hx-paper ul { list-style: none; padding: 0; display: grid; gap: 6px; counter-reset: pt; }
.hx-paper li { counter-increment: pt; display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; }
.hx-paper li::before { content: counter(pt, decimal-leading-zero); font: 700 clamp(.5rem, .42rem + .3vw, .68rem)/1 ui-monospace, Consolas, monospace; padding: 4px 6px; border-radius: 6px; color: var(--lavender-deep); background: var(--lavender-mist); }
.hx-butter, .hx-gold, .hx-mist, .hx-soft, .hx-deep { box-shadow: 0 26px 50px -30px rgba(30, 18, 90, .5), 0 6px 14px -8px rgba(30, 18, 90, .2); }
.hx-deep { background: radial-gradient(110% 80% at 90% 0%, rgba(255, 255, 255, .22), transparent 55%), linear-gradient(160deg, #a58cf5, #5b3fc4); }
.hx-butter { background: radial-gradient(110% 80% at 90% 0%, rgba(255, 255, 255, .55), transparent 55%), linear-gradient(160deg, #fbe9b2, #f6d98a); }
.hx-gold { background: radial-gradient(110% 80% at 90% 0%, rgba(255, 255, 255, .45), transparent 55%), linear-gradient(160deg, #f1d27a, #e2b94a); }
.hx-mist { background: radial-gradient(110% 80% at 90% 0%, rgba(255, 255, 255, .6), transparent 55%), linear-gradient(160deg, #ece6ff, #cfc2ff); }
.hx-soft { background: radial-gradient(110% 80% at 90% 0%, #fff, transparent 60%), linear-gradient(160deg, #fbf8ff, #efe8ff); }
.pc-ref { margin: 0 auto 10px; max-width: 60ch; padding: 10px 16px; border-radius: 999px; background: #e9f7ee; color: #14532d; font-weight: 600; font-size: .92rem; text-align: center; }
.pc-ref b { letter-spacing: .06em; }
/* Header tagline under the name (owner, 15 Nov 2026) */
.brand-n { display: inline-flex; flex-direction: column; line-height: 1.05; }
.brand-n .brand-tag { font: 500 10.5px/1.2 Inter, system-ui, sans-serif; letter-spacing: .01em; color: #7a7a85; margin-top: 2px; white-space: nowrap; }
/* ONE HEADER POSITION (owner, 15 Nov 2026): knewit logo + name sit at exactly the same spot on every page */
html { scrollbar-gutter: stable; }
header.nav, header.shop-top { padding-inline: max(var(--kw-gut, 16px), calc((100% - 1240px) / 2)) !important; }
header.nav, header.shop-top { --kw-gut: clamp(16px, 4.5vw, 48px); padding-block: 12px !important; min-height: 64px; box-sizing: border-box; }
header .brand { gap: 9px !important; font-size: 1.2rem !important; font-weight: 700 !important; letter-spacing: -0.04em !important; line-height: 1 !important; }
header .brand img { width: 30px !important; height: 30px !important; border-radius: 8px; }
header.nav, header.shop-top { height: 64px; align-items: center !important; padding-block: 0 !important; }
