:root {
  --bg: #fafaf9;
  --bg-alt: #f4f5f3;
  --surface: #fff;
  --text: #1a2b23;
  --text-secondary: rgba(26, 43, 35, 0.6);
  --text-tertiary: rgba(26, 43, 35, 0.4);
  --line: rgba(26, 43, 35, 0.08);
  --line-strong: rgba(26, 43, 35, 0.14);
  --mint: #5bb89a;
  --mint-light: #e8f5f0;
  --mint-dark: #449b80;
  --dark: #0f1a15;
  --danger: #c94444;
  --accent-green: #196d59;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --shadow-card:
    0 1px 2px rgba(26, 43, 35, 0.04), 0 8px 24px rgba(26, 43, 35, 0.06);
  --shadow-card-hover:
    0 2px 4px rgba(91, 184, 154, 0.08), 0 16px 40px rgba(26, 43, 35, 0.1);
  --container: 1200px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1);
  --transition-base: 0.3s var(--ease-out-expo);
  --transition-slow: 0.5s var(--ease-out-expo);
  --scroll-velocity: 0;
  accent-color: var(--mint);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  max-width: 100vw;
}

body {
  margin: 0;
  font-family:
    "Outfit",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  max-width: 100vw;
}

body.menu-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: #c5e8da;
  color: var(--text);
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.02em;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.section {
  padding: 96px 0;
}

section[id] {
  scroll-margin-top: 96px;
}

.section-head {
  margin-bottom: 40px;
}

.section-head h2 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-head .sub {
  margin: 16px 0 0;
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-wrap: pretty;
  max-width: 52ch;
}

.overline {
  margin: 0 0 24px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -200px;
  z-index: 1000;
  padding: 12px 24px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-sm);
}

.skip-link:focus-visible {
  top: 8px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 100%;
  height: 2px;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--mint), var(--mint-dark));
  box-shadow: 0 0 10px rgba(91, 184, 154, 0.4);
  pointer-events: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.site-header.scrolled {
  background: rgba(250, 250, 249, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 12px rgba(26, 43, 35, 0.06);
}

/* Strony prawne (privacy / terms / support) nie ładują main.js — bez tego
   nagłówek zostaje przezroczysty i treść „wjechała” pod sticky bar. */
body:has(main.legal) .site-header {
  background: rgba(250, 250, 249, 0.94);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 12px rgba(26, 43, 35, 0.06);
}

.nav-wrap {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand span {
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.desktop-nav,
.desktop-cta {
  display: flex;
  align-items: center;
  gap: 24px;
}

.desktop-nav a {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-secondary);
  font-size: 0.8rem;
  position: relative;
  transition: color var(--transition-base);
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--mint);
  border-radius: 1px;
  transition: width var(--transition-base);
}

.desktop-nav a:hover {
  color: var(--text);
}

.desktop-nav a:hover::after {
  width: 100%;
}

.desktop-nav a.is-active {
  color: var(--text);
}

.desktop-nav a.is-active::after {
  width: 100%;
}

.menu-toggle,
.mobile-menu {
  display: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition:
    transform var(--transition-base),
    background-color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base);
  padding: 12px 24px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.1s;
}

.btn:focus-visible {
  outline: 2px solid var(--mint-dark);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(68, 155, 128, 0.24);
}

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

.btn-solid {
  background: var(--text);
  color: var(--bg);
}

.btn-solid:hover {
  box-shadow:
    0 4px 12px rgba(26, 43, 35, 0.15),
    0 12px 32px rgba(26, 43, 35, 0.1);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.btn-mint {
  background: var(--mint);
  color: var(--dark);
  box-shadow:
    0 2px 12px rgba(91, 184, 154, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-mint:hover {
  background: var(--mint-dark);
  box-shadow:
    0 6px 20px rgba(68, 155, 128, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

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

.hero {
  min-height: calc(100dvh - 80px);
  display: grid;
  align-items: center;
  padding: 0 0 48px;
  background-image: radial-gradient(
    circle at 1px 1px,
    rgba(26, 43, 35, 0.025) 1px,
    transparent 0
  );
  background-size: 20px 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-copy,
.hero-product {
  min-width: 0;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: calc(-0.035em - var(--scroll-velocity) * 0.0002em);
  font-weight: 700;
  color: var(--text);
  text-wrap: balance;
  font-feature-settings: "ss01", "cv11";
  transition: letter-spacing 0.3s var(--ease-out-expo);
}

.hero-copy h1 span {
  font-weight: 400;
  color: var(--mint-dark);
  display: inline-block;
  padding-top: 6px;
  letter-spacing: -0.025em;
}

.hero-lead {
  margin: 28px 0 0;
  max-width: 44ch;
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-stats {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-stats div {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  transition:
    border-color 0.4s var(--ease-out-expo),
    box-shadow 0.4s var(--ease-out-expo),
    transform 0.4s var(--ease-out-expo);
}

.hero-stats div:hover {
  border-color: var(--line-strong);
  box-shadow: 0 4px 20px rgba(26, 43, 35, 0.06);
  transform: translateY(-2px);
}

.hero-stats strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-stats span {
  display: block;
  margin-top: 4px;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (min-width: 1200px) {
  .hero-copy {
    margin-left: -2vw;
  }
}

.hero-product {
  position: relative;
  padding: 12px 0 32px 0;
  transform: translateY(4px);
  isolation: isolate;
}

.hero-product::before {
  content: "";
  position: absolute;
  inset: -8% -6% -10% -4%;
  z-index: -1;
  background:
    radial-gradient(
      40% 50% at 78% 80%,
      rgba(91, 184, 154, 0.18),
      transparent 70%
    ),
    radial-gradient(
      50% 45% at 18% 22%,
      rgba(91, 184, 154, 0.1),
      transparent 70%
    );
  filter: blur(8px);
  pointer-events: none;
}

.desktop-shot {
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  background: var(--surface);
  transition:
    transform var(--transition-slow),
    box-shadow var(--transition-slow);
}

.desktop-shot:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.desktop-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.frame-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.frame-top span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d3d8df;
}

.frame-top small {
  margin-left: auto;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.phone-shot {
  position: absolute;
  right: -12px;
  bottom: -48px;
  width: clamp(140px, 18vw, 188px);
  padding: 7px;
  background: linear-gradient(180deg, #15181d 0%, #05060a 100%);
  border-radius: 38px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    0 32px 64px -20px rgba(15, 26, 21, 0.42),
    0 0 0 1px rgba(0, 0, 0, 0.06);
  transform: rotate(-3deg);
  transition: transform 0.8s var(--ease-out-expo);
  will-change: transform;
}

.phone-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 32px;
}

.phone-shot:hover {
  transform: rotate(0deg) translateY(-6px) scale(1.02);
}

/* ---- Social Proof ---- */

.social-proof {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.social-inner {
  display: grid;
  gap: 12px;
}

.social-inner p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 32px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  animation: marquee 28s linear infinite;
  will-change: transform;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---- How it works ---- */

.howto {
  min-height: 100dvh;
  padding: 72px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.howto-steps {
  --connector-progress: 0%;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(4, auto);
  column-gap: 24px;
  row-gap: 0;
  position: relative;
}

.howto-steps::before {
  display: none;
}

.howto-step {
  position: relative;
  z-index: 1;
  background: var(--surface);
  min-width: 0;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4;
  align-content: start;
}

.howto-step > * {
  align-self: start;
  min-width: 0;
}

.step-num {
  display: inline-block;
  margin-bottom: 8px;
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--mint-dark);
}

.step-illustration {
  margin: 0 0 12px;
  position: relative;
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1 / 1;
}

.step-illustration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s var(--ease-out-expo);
}

.howto-step:hover .step-illustration img {
  transform: scale(1.03) translateY(-2px);
}

.howto-step h3 {
  margin: 0 0 14px;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

.howto-step p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  text-wrap: pretty;
}

/* Fallback when subgrid is unavailable */
@supports not (grid-template-rows: subgrid) {
  .howto-step {
    display: flex;
    flex-direction: column;
    grid-row: auto;
  }

  .howto-step h3 {
    min-height: 2.5em;
  }

  .howto-step p {
    min-height: calc(3 * 1.7em);
  }
}

/* ---- Calculator ---- */

.kalkulator {
  padding: 112px 0;
  background: var(--surface);
}

.calc-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  padding: 56px 56px 48px;
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.calc-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.calc-hero-main .calc-label {
  margin-bottom: 8px;
}

.calc-hero-main .money {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--accent-green);
}

.calc-hero-meta {
  display: flex;
  gap: 40px;
  padding-bottom: 8px;
}

.calc-meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-meta-item strong {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.calc-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.calc-divider {
  border: none;
  height: 1px;
  background: var(--line);
  margin: 36px 0;
}

.calc-controls label {
  display: block;
  margin-bottom: 14px;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--text);
}

.calc-controls input[type="range"] {
  --fill-percent: 0%;
  width: 100%;
  appearance: none;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(
    to right,
    var(--mint) 0,
    var(--mint) var(--fill-percent),
    #d9dde3 var(--fill-percent),
    #d9dde3 100%
  );
  margin: 0 0 32px;
  cursor: pointer;
}

.calc-controls input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid var(--surface);
  background: var(--mint-dark);
  box-shadow: 0 2px 6px rgba(68, 155, 128, 0.3);
  cursor: pointer;
  transition: transform var(--transition-base);
}

.calc-controls input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.calc-controls input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid var(--surface);
  background: var(--mint-dark);
  box-shadow: 0 2px 6px rgba(68, 155, 128, 0.3);
  cursor: pointer;
}

.price-group {
  display: grid;
  gap: 14px;
}

.calc-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.price-group > span {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.price-pills {
  display: flex;
  gap: 8px;
}

.calc-disclaimer {
  display: block;
  margin-top: 24px;
  color: var(--text-tertiary);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.pill {
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  transition:
    border-color var(--transition-base),
    transform var(--transition-base),
    background-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base);
}

.pill:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.pill.active {
  border-color: transparent;
  background: var(--text);
  color: var(--bg);
}

/* ---- System / Bento ---- */

.system {
  min-height: 100dvh;
  padding: 72px 0;
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bento-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto;
  grid-template-areas:
    "a a b"
    "d c b";
}

.bento-grid > * {
  min-width: 0;
}

.bento-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
  will-change: transform;
}

.bento-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.bento-card .mono {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.bento-card h3 {
  margin: 12px 0 0;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text);
}

.bento-ai {
  grid-area: a;
  display: flex;
  flex-direction: column;
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
}

.bento-ai .mono {
  color: rgba(255, 255, 255, 0.6);
}

.bento-ai h3 {
  color: var(--bg);
  margin-bottom: 20px;
}

.ai-flow {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  background: rgba(255, 255, 255, 0.04);
}

.ai-flow-text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.75);
  min-height: 3.1em;
  transition: opacity 0.35s var(--ease-out-expo);
}

.ai-flow-text.is-fading {
  opacity: 0;
}

.bento-app {
  grid-area: b;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  padding: 28px 28px 24px;
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
}

.bento-phone-frame {
  position: relative;
  margin: 20px auto 0;
  width: clamp(160px, 68%, 220px);
  padding: 8px;
  background: linear-gradient(180deg, #15181d 0%, #05060a 100%);
  border-radius: 42px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    0 24px 52px -18px rgba(15, 26, 21, 0.44),
    0 0 0 1px rgba(0, 0, 0, 0.06);
  transition: transform 0.8s var(--ease-out-expo);
  will-change: transform;
}

.bento-phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 34px;
}

.bento-app:hover .bento-phone-frame {
  transform: translateY(-6px);
}

.bento-data {
  grid-area: c;
}

.data-row {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.data-row:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.data-row:first-of-type strong {
  color: var(--danger);
}

.data-row:last-of-type strong {
  color: var(--accent-green);
}

.bento-model {
  grid-area: d;
  background: var(--bg-alt);
}

.bento-model ul {
  margin: 20px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
}

/* ---- FAQ ---- */

.faq {
  padding: 80px 0;
  background: var(--surface);
}

.faq .section-head {
  max-width: 720px;
}

.faq-list {
  max-width: 720px;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  list-style: none;
  padding: 24px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
  user-select: none;
  transition: color var(--transition-base);
}

.faq-item summary:hover {
  color: var(--mint-dark);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 1.35rem;
  font-weight: 300;
  line-height: 1;
  color: var(--text-tertiary);
  transition:
    transform 0.5s var(--ease-out-expo),
    color var(--transition-base);
}

.faq-item summary:hover .faq-icon {
  color: var(--mint-dark);
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
  color: var(--mint-dark);
}

.faq-answer {
  overflow: hidden;
  height: 0;
  transition: height 0.5s var(--ease-out-expo);
}

.faq-answer p {
  margin: 0;
  padding: 4px 0 28px;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ---- CTA Dark ---- */

.cta-dark {
  padding: 128px 0;
  background: var(--dark);
  color: var(--bg);
  position: relative;
  overflow: hidden;
}

.cta-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle at 1px 1px,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 0
  );
  background-size: 20px 20px;
  pointer-events: none;
}

.cta-dark::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 50%;
  background: radial-gradient(
    ellipse at center bottom,
    rgba(91, 184, 154, 0.1),
    transparent 70%
  );
  pointer-events: none;
}

.cta-wrap {
  position: relative;
  z-index: 1;
  text-align: center;
}

.cta-wrap h2 {
  margin: 0 0 32px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--bg);
}

.cta-wrap p {
  margin: 0 0 32px;
  color: rgba(250, 250, 249, 0.65);
}

.cta-wrap small {
  display: block;
  margin-top: 24px;
  color: rgba(250, 250, 249, 0.4);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

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

.site-footer {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.site-footer .brand span {
  font-size: 1.3rem;
}

.footer-wrap > div {
  display: flex;
  gap: 16px;
  color: var(--text-tertiary);
  align-items: center;
  font-size: 0.875rem;
}

.footer-wrap a {
  transition: color var(--transition-base);
}

.footer-wrap a:hover {
  color: var(--mint-dark);
}

/* ---- Legal Pages (privacy / terms / support) ---- */

.legal-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.legal-nav a {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-secondary);
  font-size: 0.8rem;
  position: relative;
  transition: color var(--transition-base);
}

.legal-nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--mint);
  border-radius: 1px;
  transition: width var(--transition-base);
}

.legal-nav a:hover {
  color: var(--text);
}

.legal-nav a:hover::after,
.legal-nav a[aria-current="page"]::after {
  width: 100%;
}

.legal-nav a[aria-current="page"] {
  color: var(--text);
}

.legal {
  padding: 64px 0 96px;
}

.legal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 56px;
  align-items: start;
}

.legal-article {
  min-width: 0;
}

.legal-intro {
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.legal-intro h1 {
  margin: 20px 0 0;
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text);
}

.legal-intro .lead {
  margin: 16px 0 0;
  max-width: 60ch;
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
}

.legal-meta {
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.legal-meta-item {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.legal-meta-item dt {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.legal-meta-item dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.legal-section {
  border-top: 1px solid var(--line);
  padding-top: 32px;
  margin-top: 32px;
  scroll-margin-top: 96px;
}

.legal-section:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.legal-section-head {
  margin: 0 0 16px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.legal-section-head .num {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}

.legal-section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.legal-section p,
.legal-section li {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.legal-section p {
  margin: 0 0 12px;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section a {
  color: var(--mint-dark);
  text-decoration: underline;
  text-decoration-color: rgba(68, 155, 128, 0.3);
  text-underline-offset: 2px;
  transition:
    color var(--transition-base),
    text-decoration-color var(--transition-base);
}

.legal-section a:hover {
  color: var(--accent-green);
  text-decoration-color: var(--accent-green);
}

.legal-section ul,
.legal-section ol {
  margin: 4px 0 12px;
  padding-left: 22px;
}

.legal-section li {
  margin-bottom: 6px;
}

.legal-section strong {
  color: var(--text);
  font-weight: 600;
}

.legal-section code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-alt);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  color: var(--text);
}

.legal-toc {
  position: sticky;
  top: 100px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.legal-toc-title {
  margin: 0 0 12px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}

.legal-toc a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition:
    background-color var(--transition-base),
    color var(--transition-base);
}

.legal-toc a:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.support-stack {
  display: grid;
  gap: 16px;
  max-width: 760px;
}

.support-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 32px;
  box-shadow: var(--shadow-card);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

.support-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.support-card h2 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.support-card p {
  margin: 0 0 8px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.support-card p:last-child {
  margin-bottom: 0;
}

.support-card a {
  color: var(--mint-dark);
  text-decoration: underline;
  text-decoration-color: rgba(68, 155, 128, 0.3);
  text-underline-offset: 2px;
  transition:
    color var(--transition-base),
    text-decoration-color var(--transition-base);
}

.support-card a:hover {
  color: var(--accent-green);
  text-decoration-color: var(--accent-green);
}

.support-card ul,
.support-card ol {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.support-card li {
  margin-bottom: 4px;
}

.support-card strong {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 1024px) {
  .legal-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .legal-toc {
    position: static;
    max-height: none;
  }

  .legal-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .legal {
    padding: 40px 0 64px;
  }

  .legal-meta {
    grid-template-columns: 1fr;
  }

  .support-card {
    padding: 24px;
  }
}

@media print {
  .site-header,
  .legal-toc,
  .site-footer {
    display: none !important;
  }
}

/* ---- Reveal (GSAP will handle the animation) ---- */

.reveal {
  opacity: 0;
}

/* ---- Responsive: Tablet (max-width: 1024px) ---- */

@media (max-width: 1024px) {
  .section {
    padding: 80px 0;
  }

  .desktop-nav,
  .desktop-cta {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--surface);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: background-color var(--transition-base);
  }

  .menu-toggle:hover {
    background: var(--bg-alt);
  }

  .menu-toggle span {
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: transform var(--transition-base);
  }

  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .mobile-menu {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(250, 250, 249, 0.96);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 96px 24px 48px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.4s var(--ease-out-expo),
      visibility 0.4s var(--ease-out-expo);
  }

  .mobile-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-menu[aria-hidden="false"] {
    overscroll-behavior: contain;
  }

  .menu-close {
    position: absolute;
    top: 16px;
    right: 24px;
    z-index: 101;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition:
      border-color 0.3s var(--ease-out-expo),
      transform 0.3s var(--ease-out-expo);
  }

  .menu-close:hover {
    border-color: var(--line-strong);
    transform: rotate(90deg);
  }

  .menu-close span {
    position: absolute;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
  }

  .menu-close span:first-child {
    transform: rotate(45deg);
  }

  .menu-close span:last-child {
    transform: rotate(-45deg);
  }

  .mobile-menu a:not(.btn) {
    font-family:
      "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 320px);
    text-align: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    opacity: 0;
    transform: translateY(16px);
    --delay: 0s;
    transition:
      background-color var(--transition-base),
      color var(--transition-base),
      opacity 0.5s var(--ease-out-expo) var(--delay),
      transform 0.5s var(--ease-out-expo) var(--delay);
  }

  .mobile-menu a:not(.btn):hover {
    background: var(--mint-light);
    color: var(--mint-dark);
  }

  .mobile-menu.active a:not(.btn) {
    opacity: 1;
    transform: translateY(0);
  }

  .mobile-menu.active a:nth-child(2) {
    --delay: 0.1s;
  }

  .mobile-menu.active a:nth-child(3) {
    --delay: 0.18s;
  }

  .mobile-menu.active a:nth-child(4) {
    --delay: 0.26s;
  }

  .mobile-menu.active a:nth-child(5) {
    --delay: 0.34s;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-product {
    transform: none;
    min-height: 360px;
    padding: 16px 0 24px;
    overflow: hidden;
    border-radius: var(--radius-xl);
  }

  .phone-shot {
    width: clamp(140px, 28vw, 200px);
    right: 8px;
    bottom: 8px;
    transform: rotate(-2deg);
  }

  .calc-card {
    padding: 40px 36px 36px;
  }

  .calc-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  .calc-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .kalkulator {
    padding: 80px 0;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "a a"
      "b b"
      "c d";
  }

  .bento-app {
    grid-row: auto;
  }

  .bento-phone-frame {
    width: clamp(140px, 36vw, 180px);
  }

  .howto,
  .system {
    min-height: auto;
    padding: 80px 0;
    display: block;
  }

  .howto-steps {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 32px;
  }

  .howto-step {
    display: flex;
    flex-direction: column;
    grid-row: auto;
    grid-template-rows: none;
    max-width: 460px;
    margin: 0 auto;
  }

  .howto-step .step-num,
  .howto-step h3,
  .howto-step p {
    text-align: left;
    min-height: unset;
  }

  .step-illustration {
    margin: 0 auto 12px;
  }

  .howto-steps::before {
    display: none;
  }

  .bento-card {
    padding: 24px;
  }

  .faq {
    padding: 64px 0;
  }

  .cta-dark {
    padding: 96px 0;
  }
}

/* ---- Responsive: Small Mobile (max-width: 640px) ---- */

@media (max-width: 640px) {
  .container {
    width: calc(100% - 32px);
  }

  .menu-close {
    right: 16px;
  }

  .section {
    padding: 64px 0;
  }

  .kalkulator {
    padding: 64px 0;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .hero-stats div {
    padding: 12px 8px;
    text-align: center;
  }

  .hero-stats strong {
    font-size: 1.1rem;
  }

  .hero-stats span {
    font-size: 0.65rem;
  }

  .hero-product {
    min-height: 310px;
  }

  .howto {
    padding: 64px 0;
  }

  .step-illustration {
    aspect-ratio: 1 / 1;
    margin: 0 auto 10px;
    max-width: 280px;
  }

  .calc-card {
    padding: 32px 24px 28px;
  }

  .calc-hero-meta {
    flex-direction: column;
    gap: 16px;
  }

  .price-pills {
    flex-wrap: wrap;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "a"
      "b"
      "c"
      "d";
    gap: 12px;
  }

  .bento-card {
    padding: 28px 24px;
  }

  .ai-flow {
    padding: 18px 20px;
  }

  .faq {
    padding: 56px 0;
  }

  .cta-dark {
    padding: 80px 0;
  }

  .cta-wrap h2 {
    max-width: 12ch;
    margin-inline: auto;
    margin-bottom: 24px;
    text-wrap: balance;
  }

  .cta-wrap .btn {
    width: min(100%, 290px);
  }

  .cta-wrap small {
    max-width: 26ch;
    margin: 18px auto 0;
    line-height: 1.7;
    letter-spacing: 0.015em;
    text-wrap: pretty;
  }

  .site-footer {
    padding: 28px 0 34px;
  }

  .footer-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .footer-wrap > div {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
  }

  .footer-wrap > div > span {
    grid-column: 1 / -1;
    line-height: 1.45;
  }

  .footer-wrap > div > a {
    grid-column: 1 / -1;
    overflow-wrap: anywhere;
    line-height: 1.45;
  }

  .footer-wrap > div > a[href^="mailto:"] {
    grid-column: 1 / -1;
    overflow-wrap: anywhere;
  }

  .section-head h2 {
    font-size: clamp(2rem, 7vw, 2.5rem);
  }

  .hero-copy h1 {
    font-size: clamp(2.25rem, 9vw, 2.85rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
  }

  .hero-copy h1 span {
    padding-top: 4px;
  }

  .hero-lead {
    margin-top: 20px;
    font-size: 1rem;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .step-num {
    font-size: 2.25rem;
    margin-bottom: 6px;
  }

  .calc-hero-main .money {
    font-size: 2.25rem;
  }

  .cta-wrap h2 {
    font-size: 1.85rem;
  }

  .mobile-menu a:not(.btn) {
    font-size: 1.2rem;
  }
}

/* ---- Responsive: Tiny phones (max-width: 400px) ---- */

@media (max-width: 400px) {
  .container {
    width: calc(100% - 24px);
  }

  .menu-close {
    right: 12px;
  }

  .hero {
    padding-bottom: 32px;
  }

  .hero-product {
    min-height: 340px;
  }

  .hero-copy h1 {
    font-size: clamp(1.85rem, 9.5vw, 2.35rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
  }

  .hero-stats {
    gap: 6px;
  }

  .hero-stats div {
    padding: 10px 6px;
  }

  .hero-stats strong {
    font-size: 0.95rem;
  }

  .hero-stats span {
    font-size: 0.6rem;
  }

  .btn-lg {
    padding: 14px 22px;
    font-size: 0.98rem;
  }

  .phone-shot {
    width: clamp(120px, 32vw, 152px);
    right: 6px;
    bottom: 6px;
  }

  .step-illustration {
    max-width: 240px;
  }

  .step-num {
    font-size: 1.85rem;
  }

  .bento-phone-frame {
    width: clamp(160px, 60vw, 200px);
  }

  .calc-hero-main .money {
    font-size: 1.95rem;
  }

  .calc-card {
    padding: 28px 20px 24px;
  }

  .faq-item summary {
    font-size: 0.98rem;
    padding: 18px 0;
  }
}

/* ---- Responsive: Short viewport (landscape phones) ---- */

@media (max-height: 720px) {
  .hero {
    min-height: auto;
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .howto,
  .system {
    min-height: auto;
    padding: 64px 0;
  }
}

/* ---- Responsive: Wide Desktop (min-width: 1440px) ---- */

@media (min-width: 1440px) {
  .bento-grid {
    gap: 20px;
  }

  .btn-lg {
    padding: 18px 36px;
    font-size: 1.1rem;
  }

  .faq-item summary {
    font-size: 1.15rem;
    padding: 28px 0;
  }

  .faq-answer p {
    font-size: 1.05rem;
  }

  .step-illustration {
    max-width: 280px;
  }

  .bento-phone-frame {
    width: clamp(180px, 70%, 240px);
  }

  .phone-shot {
    width: clamp(170px, 17vw, 210px);
  }
}

/* ---- Responsive: Ultrawide (min-width: 1800px) ---- */

@media (min-width: 1800px) {
  :root {
    --container: 1400px;
  }

  .hero-copy h1 {
    font-size: 5.25rem;
  }

  .section-head h2 {
    font-size: 3.75rem;
  }

  .bento-card h3 {
    font-size: 1.75rem;
  }

  .hero-lead {
    font-size: 1.125rem;
  }

  .calc-hero-main .money {
    font-size: 4.25rem;
  }

  .step-num {
    font-size: 2.5rem;
  }

  .step-illustration {
    max-width: 300px;
  }

  .bento-phone-frame {
    width: clamp(200px, 70%, 260px);
  }
}

/* ---- Responsive: 2K+ (min-width: 2400px) ---- */

@media (min-width: 2400px) {
  :root {
    --container: 1600px;
  }

  .hero-copy h1 {
    font-size: 6rem;
  }

  .section-head h2 {
    font-size: 4.25rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ---- Accessibility ---- */

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

  .marquee-track {
    animation: none;
    width: auto;
    flex-wrap: wrap;
    justify-content: center;
  }

  .reveal {
    opacity: 1;
  }
}
