/*
 * My Savaari — site styles.
 *
 * Two things drove this rewrite. There was not a single media query, so every screen got a
 * layout designed for a laptop: a 38px headline and five nav links crammed into 360px. And
 * the palette was blue while the app, the logo at the top of this very page and the Play
 * Store listing are all red — a visitor tapping through from the app arrived somewhere that
 * did not look like the same company.
 *
 * Sizes are fluid rather than stepped. clamp() gives the headline 26px on a small phone and
 * 40px on a desktop and every sensible size between, instead of jumping at whichever two
 * widths someone happened to write breakpoints for.
 */

:root {
  /* Mirrors palette.primary in src/theme — the app's warm brand red. */
  --primary: #E23744;
  --primary-dark: #C42232;
  --primary-tint: #FDE7E9;
  --secondary: #10B981;
  --text: #122033;
  --muted: #65758B;
  --bg: #F4F5F7;
  --card: #FFFFFF;
  --border: #E5EAF0;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(18, 32, 51, .04), 0 8px 24px rgba(18, 32, 51, .06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  /* Nothing may push the page sideways on a phone, whatever it is. */
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.container { width: min(100%, 960px); margin: 0 auto; padding: 0 20px; }

/* --- Header ------------------------------------------------------------------------- */
/* Brand and nav sit side by side when there is room. Below ~640px the nav drops to its own
   line and scrolls sideways, rather than wrapping into a ragged block or squeezing five
   links into a space that fits three. */
header.site {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
header.site .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(17px, 4.5vw, 20px);
  font-weight: 900;
  color: var(--text);
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.brand img {
  width: 36px; height: 36px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(18, 32, 51, .12);
}
header.site nav {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  /* A scrollbar is noise across a strip of five links; the overflow still works. */
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
header.site nav::-webkit-scrollbar { display: none; }
header.site nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  padding: 6px 0;
}
header.site nav a:hover { color: var(--primary); text-decoration: none; }

@media (max-width: 640px) {
  header.site .container { flex-wrap: wrap; }
  header.site nav {
    width: 100%;
    gap: 16px;
    /* Bleeds to the screen edge so the last link is visibly cut off — the standard signal
       that a row scrolls, rather than looking like the list simply ends there. */
    margin: 0 -20px;
    padding: 2px 20px 6px;
  }
}

/* --- Hero --------------------------------------------------------------------------- */
.hero {
  background: linear-gradient(135deg, #F0525F, #D42C3B);
  color: #fff;
  padding: clamp(40px, 9vw, 72px) 0;
}
.hero h1 {
  font-size: clamp(26px, 6.4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.hero p {
  font-size: clamp(15px, 2.4vw, 17px);
  opacity: .95;
  max-width: 62ch;
}
.badge {
  display: inline-block;
  background: rgba(255, 255, 255, .18);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: clamp(10px, 2.6vw, 12px);
  font-weight: 800;
  letter-spacing: .04em;
  margin-bottom: 18px;
}

/* --- Type and sections -------------------------------------------------------------- */
section { padding: clamp(32px, 7vw, 56px) 0; }
h2 { font-size: clamp(21px, 4.6vw, 28px); line-height: 1.25; margin-bottom: 18px; letter-spacing: -0.01em; }
h3 { font-size: clamp(16px, 3.4vw, 18px); margin: 22px 0 8px; }
p { margin-bottom: 12px; }
/* Long addresses, emails and URLs break rather than widening the page. */
p, li, td { overflow-wrap: anywhere; }

/* --- Cards -------------------------------------------------------------------------- */
/* minmax(min(260px, 100%), 1fr): the inner min() is what stops a 260px floor from forcing a
   horizontal scrollbar on a 320px phone once padding is counted. */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 16px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(18px, 4vw, 24px);
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; color: var(--primary-dark); }

/* --- Pricing ------------------------------------------------------------------------ */
.pricing {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(18px, 4vw, 26px);
  box-shadow: var(--shadow);
}
.pricing table { width: 100%; border-collapse: collapse; }
.pricing td {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: clamp(14px, 2.6vw, 15px);
  vertical-align: top;
}
.pricing tr:last-child td { border-bottom: 0; }
/* The amount never wraps; the description beside it does. */
.pricing td:last-child { text-align: right; font-weight: 800; white-space: nowrap; padding-left: 12px; }

/* --- Legal pages -------------------------------------------------------------------- */
.legal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 5vw, 32px);
  box-shadow: var(--shadow);
}
.legal p, .legal li { color: #2b3a4e; font-size: clamp(14px, 2.6vw, 15px); }
.legal ul { margin: 8px 0 14px 22px; }
.legal h2:first-child { margin-top: 0; }
.muted { color: var(--muted); font-size: 13px; }

/* --- Buttons ------------------------------------------------------------------------ */
.btn {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  font-weight: 800;
  padding: 13px 24px;
  border-radius: 12px;
  margin-top: 22px;
  /* 44px of height: the size a thumb can actually hit. */
  min-height: 44px;
  line-height: 1.4;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
  transition: transform .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

/* --- Footer ------------------------------------------------------------------------- */
footer.site {
  background: #0F172A;
  color: #cbd5e1;
  padding: clamp(26px, 6vw, 36px) 0;
  margin-top: 24px;
  font-size: 14px;
}
/* Rose rather than the old blue, so footer links belong to the same brand as everything
   above them. Light enough to clear AA on the dark background. */
footer.site a { color: #FDA4AF; }
footer.site .row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: space-between;
  align-items: center;
}
@media (max-width: 560px) {
  /* Stacked and left-aligned: two short columns pushed to opposite edges of a phone read as
     two unrelated fragments rather than as one footer. */
  footer.site .row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
