/* ==========================================================================
   Baby Moons II
   Values transcribed from the Claude Design source (Baby Moons II.dc.html).
   The design carried everything as inline styles; they are lifted into tokens
   and component rules here, with the same computed result.
   ========================================================================== */

:root {
  /* surfaces */
  --bg:            #fdfcfa;
  --surface:       #ffffff;
  --band-1:        #f7f4ee;  /* fotogalerij */
  --band-2:        #f2ece1;  /* teletijdskist, en de hover van de outline-knop */
  --tint:          #faf7f1;  /* het gestippelde adresvak */
  --line:          #e8e1d5;

  /* ink */
  --ink:           #4a3b26;
  --muted:         #6b5b45;
  --muted-label:   #8d7c63;

  /* accenten */
  --teal:          #1b5c74;
  --teal-dark:     #14465a;
  --teal-soft:     #cfe0e6;
  --gold:          #a8853f;
  --tan:           #a5825c;
  --tan-ink:       #8a6641;
  --tan-ink-dark:  #6b4d2f;
  --rule:          #b9a86a;
  --footer-name:   #a8b08a;
  --footer-date:   #a99c88;
  --btc-orange:    #f7931a;

  /* type */
  --font-display: 'Patrick Hand', 'Comic Sans MS', cursive;
  --font-body:    Karla, Helvetica, Arial, sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* schaduwen */
  --shadow-tile:  0 4px 14px rgba(74, 59, 38, 0.05);
  --shadow-photo: 0 8px 22px rgba(74, 59, 38, 0.12);
  --shadow-card:  0 10px 30px rgba(74, 59, 38, 0.06);
}

/* Vier kleuren uit het ontwerp halen WCAG AA (4.5:1) niet op kleine tekst:
     --gold          3.36:1   de kopjes boven elke titel
     --muted-label   4.04:1   "dagen / uren / minuten" onder de cijfers
     --footer-name   2.22:1   "Baby Moons II" in de voettekst
     --footer-date   2.63:1   de datum in de voettekst
   De originele waarden staan hierboven. Haal dit blok uit commentaar om
   dezelfde tinten te gebruiken, alleen donkerder tot ze wel voldoen. */
/*
:root {
  --gold:        #8c6f34;  --> 4.61:1
  --muted-label: #82735b;  --> 4.61:1
  --footer-name: #6f7750;  --> 4.62:1
  --footer-date: #7f715c;  --> 4.63:1
}
*/

/* --------------------------------------------------------------------------
   basis
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
}

img { max-width: 100%; }

a { color: var(--teal); }
a:hover { color: var(--teal-dark); }

h1, h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--teal);
}
h1 { font-size: 50px; line-height: 1.1; }
h2 { font-size: 38px; line-height: 1.15; }

p { margin: 0; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 100;
  padding: 12px 20px;
  background: var(--teal);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 12px 12px;
}
.skip-link:focus {
  transform: translate(-50%, 0);
  color: var(--bg);
}

/* --------------------------------------------------------------------------
   layout
   -------------------------------------------------------------------------- */

.section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.band--1 { background: var(--band-1); }
.band--2 { background: var(--band-2); }

.heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.lead {
  max-width: 520px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}
.lead--narrow { max-width: 460px; }

/* --------------------------------------------------------------------------
   knoppen
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn--outline {
  min-height: 52px;
  padding: 0 32px;
  background: var(--bg);
  border: 2px solid var(--tan);
  color: var(--tan-ink);
}
.btn--outline:hover,
.btn--outline:focus-visible {
  background: var(--band-2);
  color: var(--tan-ink-dark);
}

.btn--solid {
  min-height: 58px;
  padding: 0 40px;
  border: none;
  background: var(--teal);
  color: var(--bg);
  box-shadow: 0 6px 18px rgba(27, 92, 116, 0.2);
}
.btn--solid:hover,
.btn--solid:focus-visible {
  background: var(--teal-dark);
  color: var(--bg);
  box-shadow: 0 10px 24px rgba(27, 92, 116, 0.28);
}

.btn--copy {
  flex: none;
  min-height: 44px;
  padding: 0 18px;
  border: none;
  background: var(--teal);
  color: var(--bg);
  white-space: nowrap;
}
.btn--copy:hover,
.btn--copy:focus-visible { background: var(--teal-dark); }

/* --------------------------------------------------------------------------
   banner
   -------------------------------------------------------------------------- */

.banner {
  display: block;
  max-width: 1500px;
  margin-inline: auto;
}
.banner img {
  width: 100%;
  height: auto;
  display: block;
  /* Pinned per breakpoint so the swap between the mobile and desktop crop
     never shifts the layout while loading. */
  aspect-ratio: 938 / 740;
}
@media (min-width: 700px) {
  .banner img { aspect-ratio: 7616 / 2564; }
}

/* --------------------------------------------------------------------------
   aftelklok
   -------------------------------------------------------------------------- */

.countdown { padding: 60px 24px 64px; }

.countdown .stack {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
  text-align: center;
}
.countdown .heading { gap: 14px; }

.clock {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 620px;
}
@media (min-width: 560px) {
  .clock { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 8px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-tile);
}
.tile-value {
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 1;
  color: var(--tan);
  font-variant-numeric: tabular-nums;
}
.tile-label {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-label);
}

.tile--accent {
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 4px 14px rgba(27, 92, 116, 0.16);
}
.tile--accent .tile-value { color: var(--bg); }
.tile--accent .tile-label { color: var(--teal-soft); }

/* shown only inside <noscript>, in place of a row of empty tiles */
.clock-fallback {
  display: none;
  max-width: 520px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   fotogalerij
   -------------------------------------------------------------------------- */

.gallery {
  padding: 62px 24px 68px;
  gap: 34px;
}

.photos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  width: 100%;
  max-width: 1000px;
}
@media (min-width: 980px) {
  .photos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.photo {
  display: block;
  width: 100%;
  padding: 10px 10px 14px;
  border: none;
  background: var(--surface);
  border-radius: 6px;
  box-shadow: var(--shadow-photo);
  cursor: pointer;
  font: inherit;
  transform: rotate(-1.2deg);
  transition: transform 0.25s ease;
}
.photo:hover,
.photo:focus-visible { transform: rotate(0deg) translateY(-6px); }

.photo img {
  width: 100%;
  /* height:auto is required, not cosmetic. The width/height attributes on the
     <img> are presentational hints, so without this the height="600" wins and
     aspect-ratio is ignored — the photos render as tall strips. */
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   geboortelijst
   -------------------------------------------------------------------------- */

.gifts { padding: 66px 24px 70px; }

.card {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 40px 30px 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  text-align: center;
}
/* the second block in the card is the pair of body paragraphs */
.card .heading + .heading { gap: 8px; }

.divide {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  border-top: 1px solid var(--line);
}
.divide > :first-child { padding-top: 20px; }
.divide--wide { gap: 10px; }
.divide--wide .lead { max-width: 440px; }

.iban {
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.qr {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.qr img { width: 144px; height: 144px; display: block; }

.qr-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--btc-orange);
  border: 3px solid var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

.btc {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 8px 8px 8px 14px;
  border: 1px dashed var(--tan);
  border-radius: 14px;
  background: var(--tint);
}
.btc-address {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-all;
  text-align: left;
}

.status {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.status:empty { display: none; }
.status[data-state="error"] { color: #a33a2a; }

/* --------------------------------------------------------------------------
   teletijdskist
   -------------------------------------------------------------------------- */

.capsule {
  padding: 62px 24px 66px;
  justify-content: center;
}

.capsule-grid {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: center;
}

.capsule-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.capsule-text .lead { max-width: none; }

.capsule-img {
  justify-self: center;
  width: 100%;
  max-width: 420px;
}
.capsule-img img {
  width: 100%;
  height: auto;
  display: block;
  animation: bmFloat 6s ease-in-out infinite;
}

@keyframes bmFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* --------------------------------------------------------------------------
   afsluiting
   -------------------------------------------------------------------------- */

.floral {
  display: block;
  max-width: 1100px;
  margin: 8px auto 0;
}
.floral img { width: 100%; height: auto; display: block; }

.rule {
  width: 100%;
  height: 10px;
  background: var(--rule);
}

.footer {
  padding: 26px 24px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.footer-name {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--footer-name);
}
.footer-date {
  font-size: 14px;
  color: var(--footer-date);
}

/* --------------------------------------------------------------------------
   lightbox
   -------------------------------------------------------------------------- */

.lightbox {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 32px;
  border: none;
  background: transparent;
  overflow: hidden;
  cursor: zoom-out;
}
.lightbox:not([open]) { display: none; }
.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox::backdrop { background: rgba(45, 36, 24, 0.82); }

/* let the <img> be the flex item so it centres directly */
.lightbox picture { display: contents; }

.lightbox img {
  max-width: 90%;
  max-height: 88vh;
  display: block;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(253, 252, 250, 0.14);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.lightbox-close:hover,
.lightbox-close:focus-visible { background: rgba(253, 252, 250, 0.3); }

/* --------------------------------------------------------------------------
   kleinere schermen
   -------------------------------------------------------------------------- */

@media (max-width: 560px) {
  h1 { font-size: 42px; }
  h2 { font-size: 32px; }
  .tile-value { font-size: 38px; }
  .btn--outline,
  .btn--solid { width: 100%; padding: 0 20px; }
  .card { padding: 32px 20px 30px; }
  .btc { flex-direction: column; align-items: stretch; padding: 12px; gap: 12px; }
  .btc-address { text-align: center; }
}

/* --------------------------------------------------------------------------
   bewegingsvoorkeur
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .photo:hover,
  .photo:focus-visible { transform: rotate(0deg); }
}
