@font-face { font-family: Geist; src: url("/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  /* Nano-symbolens färgsystem (NANO BRANDING/42). Nano är alltid neutralt; färgen hör till sporten. */
  --ink: #191919;
  --paper: #f5f0e8;
  --paper-2: #f0ede8;
  --muted: #666766;
  --line: rgba(25, 25, 25, .14);
  --on-dark: rgba(245, 240, 232, .68);
  --line-dark: rgba(245, 240, 232, .16);
  /* Optisk tracking ur docs/brand/tokens.json */
  --tracking-caption: .06em;
  --tracking-ui: -.006em;
  --tracking-body: -.011em;
  --tracking-heading: -.017em;
  --tracking-display: -.022em;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --gutter: clamp(16px, 5.6vw, 88px);
  --sans: Geist, Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 16px/1.6 var(--sans);
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
.wrap { max-width: 1600px; margin-inline: auto; padding-inline: var(--gutter); }
.mono { font: 500 12px/1.4 var(--mono); letter-spacing: var(--tracking-caption); text-transform: uppercase; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 50; padding: 12px 16px; border-radius: 8px; background: var(--paper); color: var(--ink); transform: translateY(-200%); }
.skip:focus { transform: none; }

/* Sidhuvud: ligger fast och byter själv färg över ljusa ytor (difference). */
.bar {
  position: fixed; z-index: 30; inset: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: max(16px, env(safe-area-inset-top)) var(--gutter) 16px;
  color: #fff; mix-blend-mode: difference; pointer-events: none;
}
.bar > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.brand svg { height: 24px; width: auto; fill: currentColor; }
.nav { display: flex; align-items: center; gap: clamp(24px, 4vw, 56px); }
.nav a, .lang { display: inline-flex; align-items: center; min-height: 44px; opacity: .78; transition: opacity .2s; }
.nav a::before { content: "+"; margin-right: 8px; opacity: .6; }
.nav a:hover, .lang:hover { opacity: 1; }

/* Mobilmenyn: liten, fast, uppe till höger. Träffytan är 44 px fast knappen ser ut som 32. */
.menu { display: none; position: fixed; z-index: 40; top: max(16px, env(safe-area-inset-top)); right: var(--gutter); }
.menu-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 32px; margin-block: 6px; padding-inline: 12px;
  border: 1px solid var(--line-dark); border-radius: 8px; background: var(--ink); color: var(--paper);
}
.menu-btn::after { content: ""; position: absolute; inset: -8px; }
.menu-btn i { width: 6px; height: 6px; border-radius: 50%; background: var(--paper); transition: transform .25s var(--ease-out); }
.menu-btn[aria-expanded="true"] i { transform: scale(1.6); }
.menu-panel {
  position: absolute; top: 48px; right: 0; display: grid; min-width: 216px; padding: 8px;
  border: 1px solid var(--line-dark); border-radius: 12px; background: var(--ink);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top right;
  transition: opacity .2s var(--ease-out), transform .25s var(--ease-out), visibility .2s;
}
.menu-panel.open { opacity: 1; visibility: visible; transform: none; }
.menu-panel a, .menu-panel button { display: flex; align-items: center; min-height: 48px; padding-inline: 12px; border-radius: 8px; text-align: left; color: var(--on-dark); }
.menu-panel a::before { content: "+"; margin-right: 12px; opacity: .5; }
.menu-panel a:active, .menu-panel button:active { background: rgba(245, 240, 232, .08); }
.menu-panel .menu-cta { margin-top: 8px; background: var(--paper); color: var(--ink); }
.menu-panel .menu-cta::before { content: "●"; font-size: 8px; opacity: 1; }
.menu-panel button { margin-top: 8px; border-top: 1px solid var(--line-dark); border-radius: 0; }

/* Hero */
.hero { position: relative; display: flex; min-height: 100svh; overflow: hidden; flex-direction: column; justify-content: flex-end; isolation: isolate; }
.pitch { position: absolute; z-index: -1; inset: 0; perspective: 1400px; perspective-origin: 50% 20%; -webkit-mask-image: linear-gradient(to bottom, transparent 4%, #000 34%, transparent 82%); mask-image: linear-gradient(to bottom, transparent 4%, #000 34%, transparent 82%); }
/* Tre sporter på samma lutade yta. Bara fotbollen syns utan rörelse; resten tänds av GSAP. */
.tilt { position: absolute; left: 58%; bottom: 30%; width: max(720px, 86vw); aspect-ratio: 1000 / 640; transform: translateX(-50%) rotateX(58deg); transform-origin: 50% 100%; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--paper); stroke-width: 1.6; }
.scene + .scene { visibility: hidden; opacity: 0; }
.scene .lines { opacity: .42; }
.scene .lines .thick { stroke-width: 3.2; }
.scene .lines .dot { fill: var(--paper); stroke: none; }
.scene [pathLength] { stroke-dasharray: 1; }
.scene .home { fill: var(--paper); stroke: none; }
.scene .away { fill: var(--ink); stroke: var(--paper); stroke-width: 2.4; }
.scene .ball { fill: #fff; stroke: var(--ink); stroke-width: 1.5; }
.scene .shadow { fill: #000; stroke: none; opacity: 0; }
.scene .trail { stroke: #fff; stroke-width: 1.4; stroke-dasharray: 3 7; opacity: 0; }
.scene .flight { stroke: #fff; stroke-width: 1.6; opacity: .8; }
.scene .lines .faint { stroke-opacity: .45; }
.scene .cursor { fill: rgba(245, 240, 232, .16); stroke: var(--paper); stroke-width: 1.6; }
.scene text { fill: var(--paper); stroke: none; font: 500 17px var(--mono); letter-spacing: var(--tracking-caption); text-transform: uppercase; opacity: 0; }
.sports [data-sport] { transition: opacity .4s; }
.sports a:hover { opacity: 1 !important; text-decoration: underline; text-underline-offset: 4px; }
.sports.live [data-sport]:not(.on) { opacity: .45; }
.grain { position: absolute; z-index: -1; inset: 0; opacity: .1; pointer-events: none; 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'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hero-inner { width: 100%; padding-top: 120px; }
.hero-title { font-weight: 900; font-size: clamp(44px, 12.6vw, 200px); line-height: .86; letter-spacing: var(--tracking-display); text-transform: uppercase; margin-left: -.04em; }
.hero-title .line { display: block; overflow: hidden; padding-top: .14em; margin-top: -.14em; white-space: nowrap; }
.hero-title .line > span { display: block; }
.hero-title .line:last-child > span { background: linear-gradient(to bottom, #b4b0aa, #6e6c68); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px; margin-top: clamp(24px, 4vw, 48px); }
.hero-body { max-width: 34ch; color: var(--on-dark); font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5; }
.cta { display: inline-flex; align-items: center; gap: 16px; min-height: 48px; border-bottom: 1px solid var(--line-dark); transition: gap .25s var(--ease-out), border-color .2s; }
.cta:hover { gap: 24px; border-color: currentColor; }
.hero-meta { display: flex; justify-content: space-between; gap: 24px; margin-top: clamp(32px, 5vw, 64px); padding-block: 16px max(24px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line-dark); color: var(--on-dark); }

/* Intro: fyra kolumner som dras undan. Finns bara när rörelse är på. */
.curtain { display: none; position: fixed; z-index: 60; inset: 0; grid-template-columns: repeat(4, 1fr); pointer-events: none; }
.motion .curtain { display: grid; }
.curtain i { background: var(--ink); border-right: 1px solid var(--line-dark); }

/* Fyra hårlinjer genom hela sidan, samma kolumner som ridån. */
.hero, .light, .dark, footer { --rule: rgba(245, 240, 232, .07); background-image: linear-gradient(to right, var(--rule) 1px, transparent 1px); background-position: var(--gutter) 0; background-size: calc((100% - 2 * var(--gutter)) / 4) 100%; }
.light { --rule: rgba(25, 25, 25, .07); }

/* Liten fast kontaktknapp nere till höger, där tummen redan är. */
.pill { position: fixed; z-index: 40; right: var(--gutter); bottom: max(16px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 8px; height: 32px; padding-inline: 12px;
  border: 1px solid var(--line-dark); border-radius: 8px; background: var(--ink); color: var(--paper); transition: opacity .25s, transform .3s var(--ease-out), visibility .25s; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--paper); }
.pill::after { content: ""; position: absolute; inset: -8px; }
.pill.away { opacity: 0; visibility: hidden; transform: translateY(8px); }

.statement { max-width: 22ch; font-weight: 600; font-size: clamp(32px, 5.6vw, 88px); line-height: 1.04; letter-spacing: var(--tracking-display); text-wrap: balance; }

/* Ljusa sektioner */
.light { background-color: var(--paper); color: var(--ink); }
.light.alt { background-color: var(--paper-2); }
section { padding-block: clamp(96px, 13vw, 184px); }
.eyebrow { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 32px; color: var(--muted); }
.dark .eyebrow { color: var(--on-dark); }
.head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(240px, .6fr); align-items: end; gap: 48px; }
h2 { font-weight: 700; font-size: clamp(40px, 7vw, 104px); line-height: 1; letter-spacing: var(--tracking-display); text-wrap: balance; }
.lede { max-width: 40ch; color: var(--muted); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; }
.dark .lede { color: var(--on-dark); }

/* Produkter: en rad per produkt, sportens färg som enda accent. */
.rows { margin-top: clamp(48px, 8vw, 112px); border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1fr) auto; align-items: baseline; gap: 24px;
  padding-block: clamp(24px, 3vw, 40px); border-bottom: 1px solid var(--line);
  transition: padding-left .4s var(--ease-out), background-color .3s;
}
.row-n, .row-domain { color: var(--muted); }
.row-name { margin: 0; font-weight: 700; font-size: clamp(32px, 5.2vw, 80px); line-height: 1; letter-spacing: var(--tracking-display); }
.row-name span { color: var(--muted); font-weight: 500; }
.row-name.nowrap { white-space: nowrap; }
/* Två namn får egen rad; beskrivning och länkar läggs under. */
@media (min-width: 768px) { .row-name.nowrap { grid-column: 2 / -1; } .row-name.nowrap ~ .row-desc { grid-column: 3; } }
.row-name::after { content: ""; display: inline-block; width: .16em; height: .16em; margin-left: .12em; border-radius: 50%; background: var(--sport, var(--ink)); transform: scale(0); transition: transform .35s var(--ease-out); }
.row-desc { color: var(--muted); max-width: 36ch; }
.row-links { display: grid; justify-items: end; gap: 4px; }
.row-links a { display: inline-flex; align-items: center; min-height: 44px; }
.row-more { color: var(--ink); }
.row-more b { display: inline-block; margin-left: 8px; font-weight: 500; transition: transform .3s var(--ease-out); }
.row-domain { text-transform: none; letter-spacing: 0; white-space: nowrap; }
.row-domain b { display: inline-block; margin-left: 8px; font-weight: 500; color: var(--ink); transition: transform .3s var(--ease-out); }
@media (hover: hover) {
  .row:hover { padding-left: 16px; }
  .row:hover .row-name::after { transform: scale(1); }
  .row-domain:hover b { transform: translate(3px, -3px); }
  .row-more:hover b { transform: translateX(4px); }
}
@media (hover: none) { .row-name::after { transform: scale(1); } }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: clamp(64px, 9vw, 128px); }
.step { padding-top: 16px; border-top: 1px solid var(--line); }
.step .mono { color: var(--muted); }
h3 { margin: 32px 0 8px; font-weight: 600; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; letter-spacing: var(--tracking-heading); }
.step p { max-width: 32ch; color: var(--muted); }
@media (min-width: 768px) { .steps.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 48px; margin-top: clamp(40px, 6vw, 80px); }
.qa { padding-top: 16px; border-top: 1px solid var(--line); }
.qa h3 { margin-top: 0; }
.qa p { max-width: 52ch; color: var(--muted); }
.inline { text-decoration: underline; text-underline-offset: 3px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Annons & samarbete. Sektionen heter "partner" i koden: annonsblockerare gömmer allt som heter advertise. */
.dark { position: relative; overflow: hidden; }
.dark h2 { font-size: clamp(44px, 9vw, 136px); font-weight: 800; line-height: .95; }
.contact { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 48px; margin-top: clamp(40px, 6vw, 80px); }
.mail { display: inline-flex; align-items: center; gap: 16px; min-height: 56px; border-bottom: 1px solid var(--line-dark); font-size: clamp(18px, 2.4vw, 32px); font-weight: 500; letter-spacing: var(--tracking-heading); transition: gap .25s var(--ease-out), border-color .2s; }
.mail:hover { gap: 24px; border-color: currentColor; }

footer { padding-bottom: max(24px, env(safe-area-inset-bottom)); overflow-x: clip; }
.wordmark { display: block; margin: 0 0 24px -.04em; padding-top: .1em; font-weight: 900; font-size: 13.4vw; line-height: .8; letter-spacing: var(--tracking-display); white-space: nowrap; color: #fff; user-select: none; }
.wordmark span { display: inline-block; }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px; padding-top: 16px; border-top: 1px solid var(--line-dark); color: var(--on-dark); }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }
.foot a:hover { color: var(--paper); }

@media (max-width: 767px) {
  .nav, .bar .lang { display: none; }
  .menu { display: block; }
  .hero-row, .head, .contact { grid-template-columns: 1fr; gap: 24px; }
  .hero-meta > span:last-child { display: none; }
  .tilt { left: 25%; bottom: 50%; width: 170vw; }
  .cta { justify-self: start; }
  .row { grid-template-columns: 1fr auto; gap: 8px 16px; }
  .row-n { display: none; }
  .row-name { grid-column: 1 / -1; }
  .row-desc { grid-column: 1 / -1; }
  .row-links { grid-column: 1 / -1; justify-items: start; gap: 0; margin-top: 8px; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .faq { grid-template-columns: 1fr; gap: 32px; }
  h3 { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before, *::after { transition-duration: .01ms !important; }
}

/* Maps-globen: prickad jord med ljus kant, som Aceternitys glob men i SVG. */
.globe { display: block; width: min(100%, 600px); margin: clamp(32px, 5vw, 64px) auto 0; overflow: visible; fill: none; stroke: var(--paper); }
.globe .halo { stroke: none; }
.globe .rim { stroke-opacity: .22; stroke-width: 1.2; }
.globe .dots { stroke-width: 3.4; stroke-linecap: round; stroke-opacity: .9; }
.globe .dots.far { stroke-width: 2.6; stroke-opacity: .32; }
.globe .land { stroke-width: 1.4; stroke-linejoin: round; stroke-opacity: .55; fill: rgba(245, 240, 232, .05); }
.globe .pin { fill: var(--paper); stroke: none; }
.globe .ring { stroke: #fff; stroke-width: 1.6; }
.globe .cursor { fill: rgba(245, 240, 232, .16); stroke-width: 1.6; }
.globe text { fill: var(--paper); stroke: none; font: 500 15px var(--mono); letter-spacing: var(--tracking-caption); text-transform: uppercase; paint-order: stroke; }
/* Juridiska sidor: läsbar brödtext i stället för rubrikskalan. */
.doc { max-width: 68ch; margin-top: 32px; font-size: 17px; line-height: 1.65; }
.doc h2 { margin: 48px 0 12px; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; letter-spacing: normal; }
.doc p, .doc ul { margin: 0 0 12px; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 6px; }

/* Förladdare (bara startsidan, första besöket): NSG växer ut till Nano Sports Group. */
.intro-mark, .intro-bar { display: none; }
.intro .curtain { pointer-events: auto; cursor: pointer; }
.intro .intro-mark { display: flex; gap: .28em; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; color: var(--paper); font: 600 clamp(32px, 9vw, 128px)/1 var(--sans); letter-spacing: -0.04em; white-space: nowrap; }
.intro-mark span { display: inline-flex; overflow: hidden; padding-bottom: .08em; }
.intro-mark b, .intro-mark em { display: inline-block; font: inherit; }
.intro-mark em { width: 0; overflow: hidden; color: var(--on-dark, var(--paper)); }
.intro .intro-bar { display: block; position: absolute; left: 50%; bottom: 12vh; width: min(240px, 50vw); height: 1px; transform: translateX(-50%) scaleX(0); transform-origin: 0 50%; background: var(--paper); opacity: .5; }
/* Preloadern: skon och bollen mitt i ridån på undersidorna. */
.kick { position: absolute; left: 50%; top: 50%; height: min(180px, 24vh); width: auto; aspect-ratio: 320 / 560; transform: translate(-50%, -50%); color: var(--paper); overflow: visible; }
/* Lagen i fotboll och hockey: rött mot blått, så man ser vem som är vem. */
[data-scene="football"] .home, [data-scene="hockey"] .home { fill: #e5484d; }
[data-scene="football"] .away, [data-scene="hockey"] .away { fill: #3b82f6; stroke: none; }
