/*
 * Amber Noir — the Contacto+ app's design tokens, carried over to the web.
 * Dark-only: obsidian canvases, amber accents, translucent glass and pill controls.
 */

:root {
  --background: #0f0f11;
  --background-raised: #161618;
  --surface: #18181b;
  --surface-elevated: #1f1f23;
  --surface-high: #27272a;

  --glass-card: rgba(24, 24, 27, 0.8);
  --glass-floating: rgba(24, 24, 28, 0.92);
  --glass-tint: rgba(255, 255, 255, 0.06);
  --glass-tint-subtle: rgba(255, 255, 255, 0.04);

  --primary: #f59e0b;
  --secondary: #fbbf24;
  --tertiary: #d97706;
  --on-primary: #0f0f11;
  --primary-soft: rgba(245, 158, 11, 0.12);

  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.4);

  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(245, 158, 11, 0.35);

  --success: #34d399;

  --gradient-primary: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  --glow: 0 10px 24px -4px rgba(245, 158, 11, 0.4);
  --glow-soft: 0 6px 16px -4px rgba(245, 158, 11, 0.3);

  --radius-sm: 8px;
  --radius: 16px;
  --radius-md: 24px;
  --radius-card: 28px;
  --radius-lg: 32px;
  --radius-full: 9999px;

  --gutter: 20px;
  --max-width: 1120px;

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--secondary);
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Ambient glow ---------- */

.ambient {
  position: absolute;
  inset: 0 0 auto;
  height: 900px;
  background: radial-gradient(
    ellipse 70% 60% at 50% 0%,
    rgba(245, 158, 11, 0.18) 0%,
    rgba(15, 15, 17, 0) 70%
  );
  pointer-events: none;
  z-index: 0;
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 15, 17, 0.72);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--text);
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.brand-name span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 600;
}

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

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

.nav-links a.btn-primary {
  color: var(--on-primary);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--on-primary);
  box-shadow: var(--glow);
}

.btn-primary:hover {
  color: var(--on-primary);
  box-shadow: 0 14px 30px -4px rgba(245, 158, 11, 0.5);
}

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

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
}

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

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

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 22px 0 18px;
  border-radius: var(--radius);
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text);
  transition: background 0.15s ease;
}

.store-btn:hover {
  color: var(--text);
  background: var(--surface-high);
}

.store-btn svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.store-btn small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.2;
}

.store-btn strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
}

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

.hero {
  position: relative;
  padding: 72px 0 96px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 56px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: var(--radius-full);
  background: var(--primary-soft);
  border: 1px solid var(--border-focus);
  color: var(--secondary);
  font-size: 13px;
  font-weight: 700;
}

.pill svg {
  width: 16px;
  height: 16px;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

h1 {
  margin-top: 20px;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 20px 0 32px;
  max-width: 520px;
  font-size: 18px;
  color: var(--text-secondary);
}

.hero-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Phone mockup ---------- */

.phone-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone-wrap::before {
  content: '';
  position: absolute;
  inset: 10% 5%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.28) 0%, rgba(245, 158, 11, 0) 65%);
  filter: blur(30px);
}

.phone {
  position: relative;
  text-align: left;
  width: 300px;
  max-width: 100%;
  padding: 12px;
  border-radius: 48px;
  background: linear-gradient(160deg, #2a2a2e, #141416);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 40px 80px -20px rgba(0, 0, 0, 0.7),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.screen {
  position: relative;
  overflow: hidden;
  border-radius: 38px;
  background: var(--background);
  padding: 44px 16px 20px;
  min-height: 560px;
}

.screen::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 260px;
  background: radial-gradient(circle at top, rgba(245, 158, 11, 0.16) 0%, rgba(15, 15, 17, 0) 70%);
}

.notch {
  position: absolute;
  top: 12px;
  left: 50%;
  width: 90px;
  height: 26px;
  transform: translateX(-50%);
  border-radius: var(--radius-full);
  background: #000;
  z-index: 2;
}

.screen > :not(.notch) {
  position: relative;
}

.screen-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.screen-search {
  margin: 12px 0 16px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--glass-tint);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.screen-search svg {
  width: 14px;
  height: 14px;
}

.fav-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.fav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: var(--surface-high);
  color: var(--secondary);
  font-weight: 700;
  font-size: 14px;
}

.fav .avatar {
  width: 48px;
  height: 48px;
  border: 2px solid var(--primary);
  background: var(--primary-soft);
}

.chip-row {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  overflow: hidden;
}

.chip {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--glass-tint);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.chip.active {
  background: var(--gradient-primary);
  color: var(--on-primary);
  border-color: transparent;
}

.birthday-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--primary-soft);
  border: 1px solid var(--border-focus);
  font-size: 12px;
}

.birthday-card strong {
  display: block;
  font-size: 13px;
}

.birthday-card span {
  color: var(--text-secondary);
}

.birthday-card .emoji {
  font-size: 22px;
}

.contact-list {
  border-radius: 20px;
  background: var(--glass-card);
  border: 1px solid var(--border);
  overflow: hidden;
}

.contact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.contact:last-child {
  border-bottom: none;
}

.contact .avatar {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.contact-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.contact-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* ---------- Sections ---------- */

section {
  position: relative;
  padding: 96px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.eyebrow {
  display: block;
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 800;
}

.section-head p {
  margin: 16px 0 0;
  font-size: 17px;
  color: var(--text-secondary);
}

/* ---------- Privacy band ---------- */

.privacy-band {
  padding: 0 0 24px;
}

.privacy-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  padding: 40px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 0% 0%, rgba(245, 158, 11, 0.16), rgba(245, 158, 11, 0) 60%),
    var(--surface);
  border: 1px solid var(--border-strong);
}

.shield {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: var(--on-primary);
  box-shadow: var(--glow);
}

.shield svg {
  width: 44px;
  height: 44px;
}

.privacy-card h2 {
  font-size: clamp(26px, 3.4vw, 34px);
}

.privacy-card p {
  margin: 10px 0 20px;
  color: var(--text-secondary);
  font-size: 17px;
}

.check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: 600;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-list svg {
  width: 18px;
  height: 18px;
  color: var(--success);
  flex: none;
}

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  position: relative;
  padding: 28px;
  border-radius: var(--radius-card);
  background: var(--glass-card);
  border: 1px solid var(--border);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.feature:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
}

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

.feature h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.pro-tag {
  position: absolute;
  top: 28px;
  right: 28px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--primary-soft);
  border: 1px solid var(--border-focus);
  color: var(--secondary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

/* ---------- Pricing ---------- */

.pricing {
  background: linear-gradient(180deg, rgba(22, 22, 24, 0) 0%, var(--background-raised) 50%, rgba(22, 22, 24, 0) 100%);
}

.plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 820px;
  margin: 0 auto;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 36px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-strong);
}

.plan.featured {
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0) 55%),
    var(--surface-elevated);
  border-color: var(--border-focus);
  box-shadow: 0 30px 60px -30px rgba(245, 158, 11, 0.35);
}

.plan-badge {
  position: absolute;
  top: -13px;
  left: 36px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: var(--on-primary);
  font-size: 12px;
  font-weight: 800;
  box-shadow: var(--glow-soft);
}

.plan h3 {
  font-size: 20px;
  font-weight: 700;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0 4px;
}

.price strong {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.price span {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
}

.plan-sub {
  margin: 0 0 24px;
  color: var(--text-secondary);
  font-size: 15px;
}

.plan ul {
  flex: 1;
  margin: 0 0 28px;
  padding: 24px 0 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.plan li {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  font-size: 15px;
}

.plan li svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 2px;
  color: var(--primary);
}

.plan li.muted {
  color: var(--text-muted);
}

.plan li.muted svg {
  color: var(--text-muted);
}

.price-note {
  margin: 20px 0 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

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

.faq {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.faq details {
  border-radius: var(--radius-md);
  background: var(--glass-card);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease;
}

.faq details[open] {
  border-color: var(--border-focus);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 16px;
}

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

.faq summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 18px;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: 0;
  padding: 0 24px 22px;
  color: var(--text-secondary);
  font-size: 15px;
}

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

.cta {
  padding-top: 32px;
}

.cta-card {
  position: relative;
  overflow: hidden;
  padding: 64px 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(245, 158, 11, 0.24), rgba(245, 158, 11, 0) 65%),
    var(--surface);
  border: 1px solid var(--border-strong);
}

.cta-card img {
  width: 88px;
  height: 88px;
  margin: 0 auto 24px;
  border-radius: 22px;
  box-shadow: var(--glow);
}

.cta-card p {
  max-width: 480px;
  margin: 14px auto 32px;
  color: var(--text-secondary);
  font-size: 17px;
}

.cta-card .store-buttons {
  justify-content: center;
}

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

footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-links a {
  color: var(--text-secondary);
}

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

/* ---------- Legal pages ---------- */

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

.legal-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

.legal h1 {
  margin-top: 16px;
  font-size: clamp(34px, 5vw, 48px);
}

.legal .updated {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.legal .summary {
  margin: 32px 0 8px;
  padding: 24px 28px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  border: 1px solid var(--border-focus);
  color: var(--text);
  font-size: 16px;
}

.legal .summary strong {
  color: var(--secondary);
}

.legal h2 {
  margin: 48px 0 12px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.legal h3 {
  margin: 28px 0 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
}

.legal p,
.legal li {
  color: var(--text-secondary);
  font-size: 16px;
}

.legal p {
  margin: 0 0 14px;
}

.legal ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.legal li {
  margin-bottom: 8px;
}

.legal li::marker {
  color: var(--primary);
}

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

.table-wrap {
  overflow-x: auto;
  margin: 8px 0 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.legal table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
}

.legal th,
.legal td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.legal th {
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
}

.legal td {
  color: var(--text-secondary);
}

.legal tr:last-child td {
  border-bottom: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-grid .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-grid .store-buttons {
    justify-content: center;
  }

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

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

  .nav-links a:not(.btn) {
    display: none;
  }

  .hero {
    padding: 48px 0 64px;
  }

  section {
    padding: 64px 0;
  }

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

  .feature-grid,
  .plans {
    grid-template-columns: 1fr;
  }

  .privacy-card {
    grid-template-columns: 1fr;
    padding: 28px 24px;
    gap: 20px;
  }

  .shield {
    width: 64px;
    height: 64px;
  }

  .shield svg {
    width: 32px;
    height: 32px;
  }

  .plan {
    padding: 28px 24px;
  }

  .plan-badge {
    left: 24px;
  }

  .cta-card {
    padding: 48px 20px;
  }

  .store-btn {
    flex: 1 1 200px;
    justify-content: center;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  * {
    transition: none !important;
  }
}
