/* ================================================================
   MySafeMeet — shared stylesheet
   Design tokens, reset, layout, components, pages, responsive
   ================================================================ */

/* ── Google Fonts ─────────────────────────────────────────────── */
/* Loaded via <link> in each HTML file */

/* ── Custom properties (brand tokens) ────────────────────────── */
:root {
  --primary:        #5B57E6;
  --primary-pressed:#4A43D9;
  --primary-soft:   #E3E1FB;
  --ink:            #1B1830;
  --muted:          #5C596B;
  --page-bg:        #F7F7FB;
  --surface:        #FFFFFF;
  --border:         #ECEBF5;

  --radius-card:    16px;
  --radius-sm:      8px;
  --radius-pill:    999px;

  --shadow-card:    0 2px 12px rgba(27,24,48,.07);
  --shadow-card-hover: 0 6px 24px rgba(27,24,48,.12);

  --font-display:   'Nunito', system-ui, sans-serif;
  --font-body:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --max-w:          1120px;
  --section-py:     80px;
  --header-h:       68px;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary); text-decoration: underline; }
a:hover { color: var(--primary-pressed); }

ul, ol { padding-left: 1.4em; }
li { margin-bottom: .35em; }

/* ── Focus styles (accessibility) ────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Typography helpers ───────────────────────────────────────── */
.display-font { font-family: var(--font-display); }

h1,h2,h3,h4,h5 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }

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

.text-ink   { color: var(--ink) !important; }
.text-muted { color: var(--muted) !important; }
.text-primary { color: var(--primary) !important; }
.text-white { color: #fff !important; }

.lead {
  font-size: 1.125rem;
  line-height: 1.7;
}

/* ── Layout helpers ───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding-block: var(--section-py); }

.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-header {
  max-width: 680px;
  margin-bottom: 56px;
}

.section-header p {
  margin-top: 12px;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ── Grid helpers ─────────────────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

/* ── Card ─────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s, transform .2s;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

/* ── Icon box ─────────────────────────────────────────────────── */
.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-soft);
  margin-bottom: 20px;
  flex-shrink: 0;
}

.icon-box svg {
  width: 26px;
  height: 26px;
  fill: var(--primary);
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  border-radius: var(--radius-pill);
  padding: 13px 26px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background .15s, transform .1s, box-shadow .15s;
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
}

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

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-soft);
  color: var(--primary-pressed);
}

.btn-white {
  background: #fff;
  color: var(--primary);
}

.btn-white:hover {
  background: var(--primary-soft);
  color: var(--primary-pressed);
}

/* ── Pill / badge ─────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .04em;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.pill-primary-soft {
  background: var(--primary-soft);
  color: var(--primary);
}

.pill-white {
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
}

/* ── Header ───────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 20px;
}

/* Wordmark */
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.wordmark-logo {
  height: 38px;
  width: auto;
}

.wordmark-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -.02em;
}

.wordmark-text .w-safe { color: var(--primary); }

/* Main nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}

.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--primary);
}

/* Coming-soon pill in header */
.header-cta {
  flex-shrink: 0;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  color: var(--ink);
}

.hamburger svg { display: block; width: 24px; height: 24px; }

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--surface);
  z-index: 99;
  padding: 32px 20px;
  flex-direction: column;
  gap: 24px;
  border-top: 1px solid var(--border);
}

.mobile-nav.is-open { display: flex; }

.mobile-nav a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ink);
  text-decoration: none;
  padding-block: 6px;
}

.mobile-nav a:hover { color: var(--primary); }

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.7);
  padding-block: 64px 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.footer-brand .wordmark-text { color: #fff; }
.footer-brand .w-safe { color: var(--primary-soft); }

.footer-tagline {
  margin-top: 10px;
  font-size: .9rem;
  color: rgba(255,255,255,.5);
}

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li { margin-bottom: 10px; }

.footer-col a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: .95rem;
  transition: color .15s;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .85rem;
  color: rgba(255,255,255,.4);
}

/* ── Hero section ─────────────────────────────────────────────── */
.hero {
  background: var(--primary);
  color: #fff;
  padding-block: 80px 0;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: flex-end;
}

.hero-copy { max-width: 560px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  margin-bottom: 20px;
}

.hero h1 {
  color: #fff;
  margin-bottom: 24px;
}

.hero .lead {
  color: rgba(255,255,255,.85);
  margin-bottom: 40px;
  font-size: 1.15rem;
}

/* App Store "coming soon" badge */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  text-decoration: none;
  color: #fff;
  transition: background .15s;
  cursor: default;
  user-select: none;
}

.appstore-badge:hover { background: rgba(255,255,255,.18); color: #fff; }

.appstore-badge-icon { flex-shrink: 0; }
.appstore-badge-icon svg { width: 28px; height: 28px; fill: #fff; }

.appstore-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.appstore-badge-text .badge-sub {
  font-size: .7rem;
  opacity: .7;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.appstore-badge-text .badge-main {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
}

/* Phone frame */
.phone-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.phone-frame {
  position: relative;
  width: 220px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 36px;
  box-shadow:
    0 0 0 8px rgba(255,255,255,.15),
    0 32px 80px rgba(0,0,0,.35);
  overflow: hidden;
  aspect-ratio: 9/19.5;
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 28px;
  background: #fff;
  border-radius: 0 0 18px 18px;
  z-index: 2;
}

.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* Hero large phone variant */
.hero-phone {
  width: 240px;
}

/* ── Features ─────────────────────────────────────────────────── */
.features { background: var(--page-bg); }

.feature-card h3 { margin-bottom: 8px; }
.feature-card p { font-size: .975rem; line-height: 1.6; }

/* ── How it works ─────────────────────────────────────────────── */
.how { background: var(--surface); }

.step-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.step-card h3 { margin: 0; color: var(--ink); }
.step-card p  { margin: 0; font-size: .975rem; }

/* ── Screenshot gallery ───────────────────────────────────────── */
.gallery { background: var(--primary-soft); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  justify-items: center;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.gallery-item .phone-frame {
  width: 180px;
  box-shadow:
    0 0 0 6px rgba(91,87,230,.12),
    0 20px 48px rgba(27,24,48,.15);
}

.gallery-caption {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  color: var(--ink);
  text-align: center;
}

/* ── Pricing ──────────────────────────────────────────────────── */
.pricing { background: var(--page-bg); }

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 680px;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-card);
}

.best-value-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.pricing-plan {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}

.price-amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.75rem;
  color: var(--ink);
  line-height: 1;
}

.price-period {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  color: var(--muted);
}

.pricing-trial {
  font-size: .875rem;
  color: var(--muted);
  margin-bottom: 28px;
}

.pricing-trial strong { color: var(--ink); }

.pricing-footer {
  margin-top: 40px;
  font-size: .875rem;
  color: var(--muted);
}

/* ── Privacy strip ────────────────────────────────────────────── */
.privacy-strip {
  background: var(--primary-soft);
  padding-block: 56px;
}

.privacy-strip-inner {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  max-width: 700px;
}

.privacy-strip-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.privacy-strip-icon svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

.privacy-strip-text h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.privacy-strip-text p {
  font-size: .975rem;
  line-height: 1.6;
}

/* ── Prose pages (privacy, terms, support) ────────────────────── */
.prose-page {
  background: var(--page-bg);
  padding-block: 64px 80px;
}

.prose-container {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: 20px;
}

.prose-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.prose-header h1 { margin-bottom: 8px; }

.prose-meta {
  font-size: .875rem;
  color: var(--muted);
}

.prose-body {
  line-height: 1.75;
}

.prose-body h2 {
  font-size: 1.4rem;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.prose-body h3 {
  font-size: 1.1rem;
  margin-top: 32px;
  margin-bottom: 12px;
}

.prose-body p {
  color: var(--ink);
  font-size: .975rem;
  margin-bottom: 16px;
}

.prose-body ul, .prose-body ol {
  margin-bottom: 16px;
}

.prose-body li {
  font-size: .975rem;
  color: var(--ink);
  margin-bottom: 6px;
}

.prose-body a { color: var(--primary); }

.prose-body blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  background: #fff8e1;
  border-left: 4px solid #f5a623;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.prose-body blockquote p {
  margin: 0;
  font-size: .95rem;
  color: #5a4200;
}

/* Disclaimer/warning block */
.prose-body .warning-block {
  margin: 24px 0;
  padding: 20px 24px;
  background: #fff3cd;
  border: 1px solid #ffd77a;
  border-radius: var(--radius-sm);
}

.prose-body .warning-block p {
  margin: 0;
  color: #5a4200;
  font-size: .95rem;
}

/* Table in prose */
.prose-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  margin-block: 20px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.prose-body th {
  background: var(--primary-soft);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.prose-body td {
  padding: 12px 16px;
  vertical-align: top;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}

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

/* ── Support page specifics ───────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-block: 40px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.faq-question {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
  padding: 20px 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  cursor: pointer;
  transition: background .15s;
}

.faq-question:hover { background: var(--page-bg); }

.faq-question .faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: transform .2s;
}

.faq-item.is-open .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  display: none;
  padding: 0 24px 20px;
  font-size: .975rem;
  line-height: 1.7;
  color: var(--ink);
  border-top: 1px solid var(--border);
}

.faq-item.is-open .faq-answer { display: block; }

.contact-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 40px 36px;
  margin-top: 48px;
  text-align: center;
}

.contact-block h2 { margin-bottom: 12px; }
.contact-block p  { margin-bottom: 24px; }

/* ── 404 page ─────────────────────────────────────────────────── */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 80px 20px;
}

.not-found-code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(5rem, 18vw, 10rem);
  color: var(--primary-soft);
  line-height: 1;
  margin-bottom: 0;
}

.not-found h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 16px;
}

.not-found p {
  max-width: 400px;
  margin-bottom: 32px;
}

/* ── Utilities ────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (min-width: 640px) {
  :root { --section-py: 96px; }

  .hero-inner {
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: flex-end;
  }

  .hero-phone { width: 260px; }

  .footer-inner {
    grid-template-columns: 240px 1fr;
    gap: 64px;
    align-items: start;
  }

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

@media (min-width: 960px) {
  :root { --section-py: 112px; }

  .site-nav, .header-cta { display: flex; }
  .hamburger { display: none; }

  .hero-phone { width: 300px; }

  .gallery-grid { grid-template-columns: repeat(3, 1fr); }

  .footer-inner {
    grid-template-columns: 280px 1fr;
  }
}

/* Tablet — hide desktop nav, show hamburger */
@media (max-width: 959px) {
  .site-nav  { display: none; }
  .header-cta { display: none; }
  .hamburger  { display: flex; }
}
