/* =========================================================================
   Inventoryze landing page
   Design tokens mirror InventorizeMe/AppTheme.swift
   ========================================================================= */

:root {
  --bg: #ffffff;
  --surface: #f2f2f7;            /* systemGray6 */
  --card: #ffffff;
  --border: rgba(0, 0, 0, 0.12);
  --border-soft: rgba(0, 0, 0, 0.08);
  --text: #0a0a0a;
  --text-secondary: #6b6b70;
  --text-tertiary: #a1a1a6;
  --accent: #5e5ce6;             /* indigo */
  --black: #000000;

  --radius-field: 14px;
  --radius-button: 14px;
  --radius-card: 20px;
  --radius-pill: 999px;

  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-card-soft: 0 4px 10px rgba(0, 0, 0, 0.06);

  --page-padding: 24px;
  --section-spacing: 96px;
  --max-w: 1120px;
  --button-h: 54px;

  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "SF Pro Text", "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-system);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

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

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--page-padding);
}

section { position: relative; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700;
  line-height: 1.05;
}

h2 {
  font-size: clamp(32px, 4.2vw, 48px);
  font-weight: 700;
  line-height: 1.1;
}

h3 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
}

p { margin: 0; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.lead {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 620px;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--button-h);
  padding: 0 22px;
  border-radius: var(--radius-button);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--black);
  color: #fff;
}
.btn-primary:hover { background: #1a1a1a; }

.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: #fafafa; }

.btn-pill {
  height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  font-size: 15px;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover { background: rgba(0,0,0,0.04); }

/* App Store badge */
.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: var(--button-h);
  padding: 0 22px;
  border-radius: var(--radius-button);
  background: var(--black);
  color: #fff;
  font-weight: 600;
}
.btn-appstore .apple-logo { width: 22px; height: 22px; }
.btn-appstore .caption { font-size: 10px; letter-spacing: 0.02em; line-height: 1; opacity: 0.85; text-transform: uppercase; }
.btn-appstore .wordmark { font-size: 20px; font-weight: 600; line-height: 1; margin-top: 2px; }
.btn-appstore .stack { display: flex; flex-direction: column; text-align: left; }
.btn-appstore:hover { background: #1a1a1a; }

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); }

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

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.nav-toggle:hover { background: rgba(0,0,0,0.05); }
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; left: 0; }
.nav-toggle span::after  { position: absolute; top:  6px; left: 0; }

body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle span::after  { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 88px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 720px;
  background: linear-gradient(
    to bottom,
    rgba(199, 222, 247, 0.55) 0%,
    rgba(224, 237, 252, 0.25) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

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

.hero-copy { max-width: 620px; }
.hero h1 { margin: 18px 0 20px; }
.hero .lead { margin-bottom: 32px; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-sub {
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-sub .dot { width: 6px; height: 6px; border-radius: 50%; background: #34c759; display: inline-block; }

/* ---------- Phone mockup ---------- */
.phone-wrap {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 9 / 18.5;
}

.phone {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  border-radius: 52px;
  padding: 12px;
  box-shadow:
    0 30px 60px rgba(15, 30, 60, 0.18),
    0 10px 24px rgba(15, 30, 60, 0.10),
    inset 0 0 0 2px rgba(255,255,255,0.06);
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 42px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  background: #0a0a0a;
  border-radius: 20px;
  z-index: 2;
}

.phone-screen .screen-gradient {
  position: absolute;
  inset: 0 0 auto 0;
  height: 240px;
  background: linear-gradient(
    to bottom,
    rgba(199, 222, 247, 0.7) 0%,
    rgba(224, 237, 252, 0.35) 50%,
    transparent 100%
  );
  pointer-events: none;
}

.screen-header {
  padding: 56px 20px 14px;
  position: relative;
  z-index: 1;
}
.screen-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.screen-sub { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

.screen-search {
  margin: 14px 20px 12px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  font-size: 13px;
  color: var(--text-tertiary);
  position: relative;
  z-index: 1;
}
.screen-search svg { width: 14px; height: 14px; color: var(--text-tertiary); }

.screen-list {
  padding: 8px 16px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.screen-item {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.screen-item .thumb {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5e5ce6;
}
.screen-item .thumb svg { width: 28px; height: 28px; }
.screen-item .meta { padding: 8px 10px 10px; }
.screen-item .meta .n { font-size: 12px; font-weight: 600; }
.screen-item .meta .b { font-size: 10.5px; color: var(--text-secondary); margin-top: 1px; }

/* Alt gradients for variety */
.screen-item:nth-child(1) .thumb { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #b45309; }
.screen-item:nth-child(2) .thumb { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1d4ed8; }
.screen-item:nth-child(3) .thumb { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: #047857; }
.screen-item:nth-child(4) .thumb { background: linear-gradient(135deg, #fce7f3, #fbcfe8); color: #9d174d; }

.screen-tabbar {
  margin-top: auto;
  height: 56px;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  justify-items: center;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
}
.screen-tabbar svg { width: 22px; height: 22px; color: var(--text-tertiary); }
.screen-tabbar .active svg { color: var(--black); }

/* ---------- Section headings ---------- */
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.section-head h2 { margin-top: 10px; }
.section-head p { margin-top: 16px; color: var(--text-secondary); }

/* ---------- Features grid ---------- */
.features { padding: var(--section-spacing) 0; }

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

.feature-card {
  background: var(--card);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-card-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.feature-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feature-icon svg { width: 44px; height: 44px; color: var(--black); }

.feature-card h3 { margin-bottom: 8px; }
.feature-card p  { color: var(--text-secondary); font-size: 15.5px; }

/* ---------- How it works ---------- */
.how {
  padding: var(--section-spacing) 0;
  background: var(--surface);
  border-top: 1px solid rgba(0,0,0,0.04);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

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

.step { text-align: center; padding: 0 12px; }
.step-icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
}
.step-icon svg { width: 52px; height: 52px; color: var(--black); }
.step-num {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--black);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.step h3 { margin-bottom: 8px; }
.step p  { color: var(--text-secondary); font-size: 15.5px; max-width: 280px; margin: 0 auto; }

/* ---------- Pricing ---------- */
.pricing { padding: var(--section-spacing) 0; }

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

.plan {
  background: var(--card);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  box-shadow: var(--shadow-card-soft);
  position: relative;
}

.plan.featured {
  border: 2px solid var(--black);
  box-shadow: 0 16px 36px rgba(0,0,0,0.10);
}

.plan-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.plan-name { font-size: 14px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-secondary); }
.plan.featured .plan-name { color: var(--black); }

.plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--black);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  line-height: 1;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 4px;
}
.plan-price .amt { font-size: 42px; font-weight: 700; letter-spacing: -0.02em; }
.plan-price .per { font-size: 14px; color: var(--text-secondary); }
.plan-note { font-size: 13px; color: var(--text-secondary); margin-bottom: 22px; min-height: 18px; }

.plan-features { list-style: none; padding: 0; margin: 0 0 24px; }
.plan-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 15px;
}
.plan-features li:first-child { border-top: none; }
.plan-features .ico {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}
.plan.featured .plan-features .ico { color: var(--black); }
.plan-features .val { margin-left: auto; font-weight: 600; font-size: 14px; color: var(--text-secondary); }
.plan.featured .plan-features .val { color: var(--text); }
.plan-features .check { color: var(--black); }
.plan-features .dash  { color: var(--text-tertiary); }

.plan .btn { width: 100%; }

/* ---------- FAQ ---------- */
.faq { padding: var(--section-spacing) 0; }

.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  padding: 4px 20px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 0;
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }

.faq-item .answer {
  padding: 0 0 18px;
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.6;
}

/* ---------- CTA band ---------- */
.cta-band {
  padding: 72px 0;
  background: linear-gradient(
    to bottom,
    rgba(199, 222, 247, 0.55) 0%,
    rgba(224, 237, 252, 0.25) 60%,
    transparent 100%
  );
  border-top: 1px solid rgba(0,0,0,0.04);
}
.cta-band .container {
  text-align: center;
  max-width: 720px;
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { color: var(--text-secondary); margin-bottom: 28px; font-size: 18px; }
.cta-band .hero-ctas { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 56px 0 40px;
  border-top: 1px solid rgba(0,0,0,0.06);
  background: #fff;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--text-secondary); transition: color 0.15s ease; }
.footer-links a:hover { color: var(--text); }

/* ---------- Legal (privacy/terms) pages ---------- */
.legal {
  padding: 72px 0 96px;
  max-width: 760px;
  margin: 0 auto;
}
.legal h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 12px; }
.legal .updated { color: var(--text-secondary); font-size: 14px; margin-bottom: 36px; }
.legal h2 { font-size: 22px; margin: 32px 0 10px; }
.legal p, .legal li { color: var(--text); font-size: 16px; line-height: 1.65; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 960px) {
  :root { --section-spacing: 80px; }
  .hero .container {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .hero-copy { margin: 0 auto; }
  .hero-copy .lead { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-sub { justify-content: center; }
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .features-grid { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --page-padding: 20px; --section-spacing: 64px; }

  .nav-links,
  .nav-cta .desktop-cta { display: none; }
  .nav-toggle { display: inline-flex; }

  body.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: saturate(180%) blur(16px);
    padding: 8px 20px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  body.nav-open .nav-links li { border-bottom: 1px solid rgba(0,0,0,0.06); }
  body.nav-open .nav-links li:last-child { border-bottom: none; }
  body.nav-open .nav-links a {
    display: block;
    padding: 16px 0;
    font-size: 16px;
    color: var(--text);
  }

  .hero { padding: 48px 0 64px; }
  .hero h1 { font-size: 40px; }
  .phone-wrap { max-width: 300px; }

  .feature-card { padding: 26px; }
  .feature-icon { width: 80px; height: 80px; }
  .feature-icon svg { width: 36px; height: 36px; }

  .plan { padding: 28px 22px; }
  .plan-price .amt { font-size: 36px; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 36px; line-height: 1.08; }
  h2 { font-size: 30px; }
  .screen-list { grid-template-columns: 1fr 1fr; }
}
