/* ==========================================================================
   Simbla.io — digitalt verksted
   ========================================================================== */

:root {
  --bg: #0b0c0f;
  --bg-raised: #131519;
  --bg-raised-2: #1a1d22;
  --line: #2a2d33;
  --line-soft: #1e2126;
  --fg: #f2f1ec;
  --fg-dim: #a8a9ad;
  --fg-dimmer: #6f7176;
  --accent: #c8ff3d;
  --accent-dim: #8fb82c;
  --accent-ink: #0b0c0f;
  --warn: #ff6b45;

  --font-sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1200px;
  --radius: 14px;
  --ease: cubic-bezier(.22,.9,.28,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-sans); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
svg { display: block; }
img { max-width: 100%; display: block; }

.mono { font-family: var(--font-mono); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 1000;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.75rem 1.25rem; border-radius: 8px; font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* subtle grain overlay */
.grain {
  position: fixed; inset: 0; z-index: 2000; pointer-events: none;
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(11,12,15,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 1.05rem;
}
.logo-mark { color: var(--accent); display: flex; }
.logo-text { letter-spacing: -0.01em; }
.dot { color: var(--accent); }

.main-nav {
  display: flex; gap: 32px;
  font-size: 0.92rem;
}
.main-nav a {
  color: var(--fg-dim);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s var(--ease);
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--accent);
  transition: right 0.25s var(--ease);
}
.main-nav a:hover { color: var(--fg); }
.main-nav a:hover::after { right: 0; }

.header-right { display: flex; align-items: center; gap: 18px; }

.status-chip {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.75rem; color: var(--fg-dimmer);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 6px 12px;
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(200,255,61,0.6);
  animation: pulse-dot 2.2s infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(200,255,61,0.5); }
  70% { box-shadow: 0 0 0 6px rgba(200,255,61,0); }
  100% { box-shadow: 0 0 0 0 rgba(200,255,61,0); }
}

.lang-switch {
  display: flex; align-items: center;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  padding: 5px 11px;
  font-size: 0.72rem;
  border-radius: 100px;
  color: var(--fg-dimmer);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-btn.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}
.lang-btn:not(.is-active):hover { color: var(--fg); }

.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px;
}
.nav-toggle span {
  display: block; width: 100%; height: 2px; background: var(--fg);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: 88px 0 60px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 20px;
  display: inline-flex; align-items: center; gap: 8px;
}
.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-title {
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  margin-bottom: 24px;
}
.accent-text { color: var(--accent); }

.hero-lede {
  font-size: 1.1rem;
  color: var(--fg-dim);
  max-width: 46ch;
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  border-radius: 100px;
  font-weight: 600; font-size: 0.95rem;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-2px); background: #d6ff66; }
.btn-primary svg { transition: transform 0.2s var(--ease); }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-ghost { border-color: var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn-lg { padding: 18px 32px; font-size: 1.05rem; }

/* hero build visual */
.hero-build {
  position: relative;
  height: 420px;
}

.build-window {
  position: absolute; inset: 0;
  margin: auto;
  width: 100%; max-width: 400px; height: 260px;
  top: 50%; transform: translateY(-50%);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
  overflow: hidden;
  z-index: 3;
}

.build-titlebar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-raised-2);
}
.tb-dot { width: 9px; height: 9px; border-radius: 50%; }
.tb-dot.r { background: #ff5f57; }
.tb-dot.y { background: #febc2e; }
.tb-dot.g { background: #28c840; }
.build-name { margin-left: auto; font-size: 0.72rem; color: var(--fg-dimmer); }

.build-body {
  padding: 18px 16px;
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--fg-dim);
}
.tline {
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid transparent;
  width: 0;
}
.tline:nth-child(4) { color: var(--accent); }

.float-block {
  position: absolute;
  padding: 8px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--fg-dim);
  animation: drift var(--dur, 10s) ease-in-out infinite;
  z-index: 2;
}
.fb-1 { top: 6%; left: 4%; }
.fb-2 { top: 12%; right: 2%; color: var(--accent); border-color: rgba(200,255,61,0.35); }
.fb-3 { bottom: 16%; left: 0%; }
.fb-4 { bottom: 6%; right: 12%; }
.fb-5 { top: 44%; right: -2%; }

@keyframes drift {
  0%, 100% { transform: translate(0,0) rotate(0deg); }
  50% { transform: translate(0,-14px) rotate(-2deg); }
}

.scroll-cue {
  display: flex; align-items: center; gap: 8px;
  justify-content: center;
  color: var(--fg-dimmer);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 40px;
}
.scroll-cue span { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(4px);} }

/* ==========================================================================
   Section scaffolding
   ========================================================================== */

section { padding: 110px 0; position: relative; }

.section-index {
  display: inline-block;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.section-head { max-width: 720px; margin-bottom: 64px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 18px; }
.section-sub { color: var(--fg-dim); font-size: 1.05rem; max-width: 58ch; }

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   About
   ========================================================================== */

.about { border-top: 1px solid var(--line-soft); }

.about-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
}

.about-content h2 {
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  margin-bottom: 32px;
  max-width: 14ch;
}

.about-text {
  display: flex; flex-direction: column; gap: 18px;
  max-width: 62ch;
  color: var(--fg-dim);
  font-size: 1.08rem;
  margin-bottom: 40px;
}
.pull-line {
  color: var(--fg);
  font-size: 1.4rem;
  font-weight: 600;
  font-family: var(--font-sans);
}

.about-facts {
  display: flex; flex-direction: column; gap: 12px;
  border-top: 1px solid var(--line-soft);
  padding-top: 24px;
  font-size: 0.85rem;
  color: var(--fg-dim);
}
.about-facts li { display: flex; gap: 14px; align-items: baseline; }
.about-facts span { color: var(--accent); }

/* ==========================================================================
   Projects — editorial bento grid
   ========================================================================== */

.projects { border-top: 1px solid var(--line-soft); background: var(--bg-raised); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.project-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.project-card.size-lg { grid-column: span 4; grid-row: span 2; }
.project-card.size-md { grid-column: span 2; grid-row: span 2; }
.project-card.size-sm { grid-column: span 2; grid-row: span 1; }

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -24px rgba(0,0,0,0.7);
}

.project-link {
  display: flex; flex-direction: column;
  height: 100%;
  padding: 28px;
  position: relative;
}

.size-sm .project-link { padding: 22px; }

.pc-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.pc-num { color: var(--fg-dimmer); font-size: 0.78rem; }
.pc-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.72rem; color: var(--fg-dim);
}
.pc-status i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  display: inline-block;
}

.pc-title {
  font-size: 1.5rem;
  margin-bottom: 12px;
  transition: color 0.2s var(--ease);
}
.size-lg .pc-title { font-size: 2.1rem; }
.project-card:hover .pc-title { color: var(--accent); }

.pc-desc {
  color: var(--fg-dim);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: auto;
  max-width: 46ch;
}

.pc-meta {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.pc-cat { font-size: 0.72rem; color: var(--fg-dimmer); text-transform: uppercase; letter-spacing: 0.03em; }
.pc-tech { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-tech span {
  font-size: 0.7rem;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--fg-dim);
}

.pc-arrow {
  position: absolute; top: 24px; right: 24px;
  color: var(--fg-dimmer);
  opacity: 0;
  transform: translate(-4px,4px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), color 0.25s var(--ease);
}
.project-card:hover .pc-arrow { opacity: 1; transform: translate(0,0); color: var(--accent); }

/* ==========================================================================
   Process / oppdrag
   ========================================================================== */

.process { border-top: 1px solid var(--line-soft); }

.process-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
}

.process-flow {
  display: flex; align-items: center;
  flex-wrap: wrap;
  gap: 0;
}
.pf-step {
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-raised);
  min-width: 130px;
}
.pf-step.pf-final { border-color: var(--accent); background: rgba(200,255,61,0.06); }
.pf-num { color: var(--accent); font-size: 0.78rem; }
.pf-label { font-weight: 600; font-size: 1.05rem; }
.pf-line {
  flex: 1 1 40px;
  min-width: 24px;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px);
  margin: 0 4px;
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.offer-item {
  background: var(--bg);
  padding: 24px 20px;
  display: flex; flex-direction: column; gap: 10px;
  transition: background 0.2s var(--ease);
}
.offer-item:hover { background: var(--bg-raised); }
.offer-item span { color: var(--accent); font-size: 0.75rem; }
.offer-item p { font-size: 0.95rem; }

.process-note {
  margin-top: 48px;
  color: var(--fg-dim);
  font-size: 0.95rem;
  border-left: 2px solid var(--accent);
  padding-left: 18px;
}

/* ==========================================================================
   Statement
   ========================================================================== */

.statement {
  border-top: 1px solid var(--line-soft);
  padding: 130px 0;
  background: var(--bg-raised);
}
.statement-text {
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  font-weight: 600;
  line-height: 1.35;
  max-width: 26ch;
}

/* ==========================================================================
   Stack marquee
   ========================================================================== */

.stack { border-top: 1px solid var(--line-soft); padding: 90px 0 70px; }
.stack-head { margin-bottom: 36px; }

.stack-marquee {
  overflow: hidden;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 22px 0;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.stack-track {
  display: flex; gap: 20px; white-space: nowrap;
  width: max-content;
  font-size: 1.1rem;
  color: var(--fg-dim);
  animation: marquee 28s linear infinite;
}
.stack-track span:nth-child(2n) { color: var(--fg-dimmer); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.stack-caption {
  text-align: center;
  color: var(--fg-dimmer);
  font-size: 0.8rem;
  margin-top: 28px;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact { border-top: 1px solid var(--line-soft); padding: 140px 0; }
.contact-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact h2 { font-size: clamp(2.2rem, 5vw, 4rem); margin-bottom: 20px; max-width: 16ch; }
.contact-lede { color: var(--fg-dim); font-size: 1.1rem; max-width: 50ch; margin-bottom: 44px; }
.contact-actions { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.contact-email { color: var(--fg-dim); font-size: 0.95rem; border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: color 0.2s var(--ease), border-color 0.2s var(--ease); }
.contact-email:hover { color: var(--accent); border-color: var(--accent); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { border-top: 1px solid var(--line-soft); padding: 56px 0; }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start;
  gap: 32px;
}
.footer-brand p { color: var(--fg-dimmer); font-size: 0.9rem; margin-top: 10px; max-width: 32ch; }
.footer-links { display: flex; gap: 24px; font-size: 0.9rem; color: var(--fg-dim); }
.footer-links a:hover { color: var(--accent); }
.footer-meta { color: var(--fg-dimmer); font-size: 0.78rem; width: 100%; margin-top: 16px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-build { height: 320px; order: -1; }
  .about-grid { grid-template-columns: 1fr; }
  .offer-grid { grid-template-columns: repeat(3, 1fr); }
  .project-grid { grid-template-columns: repeat(4, 1fr); }
  .project-card.size-lg { grid-column: span 4; }
  .project-card.size-md { grid-column: span 2; }
  .project-card.size-sm { grid-column: span 2; }
}

@media (max-width: 720px) {
  section { padding: 76px 0; }
  .main-nav { position: fixed; top: 68px; left: 0; right: 0; bottom: 0;
    background: var(--bg); border-top: 1px solid var(--line-soft);
    flex-direction: column; padding: 32px 24px; gap: 24px;
    font-size: 1.2rem;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
    z-index: 400;
  }
  .main-nav.is-open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .status-chip { display: none; }

  .offer-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .project-card.size-lg,
  .project-card.size-md,
  .project-card.size-sm { grid-column: span 2; grid-row: auto; }

  .process-flow { flex-direction: column; align-items: stretch; }
  .pf-line { width: 1px; height: 24px; margin: 0 0 0 22px;
    background: repeating-linear-gradient(180deg, var(--line) 0 6px, transparent 6px 12px);
  }
  .pf-step { flex-direction: row; align-items: center; }

  .footer-inner { flex-direction: column; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 18px; }
  .hero { padding-top: 64px; }
  .btn-lg { width: 100%; justify-content: center; }
}
