/* Uplaim marketing site — shared styles */
:root {
  --bg: #0c0b14;
  --bg-elevated: #16151f;
  --surface: #222131;
  --surface-soft: #2a2840;
  --text: #ffffff;
  --text-muted: #9b97b0;
  --text-dim: #6e6a87;
  --brand: #9572e3;
  --brand-start: #7a42f4;
  --brand-end: #b97aff;
  --brand-glow: rgba(149, 114, 227, 0.35);
  --accent-teal: #15b4ac;
  --border: rgba(110, 106, 135, 0.35);
  --danger: #eb5757;
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Manrope", system-ui, sans-serif;
  --max: 1120px;
  --nav-h: 72px;
  --pad-x: clamp(16px, 4vw, 24px);
  --section-y: clamp(48px, 8vw, 88px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: min(100% - (var(--pad-x) * 2), var(--max));
  margin-inline: auto;
}

/* —— Nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(12, 11, 20, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(12, 11, 20, 0.92);
}

.site-header .inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(100% - (var(--pad-x) * 2), var(--max));
  margin-inline: auto;
  padding-block: 12px;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  height: clamp(22px, 4vw, 28px);
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 28px);
}

.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--surface);
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(90deg, var(--brand-end), var(--brand-start));
  color: #fff;
  box-shadow: 0 10px 40px var(--brand-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-store {
  background: var(--surface);
  color: var(--text);
  min-width: min(100%, 180px);
  flex: 1 1 160px;
  max-width: 220px;
  border: 1px solid var(--border);
}

.btn-store:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(149, 114, 227, 0.25);
}

.btn-store svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.btn-store .store-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.btn-store .store-meta small {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-store .store-meta strong {
  font-size: 14px;
  font-weight: 700;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(32px, 6vw, 64px) 0 clamp(48px, 8vw, 80px);
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 75% 35%, rgba(122, 66, 244, 0.28), transparent 60%),
    radial-gradient(ellipse 50% 45% at 15% 80%, rgba(185, 122, 255, 0.16), transparent 55%),
    radial-gradient(circle at 50% 0%, rgba(21, 180, 172, 0.08), transparent 40%),
    linear-gradient(180deg, #0c0b14 0%, #12111c 50%, #0c0b14 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}

.hero-content {
  min-width: 0;
}

.brand-mark {
  display: block;
  height: clamp(28px, 5vw, 40px);
  width: auto;
  margin-bottom: clamp(18px, 3vw, 28px);
  animation: rise 0.8s ease both;
}

.hero h1 {
  font-size: clamp(1.85rem, 4.8vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
  max-width: 14ch;
  animation: rise 0.8s 0.08s ease both;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--brand-end), var(--brand-start));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-muted);
  max-width: 38ch;
  margin-bottom: 28px;
  animation: rise 0.8s 0.16s ease both;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: rise 0.8s 0.24s ease both;
}

.hero-visual {
  justify-self: end;
  width: min(100%, 320px);
  aspect-ratio: 9 / 17.5;
  border-radius: 36px;
  background: linear-gradient(160deg, #1a1830, #0c0b14 60%);
  border: 1px solid var(--border);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(149, 114, 227, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
  animation: float-in 1s 0.2s ease both;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 30% 20%, rgba(185, 122, 255, 0.35), transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(122, 66, 244, 0.3), transparent 50%),
    linear-gradient(180deg, #222131, #0c0b14);
}

.phone-ui {
  position: absolute;
  inset: 28px 20px 20px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.phone-ui .pill {
  height: 10px;
  width: 36%;
  margin-inline: auto;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.phone-ui .block {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 14px;
}

.phone-ui .block.tall {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.phone-ui .row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.phone-ui .dot {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-end), var(--brand-start));
  flex-shrink: 0;
}

.phone-ui .lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.phone-ui .line {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
}

.phone-ui .line.short {
  width: 55%;
}

.phone-ui .cta-bar {
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--brand-end), var(--brand-start));
  margin-top: auto;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* —— Sections —— */
.section {
  padding: var(--section-y) 0;
  position: relative;
}

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}

.section h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 14px;
  max-width: 20ch;
}

.section-lead {
  color: var(--text-muted);
  max-width: 48ch;
  margin-bottom: clamp(24px, 4vw, 40px);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
}

.features,
.features-wide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 20px);
}

.section-soft {
  background:
    radial-gradient(ellipse 50% 60% at 100% 0%, rgba(122, 66, 244, 0.12), transparent 55%),
    #0e0d16;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.how-steps {
  counter-reset: how;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 16px);
  list-style: none;
  padding: 0;
  margin: 0;
}

.how-steps li {
  counter-increment: how;
  position: relative;
  padding: 22px 20px 22px 68px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(34, 33, 49, 0.9), rgba(22, 21, 31, 0.6));
  border: 1px solid var(--border);
  min-width: 0;
}

.how-steps li::before {
  content: counter(how);
  position: absolute;
  left: 16px;
  top: 20px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-end), var(--brand-start));
}

.how-steps strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.how-steps span {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.feature {
  padding: clamp(20px, 3vw, 28px) clamp(16px, 2.5vw, 24px);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(34, 33, 49, 0.9), rgba(22, 21, 31, 0.6));
  border: 1px solid var(--border);
  transition: border-color 0.25s ease, transform 0.25s ease;
  min-width: 0;
  height: 100%;
}

.feature:hover {
  border-color: rgba(149, 114, 227, 0.45);
  transform: translateY(-3px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: rgba(149, 114, 227, 0.15);
  color: var(--brand-end);
}

.feature h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* —— Legal / wiki pages —— */
.page-hero {
  padding: clamp(36px, 6vw, 56px) 0 clamp(24px, 4vw, 32px);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 50% 80% at 0% 0%, rgba(122, 66, 244, 0.2), transparent 55%),
    var(--bg);
}

.page-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.15;
}

.page-hero .meta {
  color: var(--text-dim);
  font-size: 14px;
}

.prose {
  padding: clamp(32px, 5vw, 48px) 0 clamp(64px, 10vw, 96px);
}

.prose h2 {
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 700;
  margin: 36px 0 12px;
  letter-spacing: -0.01em;
}

.prose h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 28px 0 10px;
}

.prose p,
.prose li {
  color: var(--text-muted);
  margin-bottom: 12px;
  font-size: 1rem;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
  margin-bottom: 16px;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose a {
  color: var(--brand-end);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-word;
}

.prose strong {
  color: var(--text);
  font-weight: 700;
}

.steps {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0 32px;
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 18px 16px 18px 64px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  margin: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 16px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-end), var(--brand-start));
}

.steps li strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.callout {
  margin: 28px 0;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: rgba(235, 87, 87, 0.08);
  border: 1px solid rgba(235, 87, 87, 0.3);
  color: var(--text-muted);
}

.callout strong {
  color: var(--danger);
}

.callout.info {
  background: rgba(149, 114, 227, 0.1);
  border-color: rgba(149, 114, 227, 0.35);
}

.callout.info strong {
  color: var(--brand-end);
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--border);
  padding: clamp(32px, 5vw, 48px) 0;
  padding-bottom: calc(clamp(32px, 5vw, 48px) + env(safe-area-inset-bottom, 0px));
  background: #09080f;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.4fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

.footer-brand img {
  height: 24px;
  margin-bottom: 12px;
}

.footer-brand > p {
  color: var(--text-dim);
  font-size: 14px;
  max-width: 32ch;
}

.footer-nav-legal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
}

.footer-nav a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.35;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-reqs {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.55;
  max-width: 42ch;
}

.footer-reqs a {
  color: var(--brand-end);
}

.footer-copy {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  padding: 14px var(--pad-x);
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  background: rgba(9, 8, 15, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.cookie-banner-inner {
  width: min(100%, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.cookie-banner p {
  color: var(--text-muted);
  font-size: 14px;
  flex: 1;
  min-width: 0;
}

.cookie-banner a {
  color: var(--brand-end);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner .btn {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
  flex-shrink: 0;
}

/* —— Reveal on scroll —— */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* —— Tablet —— */
@media (max-width: 1024px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1fr) minmax(200px, 280px);
    gap: 32px;
  }

  .hero-visual {
    width: 100%;
    max-width: 260px;
  }

  .features,
  .features-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-nav-legal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* —— Small tablet / large phone —— */
@media (max-width: 860px) {
  .hero {
    min-height: auto;
    padding-top: 36px;
    padding-bottom: 48px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-visual {
    display: none;
  }

  .hero h1 {
    max-width: 16ch;
  }

  .how-steps {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* —— Mobile —— */
@media (max-width: 640px) {
  :root {
    --nav-h: 64px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: calc(var(--pad-x) * -1);
    right: calc(var(--pad-x) * -1);
    width: calc(100% + var(--pad-x) * 2);
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--pad-x) 16px;
    background: rgba(12, 11, 20, 0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    white-space: normal;
  }

  .nav-links a:last-child {
    border-bottom: 0;
  }

  .features,
  .features-wide {
    grid-template-columns: 1fr;
  }

  .store-row {
    width: 100%;
  }

  .btn-store {
    flex: 1 1 100%;
    max-width: none;
  }

  .footer-nav-legal {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner .btn {
    width: 100%;
  }

  .steps li {
    padding-left: 58px;
  }

  .how-steps li {
    padding-left: 64px;
  }

  .feature:hover {
    transform: none;
  }
}

@media (max-width: 380px) {
  .hero h1 {
    font-size: 1.65rem;
  }

  .brand-mark {
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .brand-mark,
  .hero h1,
  .hero-lead,
  .store-row,
  .hero-visual {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .feature:hover {
    transform: none;
  }
}
