/* =============== Tokens =============== */
:root {
  --bg:        #0a0b14;
  --bg-2:      #0f1120;
  --bg-3:      #161a2e;
  --line:      rgba(255,255,255,.08);
  --line-2:    rgba(255,255,255,.14);
  --text:      #e8ebf5;
  --text-mute: #98a0b3;
  --text-dim:  #6b7390;
  --accent:    #a78bfa;
  --accent-2:  #22d3ee;
  --warn:      #fbbf24;
  --ok:        #34d399;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --shadow-1: 0 1px 0 0 rgba(255,255,255,.04) inset, 0 0 0 1px var(--line);
  --shadow-2: 0 30px 80px -20px rgba(0,0,0,.6), 0 8px 30px -10px rgba(0,0,0,.5);
  --radius:   16px;
  --radius-lg: 28px;
  --maxw: 1180px;
  --nav-h: 68px;
}

/* =============== Reset =============== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "ss01", "cv11";
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(ellipse 1200px 600px at 50% -200px, rgba(167,139,250,.18), transparent 60%),
    radial-gradient(ellipse 800px 400px at 90% 10%, rgba(34,211,238,.10), transparent 60%),
    var(--bg);
}

/* =============== Layout =============== */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-2);
  margin: 0 0 14px;
}
.eyebrow.muted { color: var(--text-mute); }
.muted { color: var(--text-mute); }
.small { font-size: 13px; }

h1, h2, h3, h4 { color: var(--text); margin: 0 0 16px; line-height: 1.1; letter-spacing: -.02em; }
h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }
h4 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--text-mute); }

p { margin: 0 0 14px; color: var(--text-mute); }
p.lede { font-size: 18px; color: #c5cad8; max-width: 56ch; }

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

/* =============== Buttons =============== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 600; font-size: 14px;
  border: 1px solid var(--line-2);
  transition: transform .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
  user-select: none; white-space: nowrap;
}
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.btn-primary {
  background: var(--grad);
  color: #0a0b14;
  border: 1px solid transparent;
  box-shadow: 0 10px 30px -10px rgba(167,139,250,.55), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary svg { color: #0a0b14; }

.btn-ghost {
  background: rgba(255,255,255,.02);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,.05); border-color: var(--line-2); }

/* =============== Nav =============== */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(10,11,20,.55);
  border-bottom: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease;
}
.nav.scrolled { background: rgba(10,11,20,.85); border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 100%; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark { width: 32px; height: 32px; flex-shrink: 0; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-mark img {
  width: 100%; height: 100%;
  object-fit: contain;
  /* The PNG already has a baked-in squircle, but a small CSS radius keeps
     edges crisp on hi-DPI when the browser scales. */
  border-radius: 7px;
}
.brand-text { letter-spacing: -.01em; }

.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a {
  color: var(--text-mute); font-size: 14px; font-weight: 500;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-cta { margin-left: 16px; }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* =============== Hero =============== */
.hero { padding: 64px 0 48px; }
.hero-inner {
  display: grid; gap: 56px;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
}
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
}

.hero-copy h1 { margin-bottom: 22px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 28px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px; margin: 0; padding: 0; list-style: none;
  border-top: 1px solid var(--line); padding-top: 22px; max-width: 540px;
}
.hero-stats li { display: flex; flex-direction: column; gap: 2px; }
.hero-stats strong { color: var(--text); font-weight: 600; font-size: 14px; }
.hero-stats span { color: var(--text-dim); font-size: 12px; }

/* =============== Phone mockup =============== */
.phone-wrap { position: relative; display: flex; justify-content: center; }
.phone-glow {
  position: absolute; inset: -10% -10% -10% -10%;
  background: radial-gradient(circle at 60% 40%, rgba(167,139,250,.35), transparent 55%),
              radial-gradient(circle at 30% 80%, rgba(34,211,238,.28), transparent 60%);
  filter: blur(40px);
  z-index: 0; pointer-events: none;
}

.phone {
  position: relative; z-index: 1;
  width: 320px; height: 640px;
  border-radius: 46px;
  background: linear-gradient(160deg, #1a1d33, #0c0e1d);
  padding: 14px;
  box-shadow:
    0 60px 120px -30px rgba(0,0,0,.7),
    0 0 0 1px rgba(255,255,255,.06) inset,
    0 0 0 8px rgba(255,255,255,.02);
}
.phone-notch {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 26px; border-radius: 18px;
  background: #050610;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  z-index: 2;
}
.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 34px;
  /* Subtle wallpaper gradient — emulates a soft system wallpaper */
  background:
    radial-gradient(circle at 25% 18%, rgba(167,139,250,.28), transparent 55%),
    radial-gradient(circle at 80% 95%, rgba(34,211,238,.18), transparent 60%),
    linear-gradient(180deg, #0c0f1f 0%, #08091a 50%, #06070f 100%);
  overflow: hidden;
  padding: 36px 14px 14px;
  display: flex; flex-direction: column;
}

.status-bar {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: rgba(255,255,255,.65); padding: 0 8px;
  font-weight: 500;
}
.status-bar .dots { letter-spacing: 1px; }

/* Top: large clock + secondary date line, sitting over the wallpaper */
.hs-clock { text-align: center; margin: 14px 0 6px; }
.hs-time {
  font-size: 64px; font-weight: 300;
  letter-spacing: -.03em; line-height: 1;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.hs-date {
  margin-top: 6px;
  font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,.78);
  letter-spacing: .02em;
}

/* Wallpaper spacer — pushes the search/popular/tiles cluster to the bottom,
   matching the flex View at view_home_screen_feed.xml:27-30 */
.hs-wallpaper { flex: 1; min-height: 24px; }

/* Search bar — same look as before, just no longer the bottommost element */
.hs-search {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 44px;
  margin: 0 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 14px -6px rgba(0,0,0,.4);
}
.hs-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px;
  color: rgba(255,255,255,.7);
}
.hs-search span {
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 500;
}

/* Popular-apps strip — taller pill with 4 frequently-used apps, each with
   a labeled rounded-square icon underneath. Sits between the search bar
   and the 6-tile grid. */
.hs-popular {
  display: flex; align-items: stretch; justify-content: space-around;
  gap: 4px;
  padding: 14px 14px 12px;
  border-radius: 22px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin: 0 4px 10px;
}
.pop-app {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px;
  flex: 1; min-width: 0;
}
.pop-app span {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  letter-spacing: -.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}
.pop-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px -6px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.12);
  flex-shrink: 0;
}
.pop-icon svg { width: 60%; height: 60%; display: block; }

/* When a .pop-icon hosts a real PNG (sliced out of assets/icons.png), drop
   the placeholder gradient + inner-stroke so the icon's own background and
   silhouette read cleanly. */
.pop-icon.pop-image {
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}
.pop-icon.pop-image img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}

/* 3×2 tile grid (Contacts, Messages, Email, Phone, All Apps, Browser) — now
   the bottommost element on the home screen. */
.hs-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 4px;
}
.hs-tile {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  padding: 14px 6px 12px;
  border-radius: 18px;
  /* Frosted-card look matching qs_tile_background */
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.hs-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--tint, #ffffff);
}
.hs-icon svg { width: 100%; height: 100%; }
.hs-tile span {
  font-size: 10.5px;
  font-weight: 500;
  color: #fff;
  letter-spacing: -.005em;
}

/* =============== Overview =============== */
.overview { padding: 60px 0; border-top: 1px solid var(--line); }
.overview-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
@media (max-width: 900px) { .overview-inner { grid-template-columns: 1fr; } }

.overview-card {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0; overflow: hidden;
  box-shadow: var(--shadow-2);
}
.overview-card-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}
.overview-card-label { margin-left: 10px; font-size: 12px; color: var(--text-mute); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #ff5f56; } .dot-y { background: #ffbd2e; } .dot-g { background: #27c93f; }

.overview-card-body { margin: 0; padding: 18px 22px; font-size: 13px; color: var(--text); }
.overview-card-body code { font-family: ui-monospace, "SF Mono", Menlo, monospace; line-height: 1.9; }
.c-c { color: var(--text-dim); }
.c-n { color: var(--accent-2); font-weight: 600; }

/* =============== Section heads =============== */
.section-head { text-align: center; margin: 0 auto 48px; max-width: 640px; }

/* =============== Features =============== */
.features { padding: 80px 0; }
.feature-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.feature {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  border: 1px solid var(--line);
  transition: transform .2s ease, border-color .2s ease;
}
.feature::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(167,139,250,.4), rgba(34,211,238,.0) 50%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .2s ease;
  pointer-events: none;
}
.feature:hover { transform: translateY(-3px); border-color: var(--line-2); }
.feature:hover::before { opacity: 1; }

.feature-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(167,139,250,.18), rgba(34,211,238,.12));
  color: var(--accent);
  margin-bottom: 18px;
  box-shadow: inset 0 0 0 1px rgba(167,139,250,.25);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { margin-bottom: 10px; }
.feature p { margin-bottom: 16px; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li {
  position: relative; padding-left: 22px;
  font-size: 14px; color: var(--text);
}
.checks li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 3px rgba(167,139,250,.15);
}

/* =============== Secondary CTA band =============== */
.cta-band { padding: 60px 0; }
.cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 36px 40px; border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 600px 200px at 0% 0%, rgba(167,139,250,.25), transparent 60%),
    radial-gradient(ellipse 600px 200px at 100% 100%, rgba(34,211,238,.18), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}
.cta-text h2 { margin-bottom: 10px; font-size: clamp(22px, 2.4vw, 30px); }
@media (max-width: 760px) {
  .cta-inner { flex-direction: column; align-items: flex-start; padding: 28px; }
}

/* =============== FAQ =============== */
.faq { padding: 80px 0; border-top: 1px solid var(--line); }
.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.02);
  padding: 18px 20px;
  transition: border-color .15s ease, background .15s ease;
}
.faq details[open] { border-color: var(--line-2); background: rgba(255,255,255,.03); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; color: var(--text); font-size: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-weight: 400; color: var(--text-mute); font-size: 22px;
  transition: transform .2s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; color: var(--text-mute); }

/* =============== Footer =============== */
.footer { padding: 60px 0 28px; border-top: 1px solid var(--line); margin-top: 40px; }
.footer-inner {
  display: grid; gap: 48px;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
}
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { max-width: 32ch; }

.footer-cols { display: contents; }
.footer-cols div { display: flex; flex-direction: column; gap: 10px; }
.footer-cols h4 { margin-bottom: 6px; }
.footer-cols a { font-size: 14px; color: var(--text-mute); transition: color .15s ease; }
.footer-cols a:hover { color: var(--text); }

.footer-base {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 32px; margin-top: 40px;
  border-top: 1px solid var(--line);
}

/* =============== Legal pages (Privacy Policy, Terms, etc.) =============== */
.legal { padding: 72px 0 56px; }
.legal-inner { max-width: 760px; margin: 0 auto; }

.legal h1 {
  font-size: clamp(34px, 4.4vw, 52px);
  margin: 6px 0 4px;
}
.legal-meta {
  font-size: 13px;
  margin: 0 0 28px;
  color: var(--text-mute);
}

.legal section {
  margin: 32px 0;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.legal section:first-of-type { border-top: 0; padding-top: 0; }

.legal h2 {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -.01em;
  color: var(--text);
}

.legal p {
  color: #c5cad8;
  line-height: 1.75;
  margin: 0 0 12px;
}
.legal p.muted, .legal-address { color: var(--text-mute); }
.legal-address { font-size: 14px; margin-top: 4px; }

.legal-list {
  margin: 8px 0 14px;
  padding: 0;
  list-style: none;
}
.legal-list li {
  position: relative;
  padding-left: 22px;
  margin: 8px 0;
  color: #c5cad8;
  line-height: 1.7;
}
.legal-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 11px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 3px rgba(167,139,250,.12);
}

.legal a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.legal a:hover { color: var(--text); }

/* =============== A11y / motion =============== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0ms !important; transition-duration: 0ms !important; scroll-behavior: auto !important; }
}

::selection { background: rgba(167,139,250,.35); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
