/* digibeet.nl - no external fonts, no third-party anything */
:root {
  --paper: #f6efdf;
  --paper-2: #efe4cb;
  --ink: #2b2118;
  --muted: #6d5d4b;
  --gold: #a8812f;
  --gold-2: #d4b062;
  --wax: #8c1c1c;
  --wax-2: #b33a2b;
  --card: #fffdf7;
  --line: #d9c9a6;
  --accent: #1f4e5f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --display: "Didot", "Bodoni 72", "Bodoni MT", "Playfair Display", Georgia, serif;
  --script: "Snell Roundhand", "Apple Chancery", "URW Chancery L", "Z003", "Brush Script MT", cursive;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  background-image:
    radial-gradient(ellipse at top, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(ellipse at bottom, rgba(168,129,47,.08), transparent 60%);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); }
main { flex: 1; width: 100%; }

/* ---------- home ---------- */
.home { max-width: 620px; margin: 0 auto; padding: 48px 16px 24px; }
.home.narrow { max-width: 560px; }
.hero { text-align: center; margin-bottom: 28px; }
.mini-seal {
  width: 56px; height: 56px; margin: 0 auto 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--wax-2), var(--wax) 70%);
  color: #f3d9a4; font-size: 26px; line-height: 56px;
  box-shadow: 0 2px 0 rgba(0,0,0,.15), inset 0 0 0 4px rgba(0,0,0,.12);
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(34px, 7vw, 52px);
  font-weight: 400; letter-spacing: .01em;
  margin: 0 0 12px; line-height: 1.1;
}
.intro { color: var(--muted); margin: 0 auto; max-width: 52ch; }

.lang-switch { position: absolute; top: 14px; right: 16px; z-index: 2; }
.lang-switch a {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--ink);
  text-decoration: none; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,253,247,.85);
}
.lang-switch a:hover { background: var(--card); border-color: var(--gold); }
.lang-switch .flag { width: 22px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); display: block; }
body { position: relative; }

.word {
  text-align: left; max-width: 520px; margin: 4px auto 18px;
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--wax);
  border-radius: 4px; padding: 14px 18px;
}
.word h2 { font-family: var(--display); font-weight: 400; font-size: 22px; margin: 0 0 6px; }
.word p { margin: 0; font-size: 16px; color: #3d3024; }
.word em { font-style: italic; color: var(--wax); }

.club-stats { display: flex; justify-content: center; gap: 12px; margin: 22px auto 0; max-width: 520px; }
.club-stats .stat {
  flex: 1; padding: 10px 12px;
  border-top: 2px solid var(--gold); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center;
}
.club-stats .num { font-family: var(--display); font-size: 32px; line-height: 1.1; color: var(--wax); font-variant-numeric: lining-nums tabular-nums; }
.club-stats .lbl { font-family: var(--sans); font-size: 12px; letter-spacing: .04em; color: var(--muted); text-align: center; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 12px 32px -18px rgba(60,40,10,.35);
}
.card h1, .card h2 { font-family: var(--display); font-weight: 400; margin-top: 0; }

.form label { display: block; font-family: var(--sans); font-size: 14px; font-weight: 600; margin: 14px 0 6px; color: var(--ink); }
.form label:first-of-type { margin-top: 0; }
input[type=text], input:not([type]), input[readonly] {
  width: 100%; padding: 12px 14px;
  font: inherit; font-size: 18px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
}
input:focus { outline: 2px solid var(--gold-2); outline-offset: 1px; border-color: var(--gold); }
fieldset { border: 0; padding: 0; margin: 16px 0 4px; }
legend { font-family: var(--sans); font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 6px; }
label.radio { display: inline-flex !important; align-items: center; gap: 8px; font-weight: 400 !important; font-family: var(--serif) !important; font-size: 17px !important; margin: 0 22px 0 0 !important; cursor: pointer; }
.hint { font-family: var(--sans); font-size: 13px; color: var(--muted); margin: 8px 0 0; }

button, .button {
  display: inline-block;
  font-family: var(--sans); font-size: 16px; font-weight: 600;
  padding: 12px 20px; border-radius: 4px; cursor: pointer;
  background: var(--wax); color: #fff6e4; border: 1px solid var(--wax);
  text-decoration: none;
}
.form button[type=submit] { width: 100%; margin-top: 20px; padding: 14px; font-size: 17px; }
button:hover, .button:hover { background: var(--wax-2); }
button.ghost, .button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
button.ghost:hover, .button.ghost:hover { background: var(--paper-2); }
button.danger { background: #fff; color: var(--wax); border-color: var(--wax); font-size: 14px; padding: 8px 14px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  background: #fbeaea; border: 1px solid #e3b4b4; color: #6b1515;
  border-radius: 4px; padding: 12px 16px; margin-bottom: 16px; font-family: var(--sans); font-size: 15px;
}
.promises { list-style: none; padding: 0; margin: 22px 0 0; font-family: var(--sans); font-size: 14px; color: var(--muted); text-align: center; }
.promises li { margin: 4px 0; }
.promises li::before { content: "✓ "; color: var(--gold); font-weight: 700; }

.site-foot { text-align: center; font-family: var(--sans); font-size: 13px; color: var(--muted); padding: 24px 16px 32px; }
.site-foot a { color: var(--muted); }

/* ---------- share panel ---------- */
.share { max-width: 760px; margin: 24px auto 0; }
.share h2 { margin-bottom: 4px; }
.share p { margin: 4px 0 12px; }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: 15px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 520px) { .share-row { flex-direction: column; } }

/* ---------- certificate ---------- */
.cert-wrap { padding: 24px 16px; max-width: 1000px; margin: 0 auto; }
.certificate {
  background: #fbf5e6;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(255,255,255,.75), transparent 45%),
    radial-gradient(ellipse at 85% 90%, rgba(168,129,47,.12), transparent 50%),
    repeating-linear-gradient(45deg, rgba(168,129,47,.025) 0 2px, transparent 2px 6px);
  padding: clamp(10px, 2.2vw, 22px);
  border: 1px solid #c9b07a;
  box-shadow: 0 30px 60px -30px rgba(60,40,10,.5), 0 2px 6px rgba(60,40,10,.12);
  aspect-ratio: 1.414 / 1;
  container-type: inline-size;
}
.frame {
  position: relative; height: 100%;
  border: 3px double var(--gold);
  outline: 1px solid var(--gold-2); outline-offset: -9px;
  padding: 4.5cqw 7cqw 3cqw;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.corner { position: absolute; width: 6cqw; height: 6cqw; border: 2px solid var(--gold); }
.corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.corner::after { content: "✦"; position: absolute; color: var(--gold); font-size: 1.6cqw; }
.corner.tl::after { top: .6cqw; left: .9cqw; } .corner.tr::after { top: .6cqw; right: .9cqw; }
.corner.bl::after { bottom: .6cqw; left: .9cqw; } .corner.br::after { bottom: .6cqw; right: .9cqw; }

.bureau { font-family: var(--sans); text-transform: uppercase; letter-spacing: .32em; font-size: 1.15cqw; color: var(--muted); margin: 0 0 .6cqw; }
.c-heading {
  font-family: var(--display); font-weight: 400;
  font-size: 6.4cqw; letter-spacing: .14em; text-transform: uppercase;
  margin: 0 0 1.4cqw; line-height: 1; color: var(--ink);
}
.c-line { font-style: italic; font-size: 1.9cqw; margin: .3cqw 0; color: #3d3024; }
.c-line.small { font-size: 1.5cqw; color: var(--muted); }
.c-name {
  font-family: var(--script);
  font-size: 5.6cqw; line-height: 1.15;
  margin: .8cqw 0 .9cqw; padding: 0 3cqw .4cqw;
  border-bottom: 1px solid var(--gold-2);
  color: #1d1610; overflow-wrap: anywhere;
}
.c-title {
  font-family: var(--display); font-size: 5cqw; letter-spacing: .08em; text-transform: uppercase;
  margin: .6cqw 0 0; line-height: 1.05; color: var(--wax);
}
.c-sub { font-style: italic; font-size: 1.45cqw; color: var(--muted); margin: .5cqw 0 1.6cqw; }
.c-issued { font-size: 1.7cqw; margin: 0 0 1cqw; }
.c-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 3cqw; width: 100%; margin-top: auto; }
.sig { display: flex; flex-direction: column; align-items: center; }
.sig-name { font-family: var(--script); font-size: 2.8cqw; line-height: 1.1; overflow-wrap: anywhere; }
.sig-name.stamp { font-family: var(--display); font-size: 2cqw; letter-spacing: .12em; color: var(--accent); transform: rotate(-3deg); }
.sig-line { display: block; width: 100%; max-width: 24cqw; border-top: 1px solid var(--ink); margin: .5cqw 0; }
.sig-role { font-family: var(--sans); font-size: 1.05cqw; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.seal { width: 13cqw; height: 13cqw; filter: drop-shadow(0 .4cqw .5cqw rgba(80,10,10,.35)); }
.seal-edge { fill: var(--wax); }
.seal-face { fill: var(--wax-2); }
.seal-inner { fill: none; stroke: #f3d9a4; stroke-width: 1.5; stroke-dasharray: 2 3; }
.seal-ring { fill: #f8e3b4; font: 700 15px var(--sans); letter-spacing: 1px; }
.seal-glyph { fill: #f8e3b4; font-size: 40px; }
.seal-year { fill: #f8e3b4; font: 700 18px var(--display); letter-spacing: 3px; }
.c-meta { font-family: var(--sans); font-size: 1.05cqw; color: var(--muted); margin: 1.4cqw 0 0; letter-spacing: .04em; }

.cert-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px; margin: 20px 0 8px; font-family: var(--sans); font-size: 15px; }
.delete { text-align: center; font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 18px; }
.delete summary { cursor: pointer; }
.delete form { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.delete label.radio { font-family: var(--sans) !important; font-size: 14px !important; margin: 0 !important; }

/* Small screens: let the certificate grow taller instead of squashing */
@media (max-width: 640px) {
  .certificate { aspect-ratio: auto; }
  .frame { padding: 34px 18px 22px; }
  .bureau { font-size: 9px; }
  .c-heading { font-size: 34px; }
  .c-line { font-size: 15px; } .c-line.small { font-size: 13px; }
  .c-name { font-size: 36px; }
  .c-title { font-size: 30px; }
  .c-sub { font-size: 13px; }
  .c-issued { font-size: 15px; margin-bottom: 18px; }
  .c-bottom { grid-template-columns: 1fr 1fr; }
  .c-bottom .seal { grid-row: 1; grid-column: 1 / -1; justify-self: center; width: 96px; height: 96px; margin-bottom: 8px; }
  .sig-name { font-size: 22px; } .sig-name.stamp { font-size: 15px; }
  .sig-line { max-width: 140px; }
  .sig-role { font-size: 9px; }
  .c-meta { font-size: 10px; }
  .corner { width: 26px; height: 26px; }
  .corner::after { font-size: 9px; }
}

/* ---------- print ---------- */
@page { size: A4 landscape; margin: 8mm; }
@media print {
  body { background: #fff; }
  .no-print, .site-foot { display: none !important; }
  .cert-wrap { padding: 0; max-width: none; }
  .certificate { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
