:root {
  --ink: #1b1410;
  --gold-top: #ffe26a;
  --gold-mid: #f7b733;
  --gold-bot: #d97706;
  --wood-light: #b96e35;
  --wood-mid: #965224;
  --wood-dark: #6f3916;
  --frame-light: #d1d5db;
  --frame-mid: #9ca3af;
  --frame-dark: #4b5563;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Pixelify Sans", system-ui, -apple-system, sans-serif;
  color: #ffffff;
  background: #1c4e6c;
  -webkit-font-smoothing: antialiased;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  background: url("assets/bg-coast.jpg") center / cover no-repeat;
  filter: blur(16px) saturate(1.1) brightness(0.78);
  transform: scale(1.08);
  z-index: 0;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.card {
  position: relative;
  width: 100%;
  max-width: 440px;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #5ec4e8 0%, #99dff2 34%, #f8cfa2 58%, #f6ba86 100%);
}

@media (min-width: 520px) {
  .stage {
    padding: 24px 16px;
  }

  .card {
    min-height: min(860px, calc(100dvh - 48px));
    border: 4px solid var(--ink);
    box-shadow:
      0 20px 50px rgba(0, 0, 0, 0.45),
      inset 0 0 0 3px rgba(255, 255, 255, 0.25);
  }
}

.card-bg {
  position: absolute;
  inset: 0;
  background: url("assets/bg-coast.jpg") center bottom / cover no-repeat;
  image-rendering: pixelated;
  z-index: 0;
}

.card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(66, 178, 224, 0.12) 0%,
    rgba(255, 215, 170, 0.14) 48%,
    rgba(0, 0, 0, 0.04) 75%,
    rgba(0, 0, 0, 0.1) 100%
  );
  z-index: 1;
}

.content {
  position: relative;
  z-index: 2;
  padding: 36px 22px 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
}

.emblem-wrap {
  width: 134px;
  height: 134px;
  border-radius: 50%;
  padding: 4px;
  background: var(--ink);
  box-shadow:
    0 6px 0 rgba(27, 20, 16, 0.35),
    0 0 0 3px rgba(255, 255, 255, 0.35);
  margin-bottom: 16px;
}

.emblem {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
}

.title {
  margin: 0;
  font-size: clamp(2rem, 8.6vw, 2.55rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.05;
  color: var(--gold-top);
  text-shadow:
    -2px -2px 0 var(--ink),
     2px -2px 0 var(--ink),
    -2px  2px 0 var(--ink),
     2px  2px 0 var(--ink),
     0px  4px 0 var(--ink);
}

.subtitle {
  margin: 6px 0 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow:
    -1.5px -1.5px 0 var(--ink),
     1.5px -1.5px 0 var(--ink),
    -1.5px  1.5px 0 var(--ink),
     1.5px  1.5px 0 var(--ink),
     0px    2.5px 0 var(--ink);
}

.handle {
  margin: 10px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fffbeb;
  text-shadow:
    -1.5px -1.5px 0 var(--ink),
     1.5px -1.5px 0 var(--ink),
    -1.5px  1.5px 0 var(--ink),
     1.5px  1.5px 0 var(--ink);
}

.links {
  width: 100%;
  max-width: 348px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wood-btn {
  position: relative;
  display: block;
  text-decoration: none;
  color: #ffffff;
  background: var(--frame-mid);
  border: 3px solid var(--ink);
  padding: 5px;
  box-shadow:
    inset 2px 2px 0 var(--frame-light),
    inset -2px -2px 0 var(--frame-dark),
    0 5px 0 var(--ink);
  transition: transform 90ms ease, box-shadow 90ms ease, filter 120ms ease;
}

.wood-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    inset 2px 2px 0 var(--frame-light),
    inset -2px -2px 0 var(--frame-dark),
    0 6px 0 var(--ink);
}

.wood-btn:active {
  transform: translateY(3px);
  box-shadow:
    inset 2px 2px 0 var(--frame-light),
    inset -2px -2px 0 var(--frame-dark),
    0 2px 0 var(--ink);
}

.wood-inner {
  display: grid;
  grid-template-columns: 34px 1fr 18px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.06) 0px,
      rgba(255, 255, 255, 0.06) 3px,
      rgba(0, 0, 0, 0.08) 3px,
      rgba(0, 0, 0, 0.08) 6px
    ),
    linear-gradient(180deg, var(--wood-light) 0%, var(--wood-mid) 55%, var(--wood-dark) 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 224, 178, 0.35),
    inset 0 -3px 0 rgba(45, 20, 6, 0.45);
}

.rivet {
  position: absolute;
  width: 5px;
  height: 5px;
  background: #374151;
  border: 1px solid var(--ink);
  z-index: 3;
}
.rivet.tl { top: 2px; left: 2px; }
.rivet.tr { top: 2px; right: 2px; }
.rivet.bl { bottom: 2px; left: 2px; }
.rivet.br { bottom: 2px; right: 2px; }

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-label {
  font-size: 1.24rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-shadow:
    -1.5px -1.5px 0 var(--ink),
     1.5px -1.5px 0 var(--ink),
    -1.5px  1.5px 0 var(--ink),
     1.5px  1.5px 0 var(--ink),
     0px    2px 0 var(--ink);
}

.wood-btn--multiline .btn-label {
  font-size: 0.96rem;
  line-height: 1.15;
}

.btn-arrow {
  font-size: 0.95rem;
  color: #ffffff;
  text-shadow:
    -1px -1px 0 var(--ink),
     1px -1px 0 var(--ink),
    -1px  1px 0 var(--ink),
     1px  1px 0 var(--ink);
}

.socials {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 18px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  text-shadow:
    -1.2px -1.2px 0 var(--ink),
     1.2px -1.2px 0 var(--ink),
    -1.2px  1.2px 0 var(--ink),
     1.2px  1.2px 0 var(--ink);
  transition: transform 90ms ease, color 120ms ease;
}

.social-link:hover {
  color: var(--gold-top);
  transform: translateY(-1px);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: #fef3c7;
  border: 2px solid var(--gold-mid);
  padding: 10px 16px;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 20;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
