/*
Theme Name: Locstat
Theme URI: https://locstat.app
Author: Locstat
Author URI: https://locstat.app
Description: App-download-first landing theme for locstat.app — hero, feature cards, download band and business footer, with a light/dark toggle and a five-language switcher (EN, VI, RU, KO, ZH). Document pages (About / Privacy / Terms) render as real WordPress pages.
Version: 1.0
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: locstat
Tags: landing-page, one-column, custom-colors, translation-ready
*/

/* =========================================================================
   Design tokens — verbatim from the handoff.
   Light is the default; [data-theme="dark"] swaps the set. The theme
   attribute lives on <html> so the tokens cascade to everything.
   ========================================================================= */
:root,
[data-theme] {
  --bg: #faf8f4;
  --surface: #ffffff;
  --ink: #221c14;
  --muted: #8a7c68;
  --line: #eae3d6;
  --soft: #f3eee3;
  --accent: #007aff;
  --accent-soft: #e8f0fe;
  --ph1: #ece5d8;
  --ph2: #e4dbca;
  --shadow: 0 1px 2px rgba(30, 24, 12, .05), 0 10px 28px rgba(30, 24, 12, .07);
}

[data-theme="dark"] {
  --bg: #141210;
  --surface: #1e1b17;
  --ink: #f2ede3;
  --muted: #a29684;
  --line: #2f2a22;
  --soft: #26221b;
  --accent: #3d8bff;
  --accent-soft: #1b2a45;
}

/* ------------------------------- base ---------------------------------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #005fcc; }
[data-theme="dark"] a:hover { color: #7fb2ff; }

img { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.ls-screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* The design is a 1440px canvas; centre it and let it breathe below that. */
.ls-site {
  max-width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.ls-main { flex: 1; }

/* ------------------------------ header --------------------------------- */
.ls-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.ls-header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px 48px;
}

.ls-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.ls-brand:hover { color: var(--ink); }

.ls-brand-mark { width: 32px; height: 34px; display: block; }
.ls-brand-word { font-size: 20px; font-weight: 900; letter-spacing: -.02em; }

/* Dark mode turns the logo white (header + footer). */
[data-theme="dark"] .ls-brand-mark,
[data-theme="dark"] .ls-footer-mark { filter: brightness(0) invert(1); }

.ls-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 700;
}
.ls-nav a { color: var(--muted); }
.ls-nav a:hover,
.ls-nav a.is-current { color: var(--ink); }

.ls-cta-pill {
  background: var(--accent);
  color: #fff;
  border-radius: 99px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.ls-cta-pill:hover { color: #fff; filter: brightness(1.05); }

/* Shared pill styling for the language + theme controls. */
.ls-pill-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.ls-pill-btn:hover { color: var(--ink); }

.ls-lang { position: relative; }

.ls-lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(30, 24, 12, .16);
  padding: 6px;
  min-width: 170px;
  z-index: 50;
  display: flex;
  flex-direction: column;
}
.ls-lang-menu[hidden] { display: none; }

.ls-lang-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}
.ls-lang-opt:hover { background: var(--soft); }
.ls-lang-opt.is-active { background: var(--soft); font-weight: 800; }
.ls-lang-opt span { margin-left: auto; font-size: 11px; opacity: .6; }

/* ------------------------------- hero ---------------------------------- */
.ls-hero { position: relative; overflow: hidden; }

.ls-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}

.ls-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 12, 8, .62) 0%, rgba(15, 12, 8, .42) 46%, rgba(15, 12, 8, .12) 100%);
}

.ls-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 56px;
  align-items: center;
  padding: 72px 48px 80px;
}

.ls-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-start;
}

.ls-hero-badge {
  background: rgba(255, 255, 255, .92);
  color: var(--accent);
  border-radius: 99px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 800;
}

.ls-hero-h1 {
  margin: 0;
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.06;
  text-wrap: pretty;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .35);
}

.ls-hero-sub {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .92);
  max-width: 52ch;
  font-weight: 600;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .3);
}

.ls-store-row { display: flex; gap: 12px; margin-top: 6px; flex-wrap: wrap; }

.ls-store-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  background: #16120c;
  color: #faf8f4;
  border-radius: 14px;
  padding: 12px 22px;
}
.ls-store-btn:hover { color: #faf8f4; filter: brightness(1.15); }
.ls-store-btn svg { flex: 0 0 auto; display: block; }
.ls-store-small { font-size: 10.5px; font-weight: 700; opacity: .75; display: block; }
.ls-store-big { font-size: 17px; font-weight: 800; margin-top: 1px; display: block; }

/* Pre-launch: identical to the live button but not interactive
   (the app is TestFlight-only — see LOCSTAT_APP_LIVE). */
.ls-store-btn.is-inert { cursor: default; opacity: .88; }
.ls-store-btn.is-inert:hover { filter: none; }

.ls-store-note {
  margin: -8px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, .82);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}

/* QR block — hidden until the app ships (see LOCSTAT_SHOW_QR). */
.ls-qr { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.ls-qr-card {
  width: 84px; height: 84px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .95);
  display: flex; align-items: center; justify-content: center;
  font-family: monospace; font-size: 9px; color: #8a7c68;
}
.ls-qr-text {
  font-size: 13px;
  color: rgba(255, 255, 255, .9);
  font-weight: 700;
  max-width: 20ch;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .3);
}

/* Overlapping phone mockups. */
.ls-hero-phones { position: relative; height: 600px; }

.ls-phone {
  position: absolute;
  border-radius: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.ls-phone img {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  border-radius: 28px;
  object-fit: cover;
}

.ls-phone-back {
  left: 0; top: 40px;
  width: 260px; height: 530px;
  box-shadow: var(--shadow);
  transform: rotate(-5deg);
}
.ls-phone-back img { object-position: left top; }

.ls-phone-front {
  right: 20px; top: 0;
  width: 270px; height: 560px;
  box-shadow: 0 24px 60px rgba(30, 24, 12, .18);
  transform: rotate(3deg);
}
.ls-phone-front img { object-position: top; }

/* ----------------------------- features -------------------------------- */
.ls-features { padding: 56px 48px 72px; }

.ls-features h2 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -.02em;
  text-align: center;
}

.ls-features-sub {
  margin: 0 auto 36px;
  font-size: 15.5px;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  max-width: 56ch;
}

.ls-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.ls-feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 24px;
  box-shadow: var(--shadow);
}

.ls-feature-icon {
  width: 46px; height: 46px;
  border-radius: 99px;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  color: var(--accent);
}
.ls-feature-icon svg { display: block; }

.ls-feature-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 800; }
.ls-feature-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  font-weight: 600;
}

/* --------------------------- download band ------------------------------ */
.ls-band-wrap { padding: 0 48px 72px; }

.ls-band {
  background: var(--ink);
  border-radius: 24px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 44px;
  align-items: center;
}

.ls-band h2 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--bg);
}
.ls-band p {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--bg);
  opacity: .75;
  font-weight: 600;
  max-width: 52ch;
}
.ls-band-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border-radius: 99px;
  padding: 12px 26px;
  font-size: 14.5px;
  font-weight: 800;
}
.ls-band-cta:hover { color: #fff; filter: brightness(1.05); }

/* Pre-launch counterpart of the store buttons. */
.ls-band-cta.is-inert { cursor: default; opacity: .9; }
.ls-band-cta.is-inert:hover { filter: none; }
.ls-band-note {
  margin: 12px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--bg);
  opacity: .6;
}

.ls-band-phone-col { display: flex; justify-content: center; align-self: end; }

/* Bezel sits flush with the band's bottom edge. */
.ls-band-bezel {
  width: 230px;
  height: 248px;
  border-radius: 34px 34px 0 0;
  background: #16120c;
  border: 1px solid rgba(255, 255, 255, .14);
  border-bottom: none;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .4);
  overflow: hidden;
  padding: 9px 9px 0;
  margin-bottom: -48px;
}
.ls-band-bezel img {
  width: 100%;
  height: 100%;
  border-radius: 26px 26px 0 0;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* ------------------------- document pages ------------------------------ */
.ls-doc {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 48px 80px;
  width: 100%;
}

.ls-doc-title {
  margin: 0 0 6px;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.ls-doc-meta {
  margin: 0 0 36px;
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 700;
}

/* Styles the page content whatever WordPress holds (incl. pages not in the
   design, e.g. how-locstat-uses-your-data). */
.ls-doc-body > *:first-child { margin-top: 0; }
.ls-doc-body h1,
.ls-doc-body h2,
.ls-doc-body h3 {
  margin: 26px 0 10px;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.35;
}
.ls-doc-body h1 { font-size: 24px; }
.ls-doc-body p,
.ls-doc-body li {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 400;
  color: var(--ink);
  text-wrap: pretty;
}
.ls-doc-body ul,
.ls-doc-body ol { padding-left: 22px; margin: 0 0 16px; }
.ls-doc-body li { margin-bottom: 8px; }
.ls-doc-body img { height: auto; border-radius: 12px; }
.ls-doc-body blockquote {
  margin: 0 0 16px;
  padding: 12px 18px;
  border-left: 3px solid var(--line);
  color: var(--muted);
}
.ls-doc-body table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.ls-doc-body th,
.ls-doc-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; font-size: 14px; }

/* ------------------------------ footer --------------------------------- */
.ls-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 44px 48px 36px;
}

.ls-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 44px;
}

.ls-footer-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.ls-footer-mark { width: 26px; height: 28px; display: block; }
.ls-footer-word { font-size: 17px; font-weight: 900; }

.ls-footer-legal {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  font-weight: 600;
  max-width: 46ch;
}

.ls-footer-tagline {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  font-weight: 600;
  font-style: italic;
}

.ls-footer h4 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.ls-footer-address { margin: 0; font-size: 13px; line-height: 1.7; font-weight: 600; }
.ls-footer-contact { margin: 10px 0 0; font-size: 13px; line-height: 1.8; font-weight: 600; }

.ls-footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}
.ls-footer-links a { color: var(--muted); }
.ls-footer-links a:hover { color: var(--accent); }

.ls-footer-bottom {
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

/* ------------------------------- 404 ----------------------------------- */
.ls-404 {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 96px 48px;
  text-align: center;
}
.ls-404 h1 { font-size: 38px; font-weight: 900; letter-spacing: -.02em; margin: 0 0 10px; }
.ls-404 p { font-size: 15px; line-height: 1.7; color: var(--muted); font-weight: 600; margin: 0 0 24px; }

/* ============================== responsive =============================
   The design is a fixed 1440px desktop canvas. These rules only reflow it
   — no new visual language is introduced.
   ===================================================================== */
@media (max-width: 1180px) {
  .ls-hero-inner { grid-template-columns: 1fr 380px; gap: 36px; padding: 60px 32px 68px; }
  .ls-hero-h1 { font-size: 46px; }
  .ls-hero-phones { height: 520px; }
  .ls-phone-back { width: 210px; height: 430px; top: 34px; }
  .ls-phone-front { width: 220px; height: 456px; right: 10px; }
  .ls-header-inner,
  .ls-features,
  .ls-band-wrap,
  .ls-footer { padding-left: 32px; padding-right: 32px; }
  .ls-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .ls-band { grid-template-columns: 1fr 300px; padding: 40px; }
}

@media (max-width: 900px) {
  .ls-hero-inner { grid-template-columns: 1fr; }
  /* Phones move below the copy, centred, at a comfortable size. */
  .ls-hero-phones { height: 470px; max-width: 420px; margin: 0 auto; width: 100%; }
  .ls-phone-back { left: 6%; }
  .ls-phone-front { right: 6%; }
  .ls-band { grid-template-columns: 1fr; gap: 32px; }
  .ls-band-phone-col { justify-content: center; }
  .ls-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .ls-nav { gap: 18px; }
}

@media (max-width: 720px) {
  .ls-header-inner {
    flex-wrap: wrap;
    gap: 12px 16px;
    padding: 14px 20px;
  }
  .ls-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
  }
  .ls-lang { margin-left: auto; }
  .ls-hero-inner { padding: 44px 20px 56px; gap: 28px; }
  .ls-hero-h1 { font-size: 34px; }
  .ls-hero-sub { font-size: 16px; }
  .ls-store-btn { padding: 11px 18px; }
  .ls-features { padding: 40px 20px 52px; }
  .ls-features h2 { font-size: 24px; }
  .ls-feature-grid { grid-template-columns: 1fr; }
  .ls-band-wrap { padding: 0 20px 52px; }
  .ls-band { padding: 32px 24px; border-radius: 20px; }
  .ls-band h2 { font-size: 23px; }
  .ls-band-bezel { margin-bottom: -32px; }
  .ls-doc { padding: 40px 20px 64px; }
  .ls-doc-title { font-size: 30px; }
  .ls-footer { padding: 36px 20px 28px; }
  .ls-footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .ls-footer-bottom { flex-direction: column; gap: 6px; }
  .ls-404 { padding: 64px 20px; }
  .ls-hero-phones { height: 400px; max-width: 340px; }
  .ls-phone-back { width: 165px; height: 340px; top: 28px; }
  .ls-phone-front { width: 172px; height: 356px; }
}

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


/* =========================================================================
   Static-site correction (appended by tools/build.mjs)
   The [hidden] attribute must beat author display rules — the pre-launch QR
   block and the "coming soon" captions are toggled with it.
   ========================================================================= */
[hidden] { display: none !important; }
