/* Innovolt – innovolt.no
   Tokens, base, layout and components. Section styles follow in page order. */

:root {
  --bg: #f7f4ee;
  --ink: #1d1c1a;
  --ink-2: #4a4741;
  --ink-3: #5d5a54;
  --muted: #6b665c;
  --line: #e4ddd0;
  --sand: #efe7d8;
  --card: #ffffff;
  --card-line: #e7e1d6;
  --gold: #8a6a12;
  --gold-small: #7d5f10;
  --bolt: #d9a300;
  --night: #0f0f0e;
  --night-2: #1d1c1a;
  --night-line: #3a3933;
  --night-ink: #f3f1ea;
  --night-ink-2: #b4b1a7;
  --night-muted: #9a978e;
  --yellow: #ffd23f;
  --term-dim: #8f8b80;
  --term-ok: #7fc98f;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --wrap: min(1180px, 92vw);
  --radius-panel: 32px;
}

@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
strong, b { font-weight: 600; }
em, i { font-style: normal; }
[id] { scroll-margin-top: 24px; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.panel--night :focus-visible { outline-color: var(--yellow); }

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus { top: 16px; }

/* ---------- layout ---------- */
.wrap { width: var(--wrap); margin-inline: auto; }
.section { position: relative; padding-block: clamp(72px, 9vw, 120px); }
.panel { margin-inline: 16px; border-radius: var(--radius-panel); overflow: hidden; }
.panel .wrap { width: min(1180px, calc(100% - 48px)); }
.panel--sand { background: var(--sand); }
.panel--night { background: var(--night); color: var(--night-ink); }
.panel + .section, .section + .panel { margin-top: 0; }

/* ---------- type ---------- */
.kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-small);
}
.panel--night .kicker { font-family: var(--mono); font-weight: 500; letter-spacing: .08em; color: var(--yellow); }

.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.08;
  letter-spacing: -.02em;
  max-width: 18em;
  margin-top: 12px;
}
.h2 em { color: var(--gold); }
.panel--night .h2 em { color: var(--yellow); }

.lead { font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 32em; }

/* ---------- components ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--bg);
  padding: 11px 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .2s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: #cfc9bd; }
.btn--ghost:hover { border-color: var(--ink); }

.pill {
  display: block;
  font-size: 12.5px;
  border: 1px solid #ddd5c6;
  background: #fbf9f4;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--ink-2);
}
.pill strong { color: var(--ink); }

/* ---------- header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 28px;
  font-size: 14px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
}
.logo__bolt { width: 13px; height: 18px; fill: var(--bolt); }
.site-nav { display: flex; gap: 26px; color: var(--ink-3); }
.site-nav a { text-decoration: none; }
.site-nav a:hover { color: var(--ink); }
.site-header__end { display: flex; align-items: center; gap: 18px; }
.lang { display: flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.lang [aria-current] { color: var(--ink); font-weight: 600; }
.lang a { text-decoration: none; }
.lang a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.btn--nav { padding: 8px 16px; font-size: 13px; }

@media (max-width: 720px) {
  .site-nav { display: none; }
  .site-header { padding-block: 20px; }
  .site-header__end { gap: 12px; }
}

/* ---------- 1 · hero ---------- */
.hero { padding-top: clamp(28px, 5vw, 60px); padding-bottom: 40px; }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 7.4vw, 104px);
  line-height: .95;
  letter-spacing: -.04em;
}
.hero__end { white-space: nowrap; }
.hero__bolt {
  display: inline-block;
  width: .3em;
  height: .42em;
  margin-left: .04em;
  fill: var(--bolt);
}
.hero__lead { margin-top: 22px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.clients {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 30px;
  margin-top: 54px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.clients span { margin-right: 4px; }
.clients strong { font-family: var(--serif); font-weight: 600; font-size: 18px; color: var(--ink-3); }

/* ---------- cards (deck + grid) ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px -28px rgba(60, 45, 10, .32);
}
.card__media { position: relative; flex: 1; min-height: 190px; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 16px 20px 18px; border-top: 1px solid #f0ebe2; }
.card__type {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.card__dot { width: 6px; height: 6px; border-radius: 50%; }
.card__dot--artifact-hub { background: var(--bolt); }
.card__dot--potluck { background: #c0793a; }
.card__dot--modi { background: #6b8a5a; }
.card__name { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -.01em; margin: 6px 0 4px; }
.card__text { font-size: 13.5px; line-height: 1.45; color: var(--ink-3); }

.hero__visual { position: relative; }
.deck { position: relative; height: 390px; }
.deck-toggle {
  position: absolute;
  right: 34px;
  bottom: -46px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #cfc9bd;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
}
.deck-toggle:hover { border-color: var(--ink); color: var(--ink); }
.deck-toggle::before, .deck-toggle::after {
  content: '';
  position: absolute;
  top: 10px;
  width: 3px;
  height: 10px;
  border-radius: 1px;
  background: currentColor;
}
.deck-toggle::before { left: 11px; }
.deck-toggle::after { left: 16px; }
.deck-toggle[aria-pressed="true"]::before {
  left: 12px;
  width: 0;
  height: 0;
  border-radius: 0;
  background: none;
  border-style: solid;
  border-width: 5px 0 5px 9px;
  border-color: transparent transparent transparent currentColor;
}
.deck-toggle[aria-pressed="true"]::after { display: none; }
.deck .card {
  position: absolute;
  inset: 30px 34px 0 0;
  transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .7s;
}
.deck .card[data-pos="0"] { transform: none; opacity: 1; z-index: 3; }
.deck .card[data-pos="1"] { transform: translate(18px, -16px) scale(.96); opacity: .7; z-index: 2; }
.deck .card[data-pos="2"] { transform: translate(34px, -30px) scale(.92); opacity: .35; z-index: 1; }

/* illustrations (until real screenshots replace them) */
.art { position: absolute; inset: 0; }
.art--hub {
  background: var(--night-2);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 24px 26px;
  align-content: center;
}
.art__tile {
  aspect-ratio: 1;
  border-radius: 12px;
  background: #2a2926;
  display: grid;
  place-items: center;
  color: var(--night-muted);
  font-size: 18px;
}
.art__tile--on { background: var(--yellow); box-shadow: 0 0 24px rgba(255, 210, 63, .45); }
.art__bolt { width: 40%; height: 50%; fill: var(--night); }
.art--potluck {
  background: #f3e7d8;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
}
.art__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #fffaf3;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  color: #5b3f22;
}
.art__row b { font-weight: 500; }
.art__row span { font-size: 11px; color: #8c6238; }
.art--modi { background: #e6eedf; display: flex; justify-content: center; align-items: flex-end; gap: 16px; padding-top: 20px; }
.phone {
  width: 132px;
  align-self: stretch;
  background: #fff;
  border: 5px solid var(--ink);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  padding: 12px 10px;
  font-size: 10.5px;
  color: #2f3a28;
}
.phone__title { font-weight: 600; font-size: 11px; margin-bottom: 8px; }
.phone__day { display: flex; justify-content: space-between; gap: 6px; padding: 5px 0; border-top: 1px solid #eef2ea; }
.phone__day span:first-child { color: #5e6e52; }
.phone__item { display: flex; gap: 6px; align-items: center; padding: 4px 0; }
.phone__item i { width: 10px; height: 10px; flex: none; border: 1.5px solid #5e6e52; border-radius: 3px; }
.phone__item--done i { background: #6b8a5a; border-color: #6b8a5a; }
.phone__item--done span { text-decoration: line-through; color: #8a9480; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .deck { height: 360px; max-width: 520px; }
}

/* ---------- 2 · services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 44px;
  border-top: 1px solid #cfc5b2;
}
.service { padding: 22px 26px 0 0; }
.service + .service { padding-left: 26px; border-left: 1px solid #ddd3c1; }
.service__n { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.service__title { font-family: var(--serif); font-weight: 600; font-size: 22px; margin: 8px 0; }
.service p { font-size: 14px; line-height: 1.6; color: var(--ink-2); }

/* ---------- 3 · projects ---------- */
.projects__lead { margin-top: 16px; }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.card--grid { transition: transform .25s ease, box-shadow .25s ease; }
.card--grid:hover { transform: translateY(-3px); box-shadow: 0 30px 70px -30px rgba(60, 45, 10, .38); }
.card--grid .card__media { flex: none; height: 210px; }
.card--grid .card__body { flex: 1; }
.card--grid .phone { width: 112px; }
.card__name a { text-decoration: none; }
.card__name a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.card__name a:focus-visible { outline: none; }
.card--grid:focus-within { outline: 2px solid var(--ink); outline-offset: 3px; }
.card__stack { margin-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--gold-small); }

@media (max-width: 860px) {
  .services { grid-template-columns: 1fr; }
  .service, .service + .service { padding: 20px 0; border-left: 0; }
  .service + .service { border-top: 1px solid #ddd3c1; }
  .projects { grid-template-columns: 1fr; max-width: 520px; }
}

/* ---------- 4 · artifact hub ---------- */
.panel--night { position: relative; isolation: isolate; }
.panel--night::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 25%, transparent 75%);
}
.panel--night::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 30%;
  z-index: -1;
  width: min(620px, 92%);
  height: 420px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(255, 210, 63, .16), transparent 65%);
  pointer-events: none;
}
.panel--night .h2 { color: var(--night-ink); }
.hub__lead { margin-top: 16px; color: var(--night-ink-2); max-width: 36em; }
.hub-media {
  margin-top: 38px;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border: 1px solid #2e2d29;
  background: linear-gradient(160deg, var(--night-2), #141412);
  box-shadow: 0 40px 90px -30px rgba(255, 210, 63, .18);
  overflow: hidden;
}
.hub-media video { width: 100%; height: 100%; object-fit: cover; }
.hub-art {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 120px));
  gap: clamp(10px, 2vw, 22px);
  place-content: center;
  padding: 24px;
}
.hub-art__tile {
  aspect-ratio: 1;
  border-radius: clamp(10px, 1.6vw, 18px);
  background: #2a2926;
  display: grid;
  place-items: center;
  color: var(--night-muted);
  font-size: clamp(16px, 2.4vw, 26px);
}
.hub-art__tile--on { background: var(--yellow); box-shadow: 0 0 40px rgba(255, 210, 63, .5); }
.hub-art__bolt { width: 40%; height: 50%; fill: var(--night); }
.hub-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 34px; }
.hub-step { border-top: 1px solid var(--night-line); padding-top: 16px; }
.hub-step__n { font-family: var(--mono); font-size: 11px; color: var(--yellow); }
.hub-step__title { font-size: 17px; font-weight: 600; margin: 8px 0 6px; }
.hub-step p { color: var(--night-muted); font-size: 14px; line-height: 1.55; }
.hub__oss { margin-top: 34px; font-size: 14px; color: var(--night-ink-2); }
.hub__oss a { color: var(--yellow); text-underline-offset: 3px; white-space: nowrap; }

@media (max-width: 860px) {
  .hub-steps { grid-template-columns: 1fr; }
}

/* ---------- 5 · join + terminal ---------- */
.join { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.join .h2 { font-size: clamp(40px, 5vw, 66px); line-height: .98; letter-spacing: -.04em; }
.join__lead { margin: 24px 0 26px; font-size: 17px; }
.join__text > a { font-size: 14px; color: var(--ink-2); text-decoration-color: #b9b1a2; text-underline-offset: 4px; }
.join__text > a:hover { color: var(--ink); text-decoration-color: var(--ink); }

.term {
  background: var(--night);
  color: #e8e5dc;
  border-radius: 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .45);
  overflow: hidden;
  cursor: text;
}
.term__bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; background: var(--night-2); }
.term__bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--night-line); }
.term__bar span { flex: 1; text-align: center; margin-right: 40px; font-size: 11px; color: var(--term-dim); }
.term__out { height: 400px; overflow-y: auto; padding: 18px 20px 22px; scrollbar-width: thin; scrollbar-color: var(--night-line) transparent; }
.term__line { white-space: pre-wrap; overflow-wrap: anywhere; }
.term__line + .term__line { margin-top: 2px; }
.t-dim { color: var(--term-dim); }
.t-me { color: var(--night-ink); }
.t-ok { color: var(--term-ok); }
.term__prompt { display: flex; align-items: center; }
.term input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 0;
  color: var(--night-ink);
  font: inherit;
  caret-color: var(--yellow);
}
.term__cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--yellow);
  vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}
.term__prompt:focus-within .term__cursor { display: none; }
@keyframes blink { 50% { opacity: 0; } }
.term__action {
  font: inherit;
  color: var(--yellow);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.term__restart { color: var(--term-dim); margin-right: 8px; }
.term :focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

@media (max-width: 860px) {
  .join { grid-template-columns: 1fr; gap: 40px; }
  .term__out { height: 360px; }
}
@media (pointer: coarse) {
  .term input { font-size: 16px; }
}

/* ---------- 6 · contact + footer ---------- */
.contact { text-align: center; padding-top: clamp(80px, 10vw, 112px); padding-bottom: 40px; margin-bottom: 16px; }
.contact .h2 { margin-inline: auto; font-size: clamp(40px, 5vw, 68px); line-height: 1; letter-spacing: -.03em; }
.contact-mail {
  display: inline-block;
  margin-top: 28px;
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 28px);
  text-decoration: none;
  border-bottom: 2px solid var(--yellow);
  overflow-wrap: anywhere;
}
.contact-mail:hover { border-bottom-color: var(--ink); }
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  margin-top: clamp(64px, 8vw, 96px);
  padding-top: 20px;
  border-top: 1px solid #ddd3c1;
  font-size: 13px;
  color: var(--muted);
  text-align: left;
}
.site-footer .logo { font-size: 16px; }
.site-footer .logo__bolt { width: 10px; height: 14px; }

/* ---------- 404 ---------- */
.notfound { padding-block: clamp(80px, 14vw, 160px); }
.notfound .h2 { font-size: clamp(36px, 5vw, 64px); }
.notfound__links { display: flex; gap: 24px; margin-top: 28px; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
