/* ============================================================
   Daniel Nygård — personal site
   Light, minimal Apple-style
   ============================================================ */

:root {
  --bg: #fbfbfd;
  --bg-elevated: #ffffff;
  --bg-subtle: #f5f5f7;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --border: #e5e5ea;
  --border-strong: #d2d2d7;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-pressed: #006edb;
  --accent-soft: rgba(0, 113, 227, 0.08);
  --success: #2db14b;
  --danger: #d93025;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 22px;
  --radius-pill: 980px;

  --shadow-1: 0 1px 2px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-2: 0 4px 14px rgba(0,0,0,0.06), 0 16px 40px rgba(0,0,0,0.06);
  --shadow-3: 0 30px 60px -20px rgba(0,0,0,0.18);

  --font: "Reddit Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --max-w: 1120px;
  --nav-h: 56px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  text-rendering: optimizeLegibility;
}

html { scroll-behavior: smooth; }

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

img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: #fff; }

/* ---------- Layout ---------- */

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

section {
  padding: clamp(80px, 14vw, 160px) 0;
  scroll-margin-top: var(--nav-h);
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 50;
  display: flex;
  align-items: center;
  background: rgba(251, 251, 253, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-name {
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.nav-name:hover { text-decoration: none; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}
.nav-link:hover { opacity: 1; text-decoration: none; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  padding: 3px;
  border: 1px solid var(--border);
}
.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.18s ease, color 0.18s ease;
}
.lang-toggle button.is-active {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-1);
}

@media (max-width: 640px) {
  .nav-links { gap: 14px; }
  .nav-link { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 900px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(8px);
  animation: rise 0.8s 0.1s ease-out forwards;
}

.hero h1 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(48px, 9vw, 104px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--text);
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.9s 0.2s cubic-bezier(.2,.7,.2,1) forwards;
}

.hero .tagline {
  margin: 22px auto 0;
  max-width: 620px;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.35;
  color: var(--text-2);
  font-weight: 400;
  letter-spacing: -0.012em;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.9s 0.35s cubic-bezier(.2,.7,.2,1) forwards;
}

.hero-ctas {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.9s 0.5s cubic-bezier(.2,.7,.2,1) forwards;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 0;
  right: 0;
  margin-inline: auto;
  width: max-content;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: rise 1.2s 1s ease-out forwards;
  color: var(--text-3);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.scroll-hint .chev {
  width: 16px; height: 16px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob {
  0%,100% { transform: rotate(45deg) translate(0,0); opacity: 0.5; }
  50% { transform: rotate(45deg) translate(3px,3px); opacity: 1; }
}

/* ---------- Floating Isometric Icons ---------- */

.iso-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  perspective: 1400px;
  overflow: hidden;
}
.iso-icon {
  position: absolute;
  border-radius: 22%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.08),
    0 12px 32px rgba(0,0,0,0.12),
    inset 0 0 0 0.5px rgba(255,255,255,0.25);
  transform-style: preserve-3d;
  will-change: transform;
}
.iso-icon::after {
  /* glossy highlight */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 45%);
  pointer-events: none;
}
.iso-icon svg {
  width: 46%;
  height: 46%;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.12));
  position: relative;
  z-index: 1;
}

/* Variant: real PNG app icon (already has background + glow baked in) */
.iso-icon--image {
  background: transparent !important;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}
.iso-icon--image::after { display: none; }
.iso-icon--image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

@keyframes float-a {
  0%, 100% { transform: var(--base) translate3d(0, 0, 0); }
  50%      { transform: var(--base) translate3d(0, -14px, 0); }
}
@keyframes float-b {
  0%, 100% { transform: var(--base) translate3d(0, 0, 0); }
  50%      { transform: var(--base) translate3d(6px, -18px, 0); }
}
@keyframes float-c {
  0%, 100% { transform: var(--base) translate3d(0, 0, 0); }
  50%      { transform: var(--base) translate3d(-8px, -12px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .iso-icon { animation: none !important; }
  .eyebrow, .hero h1, .hero .tagline, .hero-ctas, .scroll-hint {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.1s ease;
  text-decoration: none;
  line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.985); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-subtle); }

.btn-ghost {
  background: transparent;
  color: var(--accent);
}
.btn-ghost:hover { color: var(--accent-hover); }
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(2px); }

/* ---------- Section heading ---------- */

.section-head {
  text-align: center;
  margin-bottom: 72px;
}
.section-head .eyebrow {
  animation: none;
  opacity: 1;
  transform: none;
  margin-bottom: 14px;
}
.section-head h2 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.028em;
  line-height: 1.08;
  max-width: 700px;
  margin-inline: auto;
}
.section-head p {
  margin: 18px auto 0;
  max-width: 560px;
  color: var(--text-2);
  font-size: 18px;
  line-height: 1.5;
}

/* ---------- Apps section ---------- */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 820px) {
  .apps-grid { grid-template-columns: 1fr; }
}

.app-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1), box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
  overflow: hidden;
}
.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: var(--border-strong);
}
.app-card-icon {
  width: 96px;
  height: 96px;
  border-radius: 22%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.08),
    0 10px 24px rgba(0,0,0,0.10),
    inset 0 0 0 0.5px rgba(255,255,255,0.3);
  position: relative;
}
.app-card-icon::after {
  content:"";
  position: absolute;
  inset:0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 45%);
}
.app-card-icon svg {
  width: 48%;
  height: 48%;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
}

/* Variant: image-based icon (PNG with built-in background + glow) */
.app-card-icon--image {
  width: 104px;
  height: 104px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}
.app-card-icon--image::after { display: none; }
.app-card-icon--image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.project-card-icon {
  background: linear-gradient(145deg, #0071e3, #4db6ff);
}
.project-card-icon--pilot {
  background: linear-gradient(145deg, #1f8a70, #7bd88f);
}
.app-card h3 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.15;
}
.app-card .platform {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  margin-top: 6px;
  white-space: nowrap;
}
.app-card .platform svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  align-self: center;
}
.app-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.5;
  text-wrap: pretty;
}
.app-card .app-cta {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 15px;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.app-card .app-cta:hover { color: var(--accent-hover); text-decoration: none; }
.app-card .app-cta .arrow { transition: transform 0.2s ease; }
.app-card .app-cta:hover .arrow { transform: translateX(3px); }
.app-card .app-cta--disabled,
.app-card .app-cta--disabled:hover {
  color: var(--text-3);
  cursor: not-allowed;
}

.app-card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.app-privacy {
  font-size: 13px;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.15s ease;
}
.app-privacy:hover { color: var(--text-2); text-decoration: none; }

/* ---------- Optional donations ---------- */

.donation-card {
  margin: 32px auto 0;
  padding: 28px 30px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  align-items: center;
  gap: 36px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.donation-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.donation-copy h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.016em;
}
.donation-copy p {
  max-width: 580px;
  margin: 9px 0 0;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.55;
  text-wrap: pretty;
}
.donation-copy .donation-amount-note {
  margin-top: 8px;
  color: var(--text-3);
  font-size: 13px;
}
.donation-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.btn-donation {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
  box-shadow: 0 2px 8px rgba(45, 177, 75, 0.22);
}
.btn-donation:hover {
  background: #248f3d;
  border-color: #248f3d;
}
.donation-disclaimer {
  margin: 0;
  color: var(--text-3);
  font-size: 11.5px;
  line-height: 1.45;
  text-wrap: pretty;
}
@media (max-width: 720px) {
  .donation-card {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 26px 24px;
  }
  .donation-action { align-items: stretch; }
  .btn-donation { justify-content: center; }
}

/* ---------- Playground blueprint ---------- */

.playground {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 56% 62%, rgba(59, 213, 244, 0.6), rgba(0, 113, 227, 0.04) 34%, transparent 58%),
    linear-gradient(145deg, #0759a8 0%, #0693cf 47%, #064f99 100%);
}
.playground::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.28;
  --blueprint-grid-scale: 1.35;
  transform: translate3d(0, 0, 0) rotate(-30deg) scale(var(--blueprint-grid-scale));
}
.playground::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 48%, transparent 0%, rgba(4, 43, 93, 0.18) 58%, rgba(3, 28, 66, 0.56) 100%),
    linear-gradient(180deg, rgba(251, 251, 253, 0.16), transparent 16%, transparent 84%, rgba(245, 245, 247, 0.12));
  pointer-events: none;
}
.playground .container {
  position: relative;
  z-index: 2;
}
.playground .section-head .eyebrow {
  color: rgba(205, 242, 255, 0.95);
}
.playground .section-head h2 {
  color: #fff;
  text-shadow: 0 12px 40px rgba(0, 34, 82, 0.28);
}
.playground .app-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.48);
  box-shadow: 0 24px 70px rgba(4, 33, 78, 0.24);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
}
.playground .app-card:hover {
  border-color: rgba(255, 255, 255, 0.76);
  box-shadow: 0 30px 86px rgba(4, 33, 78, 0.3);
}
.blueprint-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.blueprint-sheet {
  position: absolute;
  inset: -18% -22%;
  --blueprint-perspective: 1200px;
  --blueprint-rotate-x: 58deg;
  --blueprint-rotate-z: -31deg;
  --blueprint-scale: 1.18;
  --blueprint-base-x: 0px;
  --blueprint-base-y: 0px;
  transform:
    perspective(var(--blueprint-perspective))
    rotateX(var(--blueprint-rotate-x))
    rotateZ(var(--blueprint-rotate-z))
    translate3d(var(--blueprint-base-x), var(--blueprint-base-y), 0)
    scale(var(--blueprint-scale));
  transform-origin: center;
}
.blueprint-sheet--primary {
  opacity: 0.86;
}
.blueprint-sheet--secondary {
  opacity: 0.34;
  --blueprint-base-x: 120px;
  --blueprint-base-y: 170px;
}
.blueprint-sheet svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.blueprint-lines,
.blueprint-details,
.blueprint-measurements,
.blueprint-copy {
  fill: none;
  stroke: rgba(255,255,255,0.86);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.blueprint-lines path {
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}
.blueprint-details {
  stroke: rgba(255,255,255,0.72);
}
.blueprint-details path,
.blueprint-details circle {
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
}
.blueprint-measurements {
  stroke: rgba(217, 249, 255, 0.58);
  stroke-dasharray: 8 8;
}
.blueprint-measurements path {
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}
.blueprint-copy {
  fill: rgba(255,255,255,0.58);
  stroke: none;
  font: 700 18px var(--font-mono);
  letter-spacing: 0;
  text-transform: uppercase;
}
.blueprint-app-icon,
.blueprint-badge {
  position: absolute;
  z-index: 1;
  opacity: 0.22;
  filter: grayscale(1) brightness(2.4) contrast(0.85) drop-shadow(0 14px 26px rgba(4, 42, 90, 0.18));
  transform: perspective(1000px) rotateX(58deg) rotateZ(-31deg);
}
.blueprint-app-icon {
  width: clamp(78px, 10vw, 132px);
  height: clamp(78px, 10vw, 132px);
  object-fit: contain;
}
.blueprint-app-icon--timer {
  left: 13%;
  top: 22%;
}
.blueprint-app-icon--debtio {
  right: 14%;
  bottom: 16%;
}
.blueprint-badge {
  width: clamp(64px, 8vw, 110px);
  height: clamp(64px, 8vw, 110px);
  border: 2px solid rgba(255,255,255,0.58);
  border-radius: 22%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.68);
  font-size: clamp(20px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}
.blueprint-badge--cv {
  right: 22%;
  top: 20%;
}
.blueprint-badge--pilot {
  left: 22%;
  bottom: 20%;
}
@media (max-width: 720px) {
  .playground::before {
    background-size: 34px 34px;
    --blueprint-grid-scale: 1.8;
  }
  .blueprint-sheet {
    inset: -12% -90%;
    --blueprint-perspective: 1000px;
    --blueprint-rotate-x: 56deg;
    --blueprint-scale: 1.05;
  }
  .blueprint-sheet--secondary {
    --blueprint-base-x: 80px;
    --blueprint-base-y: 150px;
  }
  .blueprint-app-icon--timer {
    left: -4%;
    top: 16%;
  }
  .blueprint-app-icon--debtio {
    right: -3%;
    bottom: 10%;
  }
  .blueprint-badge--cv {
    right: 12%;
    top: 19%;
  }
  .blueprint-badge--pilot {
    left: 10%;
    bottom: 16%;
  }
  .playground .app-card {
    background: rgba(255, 255, 255, 0.94);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .playground::before {
    animation: blueprintGridDrift 24s linear infinite;
  }
  .blueprint-sheet {
    animation: blueprintSheetDrift 34s linear infinite;
    will-change: transform;
  }
  .blueprint-sheet--secondary {
    animation-duration: 46s;
  }
  .blueprint-app-icon,
  .blueprint-badge {
    animation: blueprintMarkerDrift 36s linear infinite;
    will-change: transform;
  }
  .blueprint-app-icon--debtio,
  .blueprint-badge--cv {
    animation-duration: 44s;
  }
}
@keyframes blueprintGridDrift {
  from {
    background-position: 0 0, 0 0;
    transform: translate3d(0, 0, 0) rotate(-30deg) scale(var(--blueprint-grid-scale));
  }
  to {
    background-position: 46px 46px, 46px 46px;
    transform: translate3d(-46px, 46px, 0) rotate(-30deg) scale(var(--blueprint-grid-scale));
  }
}
@keyframes blueprintSheetDrift {
  from {
    transform:
      perspective(var(--blueprint-perspective))
      rotateX(var(--blueprint-rotate-x))
      rotateZ(var(--blueprint-rotate-z))
      translate3d(var(--blueprint-base-x), var(--blueprint-base-y), 0)
      scale(var(--blueprint-scale));
  }
  to {
    transform:
      perspective(var(--blueprint-perspective))
      rotateX(var(--blueprint-rotate-x))
      rotateZ(var(--blueprint-rotate-z))
      translate3d(calc(var(--blueprint-base-x) - 148px), calc(var(--blueprint-base-y) + 92px), 0)
      scale(var(--blueprint-scale));
  }
}
@keyframes blueprintMarkerDrift {
  from {
    transform: perspective(1000px) rotateX(58deg) rotateZ(-31deg) translate3d(0, 0, 0);
  }
  to {
    transform: perspective(1000px) rotateX(58deg) rotateZ(-31deg) translate3d(-42px, 28px, 0);
  }
}

/* ---------- Support / form ---------- */

.support {
  background: var(--bg-subtle);
}

.form-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 48px);
  max-width: 680px;
  margin: 0 auto;
  box-shadow: var(--shadow-1);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field-row { display: flex; flex-direction: column; gap: 6px; }
.field label, .field-row label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: -0.005em;
}
.field input, .field select, .field textarea,
.field-row input, .field-row select, .field-row textarea {
  appearance: none;
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.field textarea, .field-row textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.5;
}
.field input:focus, .field select:focus, .field textarea:focus,
.field-row input:focus, .field-row select:focus, .field-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  background-color: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field select, .field-row select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%236e6e73' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
}
.field-error {
  font-size: 12px;
  color: var(--danger);
  min-height: 0;
}
.field.has-error .field-error { min-height: 14px; margin-top: 2px; }

.form-actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.form-note {
  font-size: 12px;
  color: var(--text-3);
  max-width: 360px;
}

.form-success, .form-error {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  display: none;
}
.form-success {
  background: rgba(45, 177, 75, 0.08);
  color: #1e7a32;
  border: 1px solid rgba(45, 177, 75, 0.25);
}
.form-error {
  background: rgba(217, 48, 37, 0.06);
  color: #b3261e;
  border: 1px solid rgba(217, 48, 37, 0.2);
}
.form-success.is-visible, .form-error.is-visible { display: block; }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
  background: var(--bg);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-meta {
  font-size: 13px;
  color: var(--text-3);
}
.footer-meta a { color: var(--text-2); }
.footer-meta a:hover { color: var(--text); text-decoration: none; }
.footer-meta .sep { margin: 0 12px; color: var(--border-strong); }
.socials { display: flex; gap: 6px; }
.socials a {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-2);
  transition: background 0.15s ease, color 0.15s ease;
  text-decoration: none;
}
.socials a:hover { background: var(--bg-subtle); color: var(--text); text-decoration: none; }
.socials svg { width: 22px; height: 22px; }

/* ---------- Cookie Banner ---------- */

.cookie {
  position: fixed;
  left: 16px; right: 16px;
  bottom: 16px;
  z-index: 100;
  max-width: 520px;
  margin-left: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  padding: 22px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1), opacity 0.35s ease;
}
.cookie.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.cookie h4 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.cookie p {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
}
.cookie-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cookie .btn { padding: 9px 16px; font-size: 13.5px; }
.cookie-link {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 12px;
}
.cookie-link a { color: var(--text-2); }

.cookie-details {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: none;
}
.cookie.is-expanded .cookie-details { display: block; }
.cookie-cat {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
}
.cookie-cat strong {
  font-size: 13.5px;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
.cookie-cat span {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.45;
}

/* iOS-style switch */
.switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: 999px;
  transition: background 0.25s ease;
  cursor: pointer;
}
.switch .slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  top: 2px;
  background: white;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked + .slider { background: #30d158; }
.switch input:checked + .slider::before { transform: translateX(16px); }
.switch input:disabled + .slider { opacity: 0.55; cursor: not-allowed; }

/* ---------- Privacy page ---------- */

.legal {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 120px;
}
.legal-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}
.legal-icon {
  width: 88px;
  height: 88px;
  margin-bottom: 24px;
  display: block;
}
.legal-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.legal h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.028em;
  margin: 0 0 8px;
  line-height: 1.1;
}
.legal .updated {
  color: var(--text-3);
  font-size: 13px;
  margin-bottom: 40px;
}
.legal h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 40px 0 12px;
}
.legal h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 8px;
}
.legal p, .legal li {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.65;
}
.legal ul { padding-left: 22px; margin: 8px 0 16px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--accent); }
.legal .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 24px;
}
.legal .back-link:hover { color: var(--text); text-decoration: none; }

/* ---------- i18n helper ---------- */
[data-i18n-hidden] { display: none !important; }
