/* ==========================================================================
   LAYOUT — scenen bakom glaset, header, meny, hero, textband och sidfot.
   ========================================================================== */

/* ---- Scenen ----------------------------------------------------------------
   Två bildlager som tonar över i varandra (site.js byter bild när en sektion
   med data-stage kommer i bild). --hero-p går 0 → 1 medan hero-delen scrollas
   bort: bilden är klar och tydlig överst och tonas sedan ned bakom innehållet. */
.stage { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); pointer-events: none; }
.stage__layer {
  position: absolute; inset: -4%;
  background: center / cover no-repeat;
  opacity: 0;
  transform: scale(1.06) translate3d(0, calc(var(--hero-p, 0) * -2%), 0);
  transition: opacity 1.4s var(--ease-in-out), transform 2.4s var(--ease-out);
  filter: saturate(1.05);
}
.stage__layer.is-active { opacity: 1; transform: scale(1) translate3d(0, calc(var(--hero-p, 0) * -2%), 0); }
.stage__shade { position: absolute; inset: 0; background: var(--shade); }
.stage__veil {
  position: absolute; inset: 0;
  background: var(--veil);
  opacity: calc(.18 + var(--hero-p, 0) * .82);
  -webkit-backdrop-filter: blur(calc(var(--hero-p, 0) * 6px));
  backdrop-filter: blur(calc(var(--hero-p, 0) * 6px));
  transition: background-color var(--dur) ease;
}
.page-home .stage__veil, .page-message .stage__veil { opacity: calc(var(--hero-p, 0) * .9); }
/* Mjuka guldljus som driver långsamt bakom glaset */
.stage__orbs i {
  position: absolute; border-radius: 50%; filter: blur(70px); will-change: transform;
}
.stage__orbs i:nth-child(1) { width: 46vmax; height: 46vmax; left: -12vmax; top: 30%; background: var(--orb-1); animation: orb-a 26s ease-in-out infinite alternate; }
.stage__orbs i:nth-child(2) { width: 34vmax; height: 34vmax; right: -8vmax; top: -6vmax; background: var(--orb-2); animation: orb-b 32s ease-in-out infinite alternate; }
.stage__orbs i:nth-child(3) { width: 30vmax; height: 30vmax; right: 12%; bottom: -14vmax; background: var(--orb-3); animation: orb-c 22s ease-in-out infinite alternate; }
.stage__orbs { opacity: calc(.35 + var(--hero-p, 0) * .65); }
@keyframes orb-a { to { transform: translate3d(18vw, -12vh, 0) scale(1.15); } }
@keyframes orb-b { to { transform: translate3d(-14vw, 18vh, 0) scale(.9); } }
@keyframes orb-c { to { transform: translate3d(-20vw, -10vh, 0) scale(1.2); } }
/* Filmkorn — ger glaset något att bryta */
.stage__grain {
  position: absolute; inset: -50%;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] .stage__grain { opacity: .05; }

/* ---- Framstegslinjen ----------------------------------------------------- */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--gradient); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); box-shadow: 0 0 12px var(--accent); }

/* ---- Meddelanderaden ----------------------------------------------------- */
.announce { position: relative; z-index: 41; padding: .7rem var(--gutter) 0; display: flex; justify-content: center; }
.announce__inner {
  display: inline-flex; align-items: center; gap: .7em;
  max-width: 100%;
  padding: .55em 1.1em;
  border-radius: 999px;
  background: rgb(0 0 0 / .35);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
  color: #f6f2e9; font-size: .82rem; font-weight: 500; letter-spacing: .02em; text-decoration: none;
  transition: box-shadow var(--dur);
}
.announce__inner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announce__inner:hover { box-shadow: inset 0 0 0 1px var(--accent), 0 0 30px -8px var(--accent); }
.announce__star { width: 14px; height: 14px; flex: none; }
.announce .icon { width: 1em; height: 1em; color: var(--accent); }

/* ---- Header: en svävande glaspill --------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 40; padding: .8rem var(--gutter) 0; pointer-events: none; transition: padding var(--dur) var(--ease-out); }
.site-header__inner {
  pointer-events: auto;
  max-width: var(--container); margin-inline: auto;
  display: flex; align-items: center; gap: 1rem;
  min-height: 64px; padding: .5rem .55rem .5rem 1.1rem;
  border-radius: 999px;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  box-shadow: inset 0 0 0 1px var(--glass-border), inset 0 1px 0 var(--glass-hi), 0 20px 40px -24px rgb(0 0 0 / .6);
  transition: min-height var(--dur) var(--ease-out), background-color var(--dur), box-shadow var(--dur);
}
.site-header.is-scrolled { padding-top: .5rem; }
.site-header.is-scrolled .site-header__inner { min-height: 56px; }
/* Över toppbilden (innan man scrollat) är texten alltid ljus */
.site-header:not(.is-scrolled) .site-header__inner { background: rgb(10 10 10 / .28); color: #f6f2e9; }
.site-header:not(.is-scrolled) .theme-toggle, .site-header:not(.is-scrolled) .lang-switch a { color: #f6f2e9; }

.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: inherit; flex: none; }
.logo-mark { height: 38px; width: auto; filter: drop-shadow(0 2px 8px rgb(0 0 0 / .35)); transition: transform var(--dur) var(--ease-out); }
.brand:hover .logo-mark { transform: rotate(-4deg) scale(1.05); }
.logo-text { display: grid; line-height: 1; }
.logo-text b { font: 600 1rem/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; }
.logo-text small { font: 600 .56rem/1 var(--font-body); letter-spacing: .5em; text-transform: uppercase; color: var(--accent-text); margin-top: .35em; }
.site-header:not(.is-scrolled) .logo-text small { color: var(--accent-hi); }
.logo-img { height: 40px; width: auto; }
.logo-img--light { display: none; }
:root[data-theme="light"] .logo-img--dark { display: none; }
:root[data-theme="light"] .logo-img--light { display: block; }

.nav { margin-inline: auto; }
.nav ul { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  position: relative; display: block;
  padding: .6em .95em; border-radius: 999px;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  color: inherit; opacity: .82;
  transition: opacity var(--dur-fast), background-color var(--dur-fast);
}
.nav a:hover { opacity: 1; background: rgb(255 255 255 / .08); }
.nav a[aria-current="page"] { opacity: 1; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: .2em; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); transform: translateX(-50%); box-shadow: 0 0 8px var(--accent); }

.site-header__cta { display: flex; align-items: center; gap: .45rem; margin-left: auto; }
.lang-switch { display: flex; padding: 3px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--glass-border); }
.lang-switch a { padding: .35em .6em; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-decoration: none; color: var(--text-muted); }
.lang-switch a[aria-current="true"] { background: var(--accent); color: var(--on-accent) !important; }
.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: transparent; box-shadow: inset 0 0 0 1px var(--glass-border); color: var(--text);
  transition: box-shadow var(--dur-fast), transform var(--dur) var(--ease-out);
}
.theme-toggle:hover { box-shadow: inset 0 0 0 1px var(--accent); transform: rotate(20deg); }
.theme-toggle .icon { width: 18px; height: 18px; grid-area: 1 / 1; transition: opacity var(--dur), transform var(--dur) var(--ease-out); }
.theme-toggle__sun { opacity: 0; transform: scale(.5) rotate(-90deg); }
:root[data-theme="light"] .theme-toggle__sun { opacity: 1; transform: none; }
:root[data-theme="light"] .theme-toggle__moon { opacity: 0; transform: scale(.5) rotate(90deg); }

.menu-toggle { display: none; width: 46px; height: 46px; border: 0; border-radius: 50%; cursor: pointer; background: var(--gradient); color: var(--on-accent); place-items: center; box-shadow: inset 0 1px 0 rgb(255 255 255 / .5); }
.menu-toggle__bars { display: grid; gap: 6px; width: 18px; }
.menu-toggle__bars i { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform var(--dur) var(--ease-out); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---- Mobilmeny: helskärm i glas ----------------------------------------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 35;
  display: flex; flex-direction: column;
  padding: calc(var(--header-h) + 2rem) var(--gutter) max(2rem, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%);
  overflow-y: auto;
  animation: menu-in .5s var(--ease-out);
}
.mobile-menu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; } }
.mobile-menu__mark { position: absolute; right: -8vw; bottom: 8vh; width: 70vw; max-width: 420px; opacity: .07; pointer-events: none; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li { opacity: 0; transform: translateY(18px); animation: menu-item .7s var(--ease-out) forwards; animation-delay: calc(.05s + var(--i) * .05s); }
@keyframes menu-item { to { opacity: 1; transform: none; } }
.mobile-menu a:not(.btn) {
  display: flex; align-items: baseline; gap: 1rem;
  padding: .5rem 0;
  font: 600 clamp(1.7rem, 8vw, 2.6rem)/1.15 var(--font-display); letter-spacing: .04em;
  color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a[aria-current="page"] { color: var(--accent-text); }
.mobile-menu__num { font: 600 .72rem/1 var(--font-body); letter-spacing: .2em; color: var(--accent-text); }
.mobile-menu__foot { margin-top: auto; padding-top: 2rem; display: grid; gap: 1rem; }
.mobile-menu .mobile-menu__phone { display: inline-flex; align-items: center; gap: .6em; justify-content: center; font: 500 1rem/1 var(--font-body); border: 0; color: var(--text-muted); }

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex; align-items: center;
  min-height: min(78svh, 760px);
  padding-block: calc(var(--header-h) * .6) var(--section-y);
  color: #f6f2e9;
}
.hero--home { min-height: calc(100svh - var(--header-h)); padding-bottom: 6rem; }
.hero__content { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero--page .hero__content { grid-template-columns: minmax(0, 1fr); }
.hero__text { max-width: 860px; }
.hero__title { font-size: var(--fs-hero); line-height: 1.02; letter-spacing: .01em; margin-bottom: .45em; text-shadow: 0 4px 40px rgb(0 0 0 / .35); }
.hero--page .hero__title { font-size: var(--fs-h1); }
.hero__line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__line > span { display: inline-block; }
.hero__line.text-gold > span { background: inherit; -webkit-background-clip: text; background-clip: text; }
.hero__eyebrow { color: var(--accent-hi); }
.hero__lead { color: rgb(246 242 233 / .86); text-shadow: 0 1px 14px rgb(0 0 0 / .55); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero .btn--glass { color: #f6f2e9; background: rgb(255 255 255 / .08); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22), inset 0 1px 0 rgb(255 255 255 / .25); }

/* Glaskortet på startsidan: loggan och nästa event */
.hero__card {
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border-radius: var(--radius-lg);
  display: grid; gap: 1.6rem; justify-items: center;
  background: linear-gradient(150deg, rgb(255 255 255 / .14), rgb(255 255 255 / .03) 50%, rgb(255 255 255 / .08));
  border-color: rgb(255 255 255 / .2);
  color: #f6f2e9;
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0));
  transition: transform .6s var(--ease-out);
}
.hero__card.is-tilting { transition: transform .12s linear; }
.hero__logo { width: min(68%, 290px); filter: drop-shadow(0 18px 40px rgb(0 0 0 / .5)); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }

.next-up {
  position: relative; width: 100%;
  display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; align-items: center;
  padding: 1.1rem 1.2rem; border-radius: var(--radius);
  background: rgb(0 0 0 / .32);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12);
  color: inherit; text-decoration: none;
  transition: box-shadow var(--dur), background-color var(--dur);
}
.next-up:hover { box-shadow: inset 0 0 0 1px var(--accent), 0 0 40px -12px var(--accent); background: rgb(0 0 0 / .42); }
.next-up__label { grid-column: 1; font: 600 .66rem/1 var(--font-body); letter-spacing: .3em; text-transform: uppercase; color: var(--accent-hi); }
.next-up__title { grid-column: 1; font: 600 1.15rem/1.2 var(--font-display); letter-spacing: .03em; }
.next-up__meta { grid-column: 1; display: flex; align-items: center; gap: .45em; font-size: .8rem; color: rgb(246 242 233 / .7); }
.next-up__meta .icon { width: 1em; height: 1em; }
.next-up__count { grid-column: 2; grid-row: 1 / span 3; display: grid; justify-items: center; text-align: center; padding-left: 1rem; border-left: 1px solid rgb(255 255 255 / .14); }
.next-up__count b { font: 600 2.4rem/1 var(--font-display); }
.next-up__count small { font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: rgb(246 242 233 / .7); }
.next-up__arrow { position: absolute; right: .8rem; top: .8rem; width: 1em; height: 1em; color: var(--accent); opacity: 0; transition: opacity var(--dur), transform var(--dur) var(--ease-out); }
.next-up:hover .next-up__arrow { opacity: 1; transform: translateX(3px); }

.hero__scroll {
  position: absolute; left: 50%; bottom: 1.4rem; transform: translateX(-50%);
  display: grid; justify-items: center; gap: .6rem;
  font: 600 .64rem/1 var(--font-body); letter-spacing: .32em; text-transform: uppercase; text-decoration: none; color: rgb(246 242 233 / .7);
  opacity: calc(1 - var(--hero-p, 0) * 4);
}
.hero__scroll-line { width: 1px; height: 46px; background: linear-gradient(rgb(255 255 255 / .1), rgb(255 255 255 / .1)); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent, var(--accent-hi)); animation: scroll-line 2.2s var(--ease-in-out) infinite; }
@keyframes scroll-line { from { transform: translateY(-100%); } to { transform: translateY(100%); } }

.hero--message { min-height: 80svh; }
.hero--message .hero__text { padding: clamp(1.6rem, 4vw, 3rem); color: var(--text); }
.hero--message .lead { color: var(--text-muted); }

/* ---- Textbandet ---------------------------------------------------------- */
.ticker { overflow: hidden; padding-block: clamp(1.6rem, 4vw, 3rem); border-block: 1px solid var(--line); margin-top: var(--section-y); }
.ticker__track { display: flex; align-items: center; gap: clamp(1.4rem, 3vw, 2.6rem); width: max-content; animation: ticker 48s linear infinite; }
.ticker span { font: 600 clamp(1.8rem, 4.5vw, 3.6rem)/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; color: var(--text); opacity: .9; }
.ticker .text-outline { opacity: .6; }
.ticker__star { width: clamp(16px, 2vw, 24px); height: auto; flex: none; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---- Sidfot -------------------------------------------------------------- */
.site-footer { padding: var(--section-y) 0 max(1.5rem, env(safe-area-inset-bottom)); }
.site-footer__card { padding: clamp(1.6rem, 4vw, 3.2rem); border-radius: var(--radius-lg); }
.site-footer__grid { display: grid; grid-template-columns: minmax(140px, .7fr) minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
.brand--footer .logo-img { height: auto; width: min(170px, 100%); }
.site-footer__lead { color: var(--text-muted); max-width: 42ch; }
.site-footer a { text-decoration: none; }
.site-footer a:not(.btn):not(.brand):hover { color: var(--accent-text); }
.site-footer .plain li { color: var(--text); }
.site-footer .link-arrow { margin-top: .6rem; }
.socials { display: flex; gap: .5rem; margin-top: 1.2rem; }
.socials a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--glass-border); transition: box-shadow var(--dur-fast), color var(--dur-fast); }
.socials a:hover { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent-text); }
.site-footer__area { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--text-muted); }
.site-footer__area span { font-weight: 600; letter-spacing: .2em; text-transform: uppercase; font-size: .7rem; color: var(--accent-text); margin-right: .6em; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem; margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--text-dim); }

/* ---- Producent (samma block i saac, hk och future) ---------------------------- */
.site-credit { margin: 1.1rem 0 0; text-align: center; font-size: .72rem; letter-spacing: .06em; color: var(--text-dim); }
.site-credit a { color: var(--text-muted); border-bottom: 1px solid transparent; transition: color .25s, border-color .25s; }
.site-credit a:hover, .site-credit a:focus-visible { color: var(--accent-text, var(--accent)); border-bottom-color: currentColor; }

/* ---- Ljuslåda ------------------------------------------------------------ */
.lightbox { padding: 0; border: 0; background: transparent; max-width: min(94vw, 1100px); max-height: 92svh; }
.lightbox::backdrop { background: rgb(0 0 0 / .8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lightbox img { max-height: 90svh; width: auto; margin: auto; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.lightbox__close { position: fixed; top: 1rem; right: 1rem; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .12); color: #fff; display: grid; place-items: center; cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* ---- Brytpunkter ----------------------------------------------------------- */
@media (max-width: 1180px) {
  .nav { display: none; }
  .menu-toggle { display: grid; }
  .site-header__inner { justify-content: space-between; }
}
@media (max-width: 900px) {
  .hero__content { grid-template-columns: minmax(0, 1fr); }
  .hero--home { min-height: auto; padding-top: 2rem; }
  .hero__card { max-width: 460px; width: 100%; justify-self: start; }
  .hero__logo { width: min(46%, 200px); }
  .hero__scroll { display: none; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__about { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 640px) {
  :root { --header-h: 72px; --glass-blur: 16px; }
  .site-header { padding-inline: .6rem; }
  .site-header__inner { padding-left: .8rem; min-height: 58px; }
  .header-cta { display: none; }
  .logo-mark { height: 32px; }
  .logo-text b { font-size: .88rem; }
  .theme-toggle { width: 38px; height: 38px; }
  .lang-switch a { padding: .3em .5em; }
  .hero__actions .btn { flex: 1 1 auto; }
  .hero__card { justify-self: stretch; max-width: none; gap: 1.1rem; }
  .hero__logo { width: 34%; }
  .hero--home .stage__shade, .page-home .stage__shade { background: linear-gradient(180deg, rgb(6 6 6 / .55), rgb(6 6 6 / .35) 40%, rgb(6 6 6 / .75)); }
  :root { --fs-h2: clamp(1.55rem, 7vw, 2rem); }
  .site-footer__grid { grid-template-columns: 1fr; }
  .brand--footer .logo-img { width: 130px; }
  .site-footer__bottom { flex-direction: column; }
}
@media (max-width: 380px) {
  .logo-text { display: none; }
}

/* ---- Ljust tema: guld som går att läsa på elfenben ----------------------- */
:root[data-theme="light"] { --gold-text: linear-gradient(100deg, var(--accent-lo) 0%, var(--accent) 30%, #6b4d14 55%, var(--accent) 80%, var(--accent-lo) 100%); }
/* …men toppbilden är alltid mörk, så där behålls det ljusa guldet */
:root[data-theme="light"] .hero, :root[data-theme="light"] .hero__card {
  --gold-text: linear-gradient(100deg, #d4ad5b 0%, #f6e3a8 22%, #dcb96a 42%, #c09447 62%, #f6e3a8 84%, #d4ad5b 100%);
  --accent-text: #e2c27a;
}
:root[data-theme] .hero .btn--glass { background: rgb(255 255 255 / .08); color: #f6f2e9; }
:root[data-theme="light"] .site-header.is-scrolled .logo-mark { filter: brightness(.62) saturate(1.3) drop-shadow(0 1px 0 rgb(255 255 255 / .6)); }
:root[data-theme="light"] .feature__num { -webkit-text-stroke-color: var(--accent-text); }
