/* =============================================================
   Hugo Forest · Baby Shower
   ============================================================= */

:root {
  --forest: #2b3a22;
  --forest-soft: #3a4d2e;
  --sage: #a6bf95;
  --sage-soft: #c2d4b3;
  --paper: #d7e4b2; /* #e4d7b2;*/
  --paper-deep: #e8daa8;
  --paper-cream: #faf2d6;
  --moss: #5a7048;
  --ink: #1d2618;

  --font-display: "Unkempt", "Comic Sans MS", cursive;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* type scale — small sizes static, heading sizes fluid via clamp() */
  --fs-xs:    11px;                          /* map attribution */
  --fs-sm:    15px;                          /* small notes */
  --fs-md:    17px;                          /* body */
  --fs-lg:    clamp(18px, 2.4vw, 21px);      /* address body, secondary text */
  --fs-xl:    clamp(20px, 3vw,   24px);      /* button labels, footer sign, hero welcome */
  --fs-2xl:   clamp(22px, 3.5vw, 28px);      /* address venue, time */
  --fs-3xl:   clamp(28px, 6vw,   38px);      /* date */
  --fs-display: clamp(60px, 13vw, 104px);    /* hero name */

  /* shape */
  --radius-lg: 22px;
  --radius-md: 14px;

  --shadow-card: 0 2px 0 rgba(43, 58, 34, 0.06),
    0 18px 40px -24px rgba(43, 58, 34, 0.35);

  --max-width: 720px;
}

/* ---- reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--moss);
  text-decoration: none;
  border-bottom: 1px solid rgba(90, 112, 72, 0.35);
  transition: color 160ms ease, border-color 160ms ease;
}

a:hover,
a:focus-visible {
  color: var(--forest);
  border-bottom-color: var(--forest);
}

a:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- page shell ---- */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* faint paper grain via stacked radial gradients */
.paper-texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(107, 79, 42, 0.05) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(107, 79, 42, 0.04) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 80%, rgba(43, 58, 34, 0.04) 0 1px, transparent 2px);
  background-size: 220px 220px, 280px 280px, 340px 340px;
  opacity: 0.9;
  mix-blend-mode: multiply;
}

.page {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ---- hero ---- */
.hero {
  position: relative;
  text-align: center;
  padding: 56px 12px 40px;
  margin-top: 0;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1;
}

.hero__welcome {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-xl);
  color: var(--moss);
  letter-spacing: 0.02em;
}

.hero__name {
  font-weight: 700;
  font-size: var(--fs-display);
  color: var(--forest);
  line-height: 1;
}

/* ---- cards ---- */
.card {
  position: relative;
  background: var(--paper-cream);
  border: 1px solid rgba(166, 191, 149, 0.6);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
}

.card--details {
  text-align: center;
}

.details__date {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-3xl);
  color: var(--forest);
  margin: 0 0 6px;
  line-height: 1.15;
}

.details__time {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-2xl);
  color: var(--forest);
  margin: 0;
  line-height: 1.15;
}

/* location card */
.location__address {
  font-style: normal;
  text-align: center;
  margin: 0 0 20px;
  color: var(--forest);
  font-size: var(--fs-lg);
  line-height: 1.5;
}

.location__address strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-2xl);
  color: var(--forest);
  display: inline-block;
  margin-bottom: 6px;
  line-height: 1.2;
}

.map {
  width: 100%;
  height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--sage);
  background: var(--sage-soft);
}

.location__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-top: 16px;
}

.location__directions {
  font-weight: 700;
  border-bottom: none;
  color: var(--forest);
  text-align: center;
}

.location__directions:hover {
  color: var(--moss);
}

/* MapLibre overrides — softer attribution chip on our palette */
.maplibregl-ctrl-attrib {
  background: rgba(250, 242, 214, 0.85) !important;
  font-family: var(--font-body) !important;
  font-size: var(--fs-xs) !important;
}

.maplibregl-ctrl-attrib a {
  color: var(--moss) !important;
  border-bottom: none;
}

/* ---- CTAs ---- */
.ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 4px;
}

@media (max-width: 480px) {
  .ctas {
    grid-template-columns: 1fr;
  }
}

.btn {
  --btn-bg: var(--forest);
  --btn-fg: var(--paper-cream);
  --btn-border: var(--forest);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 22px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 2px solid var(--btn-border);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-2xl);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease,
    color 160ms ease;
  box-shadow: 0 4px 0 rgba(43, 58, 34, 0.18);
  text-decoration: none;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(43, 58, 34, 0.22);
  color: var(--btn-fg);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 0 rgba(43, 58, 34, 0.18);
}

.btn--primary {
  --btn-bg: var(--forest);
  --btn-fg: var(--paper-cream);
  --btn-border: var(--forest);
}

.btn--secondary {
  --btn-bg: var(--paper-deep);
  --btn-fg: var(--forest);
  --btn-border: var(--forest);
}

/* ---- footer ---- */
.footer {
  margin-top: 24px;
  text-align: center;
  color: var(--moss);
}

.footer__scene {
  width: 100%;
  height: 64px;
  color: var(--forest);
  opacity: 0.85;
  margin-bottom: 6px;
}

.footer__sign {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-xl);
  margin: 0;
  color: var(--forest-soft);
  letter-spacing: 0.01em;
}

/* ---- responsive tweaks ---- */
@media (max-width: 520px) {
  .page {
    padding: 0 14px 48px;
    gap: 22px;
  }

  .hero {
    padding: 48px 6px 32px;
  }

  .card {
    padding: 28px 20px;
  }

  .map {
    height: 260px;
  }
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .btn:hover,
  .btn:focus-visible {
    transform: none;
  }
}
