/* ----------------------------------------------------------------------------
 * Tlapko.cz — design system
 * Palette: warm cream bg / deep ink / coral accent / mustard highlight
 * Type: Fraunces (display serif) + Inter (body sans)
 * -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

:root {
  --ink:        #1A2932;
  --ink-soft:   #3C4A56;
  --paper:      #FAF7F2;
  --paper-mid:  #F0EAE0;
  --line:       #E8E1D5;
  --coral:      #FF6B5B;
  --coral-dark: #E5503F;
  --gold:       #F2C57C;
  --muted:      #8A949B;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--coral); text-decoration: none; }
a:hover { color: var(--coral-dark); text-decoration: underline; }

.serif { font-family: 'Fraunces', 'Times New Roman', serif; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }

/* ---------- Layout primitives ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: 5rem 0; }
@media (max-width: 720px) { section { padding: 3rem 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .9rem 1.75rem;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-weight: 600; font-size: .95rem;
  line-height: 1;
  transition: transform .15s, background .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: var(--coral-dark); color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255,107,91,0.3); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000; color: var(--paper); text-decoration: none; }
.btn-outline {
  border: 1.5px solid var(--ink); color: var(--ink); background: transparent;
}
.btn-outline:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.btn-ghost { color: var(--ink-soft); padding: .5rem 1rem; font-size: .9rem; }
.btn-ghost:hover { color: var(--ink); text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  height: 72px;
}
.brand { display: inline-flex; align-items: center; line-height: 0; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand img { height: 38px; width: auto; display: block; }
.footer-about .brand img {
  height: 40px;
  filter: brightness(0) invert(1);
  opacity: .92;
}

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a { color: var(--ink-soft); font-size: .95rem; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--ink); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: .65rem; flex-shrink: 0; }

.nav-toggle {
  display: none; padding: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  align-items: center; justify-content: center;
  color: var(--ink);
  transition: background .15s;
}
.nav-toggle:hover { background: var(--paper-mid); }
.nav-toggle svg { width: 26px; height: 26px; display: block; }
.nav-toggle .icon-close { display: none; }
.nav-toggle.is-open .icon-menu { display: none; }
.nav-toggle.is-open .icon-close { display: block; }
.nav-toggle.is-open { background: var(--paper-mid); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--paper);
    flex-direction: column; gap: 0;
    padding: .5rem 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px -12px rgba(26,41,50,0.15);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a {
    width: 100%; padding: .95rem 1.5rem;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }
  .nav a:last-child { border-bottom: 0; }

  /* Compact CTA on small screens. */
  .header-actions .btn { padding: .6rem 1.1rem; font-size: .85rem; }
}

@media (max-width: 380px) {
  .brand img { height: 32px; }
  .header-actions .btn { padding: .55rem 1rem; font-size: .8rem; }
}

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 4rem;
  align-items: center;
  padding-top: 5rem; padding-bottom: 4rem;
  position: relative;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--coral);
  margin-bottom: 1.5rem;
}
.hero-eyebrow::before {
  content: ''; width: 28px; height: 1.5px; background: var(--coral);
}
.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 1.75rem;
}
.hero h1 em { font-style: italic; color: var(--coral); font-weight: 500; }
.hero p.lead {
  font-size: 1.2rem; line-height: 1.55;
  color: var(--ink-soft);
  max-width: 32rem;
  margin-bottom: 2.25rem;
}
.hero-ctas { display: flex; gap: .85rem; flex-wrap: wrap; }
.hero-side {
  position: relative;
  max-width: 360px; margin-left: auto;
}
.hero-video {
  position: relative;
  width: 100%; aspect-ratio: 9/16;
  border-radius: 24px; overflow: hidden;
  background: var(--ink);
  box-shadow: 0 30px 60px -20px rgba(26,41,50,0.4);
  transform: rotate(1.5deg);
}
.hero-video iframe {
  width: 100%; height: 100%; border: 0; display: block;
}
.hero-side::before {
  content: ''; position: absolute; inset: -16px -16px auto auto;
  width: 55%; aspect-ratio: 9/16;
  background: var(--gold);
  border-radius: 24px;
  transform: rotate(-3deg);
  z-index: -1;
}
.hero-badge {
  position: absolute; bottom: -20px; left: -20px;
  background: var(--paper); color: var(--ink);
  padding: 1rem 1.25rem; border-radius: 16px;
  box-shadow: 0 12px 30px -10px rgba(26,41,50,0.25);
  font-size: .9rem; font-weight: 600;
  display: flex; align-items: center; gap: .65rem;
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #2ecc71;
  box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.2);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.2); }
  50%      { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0.05); }
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 2rem; padding-bottom: 2.5rem; }
  .hero h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .hero-text { order: 2; }
  .hero-side { order: 1; max-width: 280px; margin: 0 auto; }
  .hero-ctas .btn { flex: 1; justify-content: center; }
}

/* ---------- Stats band ---------- */
.stats {
  background: var(--ink); color: var(--paper);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}
.stats::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,107,91,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(242,197,124,0.12) 0%, transparent 50%);
}
.stats .wrap { position: relative; }
.stats-headline {
  text-align: center;
  font-family: 'Fraunces', serif;
  font-size: .9rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: .75rem;
}
.stats-amount {
  font-family: 'Fraunces', serif;
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  font-weight: 500;
  line-height: 1; letter-spacing: -0.03em;
  text-align: center;
  margin-bottom: 2rem;
}
.stats-amount .kc { font-size: 0.5em; color: var(--gold); font-weight: 400; margin-left: .25em; }
.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  border-top: 1px solid rgba(250,247,242,0.1);
  padding-top: 2rem;
}
.stats-grid .item { text-align: center; }
.stats-grid .num { font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 500; color: var(--paper); margin-bottom: .25rem; }
.stats-grid .lbl { font-size: .8rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(250,247,242,0.6); }
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ---------- Story section ---------- */
.story {
  padding: 6rem 0;
}
.story-eyebrow {
  text-align: center; font-size: .85rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--coral); margin-bottom: 1rem;
}
.story h2 {
  text-align: center;
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.1;
  color: var(--ink);
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}
.story-photo {
  max-width: 380px; aspect-ratio: 1/1;
  border-radius: 50%; overflow: hidden;
  margin: 0 auto 2.5rem;
  box-shadow: 0 30px 60px -20px rgba(26,41,50,0.25);
}
.story-photo img { width: 100%; height: 100%; object-fit: cover; }
.story-body { max-width: 640px; margin: 0 auto; }
.story-body p {
  font-size: 1.15rem; line-height: 1.7;
  color: var(--ink-soft); margin-bottom: 1.25rem;
}
.story-body p strong { color: var(--ink); font-weight: 600; }
.story-pullquote {
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: 1.65rem; line-height: 1.3;
  color: var(--ink); text-align: center;
  padding: 1.5rem 0;
  margin: 2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.story-sig {
  text-align: center; margin-top: 2rem;
  font-family: 'Fraunces', serif; font-style: italic;
  color: var(--muted);
}
.story-cta { text-align: center; margin-top: 3rem; }

/* ---------- Impact pills ---------- */
.impact {
  background: var(--paper-mid);
  padding: 5rem 0;
}
.impact h2 {
  text-align: center; font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(1.75rem, 3vw, 2.25rem); color: var(--ink);
  margin-bottom: 3rem; letter-spacing: -0.02em;
}
.impact-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}
.impact-card {
  background: var(--paper); border-radius: 20px;
  padding: 2rem 1.5rem; text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.impact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(26,41,50,0.15);
}
.impact-card .icon {
  width: 64px; height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.impact-card .icon svg { width: 32px; height: 32px; }
.impact-card:nth-child(1) .icon { background: var(--coral); }
.impact-card:nth-child(2) .icon { background: var(--gold); color: var(--ink); }
.impact-card:nth-child(3) .icon { background: var(--ink); }
.impact-card:nth-child(4) .icon { background: #6FA193; }
.impact-card h3 {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 1.15rem; color: var(--ink);
  margin-bottom: .5rem;
}
.impact-card p { font-size: .92rem; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 820px) { .impact-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; } }

/* ---------- Donate split ---------- */
.donate {
  padding: 5rem 0;
}
.donate-header { text-align: center; margin-bottom: 3rem; }
.donate-header .eyebrow {
  font-size: .85rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--coral); margin-bottom: .75rem;
}
.donate-header h2 {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.75rem); color: var(--ink);
  letter-spacing: -0.02em;
}

.donate-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 2.5rem;
}
.donate-qr {
  display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: start;
}
.donate-qr .qr-frame {
  width: 180px; padding: .65rem; background: #fff; border-radius: 16px;
  box-shadow: 0 8px 20px -8px rgba(26,41,50,0.15);
}
.donate-qr .qr-frame img { width: 100%; border-radius: 8px; }
.donate-qr h3 { font-family: 'Fraunces', serif; font-size: 1.05rem; color: var(--ink-soft); font-weight: 500; margin-bottom: .35rem; }
.donate-qr .account {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 1.65rem; color: var(--ink);
  margin-bottom: .85rem; letter-spacing: -0.01em;
}
.donate-qr p { font-size: .9rem; color: var(--ink-soft); }
.donate-qr .note {
  margin-top: 1rem; padding: .75rem 1rem; background: var(--paper-mid);
  border-radius: 12px; font-size: .85rem;
}

.donate-tx h3 {
  font-family: 'Fraunces', serif; font-weight: 500; color: var(--ink);
  font-size: 1.1rem; margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: .65rem;
}
.donate-tx h3 .live {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .7rem; font-weight: 600; color: #2ecc71;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.donate-tx h3 .live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: #2ecc71;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.tx-list { list-style: none; }
.tx-list li {
  padding: .65rem 0;
  border-bottom: 1px dashed var(--line);
}
.tx-list li:last-child { border-bottom: 0; }
.tx-row { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.tx-date { font-size: .8rem; color: var(--muted); min-width: 5rem; font-variant-numeric: tabular-nums; }
.tx-amount { font-family: 'Fraunces', serif; font-weight: 600; color: var(--coral); font-size: 1rem; font-variant-numeric: tabular-nums; }
.tx-sender { font-size: .92rem; color: var(--ink-soft); }
.tx-message { display: block; padding-left: 5.75rem; font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.tx-empty { color: var(--muted); font-style: italic; }
.tx-all { text-align: right; margin-top: 1rem; font-size: .9rem; }

@media (max-width: 820px) {
  .donate-split { grid-template-columns: 1fr; padding: 1.75rem; gap: 2rem; }
  .donate-qr { grid-template-columns: 1fr; }
  .donate-qr .qr-frame { margin: 0 auto; }
  .tx-message { padding-left: 0; }
}

/* ---------- Pomohli jsme — slider ---------- */
.helped {
  padding: 5rem 0;
  background: var(--paper);
  position: relative;
  overflow: hidden;
}
.helped-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 2rem; margin-bottom: 2.5rem;
}
.helped-head .eyebrow {
  font-size: .85rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--coral); margin-bottom: .5rem;
}
.helped-head h2 {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.75rem); color: var(--ink);
  letter-spacing: -0.02em; line-height: 1.05;
}
.helped-head .arrows { display: flex; gap: .5rem; flex-shrink: 0; }
.helped-head .arrows button {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--ink); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.helped-head .arrows button:hover:not(:disabled) {
  background: var(--ink); color: var(--paper);
}
.helped-head .arrows button:disabled { opacity: 0.3; cursor: default; }

.helped-track-wrap {
  position: relative;
  margin: 0 calc(-1 * max((100vw - 1180px) / 2, 1.5rem));
  padding: 0 max((100vw - 1180px) / 2, 1.5rem);
}
.helped-track {
  display: flex; gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
  scrollbar-width: none;
}
.helped-track::-webkit-scrollbar { display: none; }

.helped-card {
  flex-shrink: 0;
  scroll-snap-align: start;
  width: 360px;
  background: var(--paper-mid);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex; flex-direction: column;
  transition: transform .2s;
}
.helped-card:hover { transform: translateY(-2px); }
.helped-card .head {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem;
}
.helped-card .head .logo {
  width: 64px; height: 64px; flex-shrink: 0;
  border-radius: 16px; overflow: hidden;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
}
.helped-card .head .logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.helped-card .org { font-family: 'Fraunces', serif; font-weight: 600; color: var(--ink); font-size: 1.05rem; line-height: 1.25; }
.helped-card .date { font-size: .75rem; color: var(--muted); margin-top: .15rem; text-transform: uppercase; letter-spacing: 0.05em; }

.helped-card .amount {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 2.5rem; color: var(--coral);
  line-height: 1; margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.helped-card .desc {
  font-size: .92rem; line-height: 1.55;
  color: var(--ink-soft);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.helped-card .desc a { color: var(--ink); border-bottom: 1px solid var(--coral); }
.helped-card .desc a:hover { color: var(--coral); text-decoration: none; }
.helped-card .confirm {
  margin-top: 1.25rem; padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: .85rem; font-weight: 600;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: .4rem;
}
.helped-card .confirm:hover { color: var(--coral); text-decoration: none; }

/* slider dot indicator */
.helped-dots {
  display: flex; gap: .35rem; justify-content: center;
  margin-top: 1.5rem;
}
.helped-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--line);
  transition: all .2s;
}
.helped-dots span.active { background: var(--ink); width: 24px; border-radius: 3px; }

@media (max-width: 640px) {
  .helped-card { width: 85vw; max-width: 320px; }
  .helped-head { flex-direction: column; align-items: flex-start; }
}

/* ---------- Djerba teaser ---------- */
.djerba {
  background: var(--ink); color: var(--paper);
  border-radius: 24px;
  padding: 3rem;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem;
  align-items: center;
  margin: 2rem 0;
  overflow: hidden;
}
.djerba-text .eyebrow {
  font-size: .8rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gold); font-weight: 600; margin-bottom: 1rem;
}
.djerba-text h3 {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(1.65rem, 3vw, 2.25rem); line-height: 1.1;
  color: var(--paper); margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.djerba-text p {
  color: rgba(250,247,242,0.75);
  margin-bottom: 1.5rem; font-size: 1rem;
}
.djerba-img {
  border-radius: 16px; overflow: hidden;
  aspect-ratio: 4/3;
}
.djerba-img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) {
  .djerba { grid-template-columns: 1fr; padding: 2rem; gap: 2rem; }
}

/* ---------- Djerba closing gallery ---------- */
.dzerba-gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem;
  margin: 2rem 0 2.5rem;
}
.dzerba-gallery figure { margin: 0; }
.dzerba-gallery figure:first-child { grid-column: span 2; grid-row: span 2; }
.dzerba-gallery img {
  width: 100%; height: 100%; object-fit: cover;
  aspect-ratio: 1/1;
  border-radius: 12px;
  transition: transform .2s;
}
.dzerba-gallery figure:first-child img { aspect-ratio: 1/1; }
.dzerba-gallery img:hover { transform: scale(1.02); }
@media (max-width: 640px) {
  .dzerba-gallery { grid-template-columns: repeat(2, 1fr); }
  .dzerba-gallery figure:first-child { grid-column: span 2; grid-row: auto; }
}

/* ---------- Mission complete banner (landing) ---------- */
.mission {
  background: var(--paper-mid);
  padding: 4rem 0;
}
.mission-card {
  background: var(--paper);
  border: 1.5px solid var(--coral);
  border-radius: 24px;
  padding: 2.5rem;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem;
  align-items: center;
  position: relative;
}
.mission-card .badge {
  position: absolute; top: -12px; left: 2.5rem;
  background: var(--coral); color: #fff;
  padding: .35rem .85rem; border-radius: 999px;
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.mission-card h3 {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(1.6rem, 3.2vw, 2.25rem); line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 1rem;
}
.mission-card p { color: var(--ink-soft); margin-bottom: 1rem; }
.mission-card .meta {
  display: flex; gap: 1.5rem; margin: 1.25rem 0 1.5rem;
  flex-wrap: wrap;
}
.mission-card .meta .stat .num {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 1.5rem; color: var(--coral); line-height: 1;
  display: block; margin-bottom: .1rem;
}
.mission-card .meta .stat .lbl {
  font-size: .75rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted);
}
.mission-card .photo {
  border-radius: 16px; overflow: hidden;
  aspect-ratio: 1/1;
}
.mission-card .photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 800px) {
  .mission-card { grid-template-columns: 1fr; padding: 2rem; gap: 1.5rem; }
  .mission-card .badge { left: 2rem; }
}

/* ---------- Page (narrow) ---------- */
.page {
  padding: 3rem 0 6rem;
}
.page h1 {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.05; letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 2rem;
}
.page h2 {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: 1.5rem; color: var(--ink);
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}
.page p { margin-bottom: 1.15rem; font-size: 1.05rem; line-height: 1.7; color: var(--ink-soft); }
.page p strong { color: var(--ink); font-weight: 600; }
.page-hero {
  border-radius: 20px; overflow: hidden;
  margin-bottom: 2rem;
}
.page-cta { text-align: center; margin-top: 3rem; }

/* ---------- Form ---------- */
.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem 0;
}
.form-card label {
  display: block; font-weight: 600; color: var(--ink);
  margin-bottom: .5rem; font-size: .95rem;
}
.form-card input[type=email],
.form-card input[type=text] {
  width: 100%;
  padding: .9rem 1.1rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: inherit; background: var(--paper);
  transition: border-color .15s;
}
.form-card input:focus { outline: 0; border-color: var(--coral); }
.form-card .honey { position: absolute; left: -9999px; }
.form-card .submit-row { margin-top: 1.25rem; }
.form-card .error {
  color: #c53030; font-size: .9rem; margin-top: .65rem; font-weight: 600;
}

.identifier-result {
  background: var(--paper); border: 1.5px solid var(--coral);
  border-radius: 20px; padding: 2.5rem 2rem;
  text-align: center; margin: 2rem 0;
}
.identifier-result .label {
  font-size: .85rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted);
  margin-bottom: 1rem;
}
.identifier-result .code {
  display: inline-block;
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700; letter-spacing: 0.1em;
  color: var(--ink);
  padding: 1.25rem 2rem;
  background: var(--paper-mid);
  border-radius: 14px;
  border: 1.5px dashed var(--coral);
}
.identifier-result .hint {
  margin-top: 1.5rem; font-size: .95rem; color: var(--ink-soft);
  max-width: 28rem; margin-left: auto; margin-right: auto;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(250,247,242,0.7);
  padding: 4rem 0 0;
  margin-top: 4rem;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem;
  padding-bottom: 3rem;
}
.footer-about .brand { color: var(--paper); margin-bottom: 1rem; }
.footer-about p { font-size: .95rem; line-height: 1.6; max-width: 24rem; }
.footer-col h4 {
  color: var(--paper); font-family: 'Fraunces', serif; font-weight: 500;
  font-size: 1rem; margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .5rem; }
.footer-col ul a { color: rgba(250,247,242,0.7); font-size: .92rem; }
.footer-col ul a:hover { color: var(--paper); text-decoration: none; }
.footer-contact .row { display: flex; align-items: center; gap: .65rem; margin-bottom: .5rem; font-size: .92rem; }
.footer-contact .row svg { width: 16px; height: 16px; color: var(--coral); flex-shrink: 0; }
.footer-contact a { color: rgba(250,247,242,0.7); }
.footer-contact a:hover { color: var(--paper); text-decoration: none; }
.footer-credit {
  padding: 1.25rem 0;
  text-align: center; font-size: .8rem;
  color: rgba(250,247,242,0.4);
  border-top: 1px solid rgba(250,247,242,0.08);
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Admin (reused styles, slightly adapted) ---------- */
.admin-page { background: var(--paper); min-height: 100vh; padding: 2rem 0; }
.admin-page .wrap { max-width: 960px; }
.admin-page h1 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.85rem; margin-bottom: 1.5rem; color: var(--ink); letter-spacing: -0.015em; }
.admin-tabs { display: flex; gap: 0; border-bottom: 1.5px solid var(--line); margin-bottom: 2rem; }
.admin-tabs a {
  padding: .85rem 1.5rem; color: var(--muted); font-weight: 600; font-size: .95rem;
  border-bottom: 2px solid transparent; margin-bottom: -1.5px;
}
.admin-tabs a.active { color: var(--ink); border-bottom-color: var(--coral); }
.admin-tabs a:hover { color: var(--ink); text-decoration: none; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.kpi { background: var(--paper-mid); border-radius: 14px; padding: 1.25rem; }
.kpi .num { font-family: 'Fraunces', serif; font-size: 1.85rem; font-weight: 600; color: var(--ink); line-height: 1; margin-bottom: .35rem; }
.kpi .lbl { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.panel { background: var(--paper-mid); border-radius: 14px; padding: 1.5rem; margin-bottom: 1.5rem; }
.panel h2 { font-family: 'Fraunces', serif; font-size: 1.1rem; margin-bottom: 1rem; color: var(--ink); font-weight: 600; }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 1rem; }
.chart .bar { flex: 1; background: var(--coral); border-radius: 3px 3px 0 0; position: relative; min-width: 4px; }
.chart .bar:hover { background: var(--coral-dark); }
.chart .bar:hover::after {
  content: attr(data-label); position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%); background: var(--ink); color: var(--paper);
  padding: .25rem .5rem; border-radius: 4px; font-size: .75rem; white-space: nowrap;
}
.range-picker { display: flex; gap: .25rem; margin-bottom: 1rem; flex-wrap: wrap; }
.range-picker a {
  padding: .4rem .85rem; border-radius: 8px; font-size: .85rem; font-weight: 500;
  background: var(--paper-mid); color: var(--ink-soft);
}
.range-picker a.active { background: var(--ink); color: var(--paper); }
.range-picker a:hover { text-decoration: none; color: var(--ink); }
.range-picker a.active:hover { color: var(--paper); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 800px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}
.device-bar { display: flex; height: 28px; border-radius: 6px; overflow: hidden; margin: .75rem 0 .25rem; }
.device-bar > div { display: flex; align-items: center; padding: 0 .65rem; color: #fff; font-size: .75rem; font-weight: 600; }
.device-bar .d-desktop { background: var(--ink); }
.device-bar .d-mobile  { background: var(--coral); }
.device-bar .d-tablet  { background: var(--gold); color: var(--ink); }
.ref-list { list-style: none; }
.ref-list li { display: flex; justify-content: space-between; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.ref-list li:last-child { border-bottom: 0; }
.ref-list .host { color: var(--ink); font-weight: 500; }
.ref-list .count { color: var(--muted); font-variant-numeric: tabular-nums; }
.admin-search { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.admin-search input {
  flex: 1; padding: .75rem 1rem;
  border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; background: var(--paper);
}
.admin-search input:focus { outline: 0; border-color: var(--coral); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 12px; overflow: hidden; }
.admin-table th, .admin-table td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
.admin-table th { background: var(--paper-mid); font-size: .8rem; text-transform: uppercase; color: var(--muted); letter-spacing: 0.03em; font-weight: 600; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .code { font-family: 'JetBrains Mono', Consolas, monospace; font-weight: 600; color: var(--coral); }
.admin-empty { padding: 2rem; text-align: center; color: var(--muted); font-style: italic; }
