/* ArdenGrö Dynamics
   Two worlds, one page. Utopia is the light theme, Dystopia is the dark theme.
   Brand: charcoal #2d2d2d, leaf lime #9fd120 fading to olive. */

:root {
  --brand-charcoal: #2d2d2d;
  --brand-lime: #9fd120;

  /* Utopia */
  --bg: #f7f8f3;
  --surface: #ffffff;
  --surface-muted: #eef1e6;
  --text: #2d2d2d;
  --text-muted: #5f645c;
  --line: #dfe3d6;
  --accent: #4d7c0f;
  --accent-strong: #9fd120;
  --accent-ink: #1f2a08;
  --accent-soft: #eaf5cf;
  --accent-soft-ink: #3f6a0a;
  --blob-1: rgba(159, 209, 32, 0.35);
  --blob-2: rgba(124, 159, 35, 0.22);
  --blob-3: rgba(255, 244, 200, 0.6);
  --glow: rgba(159, 209, 32, 0.18);
  --shadow: 0 24px 60px rgba(45, 45, 45, 0.12);
  --mode-label: "Utopia";
  --radius: 18px;
  --max: 1100px;
  --font-display: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141414;
    --surface: #1f1f1f;
    --surface-muted: #2d2d2d;
    --text: #f1f2ec;
    --text-muted: #a6aa9f;
    --line: #333333;
    --accent: #b9e34f;
    --accent-strong: #9fd120;
    --accent-ink: #141414;
    --accent-soft: #2f3a17;
    --accent-soft-ink: #c6e96a;
    --blob-1: rgba(159, 209, 32, 0.16);
    --blob-2: rgba(90, 110, 39, 0.28);
    --blob-3: rgba(60, 60, 60, 0.6);
    --glow: rgba(159, 209, 32, 0.12);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    --mode-label: "Dystopia";
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141414;
  --surface: #1f1f1f;
  --surface-muted: #2d2d2d;
  --text: #f1f2ec;
  --text-muted: #a6aa9f;
  --line: #333333;
  --accent: #b9e34f;
  --accent-strong: #9fd120;
  --accent-ink: #141414;
  --accent-soft: #2f3a17;
  --accent-soft-ink: #c6e96a;
  --blob-1: rgba(159, 209, 32, 0.16);
  --blob-2: rgba(90, 110, 39, 0.28);
  --blob-3: rgba(60, 60, 60, 0.6);
  --glow: rgba(159, 209, 32, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --mode-label: "Dystopia";
  color-scheme: dark;
}

/* ---------- Mode-specific content ----------
   Every Utopia/Dystopia pair is stacked in one grid cell (.swap) so the box
   keeps the taller of the two and the text crossfades. Nothing changes
   layout when the world flips. */
.swap { display: grid; }
.swap.inline { display: inline-grid; vertical-align: top; }
.swap > .u, .swap > .d {
  grid-area: 1 / 1;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}
.swap > .d { opacity: 0; visibility: hidden; }

/* Logos and the hero pictures: one variant visible, crossfaded where it matters. */
.logo-dark { display: block; }
.logo-light { display: none; }
.hero-bg .u, .hero-bg .d { display: block; }
.hero-bg picture { opacity: 0; transition: opacity 0.9s ease; }
.hero-bg picture.u { opacity: 1; }

/* The switch knob slides; the two leaves inside it crossfade. */
.mode .switch .knob img { opacity: 1; transition: opacity 0.35s ease; }
.mode .switch .knob img.d { opacity: 0; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .swap > .u { opacity: 0; visibility: hidden; }
  :root:not([data-theme="light"]) .swap > .d { opacity: 1; visibility: visible; transition-delay: 0s; }
  :root:not([data-theme="light"]) .logo-dark { display: none; }
  :root:not([data-theme="light"]) .logo-light { display: block; }
  :root:not([data-theme="light"]) .hero-bg picture.d { opacity: 1; }
  :root:not([data-theme="light"]) .hero-bg picture.u { opacity: 0; }
  :root:not([data-theme="light"]) .mode .switch .knob { transform: translateX(20px); }
  :root:not([data-theme="light"]) .mode .switch .knob img.u { opacity: 0; }
  :root:not([data-theme="light"]) .mode .switch .knob img.d { opacity: 1; }
  :root:not([data-theme="light"]) .mode .switch { background: #3a3a3a; }
}
:root[data-theme="dark"] .swap > .u { opacity: 0; visibility: hidden; }
:root[data-theme="dark"] .swap > .d { opacity: 1; visibility: visible; transition-delay: 0s; }
:root[data-theme="dark"] .logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: block; }
:root[data-theme="dark"] .hero-bg picture.d { opacity: 1; }
:root[data-theme="dark"] .hero-bg picture.u { opacity: 0; }
:root[data-theme="dark"] .mode .switch .knob { transform: translateX(20px); }
:root[data-theme="dark"] .mode .switch .knob img.u { opacity: 0; }
:root[data-theme="dark"] .mode .switch .knob img.d { opacity: 1; }
:root[data-theme="dark"] .mode .switch { background: #3a3a3a; }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }

/* ---------- Background layers ---------- */
#field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
  transition: background 0.6s ease;
}
.blob-1 { width: 55vw; height: 55vw; max-width: 720px; max-height: 720px; top: -18vw; right: -12vw; background: var(--blob-1); animation: drift-1 22s ease-in-out infinite alternate; }
.blob-2 { width: 40vw; height: 40vw; max-width: 520px; max-height: 520px; top: 55vh; left: -14vw; background: var(--blob-2); animation: drift-2 28s ease-in-out infinite alternate; }
.blob-3 { width: 30vw; height: 30vw; max-width: 420px; max-height: 420px; bottom: -10vw; right: 20vw; background: var(--blob-3); animation: drift-3 26s ease-in-out infinite alternate; }
@keyframes drift-1 { to { translate: -6vw 8vh; } }
@keyframes drift-2 { to { translate: 8vw -6vh; } }
@keyframes drift-3 { to { translate: -5vw -5vh; } }

.progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent-strong);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 30;
}

main, footer { position: relative; z-index: 1; }

.top, main, footer {
  width: min(var(--max), 100% - 32px);
  margin-inline: auto;
}

/* ---------- Header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  transition: padding 0.3s ease;
}
.top::before {
  content: "";
  position: absolute;
  inset: 0 -50vw;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  opacity: 0;
  transition: opacity 0.3s ease, border-color 0.3s ease, background-color 0.4s ease;
  z-index: -1;
}
.top.scrolled { padding: 10px 0; }
.top.scrolled::before { opacity: 1; border-bottom-color: var(--line); }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.wordmark img { height: 30px; width: auto; }
.wordmark em { font-style: normal; color: var(--text-muted); font-weight: 500; }
.wordmark:hover { text-decoration: none; }

.nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.nav a { color: var(--text-muted); font-weight: 500; position: relative; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px;
  height: 2px;
  background: var(--accent-strong);
  transition: right 0.25s ease;
}
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a:hover::after { right: 0; }

/* Theme toggle: Utopia / Dystopia */
.mode {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.4s ease, color 0.4s ease;
}
.mode:hover { border-color: var(--accent-strong); box-shadow: 0 0 0 4px var(--glow); }
.mode .mode-name { display: inline-block; min-width: 4.6em; }
.mode .mode-name::after { content: var(--mode-label); color: var(--text); }
.mode .switch {
  width: 44px; height: 24px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  position: relative;
  overflow: visible;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}
/* The knob is the brand leaf: pale in Utopia, dark in Dystopia. It slides; the leaves crossfade. */
.mode .switch .knob {
  position: absolute;
  top: 1px; left: 3px;
  width: 16px; height: 20px;
  filter: drop-shadow(0 0 6px var(--glow));
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
.mode .switch .knob img {
  position: absolute;
  inset: 0;
  width: 16px; height: 20px;
}
.mode .switch::after { content: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 40px;
  min-height: calc(100vh - 80px);
  padding: 40px 0 56px;
  perspective: 1200px;
}
.hero-bg {
  position: absolute;
  inset: -12% -50vw -6%;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
  /* fade the picture out toward the bottom so it melts into the page */
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}
/* Both worlds stay in the DOM (override the global .u/.d display rules) and crossfade. */
.hero-bg .u, .hero-bg .d { display: block; }
.hero-bg picture {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.hero-bg picture.u { opacity: 1; }
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}
/* Keep the text side calm: the page colour bleeds over the left of the picture. */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 38%, color-mix(in srgb, var(--bg) 25%, transparent) 62%, transparent 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 70%, transparent) 0%, transparent 30%);
  transition: background 0.4s ease;
}

.hero-text { will-change: transform; }
.hero-art {
  display: flex;
  justify-content: center;
  transform-style: preserve-3d;
  will-change: transform;
}
.hero-art img {
  width: min(100%, 380px);
  height: auto;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.28)) drop-shadow(0 0 40px var(--glow));
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { translate: 0 -12px; } }

.eyebrow {
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.hero h1 .accent {
  background: linear-gradient(100deg, var(--accent-strong), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede { font-size: 1.18rem; color: var(--text-muted); margin: 0 0 20px; max-width: 600px; }
.mode-line { margin: 0 0 30px; font-size: 0.95rem; color: var(--text-muted); }
.mode-line .hint { display: block; margin-top: 4px; }
.mode-line strong { color: var(--text); font-weight: 600; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.button {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.4s ease, color 0.4s ease;
}
.button:hover { text-decoration: none; border-color: var(--text-muted); transform: translateY(-2px); }
.button.primary { background: var(--accent-strong); color: var(--accent-ink); border-color: transparent; box-shadow: 0 10px 30px var(--glow); }
.button.primary:hover { filter: brightness(1.05); box-shadow: 0 14px 36px var(--glow); }

.scroll-hint {
  position: absolute;
  left: 0; bottom: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.scroll-hint::after {
  content: "";
  width: 1px; height: 36px;
  background: linear-gradient(var(--accent-strong), transparent);
  animation: hint 1.8s ease-in-out infinite;
}
@keyframes hint { 50% { transform: translateY(6px); opacity: 0.4; } }

/* ---------- Sections ---------- */
section { position: relative; padding: 72px 0; }
section > h2 { margin-bottom: 10px; }
.section-intro { margin: 0 0 28px; color: var(--text-muted); max-width: 680px; font-size: 1.05rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease,
    background-color 0.4s ease, color 0.4s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent-strong) 55%, var(--line)); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card.muted { background: var(--surface-muted); color: var(--text-muted); }
.card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card header h3 { margin: 0; }
.card p { margin: 0; }
.card p.swap { color: var(--text-muted); }
.card .num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.card .art {
  height: 180px;
  border-radius: 12px;
  margin: 2px 0 6px;
  background: linear-gradient(135deg, var(--surface-muted), color-mix(in srgb, var(--accent-strong) 18%, var(--surface-muted)));
  display: grid;
  place-items: center;
  overflow: hidden;
}
.card .art picture, .card .art img { width: 100%; height: 100%; display: block; }
.card .art img { object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.card:hover .art img { transform: scale(1.04); }

/* ---------- Manifesto ---------- */
.manifesto { padding: 40px 0 80px; }
.manifesto p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 900px;
}
.manifesto .w { color: color-mix(in srgb, var(--text) 22%, transparent); transition: color 0.4s ease; }
.manifesto .w.lit { color: var(--text); }
.manifesto .w.lit.key { color: var(--accent); }

/* ---------- Contact ---------- */
.about p { max-width: 680px; margin: 0 0 12px; }
.contact { color: var(--text-muted); }

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 40px 0 32px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: border-color 0.4s ease, color 0.4s ease;
}
footer p { margin: 0; }

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.8s ease;
  transition-delay: calc(var(--i, 0) * 90ms);
}
[data-reveal].in { opacity: 1; transform: none; filter: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 20px; min-height: 0; padding: 24px 0 48px; }
  .hero-art { order: -1; justify-content: flex-start; }
  .hero-art img { width: 150px; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.25)); }
  .hero-bg::after { background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 55%, transparent) 0%, color-mix(in srgb, var(--bg) 85%, transparent) 45%, var(--bg) 100%); }
  .scroll-hint { display: none; }
  .nav { gap: 14px; }
  .nav a.hide-sm { display: none; }
  section { padding: 52px 0; }
  .blob { filter: blur(50px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .blob { animation: none; }
  [data-reveal] { opacity: 1; transform: none; filter: none; }
  .hero-art, .hero-bg, .hero-text, .blob { transform: none !important; }
}
