/* =====================================================================
   ZeroSMS public website.
   Layered on top of app.css: same tokens, same components, wider and
   lighter treatment for a marketing page.
   ===================================================================== */

.site { background: var(--surface); }

.site-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ------------------------------------------------------------ announce */
.site-announce {
  background: var(--brand);
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
}

/* -------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.02em;
  color: var(--text);
  flex-shrink: 0;
}
.site-brand:hover { text-decoration: none; }
.site-brand img { width: 32px; height: 32px; border-radius: 8px; }

.site-nav { display: flex; gap: 4px; margin-right: auto; }

.site-nav__link {
  position: relative;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .2s ease;
}
.site-nav__link::after {
  content: "";
  position: absolute; left: 12px; right: 12px; bottom: 2px;
  height: 2px; border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0); transform-origin: center;
  transition: transform .26s cubic-bezier(.2,.7,.2,1);
}
.site-nav__link:hover { color: var(--brand); text-decoration: none; }
.site-nav__link:hover::after,
.site-nav__link.is-active::after { transform: scaleX(1); }
.site-nav__link.is-active { color: var(--brand); }
@media (prefers-reduced-motion: reduce) { .site-nav__link::after { transition: none; } }

.site-header__actions { display: flex; align-items: center; gap: 8px; }
.site-nav__toggle { display: none; }

/* ---------------------------------------------------------------- hero */
.site-hero {
  padding: 44px 0 64px;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%,
      color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%),
    var(--surface);
  text-align: center;
}

.site-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--brand-soft);
  color: var(--brand-text);
  border: 1px solid var(--brand-border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 22px;
}

.site-hero__title {
  font-size: clamp(32px, 5.2vw, 54px);
  font-weight: 680;
  letter-spacing: -.035em;
  line-height: 1.08;
  max-width: 17ch;
  margin: 0 auto 20px;
}

.site-hero__subtitle {
  font-size: clamp(15px, 1.9vw, 18px);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 58ch;
  margin: 0 auto 30px;
}

.site-hero__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.site-hero__note { font-size: 13px; color: var(--text-subtle); }

/* --------------------------------------------------------------- stats */
.site-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 56px;
}

.site-stat { background: var(--surface); padding: 26px 20px; text-align: center; }
.site-stat__value {
  font-size: 28px; font-weight: 680; letter-spacing: -.03em;
  color: var(--brand); line-height: 1.1;
}
.site-stat__label { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* -------------------------------------------------------------- blocks */
.site-section { padding: 76px 0; }
.site-section--alt { background: var(--bg); border-block: 1px solid var(--border); }

.site-section__head { text-align: center; max-width: 660px; margin: 0 auto 50px; }
.site-section__head::before {
  content: ""; display: block; width: 52px; height: 4px; margin: 0 auto 22px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand), #7c5cff);
}
.site-section__title {
  font-size: clamp(27px, 3.8vw, 40px);
  font-weight: 800; letter-spacing: -.035em; line-height: 1.12;
  margin-bottom: 14px; color: var(--text);
}
.site-section__text {
  font-size: 16.5px; color: var(--text-muted); line-height: 1.65; margin: 0 auto; max-width: 560px;
}

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

.site-feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.site-feature:hover {
  border-color: var(--brand-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.site-feature__icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 15px;
}
.site-feature__title { font-size: 15.5px; font-weight: 620; margin-bottom: 7px; }
.site-feature__text { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ------------------------------------------------------------- pricing */
.site-price-head { text-align: center; padding: 64px 0 36px; }

/* The price itself is the thing people scan for, so it gets weight and
   tabular figures. Everything else reuses the shared .table component,
   which already handles narrow screens by turning rows into cards. */
.site-price__value {
  font-size: 15px;
  font-weight: 640;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table tr.is-featured { background: var(--brand-soft); }
.table tr.is-featured:hover { background: var(--brand-soft); }

/* ------------------------------------------------------------ CTA band */
.site-cta {
  background: linear-gradient(140deg, var(--brand-strong), var(--brand) 60%, #0f6f9c);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 52px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.site-cta::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 15%, rgba(255,255,255,.18), transparent 55%);
}
.site-cta__inner { position: relative; z-index: 1; }
.site-cta__title { font-size: clamp(22px, 3vw, 30px); font-weight: 660; letter-spacing: -.025em; margin-bottom: 10px; }
.site-cta__text { font-size: 15.5px; opacity: .92; margin-bottom: 26px; max-width: 46ch; margin-inline: auto; }
.site-cta .btn--primary { background: #fff; color: var(--brand-strong); border-color: #fff; }
.site-cta .btn--primary:hover { background: #f1f6fa; border-color: #f1f6fa; }
.site-cta .btn--secondary {
  background: rgba(255, 255, 255, .14); color: #fff;
  border-color: rgba(255, 255, 255, .34);
}
.site-cta .btn--secondary:hover { background: rgba(255, 255, 255, .24); }

/* -------------------------------------------------------------- footer */
.site-footer { background: var(--bg); border-top: 1px solid var(--border); padding: 52px 0 28px; }

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 36px;
  padding-bottom: 32px;
}
.site-footer__grid > div { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.site-footer__grid a { font-size: 13.5px; color: var(--text-muted); }
.site-footer__grid a:hover { color: var(--brand); }

.site-brand--footer { font-size: 15px; margin-bottom: 4px; }
.site-footer__tagline { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; max-width: 34ch; }
.site-footer__heading {
  font-size: 11.5px; font-weight: 640; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text); margin-bottom: 3px;
}
.site-footer__muted { font-size: 13px; color: var(--text-subtle); line-height: 1.55; }
.site-footer__social { display: flex; gap: 14px; margin-top: 6px; }

.site-footer__base {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-subtle);
}

/* ------------------------------------------------------------- contact */
.site-contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; }

.site-contact-item { display: flex; gap: 13px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.site-contact-item:last-child { border-bottom: 0; }
.site-contact-item__icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.site-contact-item__label { font-size: 12px; color: var(--text-subtle); margin-bottom: 2px; }
.site-contact-item__value { font-size: 14.5px; font-weight: 550; word-break: break-word; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .site-contact-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 8px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav__link { padding: 11px 14px; }
  .site-nav__toggle { display: inline-flex; }
  .site-hide-sm { display: none; }
  .site-header { position: relative; }

  .site-hero { padding: 56px 0 48px; }
  .site-section { padding: 52px 0; }

  .site-cta { padding: 40px 24px; }
}

@media (max-width: 520px) {
  .site-container { padding: 0 16px; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-hero__actions .btn { width: 100%; }
}

/* ---------------------------------------------------------------- legal pages */
.legal { max-width: 820px; margin: 0 auto; }
.legal__head { text-align: center; margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px solid var(--border); }
.legal__eyebrow {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px;
  padding: 5px 12px; border-radius: 999px; background: var(--brand-soft, rgba(41,163,220,.1));
  color: var(--brand); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.legal__title { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.legal__meta { color: var(--text-muted); font-size: 14px; margin-top: 12px; }
.legal__body { color: var(--text); font-size: 15.5px; line-height: 1.75; }
.legal__body h2 { font-size: 20px; font-weight: 750; letter-spacing: -.02em; margin: 36px 0 12px; }
.legal__body p { margin: 0 0 16px; color: var(--text-muted); }
.legal__body ul { margin: 0 0 18px; padding-left: 22px; color: var(--text-muted); }
.legal__body li { margin: 7px 0; }
.legal__body a { color: var(--brand); text-decoration: none; font-weight: 500; }
.legal__body a:hover { text-decoration: underline; }
.legal__body strong { color: var(--text); font-weight: 650; }

/* ======================= Header / menu enhancements ======================= */

/* #1 Underline wipe: enters from the left, exits to the right */
.site-nav__link::after { transform-origin: right; }
.site-nav__link:hover::after { transform-origin: left; }

/* #4 Active page emphasis */
.site-nav__link.is-active { font-weight: 650; }

/* #3 Shrink-on-scroll */
.site-header { transition: box-shadow .25s ease, background .25s ease; }
.site-header__inner { transition: height .25s ease; }
.site-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(16, 26, 40, .09);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
}
.site-header.is-scrolled .site-header__inner { height: 54px; }

/* #5 CTA hover-lift (header primary button) */
.site-header__actions .btn--primary {
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.site-header__actions .btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 20px rgba(41, 163, 220, .34);
  filter: brightness(1.04);
}

/* #6 Theme toggle: swap moon/sun with a spin */
.theme-toggle__moon, .theme-toggle__sun { display: inline-flex; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.theme-toggle__sun { display: none; }
.theme-toggle:hover .theme-toggle__moon,
.theme-toggle:hover .theme-toggle__sun { transform: rotate(-20deg); }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: inline-flex; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle__sun { display: inline-flex; }
}
.theme-toggle.is-spin .theme-toggle__moon,
.theme-toggle.is-spin .theme-toggle__sun { animation: themeSpin .45s cubic-bezier(.2,.7,.2,1); }
@keyframes themeSpin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* #7 Mobile: morphing hamburger + animated slide-down menu */
.nav-toggle__close { display: none; }
[data-site-nav][aria-expanded="true"] .nav-toggle__open { display: none; }
[data-site-nav][aria-expanded="true"] .nav-toggle__close { display: inline-flex; }

@media (max-width: 760px) {
  .site-nav {
    display: flex;
    max-height: 0; opacity: 0; overflow: hidden; pointer-events: none;
    padding: 0 8px;
    transition: max-height .3s cubic-bezier(.2,.7,.2,1), opacity .25s ease, padding .25s ease;
  }
  .site-nav.is-open { max-height: 70vh; opacity: 1; pointer-events: auto; padding: 8px; }
  /* In the dropdown, use a tinted hover rather than the underline bar */
  .site-nav__link::after { display: none; }
  .site-nav__link:hover { background: var(--brand-soft); }
}
@media (prefers-reduced-motion: reduce) {
  .site-header, .site-header__inner, .site-nav,
  .theme-toggle__moon, .theme-toggle__sun,
  .site-header__actions .btn--primary { transition: none; }
}
