/* Afterglow — merkstijl voor joinafterglow.app
   Tokens gelijkgehouden met app/iOS/Design.swift (Palette + TypeScale).
   Wijzig kleuren nooit hier alleen: pas Design.swift en BRANDBOOK.md samen aan. */

:root {
  color-scheme: light;

  /* Palette — identiek aan Design.swift */
  --paper: #f8f7f2;
  --ink: #203749;
  --muted: #66747a;
  --sun: #f8d968;
  --line: #e4e6df;
  --sage: #eaf0e9;
  --green: #3a6154;
  --camera: #15222b;
  --white: #ffffff;

  /* Vorm */
  --radius-card: 22px;
  --radius-button: 20px;
  --radius-pill: 999px;
  --shadow-soft: 0 12px 36px rgba(32, 55, 73, 0.05);
  --shadow-lift: 0 22px 60px rgba(32, 55, 73, 0.1);

  /* Ritme */
  --gutter: clamp(20px, 5vw, 34px);
  --section: clamp(56px, 9vw, 104px);
  --measure: 62ch;

  /* Letters */
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--ink);
  text-decoration-color: rgba(32, 55, 73, 0.3);
  text-underline-offset: 4px;
}

a:hover {
  text-decoration-color: var(--ink);
}

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

/* ---------- Typografie ---------- */

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(42px, 7.4vw, 82px);
}

h2 {
  font-size: clamp(30px, 4.4vw, 46px);
}

h3 {
  font-size: clamp(21px, 2.3vw, 26px);
  line-height: 1.2;
}

p {
  margin: 0;
  max-width: var(--measure);
}

.lede {
  font-size: clamp(18px, 2vw, 21px);
  color: var(--muted);
  line-height: 1.55;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

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

.small {
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- Structuur ---------- */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section {
  padding-block: var(--section);
}

.stack > * + * {
  margin-top: 18px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gutter);
  top: 14px;
  z-index: 10;
  background: var(--white);
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

/* ---------- Kop en navigatie ---------- */

.masthead {
  padding-block: 22px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(248, 247, 242, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
}

.masthead.is-scrolled {
  border-bottom-color: var(--line);
}

.masthead .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.wordmark img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.masthead nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 26px);
  font-size: 15px;
}

.masthead nav a {
  text-decoration: none;
  color: var(--muted);
}

.masthead nav a:hover,
.masthead nav a[aria-current="page"] {
  color: var(--ink);
}

/* ---------- Knoppen ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  min-height: 56px;
  padding: 16px 22px;
  border: 0;
  border-radius: var(--radius-button);
  font: 600 17px/1.2 var(--sans);
  color: var(--ink);
  background: var(--sun);
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.btn:active {
  opacity: 0.86;
  transform: scale(0.985);
}

.btn svg {
  flex: none;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  background-color: var(--white);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  transform: none;
  /* Niet doffer maken met opacity: de tekst moet leesbaar blijven.
     Een lichtere gele vulling laat zien dat de knop nog niet werkt. */
  background: rgba(248, 217, 104, 0.42);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(248, 217, 104, 0.9);
}

.dark .btn[disabled],
.dark .btn[aria-disabled="true"] {
  background: transparent;
  color: var(--sun);
  box-shadow: inset 0 0 0 1px rgba(248, 217, 104, 0.45);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn-note {
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
}

/* ---------- Kaarten ---------- */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: clamp(22px, 3vw, 30px);
  box-shadow: var(--shadow-soft);
}

.card.sage {
  background: var(--sage);
  border-color: transparent;
  box-shadow: none;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  color: var(--muted);
  font-size: 16px;
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
}

.grid-2 {
  display: grid;
  gap: clamp(22px, 4vw, 52px);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  background: var(--sage);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.tag.dark {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

/* ---------- Donkere sectie (cameratoon uit de app) ---------- */

.dark {
  background: var(--camera);
  color: var(--white);
}

.dark h2,
.dark h3 {
  color: var(--white);
}

.dark p {
  color: rgba(255, 255, 255, 0.78);
}

.dark .eyebrow {
  color: var(--sun);
}

.dark .card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.dark .card p {
  color: rgba(255, 255, 255, 0.78);
}

.dark a {
  color: var(--sun);
  text-decoration-color: rgba(248, 217, 104, 0.5);
}

/* ---------- Stappen ---------- */

.steps {
  counter-reset: step;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  padding: 0;
  margin: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: clamp(22px, 3vw, 30px);
  box-shadow: var(--shadow-soft);
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--sun);
  font: 700 18px/1 var(--sans);
  margin-bottom: 18px;
}

/* ---------- Telefoonmaquette (nagebouwd, geen schermafbeelding) ---------- */

.phone {
  width: min(320px, 82vw);
  aspect-ratio: 320 / 660;
  margin-inline: auto;
  border-radius: 46px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-lift);
  padding: 16px 14px 0;
  overflow: hidden;
  position: relative;
  font-size: 13px;
}

.phone::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  translate: -50% 0;
  width: 92px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  opacity: 0.9;
}

.phone-body {
  padding-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.phone-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: -0.3px;
  font-size: 15px;
}

.phone-top img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.phone-title {
  font-family: var(--serif);
  font-size: 27px;
  letter-spacing: -0.02em;
}

.phone-cover {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 3.1;
}

.phone-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-cover .veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(21, 34, 43, 0.72) 6%,
    rgba(21, 34, 43, 0) 58%
  );
}

.phone-cover .cover-text {
  position: absolute;
  left: 14px;
  bottom: 12px;
  color: var(--white);
}

.phone-cover .cover-text span {
  display: block;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.85;
}

.phone-cover .cover-text strong {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.phone-cover .chip {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(248, 247, 242, 0.94);
  color: var(--ink);
  border-radius: var(--radius-pill);
  padding: 6px 11px;
  font-size: 11px;
  font-weight: 600;
}

.phone-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.phone-cta {
  background: var(--sun);
  border-radius: 15px;
  padding: 15px 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phone-tabs {
  margin-top: auto;
  margin-bottom: 14px;
  background: var(--white);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  display: flex;
  justify-content: space-around;
  padding: 9px 6px;
  font-size: 11px;
  color: var(--muted);
}

.phone-tabs span[aria-current] {
  color: var(--ink);
  font-weight: 700;
}

/* Gesloten rol — kaartruggen zoals in het onthullingsscherm */

.deck {
  display: grid;
  place-items: center;
  padding: 26px 0 8px;
}

.deck-cards {
  position: relative;
  width: 132px;
  height: 168px;
}

.deck-cards i {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  display: block;
}

.deck-cards i:nth-child(1) {
  background: #e7cfa8;
  rotate: -9deg;
  translate: -14px 6px;
}

.deck-cards i:nth-child(2) {
  background: #bed3c9;
  rotate: 8deg;
  translate: 14px 4px;
}

.deck-cards i:nth-child(3) {
  background: var(--ink);
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 10px;
  letter-spacing: 1.6px;
  text-align: center;
  padding: 0 14px;
  text-transform: uppercase;
}

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

.faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 22px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

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

.faq summary::after {
  content: "+";
  font-size: 22px;
  color: var(--muted);
  line-height: 1;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
}

/* ---------- Statusmelding ---------- */

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--sage);
  border-radius: 18px;
  padding: 18px 20px;
  font-size: 15px;
  color: var(--ink);
  max-width: 820px;
}

.notice strong {
  display: block;
}

/* ---------- Tekstpagina's ---------- */

.doc {
  max-width: 760px;
}

.doc h2 {
  margin-top: 46px;
  font-size: clamp(25px, 3vw, 32px);
}

.doc h2:first-of-type {
  margin-top: 30px;
}

.doc p,
.doc li {
  color: var(--ink);
  font-size: 17px;
}

.doc ul {
  padding-left: 22px;
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.doc p + p {
  margin-top: 16px;
}

/* ---------- Voet ---------- */

footer {
  border-top: 1px solid var(--line);
  padding-block: 44px 56px;
  font-size: 15px;
  color: var(--muted);
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: center;
}

footer nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-left: auto;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Deelnemers en opslagregel in de maquette (zoals het reisoverzicht in de app) */

.phone-people {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}

.avatars {
  display: flex;
}

.avatars i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 10px/1 var(--sans);
  font-style: normal;
  color: var(--ink);
  border: 2px solid var(--paper);
  margin-right: -7px;
}

.phone-storage {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

.deck-cards i:nth-child(3) {
  gap: 10px;
  align-content: center;
}

.deck-sun {
  color: var(--sun);
}
