/* ============================================
   MASH STUDIOS — cinematic one-pager
   Palett: #000000 / #FBECD6 (latte) / #F07D19 (carrot)
   Display: Wulkan Display · Labels/body: Inter Tight
   ============================================ */

@font-face {
  font-family: 'Wulkan Display';
  src: url('assets/fonts/Wulkan Display Light.otf') format('opentype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Wulkan Display';
  src: url('assets/fonts/Wulkan Display Light Italic.otf') format('opentype');
  font-weight: 300; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Wulkan Display';
  src: url('assets/fonts/Wulkan Display Medium.otf') format('opentype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Wulkan Display';
  src: url('assets/fonts/Wulkan Display Medium Italic.otf') format('opentype');
  font-weight: 500; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Wulkan Display';
  src: url('assets/fonts/Wulkan Display SemiBold.otf') format('opentype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Wulkan Display';
  src: url('assets/fonts/Wulkan Display SemiBold Italic.otf') format('opentype');
  font-weight: 600; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Wulkan Display';
  src: url('assets/fonts/Wulkan Display Black.otf') format('opentype');
  font-weight: 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Wulkan Display';
  src: url('assets/fonts/Wulkan Display Black Italic.otf') format('opentype');
  font-weight: 900; font-style: italic; font-display: swap;
}

:root {
  --black: #000000;
  --latte: #FBECD6;
  --latte-dim: rgba(251, 236, 214, 0.55);
  --latte-faint: rgba(251, 236, 214, 0.28);
  --carrot: #F07D19;
  --display: 'Wulkan Display', Georgia, serif;
  --label: 'Almarai', -apple-system, sans-serif;
}

/* Ordmärket: "Mash" med kursivt a, som i logotypen */
.wordmark { font-family: var(--display); font-weight: 600; }
.wordmark em { font-style: italic; font-weight: 600; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--black); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--black);
  color: var(--latte);
  font-family: var(--label);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--carrot); color: var(--black); }

:focus-visible {
  outline: 2px solid var(--carrot);
  outline-offset: 4px;
}

/* ---------- Fixed cinema layers ---------- */

#cine {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(ellipse 105% 80% at 50% 50%, transparent 45%, rgba(0,0,0,0.78) 100%);
}

.grain {
  position: fixed;
  inset: -100px;
  z-index: 4;
  pointer-events: none;
  opacity: 0.5;
  background-repeat: repeat;
}
@media (prefers-reduced-motion: no-preference) {
  .grain { animation: grain-jitter 0.9s steps(6) infinite; }
}
@keyframes grain-jitter {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-32px, 24px); }
  40%  { transform: translate(18px, -40px); }
  60%  { transform: translate(-44px, -12px); }
  80%  { transform: translate(30px, 34px); }
  100% { transform: translate(0, 0); }
}

.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 1px;
  z-index: 10;
  pointer-events: none;
}
.scroll-progress-fill {
  height: 100%;
  width: 100%;
  background: var(--latte);
  opacity: 0.65;
  transform-origin: left center;
  transform: scaleX(0);
}

/* ---------- Preloader ---------- */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.preloader-mark {
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: 0.01em;
  color: var(--latte);
}
.preloader-bar {
  width: min(240px, 50vw);
  height: 1px;
  background: var(--latte-faint);
}
.preloader-bar-fill {
  height: 100%;
  width: 100%;
  background: var(--latte);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.25s ease-out;
}
.preloader-label {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--latte-dim);
}

/* ---------- Shared text primitives ---------- */

.line {
  display: block;
  overflow: hidden;
}
.line-inner {
  display: block;
  transform: translateY(110%);
}

main { position: relative; z-index: 2; }

/* ---------- Intro ---------- */

.intro { height: 100svh; }

.intro-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.intro-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}
.intro-mash {
  font-size: clamp(5rem, 17vw, 15rem);
  line-height: 0.95;
  letter-spacing: 0.005em;
  color: var(--latte);
  opacity: 0;
}
.intro-studios {
  font-family: var(--label);
  font-weight: 400;
  font-size: clamp(0.75rem, 1.4vw, 1rem);
  letter-spacing: 0.5em;
  text-indent: 0.5em; /* kompenserar sista bokstavens spacing så ordet centreras optiskt */
  color: var(--latte-dim);
  opacity: 0;
}

.intro-tag {
  margin-top: 3.2rem;
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  color: var(--latte-dim);
}

.scroll-hint {
  position: absolute;
  bottom: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0;
}
.scroll-hint-label {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  color: var(--latte-dim);
}
.scroll-hint-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--latte-dim), transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-hint-line { animation: hint-drop 2.2s ease-in-out infinite; }
}
@keyframes hint-drop {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Akter ---------- */

.act { height: 420svh; position: relative; }

/* Akterna överlappar med en viewporthöjd så nästa scrub tar vid
   exakt när den förras sticky-scen släpper — ingen död svart sträcka */
.act + .act, .outro { margin-top: -100svh; }

.act-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}

.act-word-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
}

.act-eyebrow {
  font-family: var(--label);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  color: var(--carrot);
  opacity: 0;
}

.act-word {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(4.5rem, 15vw, 13.5rem);
  line-height: 0.95;
  letter-spacing: 0.005em;
  color: var(--latte);
  overflow: hidden;
}
.act-word .line-inner { display: block; }

.act-copy {
  position: absolute;
  left: clamp(24px, 7vw, 110px);
  bottom: clamp(70px, 14vh, 150px);
  max-width: 34rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.act-copy-italic {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  color: var(--latte);
  opacity: 0;
}
.act-copy-plain {
  font-family: var(--label);
  font-weight: 400;
  font-size: clamp(0.85rem, 1.3vw, 1rem);
  letter-spacing: 0.03em;
  line-height: 1.7;
  color: var(--latte-dim);
  opacity: 0;
}

/* ---------- Outro ---------- */

.outro {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 18vh;
}

.outro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
}

.outro-score {
  display: flex;
  align-items: baseline;
  font-family: var(--display);
  color: var(--latte);
}
.outro-score-num {
  font-weight: 900;
  font-size: clamp(5rem, 13vw, 11rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.outro-score-of {
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.6rem, 3.6vw, 3rem);
  color: var(--latte-dim);
  margin-left: 0.3rem;
}

.outro-reviews {
  margin-top: 1.6rem;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-indent: 0.08em;
  color: var(--latte-dim);
}

.outro-press {
  margin-top: 4.2rem;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
  justify-content: center;
}
.outro-press-names {
  display: inline-flex;
  align-items: center;
  gap: 1.6rem;
  white-space: nowrap;
}
.outro-press-label {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--latte-faint);
}
.outro-press-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: var(--latte-dim);
}
.outro-press-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--carrot);
}

.cta {
  margin-top: 5rem;
  display: inline-block;
  padding: 1.7rem clamp(2.4rem, 7vw, 4.6rem);
  background: var(--carrot);
  color: var(--black);
  text-decoration: none;
  font-family: var(--label);
  font-weight: 700;
  font-size: clamp(0.8rem, 1.5vw, 0.95rem);
  text-transform: uppercase; /* mashstudios.no:s knappar är versala — enda stället */
  letter-spacing: 0.1em;
  text-indent: 0.1em;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              letter-spacing 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.3s ease;
}
.cta:hover, .cta:focus-visible {
  transform: scale(1.05);
  letter-spacing: 0.17em;
}
.cta:active { transform: scale(1.01); }

.outro-address {
  margin-top: 2.6rem;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--latte-faint);
}

.footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 32px clamp(24px, 5vw, 64px);
  border-top: 1px solid rgba(251, 236, 214, 0.12);
  margin-top: 14vh;
}
.footer-mark {
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  color: var(--latte);
}
.footer-note {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--latte-faint);
}
.footer-copy {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--latte-faint);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .line-inner { transform: none; }
  .intro-mash, .intro-studios, .scroll-hint,
  .act-eyebrow, .act-copy-italic, .act-copy-plain { opacity: 1; }
  .act { height: 100svh; }
  .act + .act, .outro { margin-top: 0; }
  #cine { display: none; }
  .act-stage {
    background-size: cover;
    background-position: center;
  }
}

/* ---------- Mobil ---------- */

@media (max-width: 820px) {
  .act-copy {
    left: 24px;
    right: 24px;
    bottom: 64px;
  }
  .outro-press { gap: 1rem; }
  .footer { flex-wrap: wrap; gap: 10px; }
}
