/* World's Best Apps — shared site styles. Neutral light theme, with a few accent colors used
   across different sections/cards for variety rather than one single brand color everywhere. */

:root {
  --bg: #fafafa;
  --bg-alt: #f4f4f5;
  --card: #ffffff;
  --text: #18181b;
  --text-muted: #71717a;
  --border: #e4e4e7;

  --blue-start: #60a5fa;
  --blue-end: #2563eb;
  --violet-start: #a78bfa;
  --violet-end: #7c3aed;
  --teal-start: #2dd4bf;
  --teal-end: #0d9488;
  --amber-start: #fbbf24;
  --amber-end: #d97706;
  --rose-start: #fb7185;
  --rose-end: #e11d48;

  /* Primary accent used for links, the brand mark, and default buttons. */
  --accent-start: var(--blue-start);
  --accent-end: var(--blue-end);

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px rgba(24, 24, 27, 0.06);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

/* Sticky footer: main grows to fill any leftover viewport height, so the footer always sits at
   the bottom of the screen on short pages instead of floating right under a small amount of
   content. */
main {
  flex: 1;
}

a {
  color: var(--accent-end);
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header / nav --------------------------------------------------------------------- */

.site-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

nav.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

nav.top-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .brand {
    font-size: 16px;
  }

  nav.top-nav {
    gap: 10px 14px;
  }

  nav.top-nav a {
    font-size: 13px;
  }
}

nav.top-nav a:hover,
nav.top-nav a.active {
  color: var(--accent-end);
}

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

.hero {
  padding: 64px 0 56px;
  text-align: center;
}

.hero .eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}

.hero p.lede {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
}

.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  text-align: left;
  /* Longhand on purpose: a shorthand `padding: 56px 0` here would win the cascade over `.wrap`'s
     own `padding: 0 24px` (same specificity, this rule comes later) and silently zero out the
     left/right inset on every hero-split section — which is most of the home page. This way it
     only ever touches top/bottom, leaving `.wrap`'s horizontal padding alone. */
  padding-top: 56px;
  padding-bottom: 56px;
}

@media (max-width: 780px) {
  .hero-split {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-split .hero-actions {
    justify-content: center;
  }
}

.hero-split .hero-actions {
  justify-content: flex-start;
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  object-fit: cover;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-start), var(--blue-end));
  color: #fff;
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}

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

section {
  padding: 56px 0;
}

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

.section-head .kicker {
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

h1, h2, h3 {
  color: var(--text);
}

h2 {
  font-size: 30px;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

p {
  color: var(--text);
}

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

/* --- Color utilities (used across feature icons, kickers, stat numbers) ------------------*/

.c-blue { color: var(--blue-end); }
.c-violet { color: var(--violet-end); }
.c-teal { color: var(--teal-end); }
.c-amber { color: var(--amber-end); }
.c-rose { color: var(--rose-end); }

/* --- Feature / value grid -----------------------------------------------------------------*/

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

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

@media (max-width: 640px) {
  .grid, .grid-3 {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
}

.feature-icon.i-blue { background: linear-gradient(135deg, var(--blue-start), var(--blue-end)); }
.feature-icon.i-violet { background: linear-gradient(135deg, var(--violet-start), var(--violet-end)); }
.feature-icon.i-teal { background: linear-gradient(135deg, var(--teal-start), var(--teal-end)); }
.feature-icon.i-amber { background: linear-gradient(135deg, var(--amber-start), var(--amber-end)); }
.feature-icon.i-rose { background: linear-gradient(135deg, var(--rose-start), var(--rose-end)); }

/* --- Stat band ------------------------------------------------------------------------------*/

.stat-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: center;
}

@media (max-width: 640px) {
  .stat-band {
    grid-template-columns: 1fr;
  }
}

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 20px;
}

.stat .num {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat .label {
  color: var(--text-muted);
  font-size: 13px;
}

/* --- How it works steps -----------------------------------------------------------------*/

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

@media (max-width: 780px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step {
  text-align: center;
}

.step .step-num {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 16px;
}

/* --- App cards --------------------------------------------------------------------------*/

.app-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
}

.app-card .app-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--blue-start), var(--blue-end));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-card .app-icon svg {
  width: 30px;
  height: 30px;
}

.app-card .app-name {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 4px;
}

.app-card .app-desc {
  color: var(--text-muted);
  font-size: 14px;
}

.app-card .arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 20px;
  flex-shrink: 0;
}

.coming-soon-card {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

/* --- Product page: screenshots ------------------------------------------------------------*/

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

@media (max-width: 720px) {
  .screens {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }
}

.screen-shot {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.screen-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.screen-caption {
  text-align: center;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Product hero (per-app page) -----------------------------------------------------------*/

.product-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 48px 0 40px;
}

@media (max-width: 640px) {
  .product-hero {
    flex-direction: column;
    text-align: center;
  }
}

.product-hero .app-icon-lg {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--blue-start), var(--blue-end));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.product-hero .app-icon-lg svg {
  width: 42px;
  height: 42px;
}

.product-hero h1 {
  font-size: 34px;
  margin: 0 0 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

/* --- Sub-nav (links out to Support / Privacy / Terms) ---------------------------------------*/

.app-links {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.app-links a {
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.app-links a.active {
  color: var(--accent-end);
  border-bottom-color: var(--accent-end);
}

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

.faq-group {
  margin-bottom: 36px;
}

.faq-group .faq-kicker {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 12px;
}

.faq-item h3 {
  font-size: 15.5px;
  margin-bottom: 6px;
}

.faq-item p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0;
}

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

.legal h2 {
  font-size: 20px;
  margin-top: 36px;
}

.legal h3 {
  font-size: 16px;
  margin-top: 20px;
}

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

.legal ul {
  padding-left: 20px;
}

.legal-toc {
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0 32px;
}

.legal-toc p {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.legal-toc ol {
  /* list-style: none because the link text already spells out its own number ("1. Agreement")
     to match that section's <h2> — without this, the <ol>'s own auto-numbered marker doubled up
     with it, showing "1. 1. Agreement" on every single line. */
  list-style: none;
  columns: 2;
  padding-left: 0;
  margin: 0;
}

@media (max-width: 560px) {
  .legal-toc ol {
    columns: 1;
  }
}

.legal-toc li {
  font-size: 14px;
  margin-bottom: 6px;
  /* Without this, a browser laying out the 2-column list can split a single <li> across the
     column break, which sometimes re-renders that item's number/marker at the top of the second
     column too — reading as if that position duplicates in the list. */
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.legal-toc a {
  color: var(--text-muted);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--accent-end);
}

.effective-date {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.callout {
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin: 24px 0;
}

.callout p {
  color: var(--text);
  margin: 0;
}

.callout-strong {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

/* --- Team / about principles ------------------------------------------------------------------*/

.principle-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 32px 0;
}

.principle {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.principle .num {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.cta-band {
  background: linear-gradient(135deg, var(--blue-start), var(--blue-end));
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  color: #fff;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.85);
}

.cta-band .btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

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

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 40px;
  margin-top: 40px;
}

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

footer.site-footer .foot-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

footer.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
}

footer.site-footer a:hover {
  color: var(--accent-end);
}
