:root {
  --bg: #ffffff;
  --bg-alt: #f7f7f8;
  --bg-dark: #0a0a0b;
  --ink: #111111;
  --dim: #404049;
  --faint: #71717a;
  --muted: #71717a;
  --line: #e4e4e7;

  --ink-dark: #fbfbfb;
  --dim-dark: #c4c4cc;
  --faint-dark: #52525b;
  --line-dark: #27272a;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.wrap { max-width: 900px; margin: 0 auto; padding: 0 32px; }
a { color: inherit; text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.7; }
::selection { background: var(--ink); color: var(--bg); }

/* ---------- Dynamic Reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Nav ---------- */
nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: rgba(10,10,11,0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
  color: var(--ink-dark);
}
.nav-inner {
  max-width: 900px; margin: 0 auto; padding: 20px 32px;
  display: flex; align-items: baseline; justify-content: space-between;
}
.brand {
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 9px;
}
.brand-mark {
  display: block; flex-shrink: 0;
  width: 22px; height: 22px;
  filter: invert(1) brightness(3) drop-shadow(0 0 0.6px white) drop-shadow(0 0 0.6px white);
}
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 13.5px; color: var(--dim-dark); font-weight: 500; }
.nav-links a:hover { color: var(--ink-dark); opacity: 1; }
.lang-toggle {
  background: none; border: 1px solid var(--line-dark); color: var(--dim-dark);
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
  transition: border-color 0.2s, color 0.2s; font-family: inherit;
}
.lang-toggle:hover { border-color: var(--ink-dark); color: var(--ink-dark); }

/* hamburger — hidden on desktop */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 6px; flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--ink-dark); border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media(max-width:560px){
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; flex-direction: column; gap: 20px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(10,10,11,0.97); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 28px 32px; border-bottom: 1px solid var(--line-dark);
    z-index: 99;
  }
  .nav-links.open { display: flex; }
}

/* ---------- Hero (Dark Section) ---------- */
header {
  background: var(--bg-dark); color: var(--ink-dark);
  padding: 160px 0 100px;
  min-height: 80vh; display: flex; flex-direction: column; justify-content: center;
}
.kicker {
  font-size: 12.5px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--dim-dark); font-weight: 600; margin-bottom: 32px;
  display: inline-block; padding: 6px 14px; border: 1px solid var(--line-dark); border-radius: 999px;
}
h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05; margin: 0 0 28px;
  letter-spacing: -0.03em; font-weight: 500; max-width: 16ch;
}
.lede {
  font-size: 19px; color: var(--dim-dark); max-width: 48ch; margin: 0; font-weight: 400; line-height: 1.5;
}

/* Shared dark gradient hero — used by home and service pages */
.hero-home,
.hero-service {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #0f111a 0%, #1a1e2e 100%);
}
.hero-home::before,
.hero-service::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background:
    radial-gradient(1000px 700px at 80% 20%, rgba(80,100,200, 0.22), transparent 55%),
    radial-gradient(800px 600px at 15% 80%, rgba(40,60,160, 0.18), transparent 55%);
  z-index: 0;
  pointer-events: none;
}
.hero-home > .wrap,
.hero-service > .wrap { position: relative; z-index: 2; }
/* Slightly slower breathe on service page */
.hero-home::before   { animation: lopi-breathe 18s ease-in-out infinite alternate; }
.hero-service::before { animation: lopi-breathe 22s ease-in-out infinite alternate; }
.hero-arken { }
.hero-lopi {
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
}
.hero-lopi::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background:
    radial-gradient(1200px 800px at 70% 30%, rgba(91,140,255, 0.25), transparent 50%),
    radial-gradient(900px 700px at 30% 70%, rgba(56,224,200, 0.2), transparent 50%);
  z-index: 0;
  pointer-events: none;
  animation: lopi-breathe 15s ease-in-out infinite alternate;
}
.hero-lopi > .wrap { position: relative; z-index: 2; }
/* Light text colours for the dark LOPI hero */
.hero-lopi .kicker { color: rgba(255,255,255,0.55); border-color: rgba(255,255,255,0.2); }
.hero-lopi h1 { color: #ffffff; }
.hero-lopi .lede { color: rgba(255,255,255,0.7); }

@keyframes lopi-breathe {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.05) translate(-2%, 2%); }
}

.lopi-grad {
  background: linear-gradient(92deg, #5b8cff 0%, #38e0c8 55%, #b78bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}
/* Snakke: deep blue-navy matching the app landing page */
.hero-snakke {
  background: #0a0e1c;
  padding: 64px 0 48px;
}
.hero-snakke .kicker { color: rgba(255,255,255,0.55); border-color: rgba(255,255,255,0.2); }
.hero-snakke h1 { color: #ffffff; }
.hero-snakke .lede { color: rgba(255,255,255,0.7); }
.hero-snakke .hero-layout > div:first-child { padding: 60px 0; }
.hero-snakke .hero-layout img {
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.06);
}

/* Arken: light background matching the clean white app UI */
.hero-arken {
  background: #f0f2f5;
  color: var(--ink);
  padding: 64px 0 48px;
}
.hero-arken .kicker {
  color: #555;
  border-color: #ccc;
}
.hero-arken h1 { color: #111; }
.hero-arken .lede { color: #444; }
.hero-arken .hero-layout > div:first-child { padding: 60px 0; }
.hero-arken .hero-layout img {
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.08);
}

/* DNorway: warm pinkish-beige matching the digital nomad landing page */
.hero-dnorway {
  background: linear-gradient(135deg, #f5ede8 0%, #ede8e0 100%);
  color: var(--ink);
  padding: 64px 0 48px;
}
.hero-dnorway .kicker {
  color: #7a5c52;
  border-color: #c9afa8;
}
.hero-dnorway h1 { color: #2a1f1c; }
.hero-dnorway .lede { color: #5a4a44; }
.hero-dnorway .hero-layout > div:first-child { padding: 60px 0; }
.hero-dnorway .hero-layout img {
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  border: 1px solid rgba(0,0,0,0.06);
}

/* Hero layout — equal columns */
.hero-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.hero-layout img {
  width: 100%; height: auto; border-radius: 12px; display: block;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}
@media(max-width:720px){ .hero-layout { grid-template-columns: 1fr; } }

.hero-visit-link {
  display: inline-block; margin-top: 28px;
  font-size: 14px; font-weight: 500; letter-spacing: 0.02em;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
  opacity: 0.7; transition: opacity 0.2s;
}
.hero-visit-link:hover { opacity: 1; }
.link-blue {
  transition: color 0.2s, border-color 0.2s;
}
.link-blue:hover { color: #4a8fff !important; border-color: #4a8fff !important; opacity: 1; }

/* ---------- LOPI Orbit Animation ---------- */
.focus-orbit {
  position: relative; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; width: 320px; height: 320px; margin: 0 auto;
}
.orbit-band {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(74,222,128,0.3);
  box-shadow: 0 0 15px rgba(74,222,128,0.08);
}
.band-a {
  inset: 0;
  border-color: rgba(74,222,128,0.15);
  animation: rotate3d-a 14s infinite linear;
}
.band-b {
  width: 220px; height: 220px;
  border-color: rgba(74,222,128,0.35);
  box-shadow: 0 0 20px rgba(74,222,128,0.12), inset 0 0 10px rgba(74,222,128,0.05);
  animation: rotate3d-b 10s infinite linear;
}
.band-c {
  width: 130px; height: 130px;
  border-color: rgba(74,222,128,0.5);
  animation: rotate3d-c 7s infinite linear;
}
.focus-core {
  position: absolute; width: 60px; height: 60px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #4ade80 0%, #16a34a 75%);
  box-shadow: 0 0 35px #22c55e, inset 0 1px 0 rgba(255,255,255,0.35);
  animation: core-glow 3s infinite ease-in-out;
}
@keyframes rotate3d-a {
  0%   { transform: rotate3d(1,1,1,0deg); }
  100% { transform: rotate3d(1,1,1,360deg); }
}
@keyframes rotate3d-b {
  0%   { transform: rotate3d(1,-1,0.5,360deg); }
  100% { transform: rotate3d(1,-1,0.5,0deg); }
}
@keyframes rotate3d-c {
  0%   { transform: rotate3d(-0.5,1,-1,0deg); }
  100% { transform: rotate3d(-0.5,1,-1,360deg); }
}
@keyframes core-glow {
  0%,100% { transform: scale(1);    box-shadow: 0 0 30px rgba(74,222,128,0.65); }
  50%     { transform: scale(1.08); box-shadow: 0 0 50px rgba(74,222,128,0.95); }
}

/* ---------- Sections ---------- */
section { padding: 96px 0; }
h2 {
  font-size: 13px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--dim); font-weight: 600; margin: 0 0 48px;
}

/* ---------- Citations ---------- */
.citations { margin-top: 56px; }
.citation {
  padding: 28px 0;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0 48px;
  align-items: start;
}
.citation-tag {
  font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--dim); font-weight: 600; padding-top: 5px;
}
.citation-statement {
  font-size: 20px; font-weight: 500; letter-spacing: -0.02em;
  color: var(--ink); margin: 0 0 10px; line-height: 1.3;
}
.citation-detail {
  font-size: 15px; color: var(--dim); margin: 0; line-height: 1.6; max-width: 68ch;
}
@media(max-width:640px){
  .citation { grid-template-columns: 1fr; gap: 6px 0; }
  .citation-tag { padding-top: 0; }
}

/* ---------- Projects ---------- */
#projects { background: var(--bg-alt); }
.project {
  display: grid; grid-template-columns: 180px 1fr; gap: 16px 32px;
  padding: 32px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 24px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
  text-decoration: none;
}
.project:last-of-type { margin-bottom: 0; }
.project:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.06); border-color: #d4d4d8; }
.p-name { font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.p-tag { font-size: 13px; color: var(--dim); font-weight: 500; margin-top: 4px; }
.p-desc { font-size: 15px; color: var(--dim); margin: 0; max-width: 52ch; line-height: 1.6; }
.p-link {
  grid-column: 2; font-size: 14px; font-weight: 500; color: var(--ink);
  margin-top: 16px; display: inline-flex; align-items: center; gap: 6px;
}
.p-link:hover { opacity: 0.7; text-decoration: underline; }
@media(max-width:640px){
  .project { grid-template-columns: 1fr; padding: 24px; }
  .p-link { grid-column: 1; }
}

/* ---------- Values ---------- */
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.values li {
  font-size: 16px; color: var(--dim); padding-left: 24px; position: relative; max-width: 60ch; line-height: 1.5;
}
.values li::before {
  content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; background: var(--faint); border-radius: 50%;
}
.values strong { color: var(--ink); font-weight: 500; }

/* ---------- About & Contact ---------- */
.about p, .contact p { font-size: 16.5px; color: var(--dim); max-width: 56ch; margin: 0 0 24px; line-height: 1.6; }
.facts {
  margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 32px; padding-top: 40px; border-top: 1px solid var(--line);
}
.facts dt {
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--faint); font-weight: 600; margin-bottom: 8px;
}
.facts dd { margin: 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.facts a:hover { opacity: 0.7; }

.contact a.mail {
  display: inline-block; font-size: 18px; font-weight: 500; color: var(--ink);
  border-bottom: 1px solid var(--line); padding-bottom: 2px;
}
.contact a.mail:hover { opacity: 0.7; border-color: var(--ink); }

/* ---------- Contact Form ---------- */
.contact-form {
  margin-top: 40px; display: grid;
  grid-template-columns: 1fr 1fr; gap: 14px; max-width: 600px;
}
.contact-form .full { grid-column: 1 / -1; }
.contact-form input,
.contact-form textarea {
  width: 100%; background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: 8px; padding: 13px 16px; font-size: 15px;
  font-family: inherit; color: var(--ink); outline: none;
  transition: border-color 0.2s; box-sizing: border-box; resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--ink); }
.contact-form textarea { min-height: 120px; }
.contact-form button {
  grid-column: 1 / -1; justify-self: start;
  background: var(--ink); color: var(--bg); border: none; border-radius: 8px;
  padding: 13px 28px; font-size: 15px; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: opacity 0.2s;
}
.contact-form button:hover { opacity: 0.75; }
@media(max-width:560px){ .contact-form { grid-template-columns: 1fr; } }

/* ---------- Shared Project Page Components ---------- */
/* Used across arken.html, lopi.html, snakke.html, dnorway.html, service.html */

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; margin-top: 48px; }
.detail-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 32px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.detail-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.06); border-color: #d4d4d8; }
.detail-card h3 { font-size: 18px; margin: 0 0 12px; letter-spacing: -0.02em; }
.detail-card p { font-size: 15px; color: var(--dim); margin: 0; line-height: 1.6; }

.roadmap { margin-top: 48px; position: relative; padding-left: 24px; border-left: 2px solid var(--line); }
.milestone { position: relative; margin-bottom: 32px; }
.milestone::before {
  content: ""; position: absolute; left: -31px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--faint);
}
.milestone.done::before { background: var(--ink); border-color: var(--ink); }
.milestone.now::before { border-color: var(--ink); }
.milestone h4 { margin: 0 0 8px; font-size: 16.5px; display: flex; align-items: baseline; gap: 12px; }
.milestone .status { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.milestone.done .status { color: var(--ink); }
.milestone p { margin: 0; color: var(--dim); font-size: 15px; max-width: 60ch; }

/* LOPI page components */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
.stat-box { border: 1px solid var(--line); border-radius: 12px; padding: 20px; text-align: center; }
.stat-box .num { font-size: 32px; font-weight: 800; letter-spacing: -0.04em; color: var(--ink); line-height: 1; }
.stat-box .lbl { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 6px; }

/* Stat boxes inside the dark lopi hero get dark styling */
.hero-lopi .stat-box { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.14); }
.hero-lopi .stat-box .num { color: rgba(255,255,255,0.85); }
.hero-lopi .stat-box .lbl { color: rgba(255,255,255,0.4); }
.arch-diagram { border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin-top: 40px; background: var(--bg-alt); }
.arch-diagram svg { display: block; width: 100%; height: auto; }
.arch-caption { font-size: 13px; color: var(--faint); text-align: center; margin-top: 12px; }
.principles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
.principle { display: flex; gap: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; align-items: flex-start; }
.principle .mark { flex: 0 0 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.principle .mark.yes { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.principle .mark.no  { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.principle b { display: block; font-size: 15px; margin-bottom: 2px; }
.principle small { color: var(--dim); font-size: 13.5px; line-height: 1.5; }
table { width: 100%; border-collapse: collapse; margin-top: 40px; font-size: 14.5px; }
th { text-align: left; padding: 16px; border-bottom: 2px solid var(--line); font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px; }
td { padding: 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--dim); }
.lopi-cta { border: 1px solid var(--line); border-radius: 16px; padding: 48px; text-align: center; margin-top: 20px; background: var(--bg-alt); }
.lopi-cta h2 { margin-top: 0; }
.lopi-cta .lede { color: var(--dim); max-width: 58ch; margin: 0 auto 28px; }
@media (max-width: 640px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .principles { grid-template-columns: 1fr; }
}

/* ---------- Footer (Dark Section) ---------- */
footer {
  background: var(--bg-dark); color: var(--dim-dark);
  padding: 48px 0; font-size: 13.5px;
}
.foot-inner {
  max-width: 900px; margin: 0 auto; padding: 0 32px;
  display: flex; flex-direction: column; gap: 16px;
}
.foot-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.foot-legal {
  font-size: 12px; color: var(--faint-dark); border-top: 1px solid var(--line-dark); padding-top: 16px;
}
.foot-inner a { color: var(--dim-dark); border-bottom: 1px solid var(--faint-dark); padding-bottom: 1px; }
.foot-inner a:hover { color: var(--ink-dark); opacity: 1; }
