/* ==========================================================================
   Astraiva site styles
   Dark default + light theme via [data-theme]
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;

  --container: 1120px;
  --section-pad: clamp(56px, 7vw, 88px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
  --bg: #0c0c11;
  --bg-soft: #101016;
  --surface: #14141b;
  --surface-2: #181821;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f1ec;
  --text-2: #a6a59e;
  --text-3: #6c6b66;
  --accent: #e6b75e;
  --accent-strong: #f0c878;
  --accent-ink: #17130a;
  --accent-soft: rgba(230, 183, 94, 0.1);
  --glow: rgba(230, 183, 94, 0.16);
  --ok: #63c98e;
  --ok-soft: rgba(99, 201, 142, 0.12);
  --star: rgba(242, 241, 236, 0.8);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #faf9f6;
  --bg-soft: #f3f1ec;
  --surface: #ffffff;
  --surface-2: #f7f5f1;
  --border: rgba(20, 20, 26, 0.09);
  --border-strong: rgba(20, 20, 26, 0.16);
  --text: #16161c;
  --text-2: #55555f;
  --text-3: #92929c;
  --accent: #a9791d;
  --accent-strong: #8f6413;
  --accent-ink: #ffffff;
  --accent-soft: rgba(169, 121, 29, 0.09);
  --glow: rgba(169, 121, 29, 0.1);
  --ok: #2e9e5f;
  --ok-soft: rgba(46, 158, 95, 0.1);
  --star: rgba(20, 20, 26, 0.35);
  --shadow: 0 24px 60px -32px rgba(40, 35, 20, 0.35);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

html:focus-within {
  scroll-behavior: smooth;
}

html[data-scroll-lock="true"],
html[data-scroll-lock="true"] body {
  overflow: hidden;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60rem 40rem at 85% -10%, var(--glow), transparent 60%),
    radial-gradient(50rem 36rem at -10% 110%, var(--glow), transparent 55%);
  opacity: 0.55;
}

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

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

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

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

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

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease),
    background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn svg {
  width: 17px;
  height: 17px;
  transition: transform 0.25s var(--ease);
}

.btn:hover svg {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px -12px var(--accent);
}

.btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -12px var(--accent);
}

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

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

.btn-lg {
  padding: 16px 30px;
  font-size: 16px;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--border);
}

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

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

.brand-logo {
  height: 28px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

[data-theme="dark"] .brand-logo {
  filter: brightness(0) invert(1);
}

.brand-logo-sm {
  height: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s var(--ease);
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

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

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease),
    transform 0.25s var(--ease-spring);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(12deg);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.icon-sun {
  display: none;
}

[data-theme="light"] .icon-sun {
  display: block;
}

[data-theme="light"] .icon-moon {
  display: none;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  cursor: pointer;
}

.menu-toggle span {
  width: 16px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

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

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(72px, 9vw, 112px) 0 clamp(36px, 5vw, 64px);
  overflow: hidden;
}

.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.stars span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--star);
  animation: twinkle 4s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50% { opacity: 0.9; transform: scale(1.15); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 28px;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--border-strong);
}

.hero-title {
  font-size: clamp(2.7rem, 7.5vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.hero-sub {
  max-width: 560px;
  margin: 26px auto 0;
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  color: var(--text-2);
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 38px;
}

.hero-paths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 820px;
  margin: 54px auto 0;
  text-align: left;
}

.hero-paths a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 16px 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  transition: transform 0.25s var(--ease-spring), border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.hero-paths a:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--surface);
}

.hero-paths a > span:last-child {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--accent);
  font-size: 18px;
}

.hero-path-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}

.hero-path-note {
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.4;
}

.product-page-link {
  display: inline-block;
  margin-top: 12px;
}

/* ---------- Marquee ---------- */
.marquee {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1px solid var(--border);
  padding: 18px 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}

.marquee-track {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  width: max-content;
  animation: marquee 34s linear infinite;
}

.marquee span {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 56px;
}

.marquee span::after {
  content: "✦";
  color: var(--accent);
  font-size: 9px;
  opacity: 0.7;
}

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

/* ---------- Sections ---------- */
.section {
  padding: var(--section-pad) 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.section-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
}

.section-sub {
  margin-top: 18px;
  color: var(--text-2);
  max-width: 560px;
}

/* ---------- Cards (shared) ---------- */
.card-title {
  font-size: 21px;
}

.card-tag {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16.5px;
  color: var(--accent);
  margin-top: 8px;
}

.card-desc {
  color: var(--text-2);
  font-size: 15px;
  margin-top: 12px;
}

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

.card-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.card-links a,
.text-link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14.5px;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.card-links a:hover,
.text-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Featured work ---------- */
.featured-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.featured-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.featured-media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}

button.featured-media {
  -webkit-appearance: none;
  appearance: none;
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.5s var(--ease);
}

.featured-card:hover .featured-media img {
  filter: brightness(1.06);
}

.qm-hint {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.32);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.featured-card:hover .qm-hint,
.featured-media:focus-visible .qm-hint {
  opacity: 1;
}

.qm-hint span {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 9px 18px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ---------- Quick-view button ---------- */
.quick-view {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14.5px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    transform 0.25s var(--ease-spring);
}

.quick-view:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.quick-view svg {
  width: 15px;
  height: 15px;
  transition: transform 0.25s var(--ease);
}

.quick-view:hover svg {
  transform: translateX(2px);
}

.quick-view-sm {
  margin-top: 0;
  padding: 7px 14px;
  font-size: 13.5px;
}

.featured-body {
  padding: clamp(22px, 3vw, 32px);
}

.featured-card:first-of-type .featured-body {
  max-width: 780px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 24px;
}

/* ---------- Badges & chips ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-dev,
.badge-private {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-dev::before {
  animation: pulse 2.2s ease-in-out infinite;
}

.badge-live,
.badge-free {
  background: var(--ok-soft);
  color: var(--ok);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.chip {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 4px 12px;
  border-radius: 999px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Tool cards ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.tool-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.tool-tile {
  position: relative;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  overflow: hidden;
}

.tool-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.25;
  pointer-events: none;
}

.tool-mono {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.92);
  position: relative;
  z-index: 1;
}

.tool-tile-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(0, 0, 0, 0.18);
  padding: 5px 12px;
  border-radius: 999px;
  position: relative;
  z-index: 1;
}

.tile-vibegaffer {
  background: linear-gradient(135deg, #0f6f7a, #0b3a52 60%, #10243a);
}

.tile-thetaforge {
  background: linear-gradient(135deg, #3d4458, #232536 60%, #161826);
}

.tile-horizonai {
  background: linear-gradient(135deg, #1f6d4a, #0f4438 60%, #0c2b26);
}

.tile-rovyniq {
  background: linear-gradient(135deg, #8a5a1c, #5f3d12 60%, #3a250a);
}

.tool-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tool-body .card-links {
  margin-top: auto;
  padding-top: 22px;
}

/* ---------- Browser tools ---------- */
.browser-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.browser-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 26px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.browser-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.browser-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}

.browser-icon svg {
  width: 24px;
  height: 24px;
}

.browser-body .card-desc {
  margin-top: 8px;
}

.browser-tags {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.browser-tags .text-link {
  font-size: 13.5px;
}

/* ---------- Studio ---------- */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 90px);
  align-items: start;
}

.studio-intro .section-title {
  margin-top: 4px;
}

.studio-intro .section-sub {
  font-size: 1.05rem;
}

.studio-contact {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.studio-values {
  display: grid;
  gap: 30px;
  padding-top: 4px;
}

.value {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  transition: border-color 0.3s var(--ease);
}

.value:hover {
  border-color: var(--accent);
}

.value-num {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.value h3 {
  font-size: 18px;
  margin: 8px 0 6px;
}

.value p {
  color: var(--text-2);
  font-size: 15px;
}

/* ---------- Contact ---------- */
.section-contact {
  text-align: center;
}

.contact-title {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  letter-spacing: -0.03em;
}

.contact-sub {
  color: var(--text-2);
  margin-top: 18px;
  font-size: 1.05rem;
}

.contact-actions {
  margin-top: 34px;
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 760px;
}

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

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 20px 4px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-align: left;
  transition: color 0.2s var(--ease);
}

.faq-q:hover {
  color: var(--accent);
}

.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-3);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}

.faq-q:hover .faq-icon {
  color: var(--accent);
}

.faq-item[data-open="true"] .faq-icon {
  transform: rotate(180deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease);
}

.faq-a p {
  color: var(--text-2);
  font-size: 15.5px;
  padding: 0 4px 20px;
}

.faq-a .text-link {
  font-size: 15.5px;
}

/* ---------- Quick-view modal ---------- */
.quick-modal {
  width: min(720px, calc(100% - 32px));
  max-height: min(86vh, 920px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.quick-modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.quick-modal[open] {
  animation: modal-in 0.35s var(--ease);
}

.quick-modal[open]::backdrop {
  animation: fade-in 0.25s var(--ease);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.qm-wrap {
  max-height: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.qm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 30px 0;
}

.qm-kicker {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.qm-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-top: 6px;
}

.qm-badge {
  margin-top: 12px;
}

.qm-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    transform 0.25s var(--ease-spring);
}

.qm-close:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: rotate(90deg);
}

.qm-close svg {
  width: 18px;
  height: 18px;
}

.qm-media {
  display: grid;
  gap: 12px;
  padding: 22px 30px 0;
}

.qm-shot {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.qm-content {
  padding: 22px 30px 30px;
}

.qm-tag {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  color: var(--accent);
}

.qm-desc {
  color: var(--text-2);
  font-size: 15.5px;
  margin-top: 12px;
}

.qm-features {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.qm-features li {
  position: relative;
  padding-left: 28px;
  color: var(--text-2);
  font-size: 15px;
}

.qm-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
}

.qm-content .chips {
  margin-top: 20px;
}

/* ---------- Reveal stagger ---------- */
.featured-grid [data-reveal]:nth-child(2) { transition-delay: 0.1s; }
.tool-grid [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
.tool-grid [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
.tool-grid [data-reveal]:nth-child(4) { transition-delay: 0.24s; }
.browser-list [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
.browser-list [data-reveal]:nth-child(3) { transition-delay: 0.16s; }

/* ---------- Legal pages ---------- */
.legal-hero {
  padding: clamp(64px, 10vw, 120px) 0 clamp(40px, 6vw, 60px);
  border-bottom: 1px solid var(--border);
}

.legal-hero-inner {
  max-width: 760px;
}

.legal-hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  letter-spacing: -0.03em;
  margin-top: 16px;
}

.legal-hero p {
  color: var(--text-2);
  margin-top: 18px;
  font-size: 1.05rem;
  max-width: 580px;
}

.legal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.legal-meta {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.legal-meta span {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.legal-body {
  padding: clamp(56px, 8vw, 88px) 0 clamp(72px, 10vw, 120px);
}

.legal-prose {
  max-width: 720px;
}

.legal-prose h2 {
  font-size: 22px;
  margin: 56px 0 6px;
  scroll-margin-top: 90px;
}

.legal-prose h2:first-child {
  margin-top: 0;
}

.legal-prose h3 {
  font-size: 17px;
  margin: 28px 0 4px;
}

.legal-prose p {
  color: var(--text-2);
  font-size: 15.5px;
  margin-top: 12px;
}

.legal-prose ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.legal-prose ul li {
  position: relative;
  padding-left: 24px;
  color: var(--text-2);
  font-size: 15.5px;
}

.legal-prose ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.legal-prose a {
  color: var(--accent);
  border-bottom: 1px solid var(--border-strong);
  transition: border-color 0.2s var(--ease);
}

.legal-prose a:hover {
  border-color: var(--accent);
}

.legal-prose strong {
  color: var(--text);
}

.legal-callout {
  margin-top: 22px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.legal-callout p {
  margin: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 28px;
}

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

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

.footer-copy {
  color: var(--text-3);
  font-size: 13.5px;
}

.footer-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--text-2);
  font-size: 13.5px;
  transition: color 0.2s var(--ease);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-note {
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
  margin-top: 26px;
}

/* ---------- Reveal animation ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }

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

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

  .browser-card {
    grid-template-columns: auto 1fr;
  }

  .browser-tags {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .hero-paths {
    grid-template-columns: 1fr;
    margin-top: 40px;
  }

  .nav-links {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 17px;
  }

  .menu-toggle {
    display: flex;
  }

  .browser-card {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 18px;
  }

  .browser-tags {
    grid-column: 1;
  }

  .quick-modal {
    width: 100%;
    max-height: 92vh;
    margin: auto 0 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: 0;
  }

  .quick-modal[open] {
    animation-name: sheet-in;
  }

  @keyframes sheet-in {
    from { transform: translateY(100%); }
    to { transform: none; }
  }

  .qm-head {
    padding: 22px 22px 0;
  }

  .qm-media {
    padding: 18px 22px 0;
  }

  .qm-content {
    padding: 18px 22px 26px;
  }

  .faq-q {
    font-size: 16px;
  }
}

/* ---------- Consent banner ---------- */
.consent-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px));
  z-index: 1000;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.consent-banner.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(14px);
}

.consent-banner-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.consent-banner-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-2);
}

.consent-banner-text strong {
  color: var(--text);
}

.consent-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.consent-banner-actions .btn {
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 18px;
  font-size: 14px;
  font-family: var(--font-display);
}

.consent-banner-link {
  margin-right: auto;
  font-size: 0.9rem;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consent-banner-link:hover {
  color: var(--accent);
}

@media (max-width: 640px) {
  .consent-banner {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    transform: none;
    border-radius: var(--radius) var(--radius) 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .consent-banner.hidden {
    transform: translateY(100%);
  }

  .consent-banner-link {
    width: 100%;
    margin-right: 0;
  }
}

/* ---------- Contact & support pages ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 44px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 26px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.contact-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.contact-card-kicker {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.contact-card h3 {
  font-size: 20px;
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.contact-card p {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.65;
  margin-top: 6px;
}

.contact-card a {
  color: var(--accent);
  font-weight: 600;
  border-bottom: 1px solid var(--border-strong);
  transition: border-color 0.2s var(--ease);
  word-break: break-word;
}

.contact-card a:hover {
  border-color: var(--accent);
}

.contact-form-wrap {
  margin-top: 54px;
  max-width: 720px;
}

.contact-form-wrap h2 {
  font-size: 24px;
  letter-spacing: -0.02em;
}

.contact-form-wrap > p {
  color: var(--text-2);
  margin-top: 10px;
  font-size: 15px;
}

.contact-form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.contact-form label {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-2);
  margin-bottom: 8px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 13px 15px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s var(--ease);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.form-note {
  color: var(--text-3);
  font-size: 13px;
  margin-top: -6px;
}

.support-topics {
  margin-top: 44px;
}

.support-topic {
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 18px;
}

.support-topic h3 {
  font-size: 19px;
  letter-spacing: -0.02em;
}

.support-topic p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.65;
  margin-top: 8px;
}

.support-topic .links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 16px;
}

.support-topic .links a {
  color: var(--accent);
  font-weight: 600;
  border-bottom: 1px solid var(--border-strong);
  transition: border-color 0.2s var(--ease);
}

.support-topic .links a:hover {
  border-color: var(--accent);
}

@media (max-width: 640px) {
  .contact-form .form-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
