@font-face {
  font-family: "Lilita One";
  src: url("/assets/fonts/LilitaOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --deep: #041627;
  --navy: #0a2036;
  --navy-soft: #10304e;
  --navy-card: #16385c;
  --blue: #1567cc;
  --sky: #74ceff;
  --gold: #ffc93c;
  --gold-deep: #e9a82f;
  --cream: #fdf3d8;
  --wood: #5c3a16;
  --wood-deep: #33200d;
  --ink: #2a1a0c;

  --display: "Lilita One", "Trebuchet MS", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shell: min(1120px, 100% - 2.5rem);
  --radius: 18px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  color: var(--cream);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1rem; }
img { max-width: 100%; height: auto; }

a { color: var(--gold); }
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 0.6rem 1rem;
  z-index: 20;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn--gold {
  color: var(--wood-deep);
  background: linear-gradient(180deg, #ffe07a 0%, var(--gold) 45%, var(--gold-deep) 100%);
  border-color: #fff3c4;
  box-shadow: 0 6px 0 #b97d15, 0 14px 26px rgba(0, 0, 0, 0.35);
}
.btn--gold:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn--gold:active { transform: translateY(3px); box-shadow: 0 3px 0 #b97d15, 0 8px 16px rgba(0, 0, 0, 0.3); }

.btn--beta {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(253, 243, 216, 0.4);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}
.btn--beta:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--cream);
}
.btn--beta:active { transform: translateY(1px); }

.btn--large { font-size: 1.25rem; padding: 0.95rem 2rem; }
.btn--small { font-size: 0.95rem; padding: 0.45rem 1.1rem; box-shadow: 0 4px 0 #b97d15; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem max(1.25rem, (100% - 1120px) / 2);
  background: rgba(4, 22, 39, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(116, 206, 255, 0.14);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--cream);
  text-decoration: none;
}
.topbar__brand img { border-radius: 9px; }

.topbar__nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
}
.topbar__nav a {
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.topbar__nav a:hover { color: var(--gold); }
.topbar__nav .btn { color: var(--wood-deep); }

@media (max-width: 480px) {
  .topbar__nav a:not(.btn) { display: none; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(6rem, 12vw, 9rem);
  background:
    radial-gradient(120% 90% at 50% -10%, #2d80d9 0%, rgba(45, 128, 217, 0) 60%),
    linear-gradient(180deg, var(--deep) 0%, #0d2c4c 45%, var(--blue) 100%);
  text-align: center;
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: var(--shell);
  margin: 0 auto;
}

.hero__logo {
  width: min(560px, 88%);
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
  animation: bob 6s ease-in-out infinite;
}

.hero__tagline {
  font-family: var(--display);
  font-size: clamp(1.7rem, 1.1rem + 2.6vw, 2.9rem);
  color: var(--gold);
  text-shadow: 0 3px 0 #7d4a06, 0 10px 24px rgba(0, 0, 0, 0.4);
  margin: 1.2rem 0 0.6rem;
}

.hero__lede {
  max-width: 34rem;
  margin: 0 auto 2rem;
  color: rgba(253, 243, 216, 0.92);
  font-size: 1.075rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.hero__note {
  margin: 1.4rem 0 0;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(253, 243, 216, 0.62);
}

/* drifting props */

.hero__drift {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.drift {
  position: absolute;
  width: clamp(58px, 7vw, 96px);
  opacity: 0.6;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
  animation: bob 9s ease-in-out infinite;
}
.drift--1 { top: 12%; left: 6%; animation-delay: -1s; }
.drift--2 { top: 58%; left: 12%; animation-delay: -4s; transform: rotate(-8deg); }
.drift--3 { top: 22%; right: 8%; animation-delay: -2.5s; }
.drift--4 { top: 62%; right: 13%; animation-delay: -6s; opacity: 0.5; }
.drift--5 { top: 84%; left: 21%; animation-delay: -3s; opacity: 0.38; }

@media (max-width: 860px) {
  .drift--2, .drift--4, .drift--5 { display: none; }
  .drift { opacity: 0.32; }
}

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}

/* waves at the foot of the hero */

/* Vågorna är en kaklad bakgrundsbild, inte ett brett element som skjuts i
   sidled — då finns det ingen ytterkant som kan glida in i bild. Animationen
   flyttar exakt en kakelbredd, så skarven aldrig syns. */
.waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 2;
  height: clamp(60px, 9vw, 110px);
  overflow: hidden;
}

.waves__layer {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath fill='%23fdf3d8' d='M0 60c120-40 240-40 360 0s240 40 360 0 240-40 360 0 240 40 360 0v60H0z'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 1440px 100%;
}

.waves__layer--back {
  opacity: 0.35;
  top: -12px;
  animation: drift 26s linear infinite;
}

.waves__layer--front {
  animation: drift 17s linear infinite reverse;
}

/* Hela background-position animeras, inte longhand background-position-x —
   den senare är inte animerbar i alla webbläsare. */
@keyframes drift {
  from { background-position: 0 0; }
  to { background-position: 1440px 0; }
}

/* ---------- sections ---------- */

.section {
  background: var(--cream);
  color: var(--ink);
  padding: clamp(3rem, 7vw, 5rem) 0;
  text-align: center;
}

.section__title {
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem);
  color: var(--wood);
  margin-bottom: 0.35rem;
}

.section__lede {
  width: var(--shell);
  max-width: 36rem;
  margin: 0 auto clamp(2rem, 4vw, 3rem);
  color: rgba(42, 26, 12, 0.75);
}

.steps {
  list-style: none;
  width: var(--shell);
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  counter-reset: step;
}

.step {
  position: relative;
  counter-increment: step;
  background: linear-gradient(180deg, #fffdf5 0%, #f6e6c2 100%);
  border: 2px solid rgba(92, 58, 22, 0.18);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem 1.25rem;
  box-shadow: 0 10px 24px rgba(51, 32, 13, 0.12);
}

.step::before {
  content: counter(step);
  position: absolute;
  top: -14px;
  left: 50%;
  translate: -50% 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  color: var(--wood-deep);
  background: linear-gradient(180deg, #ffe07a, var(--gold-deep));
  border: 2px solid #fff3c4;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(51, 32, 13, 0.25);
}

.step__art {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 112px;
  margin: 0.75rem 0 1rem;
}
.step__art img { width: 46px; height: auto; }
.step__art--stack { flex-direction: column; align-items: center; justify-content: flex-end; gap: 0; }
.step__art--stack img { width: 42px; margin-bottom: -7px; }
.step__single { width: auto !important; max-height: 108px; }

.step h3 { font-size: 1.35rem; color: var(--wood); }
.step p { margin: 0; font-size: 0.97rem; color: rgba(42, 26, 12, 0.8); }

/* dark card section */

.section--dark {
  background: linear-gradient(180deg, var(--navy) 0%, var(--deep) 100%);
  color: var(--cream);
}

.cards {
  width: var(--shell);
  margin: 0 auto;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  text-align: left;
}

.card {
  background: linear-gradient(180deg, var(--navy-card) 0%, var(--navy-soft) 100%);
  border: 1px solid rgba(116, 206, 255, 0.22);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}
.card h3 { font-size: 1.3rem; color: var(--gold); }
.card p { margin: 0; color: rgba(253, 243, 216, 0.86); }

/* ---------- play band ---------- */

.playband {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 4vw, 3rem);
  width: var(--shell);
  margin: clamp(2.5rem, 6vw, 4rem) auto;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  text-align: left;
  border-radius: 26px;
  border: 2px solid rgba(255, 201, 60, 0.35);
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.07) 0 2px, rgba(0, 0, 0, 0) 2px 14px),
    linear-gradient(180deg, #6b4419 0%, var(--wood) 55%, var(--wood-deep) 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.playband__crab {
  width: clamp(140px, 22vw, 220px);
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.4));
  animation: bob 5s ease-in-out infinite;
}

.playband__text { flex: 1 1 18rem; }
.playband__aside {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: rgba(253, 243, 216, 0.75);
}
.playband__aside a { color: var(--gold); }
.playband h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); color: var(--cream); }
.playband p { color: rgba(253, 243, 216, 0.85); }

/* ---------- footer ---------- */

.footer {
  background: var(--deep);
  border-top: 1px solid rgba(116, 206, 255, 0.14);
  padding: 2rem max(1.25rem, (100% - 1120px) / 2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-size: 0.92rem;
  color: rgba(253, 243, 216, 0.65);
}
.footer p { margin: 0; }
.footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer a { color: rgba(253, 243, 216, 0.8); text-decoration: none; }
.footer a:hover { color: var(--gold); }

/* ---------- legal pages ---------- */

.legal {
  width: var(--shell);
  max-width: 46rem;
  margin: clamp(2rem, 5vw, 3.5rem) auto clamp(3rem, 6vw, 4.5rem);
  background: var(--cream);
  color: var(--ink);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}
.legal h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.8rem); color: var(--wood); margin-bottom: 0.25rem; }
.legal h2 { font-size: 1.4rem; color: var(--wood); margin-top: 2rem; }
.legal a { color: #a9600c; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 0.4rem; }
.legal__updated {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(42, 26, 12, 0.6);
  margin-bottom: 2rem;
}
.legal__lede { font-size: 1.1rem; }

/* ---------- 404 ---------- */

.notfound {
  min-height: 60vh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: clamp(3rem, 8vw, 6rem) 1.25rem;
}
.notfound img { width: min(260px, 60vw); animation: bob 5s ease-in-out infinite; }
.notfound h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.2rem); color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
