/* ============================================================
   HB App — Studio Site
   Design system: dark-first, modern SaaS / product studio
   ============================================================ */

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #07080c;
  --bg-soft: #0b0d14;
  --surface: #101320;
  --surface-2: #151929;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --text: #eef1f7;
  --text-dim: #a3abbd;
  --text-faint: #6b7385;

  /* Brand */
  --brand-1: #6e8bff;
  --brand-2: #a855f7;
  --brand-3: #22d3ee;
  --grad-brand: linear-gradient(135deg, #6e8bff 0%, #a855f7 55%, #22d3ee 120%);
  --grad-brand-soft: linear-gradient(135deg, rgba(110, 139, 255, 0.16), rgba(168, 85, 247, 0.14));

  /* App accents */
  --tahmin-1: #10b981;
  --tahmin-2: #f59e0b;
  --filo-1: #3b82f6;
  --filo-2: #6366f1;

  /* Effects */
  --shadow: 0 30px 80px -28px rgba(0, 0, 0, 0.75);
  --shadow-sm: 0 16px 40px -22px rgba(0, 0, 0, 0.7);
  --ring: 0 0 0 1px var(--border);

  /* Radii */
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --r-xl: 34px;

  /* Layout */
  --wrap: 1180px;
  --gutter: 48px;

  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient background decor */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60rem 40rem at 12% -8%, rgba(110, 139, 255, 0.18), transparent 60%),
    radial-gradient(48rem 38rem at 100% 0%, rgba(168, 85, 247, 0.16), transparent 55%),
    radial-gradient(50rem 50rem at 50% 120%, rgba(34, 211, 238, 0.1), transparent 60%),
    var(--bg);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
}

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

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

::selection {
  background: rgba(168, 85, 247, 0.32);
  color: #fff;
}

:where(a, button, .btn, .app__cta):focus-visible {
  outline: 3px solid rgba(110, 139, 255, 0.42);
  outline-offset: 3px;
}

/* ---------- Layout helpers ---------- */
.wrap {
  width: min(var(--wrap), calc(100% - var(--gutter)));
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 12px 2px rgba(168, 85, 247, 0.7);
}

h1, h2, h3, p {
  margin-top: 0;
}

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

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn--primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 14px 36px -10px rgba(110, 139, 255, 0.6);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px -12px rgba(138, 110, 255, 0.7);
}

.btn--ghost {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  transform: translateY(-2px);
  border-color: var(--brand-1);
  background: rgba(110, 139, 255, 0.08);
}

.btn--sm {
  min-height: 42px;
  padding: 0 16px;
  font-size: 14px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--wrap), calc(100% - var(--gutter)));
  margin: 14px auto;
  padding: 10px 14px 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(12, 14, 22, 0.66);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-sm);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--grad-brand);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  box-shadow: 0 8px 24px -8px rgba(110, 139, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0;
}

.brand small {
  display: block;
  margin-top: 1px;
  color: var(--text-faint);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

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

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 48px;
  padding: 56px 0 40px;
}

.hero__copy {
  max-width: 640px;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(42px, 5.6vw, 72px);
  line-height: 1.02;
}

.hero__lead {
  margin: 0 0 30px;
  max-width: 560px;
  color: var(--text-dim);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.hero__meta div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
}

.hero__meta div span {
  color: var(--text-faint);
  font-size: 13px;
}

/* Hero device stage */
.hero__stage {
  position: relative;
  min-height: 540px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero__stage::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: var(--grad-brand);
  filter: blur(90px);
  opacity: 0.35;
  z-index: 0;
}

.phone {
  position: relative;
  overflow: hidden;
  border: 9px solid #0d0f17;
  border-radius: 40px;
  background: #0d0f17;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0d0f17;
}

.hero__stage .phone {
  position: absolute;
  width: 216px;
  aspect-ratio: 9 / 19.5;
}

.hero__stage .phone--left {
  transform: translateX(-80%) rotate(-12deg);
  z-index: 1;
  opacity: 0.9;
}

.hero__stage .phone--right {
  transform: translateX(80%) rotate(12deg);
  z-index: 1;
  opacity: 0.9;
}

.hero__stage .phone--front {
  transform: translateY(-8px);
  z-index: 2;
  width: 240px;
}

.float {
  animation: float 7s ease-in-out infinite;
}
.float--slow {
  animation-duration: 9s;
  animation-delay: -2s;
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -16px; }
}

/* ---------- Marquee (tech strip) ---------- */
.marquee {
  position: relative;
  margin: 28px 0 8px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  contain: layout paint;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: scroll-x 32s linear infinite;
}

.marquee__track span {
  color: var(--text-faint);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
}

.marquee__track span::after {
  content: "•";
  margin-left: 56px;
  color: var(--brand-2);
  opacity: 0.5;
}

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

/* ---------- Sections ---------- */
.section {
  padding: 92px 0;
}

.section__head {
  max-width: 680px;
  margin-bottom: 44px;
}

.section__head h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
}

.section__head p {
  margin: 0;
  color: var(--text-dim);
  font-size: 18px;
}

/* ---------- Apps showcase ---------- */
#apps {
  scroll-margin-top: 112px;
}

.apps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px;
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.014)),
    var(--surface);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.app::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -110px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: var(--app-glow, var(--grad-brand));
  filter: blur(78px);
  opacity: 0.22;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.app::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--app-accent, var(--grad-brand));
  opacity: 0.62;
  transition: opacity 0.35s ease;
}

.app:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.app:hover::before { opacity: 0.34; }
.app:hover::after { opacity: 1; }

.app__top,
.app__media,
.app__content,
.app__tags,
.app__foot {
  position: relative;
  z-index: 1;
}

.app__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.app__brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.app__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 15px;
  background: var(--app-accent, var(--grad-brand));
  color: #fff;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 26px -10px rgba(0, 0, 0, 0.7);
}

.app__heading {
  min-width: 0;
}

.app__title {
  margin: 0 0 2px;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: 0;
}

.app__tagline {
  display: block;
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.35;
}

.app__platform {
  flex-shrink: 0;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.app__media {
  display: grid;
  place-items: center;
  min-height: 424px;
  margin: 0 -4px 20px;
  padding: 18px 0 24px;
  border-radius: var(--r);
  overflow: hidden;
  outline: none;
}

.app__media:focus-visible {
  box-shadow: 0 0 0 3px rgba(110, 139, 255, 0.35);
}

.app__media-glow {
  position: absolute;
  width: 230px;
  height: 280px;
  border-radius: 50%;
  background: var(--app-glow, var(--grad-brand));
  filter: blur(68px);
  opacity: 0.28;
  pointer-events: none;
}

.app__no {
  position: absolute;
  top: 4px;
  right: 8px;
  font-family: var(--font-display);
  font-size: 58px;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--border-strong);
  opacity: 0.38;
  pointer-events: none;
  z-index: 0;
}

.app__device {
  position: relative;
  z-index: 1;
  width: min(66%, 186px);
  aspect-ratio: 9 / 20;
  border-width: 7px;
  border-radius: 32px;
  background: #0d0f17;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.app__device::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.055),
    inset 0 18px 34px rgba(0, 0, 0, 0.18),
    inset 0 -22px 34px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.app__media .phone img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0d0f17;
}

.app:hover .app__device {
  transform: translateY(-5px);
}

.app__content {
  display: grid;
  gap: 16px;
}

.app__desc {
  margin: 0;
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.58;
}

.app__highlights {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app__highlights li {
  position: relative;
  padding-left: 25px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.42;
}

.app__highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  background: var(--app-accent, var(--grad-brand));
  opacity: 0.2;
}

.app__highlights li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 5px;
  height: 8px;
  border: solid var(--text);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.app__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 20px;
}

.app__tags span {
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.app__foot {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.app__cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--app-accent, var(--grad-brand));
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.8);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.app__cta span {
  transition: transform 0.25s ease;
}

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

.app__cta:hover span {
  transform: translateX(4px);
}

.app__stores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.app__stores .btn {
  justify-content: center;
  min-height: 38px;
  padding-inline: 10px;
  font-size: 12.5px;
}

@media (max-width: 1100px) {
  .apps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .apps {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .app {
    padding: 18px;
  }

  .app__media {
    min-height: 398px;
    margin-inline: -6px;
  }

  .app__device {
    width: min(56vw, 178px);
  }
}

@media (max-width: 390px) {
  .app {
    padding: 16px;
  }

  .app__top {
    gap: 10px;
  }

  .app__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .app__title {
    font-size: 20px;
  }

  .app__platform {
    padding-inline: 9px;
    font-size: 11.5px;
  }

  .app__media {
    min-height: 372px;
  }

  .app__device {
    width: min(55vw, 164px);
    border-width: 6px;
    border-radius: 30px;
  }
}

/* ---------- Approach / features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 13px;
  background: var(--grad-brand-soft);
  border: 1px solid var(--border);
  font-size: 22px;
}

.feature h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.feature p {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- API panel ---------- */
.api {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: 48px;
  align-items: center;
}

.api__copy h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  margin: 0 0 14px;
}

.api__copy p {
  color: var(--text-dim);
  font-size: 18px;
  margin: 0;
}

.code-panel {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.code-panel__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.code-panel__bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3a3f4c;
}
.code-panel__bar i:nth-child(1) { background: #ff5f57; }
.code-panel__bar i:nth-child(2) { background: #febc2e; }
.code-panel__bar i:nth-child(3) { background: #28c840; }
.code-panel__bar span {
  margin-left: 8px;
  color: var(--text-faint);
  font-size: 13px;
}

.code-panel__body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.endpoint {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.endpoint span {
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 600;
}

.endpoint code {
  font-family: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  font-size: 13.5px;
  color: var(--brand-3);
  overflow-wrap: anywhere;
}

.endpoint code b {
  color: var(--brand-2);
  font-weight: 600;
}

/* ---------- CTA band ---------- */
.cta {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 52px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    radial-gradient(40rem 20rem at 0% 0%, rgba(110, 139, 255, 0.22), transparent 60%),
    radial-gradient(40rem 20rem at 100% 100%, rgba(168, 85, 247, 0.2), transparent 60%),
    var(--surface);
}

.cta h2 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(28px, 3.4vw, 42px);
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(var(--wrap), calc(100% - var(--gutter)));
  margin-inline: auto;
  padding: 36px 0;
}

.site-footer .brand small {
  color: var(--text-faint);
}

.site-footer__meta {
  color: var(--text-faint);
  font-size: 14px;
}

.site-footer__meta a:hover {
  color: var(--text);
}

/* ============================================================
   Detail pages
   ============================================================ */
.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 56px;
  align-items: center;
  padding: 56px 0 64px;
}

.detail-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 5vw, 62px);
}

.detail-hero__lead {
  margin: 0 0 28px;
  max-width: 580px;
  color: var(--text-dim);
  font-size: 18px;
  line-height: 1.6;
}

.detail-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.detail-hero__actions .btn--primary {
  background: var(--app-accent, var(--grad-brand));
  box-shadow: 0 16px 38px -14px rgba(0, 0, 0, 0.8);
}

.detail-hero__media {
  position: relative;
  display: grid;
  place-items: center;
}

.detail-hero__media::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: var(--app-glow, var(--grad-brand));
  filter: blur(90px);
  opacity: 0.3;
}

.detail-hero__media .phone {
  position: relative;
  width: min(100%, 280px);
  aspect-ratio: 9 / 20;
  transform: rotate(3deg);
}

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stats-strip div {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    var(--surface);
}

.stats-strip div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--app-accent, var(--grad-brand));
  opacity: 0.65;
}

.stats-strip strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  background: var(--app-accent, var(--grad-brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stats-strip span {
  color: var(--text-faint);
  font-size: 14px;
  line-height: 1.45;
}

/* Overview */
.overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
  padding-bottom: 24px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.overview__main {
  padding: 36px;
}

.overview__main h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 3vw, 36px);
}

.overview__main p {
  color: var(--text-dim);
  font-size: 16.5px;
  line-height: 1.7;
  margin: 0;
}

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

.bullets div {
  position: relative;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface-2);
}

.bullets div::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--app-accent, var(--grad-brand));
}

.bullets strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15.5px;
}

.bullets span {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.55;
}

.facts {
  padding: 28px;
}

.facts h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.facts dl {
  display: grid;
  gap: 16px;
  margin: 0;
}

.facts dl div {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.facts dl div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.facts dt {
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
}

.facts dd {
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* Shots */
.shots {
  padding-top: 24px;
}

.shots__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
}

.shot {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background:
    radial-gradient(18rem 14rem at 50% 0%, rgba(255, 255, 255, 0.055), transparent 70%),
    var(--surface);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.shot::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--app-accent, var(--grad-brand));
  opacity: 0.42;
}

.shot:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  background:
    radial-gradient(18rem 14rem at 50% 0%, rgba(255, 255, 255, 0.07), transparent 70%),
    var(--surface-2);
}

.shot .phone {
  width: min(100%, 188px);
  aspect-ratio: 9 / 20;
  border-width: 7px;
  border-radius: 32px;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.shot h3 {
  width: 100%;
  margin: 20px 0 8px;
  font-size: 18px;
}

.shot p {
  width: 100%;
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.55;
}

/* Stack */
.stack {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1fr);
  gap: 40px;
  align-items: start;
}

.stack__copy h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 3.2vw, 40px);
}

.stack__copy p {
  margin: 0;
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1.65;
}

.stack__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stack__list span {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
}

.stack__list span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--app-accent, var(--grad-brand));
  flex-shrink: 0;
}

/* ---------- Reveal animation ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  :root { --gutter: 36px; }

  .hero,
  .api,
  .stack,
  .detail-hero,
  .overview {
    grid-template-columns: 1fr;
  }

  .hero__stage {
    min-height: 460px;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-hero {
    gap: 36px;
  }
}

@media (max-width: 720px) {
  :root { --gutter: 28px; }

  .site-header__inner {
    gap: 12px;
    margin-block: 10px;
    padding: 8px 10px;
    border-radius: 22px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand small {
    max-width: 140px;
    font-size: 11px;
    line-height: 1.25;
  }

  .site-nav {
    display: none;
  }

  .header-actions .btn {
    display: none;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
  }

  .site-header__inner.is-open {
    flex-wrap: wrap;
    border-radius: 24px;
  }

  .site-header__inner.is-open .site-nav {
    display: flex;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    margin-top: 6px;
  }

  .site-header__inner.is-open .site-nav a {
    padding: 12px;
  }

  .section {
    padding: 68px 0;
  }

  .hero {
    gap: 30px;
    padding: 34px 0 28px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero__actions .btn,
  .detail-hero__actions .btn,
  .cta__actions .btn {
    width: 100%;
  }

  .hero__stage {
    min-height: 390px;
  }

  .detail-hero {
    padding: 36px 0 44px;
  }

  .detail-hero h1 {
    font-size: 40px;
  }

  .detail-hero__lead,
  .section__head p,
  .api__copy p,
  .stack__copy p {
    font-size: 16px;
  }

  .overview__main,
  .facts {
    padding: 24px;
  }

  .features,
  .bullets,
  .stack__list {
    grid-template-columns: 1fr;
  }

  .api {
    gap: 28px;
  }

  .endpoint {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .cta {
    padding: 34px 26px;
  }

  .site-footer__inner {
    align-items: flex-start;
  }

  .hero__meta div strong {
    font-size: 19px;
  }

  .hero__stage .phone {
    width: 150px;
  }
  .hero__stage .phone--front {
    width: 166px;
  }
  .hero__stage .phone--left {
    transform: translateX(-64%) rotate(-12deg);
  }
  .hero__stage .phone--right {
    transform: translateX(64%) rotate(12deg);
  }
}

@media (max-width: 480px) {
  .stats-strip,
  .shots__grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero__stage {
    min-height: 340px;
  }

  .shot .phone,
  .detail-hero__media .phone {
    width: min(100%, 240px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
