/* ============================================================
   ALVISS — draft 2 · shared skin
   Design system copied from design/Alviss.no (standalone).html
   ("Dark nordic-futurist. Cobalt on near-black. Motif: the
   fractured diamond — sharp clips, hairline cracks.")
   ============================================================ */
:root {
  --bg: #07080d;
  --bg-2: #0b0d15;
  --panel: #0e111c;
  --line: rgba(151, 163, 205, 0.14);
  --line-strong: rgba(151, 163, 205, 0.28);
  --ink: #eef0f8;
  --ink-dim: #9aa2bd;
  --ink-faint: #5d6580;
  --accent: #4055e3;
  --accent-bright: #6f86ff;
  --accent-ice: #b9c6ff;
  --accent-glow: rgba(64, 85, 227, 0.35);
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --display: "Space Grotesk", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }

/* ---------- mono technical label ---------- */
.tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-bright);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.tag::before {
  content: "";
  width: 9px; height: 9px;
  background: var(--accent);
  transform: rotate(45deg);
  flex: none;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}
.nav.scrolled {
  background: rgba(7, 8, 13, 0.78);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-right: auto;
}
.brand img { width: 34px; height: auto; }
.brand-word {
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.16em;
}
.brand-word em { font-style: normal; color: var(--accent-bright); }
.nav-links { display: flex; gap: 34px; }
.nav-links a {
  font-size: 14.5px;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
  transition: color 0.25s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 1px;
  background: var(--accent-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.nav-links a:hover::after { transform: scaleX(1); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 13px 26px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.btn:hover { border-color: var(--accent-bright); background: rgba(64, 85, 227, 0.12); }
.btn.solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.solid:hover { background: var(--accent-bright); border-color: var(--accent-bright); }
.btn .arr { font-family: var(--mono); transition: transform 0.3s var(--ease-out); }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- sections ---------- */
section { position: relative; }
.section-pad { padding: 130px 0; }
.section-head { max-width: 720px; margin-bottom: 70px; }
.section-head h2 {
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 22px 0 18px;
  text-wrap: balance;
}
.section-head p { color: var(--ink-dim); font-size: 18px; max-width: 560px; text-wrap: pretty; }

/* ---------- panel card (fractured-diamond motif) ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  clip-path: polygon(26px 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%, 0 26px);
}

/* ---------- footer (source: design/Footer 2 (standalone).html, verbatim;
     keyframes renamed to avoid clashing with the hero orbit's) ---------- */
footer{position:relative;overflow:clip visible;/* x clipped: the mark's glow/ring may rise above the footer but must never widen the page on phones */border-top:1px solid var(--line);background:linear-gradient(180deg,var(--bg-2),#07080d);padding:0 0 44px}
footer .wrap{position:relative;z-index:2}
footer a{color:var(--ink-dim)}footer a:hover{color:var(--ink)}
.cta-row{display:grid;grid-template-columns:1fr 380px;gap:40px;align-items:center;padding:76px 0;border-bottom:1px solid var(--line)}
.cta-row h2{font-size:clamp(34px,3.9vw,56px);line-height:1.02;font-weight:700;letter-spacing:-.025em;text-wrap:balance}
.cta-row h2 em{font-style:normal;color:var(--accent-bright)}
.mark{position:relative;width:180px;justify-self:start;margin-left:20px;pointer-events:none}
.mark img{display:block;width:100%;filter:drop-shadow(0 0 48px rgba(111,134,255,.45)) drop-shadow(0 30px 60px rgba(0,0,0,.65));animation:footMarkFloat 7s ease-in-out infinite}
@keyframes footMarkFloat{0%,100%{transform:translateY(0) rotate(0deg)}50%{transform:translateY(-14px) rotate(.8deg)}}
.mark::before{content:"";position:absolute;left:50%;top:50%;width:150%;aspect-ratio:1;border:1px solid rgba(111,134,255,.2);transform:translate(-50%,-50%) rotate(45deg);animation:footRingSpin 26s linear infinite}
@keyframes footRingSpin{to{transform:translate(-50%,-50%) rotate(405deg)}}
.mark::after{content:"";position:absolute;left:50%;top:50%;width:230%;aspect-ratio:1;border-radius:50%;transform:translate(-50%,-50%);background:radial-gradient(circle,rgba(64,85,227,.32),rgba(64,85,227,0) 62%);z-index:-1}
.cols{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:40px;padding-top:56px}
.cols h4{font-family:var(--mono);font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:18px}
.cols ul{list-style:none;display:grid;gap:12px;font-size:14.5px;color:var(--ink-dim)}
.cols p{color:var(--ink-dim);font-size:14.5px;max-width:320px;text-wrap:pretty;margin-top:14px}
.cols .brand-word{font-size:18px}
.foot-meta{margin-top:64px;padding-top:26px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;font-family:var(--mono);font-size:12px;letter-spacing:.12em;color:var(--ink-faint)}
@media (max-width:980px){.cta-row{grid-template-columns:1fr;gap:48px;padding:64px 0}.mark{justify-self:center;margin:0}.cols{grid-template-columns:1fr 1fr;gap:36px}}
@media (max-width:560px){.cols{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){.mark img,.mark::before{animation:none}}
/* phones: footer per design/Systemet v2.1 — heading beside a small mark, then a 2x2 link grid
   (brand + kontakt on the first row, plattform + selskap on the second) */
@media (max-width:640px){
  /* exactly one phone screen when scrolled to the bottom: the footer fills the viewport height and
     the spare room becomes air around the link columns */
  footer{min-height:100vh;min-height:100svh;padding:84px 0 32px;display:flex}   /* top: room under the fixed nav */
  footer .wrap{flex:1;display:flex;flex-direction:column}
  .cols{flex:1;align-content:center}
  .cta-row{grid-template-columns:minmax(0,1fr) 96px;gap:22px;padding:8px 0 40px}
  .cta-row h2{font-size:26px;line-height:1.12;letter-spacing:-.02em}
  .mark{width:96px;justify-self:end;margin:0}
  .mark img{filter:drop-shadow(0 0 30px rgba(111,134,255,.45)) drop-shadow(0 20px 40px rgba(0,0,0,.65))}
  .cols{grid-template-columns:1fr 1fr;gap:34px 20px;padding:40px 0}
  .cols>div:nth-child(1){order:-2}
  .cols>div:nth-child(4){order:-1}
  .cols h4{margin-bottom:12px}
  .cols ul{gap:9px;font-size:14px}
  .cols p{font-size:13.5px;line-height:1.5;margin-top:10px}
  .cols .brand-word{font-size:17px}
  .foot-meta{margin-top:0;padding-top:22px;gap:12px 20px;font-size:11px}
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.1s; }
.reveal.d2 { transition-delay: 0.2s; }
.reveal.d3 { transition-delay: 0.3s; }

/* ---------- mobile menu (draft-2 addition, in the same skin) ---------- */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { width: 24px; height: 1.5px; background: var(--ink); }
.mobile-menu {
  display: none;
  position: fixed; inset: 0;
  background: rgba(7, 8, 13, 0.97);
  backdrop-filter: blur(10px);
  z-index: 59;
  flex-direction: column; align-items: center; justify-content: center; gap: 2.25rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: 0.02em; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav .btn { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 600px) {
  .wrap, .nav-inner { padding-left: 24px; padding-right: 24px; }
  .section-pad { padding: 90px 0; }
}
