/* oneunit on – hemsida v1
   Färger och typsnitt enligt Brand/oneuniton-riktlinjer */

:root {
  --black: #0A0A0A;
  --white: #F4F4F2;
  --coal:  #1B1B1B;
  --grey:  #8C8C87;
  --glow:  244, 244, 242;

  --font-head: "Saira", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --pad: clamp(20px, 5vw, 72px);
  --max: 1200px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

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

h1, h2 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(44px, 6vw, 56px); }
h2 { font-size: clamp(28px, 3.4vw, 40px); }

p { margin: 0 0 16px; max-width: 34em; }

.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--white); color: var(--black);
  padding: 10px 16px; z-index: 100; text-decoration: none;
}
.skip:focus { top: 16px; }

/* ---------- Knappar ---------- */

.btn {
  display: inline-block;
  background: var(--white);
  color: var(--black);
  font: 600 16px/1 var(--font-body);
  text-decoration: none;
  padding: 16px 28px;
  border-radius: 2px;
  transition: box-shadow .25s ease;
}
.btn:hover { box-shadow: 0 0 28px rgba(var(--glow), .35); }
.btn-small { padding: 11px 20px; font-size: 15px; }
.btn-wide { display: block; text-align: center; }
.btn[aria-disabled="true"] {
  background: transparent;
  color: var(--grey);
  box-shadow: inset 0 0 0 1px var(--grey);
  pointer-events: none;
}

.link {
  color: var(--white);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: var(--grey);
}
.link:hover { text-decoration-color: var(--white); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 32px;
  padding: 16px var(--pad);
  background: rgba(10, 10, 10, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand { transition: opacity .4s ease; }
.brand img { width: 96px; }
body.at-intro .brand { opacity: 0; pointer-events: none; }
.site-header nav { margin-left: auto; }
.site-header ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.site-header nav a {
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--grey);
}
.site-header nav a:hover { color: var(--white); }


/* ---------- Intro: logotypen, stapeln tänds som ett lysrör ---------- */

.intro {
  position: relative;
  min-height: calc(100svh - 76px);
  display: grid;
  place-items: center;
  padding: 40px var(--pad) 120px;
}
.intro-inner { display: grid; justify-items: center; gap: clamp(40px, 6vw, 72px); }
.intro-logo { width: min(72vw, 720px); height: auto; overflow: visible; }
.l-base { fill: #141414; }
.b-off  { fill: var(--coal); }
.b-on   { fill: var(--white); }
.b-glow { fill: var(--white); fill-opacity: .5; }

.flick { opacity: 0; animation: flicker 1.9s linear .8s forwards; }
@keyframes flicker {
  0%   { opacity: 0; }
  5%   { opacity: 1; }
  7%   { opacity: 0; }
  12%  { opacity: .8; }
  14%  { opacity: 0; }
  34%  { opacity: 0; }
  36%  { opacity: 1; }
  39%  { opacity: .25; }
  44%  { opacity: 1; }
  100% { opacity: 1; }
}

.intro-title {
  font-size: clamp(28px, 3.4vw, 40px);
  margin: 0;
  opacity: 0;
  animation: fade-in 1s ease-out 2.9s forwards;
}
.intro-cue {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  display: grid; justify-items: center; gap: 12px;
  color: var(--grey);
  font-size: 14px;
  text-decoration: none;
  opacity: 0;
  animation: fade-in 1s ease-out 3.4s forwards;
}
.intro-cue::after {
  content: "";
  width: 22px; height: 7px;
  background: var(--grey);
}
.intro-cue:hover { color: var(--white); }
.intro-cue:hover::after { background: var(--white); }

/* ---------- Hero: stapeln slås på ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) var(--pad) clamp(80px, 10vw, 140px);
}
.hero-h { font-size: clamp(40px, 5vw, 56px); }
.lead { font-size: 18px; color: var(--white); margin-bottom: 36px; }
.actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }

.stage {
  position: relative;
  display: grid;
  justify-items: center;
  padding-top: 56px;
}
/* Stapeln från logotypen, använd som lampa */
.lamp {
  width: 34%;
  aspect-ratio: 3.3 / 1;
  background: var(--coal);
  position: relative;
  z-index: 3;
}
.stage.on .lamp { animation: lamp-on .5s ease-out .2s forwards; }
.beam {
  position: absolute;
  top: -6%;
  left: -10%; right: -10%; bottom: 0;
  background:
    radial-gradient(ellipse 26% 20% at 50% 12%, rgba(var(--glow), .28), rgba(var(--glow), 0) 100%),
    radial-gradient(ellipse 42% 62% at 50% 10%, rgba(var(--glow), .13), rgba(var(--glow), 0) 100%);
  z-index: 2;
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0;
}
.stage.on .beam { animation: fade-in 1.4s ease-out .3s forwards; }
.product {
  width: 72%;
  margin-top: 8%;
  position: relative;
  z-index: 1;
  filter: brightness(.08);
}
.stage.on .product { animation: light-up 1.6s ease-out .3s forwards; }

@keyframes lamp-on {
  to {
    background: var(--white);
    box-shadow:
      0 0 24px rgba(var(--glow), .7),
      0 0 90px rgba(var(--glow), .35),
      0 30px 160px rgba(var(--glow), .25);
  }
}
@keyframes fade-in { to { opacity: 1; } }
@keyframes light-up { to { filter: brightness(1.12) contrast(1.04); } }

/* ---------- Funktioner ---------- */

.feature {
  display: grid;
  grid-template-columns: 5fr 6fr;
  align-items: center;
  gap: clamp(32px, 7vw, 110px);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 110px) var(--pad);
}
.feature-flip .feature-text { order: 2; }
.feature-text p { color: var(--white); opacity: .86; }

.detail { margin: 0; }
.crop {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 40% 0%, rgba(var(--glow), .10), transparent 70%),
    var(--coal);
}
.crop img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(2.6);
  filter: brightness(1.35) contrast(1.06);
}
.crop-switch img { transform-origin: 48% 46%; }
.crop-leds img   { transform-origin: 37% 84%; }
.crop-intake img { transform-origin: 92% 30%; transform: scale(2.2); }

.detail figcaption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--grey);
}

/* ---------- Specifikationer ---------- */

.specs {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 110px) var(--pad);
}
.specs dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(32px, 6vw, 96px);
  margin: 40px 0 0;
}
.specs dl > div {
  display: flex; justify-content: space-between; gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--coal);
}
.specs dt { color: var(--grey); }
.specs dd { margin: 0; text-align: right; font-weight: 500; }

/* ---------- Köp ---------- */

.buy {
  padding: clamp(56px, 8vw, 110px) var(--pad);
}
.buy-inner {
  max-width: 980px;
  margin: 0 auto;
  background: var(--coal);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  padding: clamp(32px, 5vw, 64px);
}
.buy-product {
  width: 78%;
  justify-self: center;
  filter: brightness(1.3);
}
.price {
  font: 600 32px/1.1 var(--font-head);
  margin-bottom: 10px;
}
.buy-note { color: var(--grey); font-size: 15px; margin-bottom: 28px; }
.buy-small { color: var(--grey); font-size: 13px; margin: 14px 0 0; text-align: center; max-width: none; }

/* ---------- Frågor ---------- */

.faq {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 110px) var(--pad);
}
.faq h2 { margin-bottom: 32px; }
.faq details { border-top: 1px solid var(--coal); }
.faq details:last-of-type { border-bottom: 1px solid var(--coal); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0;
  font-weight: 500;
  font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
/* Liten stapel som tänds när frågan är öppen */
.faq summary::after {
  content: "";
  flex: none;
  width: 22px; height: 7px;
  background: var(--coal);
  outline: 1px solid #2a2a2a;
  transition: background .25s ease, box-shadow .25s ease;
}
.faq details[open] summary::after {
  background: var(--white);
  outline-color: transparent;
  box-shadow: 0 0 14px rgba(var(--glow), .55);
}
.faq details p { color: var(--white); opacity: .86; padding-bottom: 22px; margin: 0; }

/* ---------- Footer ---------- */

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px var(--pad) 48px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  border-top: 1px solid var(--coal);
}
.footer-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; justify-content: center; flex-wrap: wrap; }
.footer-links a { color: var(--grey); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--white); }
.legal { color: var(--grey); font-size: 13px; margin: 0; }

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

@media (max-width: 860px) {
  .site-header nav { display: none; }
  .site-header .btn-small { margin-left: auto; }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 24px;
    padding-top: 32px;
  }
  .stage { order: -1; max-width: 420px; justify-self: center; width: 100%; }

  .feature, .buy-inner { grid-template-columns: 1fr; }
  .feature-flip .feature-text { order: 0; }
  .crop { aspect-ratio: 1 / 1; }

  .specs dl { grid-template-columns: 1fr; }

  .site-footer { grid-template-columns: 1fr; justify-items: start; }
  .footer-links { justify-content: flex-start; }
}

/* ---------- Mindre rörelse ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage.on .lamp, .stage.on .beam, .stage.on .product,
  .flick, .intro-title, .intro-cue { animation-duration: 0s; animation-delay: 0s; }
}
