/* Spaceberries — Apple-inspired: dramatic dark hero, clean light product
   sections. White / #f5f5f7 alternating, Apple-blue links, generous whitespace.
   Type: Geist. When this changes, sub-pages (Arcade, art, tools) must follow. */

:root {
  --bg:       #ffffff;
  --bg-alt:   #f5f5f7;   /* Apple light grey */
  --bg-dark:  #0a0711;   /* hero / dark sections (warm near-black) */
  --ink:      #1d1d1f;   /* near-black text */
  --ink-2:    #6e6e73;   /* secondary grey */
  --ink-dark: #f5f5f7;   /* text on dark */
  --ink-dark-2: #a1a1a6; /* secondary on dark */
  --line:     #d2d2d7;
  --line-dark:rgba(255,255,255,0.16);
  --blue:     #9214d6;   /* brand purple (links/accents on light) */
  --blue-2:   #ff5cae;   /* brand pink (accents on dark) */
  --grad:     linear-gradient(135deg, #ff3d9a, #6f17de);  /* brand gradient */

  --maxw: 1000px;
  --wide: 1180px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--blue); color: #fff; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.wrap.wide { max-width: var(--wide); }

/* ---------- nav (transparent over dark hero -> white when scrolled) ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 52px; padding: 0 var(--pad);
  color: var(--ink-dark);
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(255,255,255,0.72); backdrop-filter: saturate(1.8) blur(20px);
  color: var(--ink); border-bottom-color: rgba(0,0,0,0.08);
}
.brand { font-weight: 600; font-size: 1.1rem; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 0.5rem; }
.brand::before { content: ""; width: 1.5rem; height: 1.4rem; background: url(/brand/mark.svg) no-repeat center / contain; }
.nav-right { display: flex; align-items: center; gap: clamp(0.9rem, 2vw, 1.9rem); }
.nav-links { display: flex; align-items: center; gap: clamp(0.9rem, 2vw, 1.75rem); list-style: none; }
.nav-links a { font-size: 0.85rem; opacity: 0.9; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }
.menu-btn { display: none; }
.lang-toggle { display: inline-flex; align-items: center; gap: 0.1rem; font-family: var(--mono); font-size: 0.72rem; }
.lang-toggle button { background: none; border: 0; cursor: pointer; padding: 0.2rem 0.35rem; font: inherit; color: inherit; opacity: 0.65; border-radius: 5px; }
.lang-toggle button:hover { opacity: 1; }
.lang-toggle button[aria-pressed="true"] { opacity: 1; color: var(--blue-2); font-weight: 600; }
.nav.scrolled .lang-toggle button[aria-pressed="true"] { color: var(--blue); }
.lang-toggle .sep { opacity: 0.4; }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 1rem; font-weight: 400;
  padding: 0.7rem 1.4rem; border-radius: 980px; border: 1px solid transparent;
  transition: background 0.2s var(--ease), opacity 0.2s, transform 0.2s var(--ease);
}
.btn-primary { background: var(--grad); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: currentColor; opacity: 0.95; }
.btn-ghost:hover { opacity: 1; }
/* Apple-style chevron text link */
.tlink { color: var(--blue); font-size: 1.05rem; display: inline-flex; align-items: center; gap: 0.15rem; }
.tlink:hover { text-decoration: underline; }
.tlink::after { content: "›"; font-weight: 500; transition: transform 0.2s var(--ease); }
.tlink:hover::after { transform: translateX(2px); }
.dark .tlink, .hero .tlink { color: var(--blue-2); }

/* ---------- hero (dark) ---------- */
.hero { position: relative; background: var(--bg-dark); color: var(--ink-dark); overflow: hidden;
  min-height: clamp(560px, 88vh, 880px); display: grid; align-items: center; text-align: center; padding: clamp(5.5rem, 10vh, 8rem) 0 clamp(3rem, 6vh, 5rem); }
.hero .glow { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(72% 56% at 50% 30%, rgba(255,61,154,0.30), transparent 66%),
    radial-gradient(46% 40% at 80% 88%, rgba(111,23,222,0.24), transparent 70%),
    radial-gradient(40% 38% at 16% 92%, rgba(255,92,174,0.12), transparent 72%); }
.hero .inner { position: relative; z-index: 2; }
.hero .eyebrow { color: var(--blue-2); font-size: 1.1rem; font-weight: 500; margin-bottom: 0.6rem; }
.hero h1 { font-weight: 600; font-size: clamp(2.8rem, 7vw, 5.5rem); line-height: 1.04; letter-spacing: -0.03em; text-wrap: balance; }
.hero-sub { margin: 1.2rem auto 0; font-size: clamp(1.15rem, 1.6vw, 1.4rem); color: var(--ink-dark-2); max-width: 46ch; font-weight: 400; line-height: 1.5; }
.hero-manifest { margin: 1.4rem auto 0; font-size: clamp(1.02rem, 1.2vw, 1.18rem); line-height: 1.55; color: var(--ink-dark-2); max-width: 46ch; }
.hero-manifest .lead-line { color: var(--ink-dark); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; justify-content: center; align-items: center; margin-top: 1.75rem; }
/* rotating real-work showcase (replaces the cube) */
.hero-stage { position: relative; z-index: 1; width: min(760px, 94%); margin: clamp(1.5rem, 4vh, 2.75rem) auto 0; aspect-ratio: 16/10; border-radius: 24px; overflow: hidden; border: 1px solid rgba(255,255,255,0.16); box-shadow: 0 50px 120px -40px rgba(0,0,0,0.9), 0 0 0 1px rgba(41,151,255,0.08); }
.hero-stage .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.1s var(--ease); }
.hero-stage .slide.on { opacity: 1; }

/* animated hero illustration */
.ill .glow-s { filter: drop-shadow(0 0 10px rgba(217,44,196,0.6)); }
.ill .float { animation: floaty 6s var(--ease) infinite; }
.ill .float.s { animation-duration: 7.5s; animation-delay: -2s; }
.ill .float.m { animation-duration: 5s; animation-delay: -1s; }
.ill .spin { animation: spin 26s linear infinite; }
.ill .orbit { animation: spin 18s linear infinite; }
.ill .orbit.rev { animation: spinr 22s linear infinite; }
.ill .draw { stroke-dasharray: 240; stroke-dashoffset: 240; animation: draw 3s var(--ease) infinite alternate; }
.ill [class*="spin"], .ill [class*="orbit"] { transform-box: fill-box; transform-origin: center; }
@keyframes floaty { 0%,100% { transform: translateY(6px); } 50% { transform: translateY(-12px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinr { to { transform: rotate(-360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* shared section label (left-aligned, quiet) */
.section-label { font-size: 0.95rem; font-weight: 600; color: var(--ink-2); margin-bottom: clamp(1.5rem, 3.5vh, 2.5rem); }

/* ---------- Aktuelt — three equal cards (image + label) ---------- */
.aktuelt { padding-block: clamp(4.5rem, 11vh, 8rem); }
.acards { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2vw, 1.5rem); }
.acard { background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease); }
.acard:hover { transform: translateY(-4px); box-shadow: 0 22px 48px -26px rgba(0,0,0,0.18); }
.acard .img { aspect-ratio: 4/3; position: relative; overflow: hidden; background: #ececef; display: grid; place-items: center; }
.acard .img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.acard .img img.contain { object-fit: contain; padding: 9%; background: #fff; }
.acard .img.arcade-tile { background: #0a0711; }
.acard .img .ph-cap { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.acard .body { padding: clamp(1.25rem, 2vw, 1.6rem); display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.acard h3 { font-weight: 600; font-size: 1.35rem; letter-spacing: -0.01em; }
.acard p { color: var(--ink-2); font-size: 0.98rem; line-height: 1.45; }

/* ---------- Fra verkstedet — photo grid (instagram-meets-workshop) ---------- */
.verksted { padding-block: clamp(4rem, 10vh, 7rem); background: var(--bg-alt); }
.vgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.vitem { position: relative; aspect-ratio: 1/1; border-radius: 16px; overflow: hidden; background: #e4e4e9; display: grid; place-items: center; }
.vitem.wide { grid-column: span 2; aspect-ratio: 2/1; }
.vitem img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vitem .cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 0.9rem 1rem; background: linear-gradient(transparent, rgba(0,0,0,0.6)); color: #fff; font-size: 0.88rem; font-weight: 500; }
.vitem .ph-cap { color: var(--ink-2); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
@media (max-width: 820px) {
  .acards { grid-template-columns: 1fr; }
  .vitem.wide { grid-column: span 1; aspect-ratio: 1/1; }
}

/* ---------- statement / charter ---------- */
.statement { background: var(--bg-dark); color: var(--ink-dark); text-align: center; }
.statement .inner { padding-block: clamp(6rem, 16vh, 11rem); }
.statement blockquote { font-weight: 600; font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.08; letter-spacing: -0.03em; max-width: 20ch; margin: 0 auto; text-wrap: balance; }
.statement blockquote .em { color: var(--blue-2); }
.statement .tlink { margin-top: 2rem; }

/* ---------- footer ---------- */
.footer { background: var(--bg-alt); color: var(--ink-2); font-size: 0.8rem; border-top: 1px solid var(--line); }
.footer .inner { max-width: var(--wide); margin: 0 auto; padding: 2.5rem var(--pad); display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.footer a { color: var(--ink-2); }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer .links { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* ---------- inner pages (about / charter) ---------- */
.page { padding-top: 52px; }
.page-hero { text-align: center; padding-block: clamp(4rem, 10vh, 7rem) clamp(1.5rem, 4vh, 2.5rem); }
.page-hero .eyebrow { color: var(--blue); font-weight: 600; font-size: 0.95rem; }
.page-hero h1 { font-weight: 600; font-size: clamp(2.6rem, 6vw, 4.5rem); letter-spacing: -0.03em; line-height: 1.05; margin-top: 0.4rem; text-wrap: balance; }
.prose { max-width: 34ch; margin: 0 auto; text-align: center; }
.prose p { font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 1.2rem; }
.prose p.dim { color: var(--ink-2); font-weight: 400; }
.principles { max-width: var(--maxw); margin: clamp(2rem,5vh,3.5rem) auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.principles .p { background: var(--bg); padding: clamp(1.5rem, 3vw, 2.25rem); text-align: left; }
.principles .p .n { font-family: var(--mono); font-size: 0.75rem; color: var(--blue); }
.principles .p h3 { font-weight: 600; font-size: 1.3rem; letter-spacing: -0.01em; margin-block: 0.5rem 0.35rem; }
.principles .p p { color: var(--ink-2); font-size: 0.98rem; }
.section { padding-block: clamp(3.5rem, 9vh, 6rem); }
.lead-quote { text-align: center; font-weight: 600; font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.12; letter-spacing: -0.02em; max-width: 20ch; margin: 0 auto; text-wrap: balance; }
.lead-quote .em { color: var(--blue); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .nav-links { display: none; }
  .menu-btn {
    display: inline-flex; background: none; border: 0; color: inherit; cursor: pointer;
    font: inherit; font-size: 0.85rem; padding: 0.2rem 0; -webkit-tap-highlight-color: transparent;
  }
  /* Menu button opens the links as a panel under the bar */
  .nav.menu-open {
    background: rgba(255,255,255,0.97); backdrop-filter: saturate(1.8) blur(20px);
    color: var(--ink); border-bottom-color: rgba(0,0,0,0.08);
  }
  .nav.menu-open .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: fixed; top: 52px; left: 0; right: 0;
    background: rgba(255,255,255,0.98); backdrop-filter: saturate(1.8) blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
    padding: 0.4rem var(--pad) 0.8rem;
  }
  .nav.menu-open .nav-links a {
    color: var(--ink); opacity: 1; font-size: 1rem; padding: 0.75rem 0;
    border-top: 1px solid rgba(0,0,0,0.06);
  }
  .nav.menu-open .nav-links li:first-child a { border-top: 0; }
  /* don't vertically-centre on phones: tall content overflowed up into the nav */
  .hero { align-items: start; min-height: auto; padding-top: 6rem; padding-bottom: clamp(3rem, 8vh, 4rem); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ill * { animation: none !important; }
  .ill .draw { stroke-dashoffset: 0; }
}
