/* Loona – egen sida. Mörk, lyxig stil: nästan svart, varm koppar/amber som accent (matchar hero-sekvensen), krämvit text. */
:root {
  --bg: #060504;
  --bg2: #0B0908;
  --panel: #0F0C0A;
  --panel2: #0A0807;
  --text: #F1E8D8;
  --soft: #A79B8C;
  --accent: #D4914F;
  --accent2: #F0B46A;
  --glow: rgba(212, 145, 79, .35);
  --line: rgba(241, 232, 216, .10);
  --line-strong: rgba(241, 232, 216, .24);
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Instrument Sans", "Helvetica Neue", sans-serif;
  --gutter: clamp(18px, 5vw, 88px);
  --maxw: 1360px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: clamp(1.02rem, .98rem + .2vw, 1.15rem); line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, ol { margin: 0; }
::selection { background: var(--accent); color: #140C06; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.hero__title, .h2, .card__title, .contact__mail, .wordmark, .how__steps li {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
}

/* Topp ------------------------------------------------------------ */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 72px; padding: 0 var(--gutter);
  background: linear-gradient(180deg, rgba(6, 5, 4, .78) 0%, rgba(6, 5, 4, .35) 70%, rgba(6, 5, 4, 0) 100%);
}
.wordmark { font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 48; font-style: italic; font-weight: 500; font-size: 1.6rem; letter-spacing: -.01em; }
.top__nav { display: none; gap: 30px; }
.top__nav a { position: relative; display: inline-flex; align-items: baseline; gap: 8px; font-size: .92rem; font-weight: 500; }
.top__nav a small { font-size: .66rem; letter-spacing: .1em; color: var(--accent); font-variant-numeric: tabular-nums; }
.top__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.top__nav a:hover::after { transform: scaleX(1); }
.top__mail {
  font-size: .92rem; font-weight: 500; padding: .55em 1em; border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(6, 5, 4, .35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background-color .3s, color .3s, border-color .3s, box-shadow .3s;
}
.top__mail:hover { border-color: var(--accent); color: var(--accent2); box-shadow: 0 0 24px -6px var(--glow); }
@media (min-width: 900px) { .top__nav { display: flex; } }
@media (max-width: 520px) { .top__mail { font-size: .8rem; padding: .5em .8em; } }

/* Hero: scrollstyrd sekvens ----------------------------------------- */
.hero { position: relative; background: #000; }
.hero__stage { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: #000; }
.hero__poster { position: absolute; inset: 0; }
.hero__poster img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .3s var(--ease); }
.hero__canvas.is-on { opacity: 1; }
.hero__scrim {
  position: absolute; inset: 0; pointer-events: none; opacity: var(--hero-ui, 0);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .55) 72%, rgba(0, 0, 0, .9) 100%);
}
.hero__content {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter) clamp(36px, 7vh, 72px);
  display: grid; gap: 18px; justify-items: start; pointer-events: none;
  opacity: var(--hero-ui, 0); transform: translateY(calc((1 - var(--hero-ui, 0)) * 28px));
}
.hero.is-in .hero__content { pointer-events: auto; }
.eyebrow { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.hero__title {
  font-weight: 500; font-size: clamp(2.1rem, 1.1rem + 4.4vw, 4.8rem); line-height: .98; letter-spacing: -.03em;
  max-width: 15ch; text-wrap: balance; text-shadow: 0 2px 40px rgba(0, 0, 0, .6);
}
.hero__title em { font-style: italic; font-weight: 600; color: var(--accent2); }
.hero__lede {
  max-width: 44ch; font-size: clamp(1rem, .95rem + .35vw, 1.25rem); line-height: 1.4; color: var(--soft); text-wrap: pretty;
  opacity: clamp(0, calc((var(--hero-ui, 0) - .35) / .65), 1);
}
.hero__content .btn { opacity: clamp(0, calc((var(--hero-ui, 0) - .5) / .5), 1); }
.btn {
  display: inline-flex; align-items: center; gap: .7em; padding: .95em 1.5em; border-radius: 999px;
  background: var(--text); color: #140C06; font-size: .95rem; font-weight: 500; letter-spacing: .02em; line-height: 1;
  border: 1px solid var(--text); transition: background-color .35s var(--ease), color .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}
.btn:hover { background: var(--accent2); border-color: var(--accent2); transform: translateY(-1px); box-shadow: 0 10px 40px -10px var(--glow); }
.btn__arrow { display: inline-block; transition: transform .35s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateY(3px); }

.hero--seq { height: 320vh; }
.hero--seq .hero__stage { position: sticky; top: 0; }
.hero--still .hero__stage { height: 100svh; }
.hero--still .hero__content { opacity: 1; transform: none; }
.hero--still .hero__lede, .hero--still .btn { opacity: 1; }
.hero--still .hero__scrim { opacity: 1; }
@media (max-width: 899px) {
  .hero--seq { height: 240vh; }
  .hero__content { bottom: 0; padding-bottom: clamp(28px, 6vh, 56px); gap: 14px; }
  .hero__title { font-size: clamp(1.9rem, 1rem + 5.6vw, 2.8rem); }
  .hero__lede { font-size: .95rem; max-width: 36ch; }
  .hero__scrim { background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .7) 80%, rgba(0, 0, 0, .95) 100%); }
}
@media (max-width: 899px) and (max-height: 700px) { .hero__lede { display: none; } }

/* Scrollhint (bara i starten) och framstegslinje – samma som i demo-mallen */
.seq-hint {
  position: absolute; left: 50%; bottom: clamp(18px, 3.5vh, 34px); transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(241, 232, 216, .55);
  transition: opacity .35s var(--ease); animation: seqhint 2.6s ease-in-out infinite;
}
.seq-hint[hidden] { display: none; }
.seq-hint i { display: block; width: 1px; height: 26px; background: linear-gradient(180deg, rgba(241, 232, 216, 0), rgba(241, 232, 216, .7)); position: relative; }
.seq-hint i::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 6px; height: 6px; border-right: 1px solid rgba(241, 232, 216, .7); border-bottom: 1px solid rgba(241, 232, 216, .7); transform: translateX(-50%) rotate(45deg); }
@keyframes seqhint { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }
@media (min-width: 900px) { .seq-hint { left: auto; right: var(--gutter); transform: none; align-items: flex-end; } @keyframes seqhint { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } } }
.seq-progress {
  position: absolute; right: calc(var(--gutter) / 2); top: 50%; transform: translateY(-50%); z-index: 2;
  width: 1px; height: 30vh; background: rgba(241, 232, 216, .14); opacity: 0; transition: opacity .4s var(--ease); pointer-events: none;
}
.seq-progress[hidden] { display: none; }
.seq-progress span { position: absolute; left: -0.5px; top: 0; width: 2px; height: 100%; background: var(--accent); transform-origin: top; transform: scaleY(var(--p, 0)); box-shadow: 0 0 10px var(--glow); }
@media (max-width: 899px) { .seq-progress { right: 10px; height: 22vh; } }

/* Så går det till -------------------------------------------------- */
.how { max-width: var(--maxw); margin: 0 auto; padding: clamp(96px, 14vh, 150px) var(--gutter) 0; display: grid; gap: 22px; }
.how__steps { list-style: none; padding: 0; display: grid; gap: 14px; }
.how__steps li {
  display: flex; align-items: baseline; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line);
  font-weight: 500; font-size: clamp(1.35rem, 1rem + 1.4vw, 2.1rem); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance;
}
.how__steps li span { font-family: var(--font-body); font-size: .78rem; letter-spacing: .14em; color: var(--accent); font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .how__steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }

/* Sektioner ------------------------------------------------------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(64px, 11vh, 150px) var(--gutter); }
.section__head { position: relative; display: flex; align-items: baseline; gap: 14px; padding-bottom: 14px; margin-bottom: clamp(32px, 6vh, 64px); }
.section__head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, var(--accent) 0, var(--line) 180px, var(--line) 100%); }
.section__num { font-size: .78rem; letter-spacing: .14em; color: var(--accent); font-variant-numeric: tabular-nums; }
.section__label { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.h2 { font-weight: 500; font-size: clamp(2rem, 1.1rem + 3.6vw, 4.4rem); line-height: 1.02; letter-spacing: -.03em; text-wrap: balance; }
.h2 em { font-style: italic; font-weight: 600; color: var(--accent2); }

.intro { display: grid; gap: 18px; margin-bottom: clamp(36px, 6vh, 64px); }
.intro__text { max-width: 52ch; color: var(--soft); text-wrap: pretty; }
@media (min-width: 900px) { .intro { grid-template-columns: 1.1fr .9fr; align-items: end; gap: 56px; } .intro__text { justify-self: end; } }

/* Demokort: stora, mörka, lätt kopparglöd vid hover ------------------ */
.cards { display: grid; gap: clamp(20px, 3vw, 36px); }
.card {
  position: relative; display: grid; gap: 22px; padding: clamp(16px, 2.4vw, 32px); border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel2) 100%); border: 1px solid var(--line);
  transition: border-color .6s var(--ease), transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
}
.card::after {                                                 /* hårfin kopparlinje i överkanten vid hover */
  content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 180, 106, .7), transparent); opacity: 0; transition: opacity .6s var(--ease);
}
.card__glow {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .6s var(--ease);
  background: radial-gradient(640px circle at var(--mx, 50%) var(--my, 0%), rgba(212, 145, 79, .14), transparent 62%);
}
.card:hover { border-color: rgba(212, 145, 79, .38); transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(212, 145, 79, .08), 0 40px 110px -50px var(--glow); }
.card:hover::after, .card:hover .card__glow { opacity: 1; }
.card__frame {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px;
  background: var(--bg2); border: 1px solid var(--line);
  transition: border-color .6s var(--ease), box-shadow .6s var(--ease-out);
}
.card__desktop { width: 100%; height: 100%; object-fit: cover; object-position: top; transform: scale(1.01); transition: transform 1.2s var(--ease-out); }
.card__mobile {
  position: absolute; right: 5%; bottom: -6%; width: 22%; border-radius: 10px; border: 1px solid rgba(241, 232, 216, .22);
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .8); transform: translateY(8px); transition: transform .8s var(--ease-out);
}
.card:hover .card__frame { border-color: rgba(212, 145, 79, .3); box-shadow: 0 0 40px -12px var(--glow); }
.card:hover .card__desktop { transform: scale(1.035); }
.card:hover .card__mobile { transform: translateY(0); }
.card__text { position: relative; display: grid; gap: 10px; align-content: start; }
.card__kind { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.card__title { font-weight: 500; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.3rem); line-height: 1.1; letter-spacing: -.02em; max-width: 22ch; text-wrap: balance; }
.card__link { display: inline-flex; align-items: center; gap: .5em; font-size: .92rem; font-weight: 500; margin-top: 6px; color: var(--soft); transition: color .35s; }
.card__link i { font-style: normal; display: inline-block; transition: transform .35s var(--ease-out); }
.card:hover .card__link i { transform: translateX(4px); }
.card:hover .card__link { color: var(--accent2); }
@media (min-width: 900px) {
  .card { grid-template-columns: 1.35fr .65fr; align-items: end; gap: 44px; }
  .card:nth-child(even) { grid-template-columns: .65fr 1.35fr; }
  .card:nth-child(even) .card__frame { order: 2; }
  .card__mobile { width: 19%; right: 4%; }
}

.facts { margin-top: clamp(48px, 8vh, 96px); display: grid; }
.facts > div { display: grid; gap: 6px; padding: 20px 0; border-top: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 500; }
.facts dd { color: var(--soft); max-width: 40ch; text-wrap: pretty; }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(3, 1fr); gap: 40px; } .facts > div { border-bottom: 1px solid var(--line); } }

/* AI -------------------------------------------------------------- */
.section--ai { position: relative; max-width: none; background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--ai::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(900px 420px at 12% 0%, rgba(212, 145, 79, .09), transparent 70%); }
.section--ai > * { position: relative; max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.ai { display: grid; gap: 36px; }
.ai__body { display: grid; gap: 1em; max-width: 52ch; color: var(--soft); text-wrap: pretty; }
.ai__note { color: var(--text); padding-left: 18px; border-left: 2px solid var(--accent); }
.steps { list-style: none; padding: 0; display: grid; counter-reset: s; }
.steps li { counter-increment: s; display: grid; gap: 4px; padding: 18px 0 18px 44px; border-top: 1px solid var(--line); position: relative; color: var(--soft); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: "0" counter(s); position: absolute; left: 0; top: 20px; font-size: .78rem; letter-spacing: .12em; color: var(--accent); font-variant-numeric: tabular-nums; }
.steps li span { display: block; font-weight: 500; color: var(--text); }
@media (min-width: 900px) {
  .ai { grid-template-columns: 1.2fr .8fr; grid-template-areas: "h h" "b s"; column-gap: 72px; row-gap: 48px; align-items: start; }
  .ai .h2 { grid-area: h; max-width: 22ch; }
  .ai__body { grid-area: b; }
  .steps { grid-area: s; }
}

/* Kontakt --------------------------------------------------------- */
.contact { display: grid; gap: 28px; }
.contact__who { color: var(--soft); line-height: 1.6; }
.contact__mail {
  font-style: italic; font-weight: 500; font-size: clamp(1.6rem, 1rem + 3.2vw, 4rem); letter-spacing: -.02em; line-height: 1.1;
  width: fit-content; max-width: 100%; overflow-wrap: anywhere;
  background-image: linear-gradient(var(--accent), var(--accent)); background-size: 100% 2px; background-repeat: no-repeat; background-position: 0 100%;
  padding-bottom: 6px; transition: background-size .4s var(--ease), color .3s, text-shadow .4s;
}
.contact__mail:hover { color: var(--accent2); background-size: 30% 2px; text-shadow: 0 0 40px var(--glow); }
.contact__also { font-size: .92rem; color: var(--soft); padding-top: 18px; border-top: 1px solid var(--line); max-width: 46ch; }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr auto; grid-template-areas: "h w" "m m" "a a"; column-gap: 72px; align-items: end; } .contact .h2 { grid-area: h; max-width: 16ch; } .contact__who { grid-area: w; text-align: right; } .contact__mail { grid-area: m; } .contact__also { grid-area: a; } }

/* Sidfot ---------------------------------------------------------- */
.foot { display: flex; justify-content: space-between; gap: 20px; padding: 28px var(--gutter) 36px; max-width: var(--maxw); margin: 0 auto; font-size: .85rem; color: var(--soft); border-top: 1px solid var(--line); }
.foot a:hover { color: var(--accent2); }

/* Reveal ---------------------------------------------------------- */
:where(.how__steps li, .card, .facts > div, .steps li, .intro, .ai, .contact) { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease-out); }
.card { transition: opacity .9s var(--ease), transform .9s var(--ease-out), border-color .6s var(--ease), box-shadow .6s var(--ease-out); }
.is-in { opacity: 1 !important; transform: none !important; }
.card.is-in:hover { transform: translateY(-3px) !important; }
.how__steps li:nth-child(2), .facts > div:nth-child(2), .steps li:nth-child(2) { transition-delay: .08s; }
.how__steps li:nth-child(3), .facts > div:nth-child(3), .steps li:nth-child(3) { transition-delay: .16s; }
.steps li:nth-child(4) { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .seq-hint { animation: none; }
  .how__steps li, .card, .facts > div, .steps li, .intro, .ai, .contact { opacity: 1; transform: none; transition: none; }
  .card__frame, .card__desktop, .card__mobile, .btn, .btn__arrow, .card { transition: none; }
}
