:root {
  --bg: #101614;
  --ink: #f4f0e6;
  --muted: #b7b1a3;
  --gold: #c6a36a;
  --gold-soft: #e6d3ae;
  --line: rgba(244, 240, 230, 0.14);
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --pad: clamp(20px, 4vw, 56px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(820px 480px at 82% 28%, rgba(232, 196, 138, 0.14), transparent 62%),
    radial-gradient(680px 520px at 92% 78%, rgba(36, 110, 74, 0.28), transparent 64%),
    var(--bg);
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.5;
  color-scheme: dark;
}

::selection {
  background: var(--gold);
  color: #1c160f;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 22px var(--pad) 16px;
}

.top,
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.brand svg {
  display: block;
  width: 28px;
  height: 28px;
}

.domain,
.foot {
  color: var(--muted);
  font-size: 0.92rem;
}

.domain {
  margin: 0;
  letter-spacing: 0.04em;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 40px 0 8px;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.kicker span {
  display: block;
  width: 36px;
  height: 1px;
  background: var(--gold);
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.6rem, 12vw, 7.1rem);
  font-weight: 460;
  font-optical-sizing: auto;
  letter-spacing: -0.035em;
  line-height: 0.88;
}

h1 em {
  font-style: italic;
  font-weight: 460;
  color: var(--gold-soft);
}

.lede {
  max-width: 36ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.notify {
  margin-top: 28px;
  max-width: 460px;
}

.notify label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.row {
  display: flex;
  gap: 8px;
}

input,
button {
  font: inherit;
}

input {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 1.15rem;
  color: var(--ink);
  background: rgba(244, 240, 230, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
}

input::placeholder {
  color: var(--muted);
}

input:disabled {
  opacity: 1;
  cursor: not-allowed;
}

button {
  padding: 0.85rem 1.25rem;
  color: #1c160f;
  font-weight: 500;
  white-space: nowrap;
  background: var(--gold);
  border: 0;
  border-radius: 999px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.78;
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.course {
  margin: 18px 0 0;
}

.course svg {
  display: block;
  width: 100%;
  height: auto;
}

.flag {
  transform-box: fill-box;
  transform-origin: 0% 50%;
  animation: sway 3.8s ease-in-out infinite;
}

@keyframes sway {
  0%,
  100% {
    transform: scaleX(1) rotate(0deg);
  }
  50% {
    transform: scaleX(0.9) rotate(2.5deg);
  }
}

.foot {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

.foot p {
  margin: 0;
}

@media (max-width: 560px) {
  .row {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (min-width: 980px) {
  .wrap {
    padding-right: 0;
    padding-bottom: 20px;
  }

  .top,
  .foot {
    padding-right: var(--pad);
  }

  main {
    display: grid;
    grid-template-columns: minmax(320px, 38vw) minmax(460px, 1fr);
    align-items: end;
    gap: 2vw;
    padding-top: 24px;
    padding-bottom: 0;
  }

  .copy {
    padding-bottom: 28px;
  }

  .course {
    margin: 0;
    display: flex;
    align-items: flex-end;
  }

  .course svg {
    width: 100%;
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flag {
    animation: none;
  }
}

/* Cookie consent banner (GA) */
.consent {
  position: fixed;
  left: max(16px, env(safe-area-inset-left, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: grid;
  justify-items: center;
}
.consent[hidden] { display: none !important; }
.consent-inner {
  max-width: 640px;
  width: 100%;
  background: #162820;
  color: #f4f0e6;
  border: 1px solid rgba(198, 163, 106, 0.35);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  padding: 1rem 1.15rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.45;
}
.consent-inner p { margin: 0; color: rgba(244, 240, 230, 0.78); }
.consent-inner p strong { color: #f4f0e6; font-weight: 500; }
.consent-inner a { color: #c6a36a; }
.consent-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.consent-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  background: #c6a36a;
  color: #101614;
}
.consent-btn.ghost {
  background: transparent;
  color: #f4f0e6;
  border: 1px solid rgba(244, 240, 230, 0.28);
}
@media (max-width: 640px) {
  .consent-inner { grid-template-columns: 1fr; }
  .consent-actions { width: 100%; }
  .consent-btn { flex: 1; }
}
