/* WeekSquire marketing site — shared styles.
   Colors mirror constants/theme.ts (light/dark) and spacing mirrors
   constants/tokens.ts, so the site reads as the same product as the app. */

:root {
  --background: #F6F8F6;
  --background-translucent: rgba(246, 248, 246, 0.82);
  --card: #FFFFFF;
  --text: #16211B;
  --text-muted: #657168;
  --accent: #1E8F68;
  --accent-text: #FFFFFF;
  --accent-soft: #E4F3EB;
  --accent-soft-2: #D7EEE3;
  --border: #E3E8E4;
  --shadow: rgba(22, 33, 27, 0.10);
  --phone-bezel-1: #2b302d;
  --phone-bezel-2: #0d100e;
  --phone-shadow: rgba(15, 21, 18, 0.28);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #0F1512;
    --background-translucent: rgba(15, 21, 18, 0.82);
    --card: #1A211D;
    --text: #EEF2EF;
    --text-muted: #98A39C;
    --accent: #5FCB9E;
    --accent-text: #08110C;
    --accent-soft: #172C22;
    --accent-soft-2: #1C332A;
    --border: #2A322D;
    --shadow: rgba(0, 0, 0, 0.35);
    --phone-bezel-1: #333935;
    --phone-bezel-2: #0a0b0a;
    --phone-shadow: rgba(0, 0, 0, 0.55);
  }
}

/* Manual override via the header's light/dark toggle (persisted in localStorage),
   independent of the OS-level prefers-color-scheme query above. */
:root[data-theme="dark"] {
  --background: #0F1512;
  --background-translucent: rgba(15, 21, 18, 0.82);
  --card: #1A211D;
  --text: #EEF2EF;
  --text-muted: #98A39C;
  --accent: #5FCB9E;
  --accent-text: #08110C;
  --accent-soft: #172C22;
  --accent-soft-2: #1C332A;
  --border: #2A322D;
  --shadow: rgba(0, 0, 0, 0.35);
  --phone-bezel-1: #333935;
  --phone-bezel-2: #0a0b0a;
  --phone-shadow: rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

img, video {
  max-width: 100%;
}

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

.wrap.legal {
  max-width: 720px;
}

/* Header */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 18px 0;
  background: var(--background-translucent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}

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

.wrap.legal header.site-header {
  position: static;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-toggle {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.theme-toggle:hover {
  filter: brightness(0.96);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.badge {
  display: inline-block;
  flex-shrink: 0;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 6px 14px;
  border-radius: 999px;
}

/* Hero */

.hero-section {
  position: relative;
  overflow: hidden;
  padding: 40px 0 24px;
}

.hero-bg {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 620px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(480px 320px at 12% 10%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%),
    radial-gradient(420px 320px at 88% 25%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 860px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.85fr;
    gap: 24px;
  }
}

h1 {
  font-size: 36px;
  line-height: 1.16;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

@media (min-width: 860px) {
  h1 {
    font-size: 44px;
  }
}

.pitch {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 0 26px;
  max-width: 56ch;
}

.waitlist {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.waitlist input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 15px;
}

.waitlist input[type="email"]:focus,
.waitlist button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.waitlist button {
  padding: 13px 22px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.waitlist button:hover {
  opacity: 0.9;
}

.form-note {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 4px;
}

.store-cta {
  margin-bottom: 18px;
}

.app-store-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.app-store-link:hover {
  opacity: 0.9;
}

.app-store-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.android-note {
  margin-top: 4px;
}

.waitlist-compact input[type="email"] {
  padding: 10px 13px;
  font-size: 14px;
}

.waitlist-compact button {
  padding: 10px 18px;
  font-size: 14px;
}

.form-success {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 16px;
  border-radius: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.trust-line {
  font-size: 13px;
  color: var(--text-muted);
  margin: 14px 0 0;
}

.trust-line span::after {
  content: "\00b7";
  margin: 0 8px;
  color: var(--border);
}

.trust-line span:last-child::after {
  content: "";
  margin: 0;
}

/* Phone frame */

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

.phone-frame {
  width: 100%;
  max-width: 280px;
  border-radius: 34px;
  padding: 12px;
  background: linear-gradient(160deg, var(--phone-bezel-1), var(--phone-bezel-2));
  box-shadow: 0 26px 60px -22px var(--phone-shadow);
  position: relative;
}

.phone-frame::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  z-index: 1;
}

.phone-frame video {
  display: block;
  width: 100%;
  border-radius: 24px;
  background: #000;
}

.phone-frame.tile {
  max-width: 100%;
  padding: 0;
  border-radius: 24px;
  background: none;
  box-shadow: 0 16px 34px -18px var(--shadow);
}

.phone-frame.tile img {
  display: block;
  width: 100%;
  border-radius: 24px;
}

/* Value strip */

.value-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 8px auto 56px;
}

@media (min-width: 720px) {
  .value-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

.value-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.value-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.value-icon svg {
  width: 20px;
  height: 20px;
}

.value-card h3 {
  margin: 2px 0 4px;
  font-size: 15px;
}

.value-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* Section blocks */

.section-block {
  margin: 64px auto;
}

.section-head {
  max-width: 62ch;
  margin: 0 0 32px;
}

.section-head h2 {
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

@media (min-width: 860px) {
  .section-head h2 {
    font-size: 30px;
  }
}

.section-head p {
  color: var(--text-muted);
  font-size: 16px;
  margin: 0;
}

.tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 360px;
  margin: 0 auto;
}

@media (min-width: 720px) {
  .tile-grid {
    max-width: none;
    grid-template-columns: repeat(3, 1fr);
  }
}

.tile-item {
  position: relative;
}

.tile-step {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Old step list (kept for legal/back-compat styling reuse) */

.steps {
  display: grid;
  gap: 20px;
  margin: 48px 0 8px;
  padding: 0;
  list-style: none;
}

.steps li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.step-number {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  line-height: 24px;
  margin-bottom: 10px;
}

.steps h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.plans-change {
  color: var(--text-muted);
  font-size: 15px;
  margin: 28px 0 8px;
  max-width: 62ch;
}

/* CTA band */

.cta-band {
  background: linear-gradient(180deg, var(--accent-soft), var(--accent-soft-2));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 56px 0;
  margin-top: 8px;
}

.cta-band-inner {
  text-align: center;
  max-width: 560px;
}

.cta-band h2 {
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.cta-band .pitch {
  margin: 0 auto 24px;
  text-align: center;
}

.cta-band .app-store-link {
  margin-bottom: 20px;
}

.cta-band .waitlist {
  justify-content: center;
}

.cta-band .form-note {
  text-align: center;
}

/* Footer */

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 32px;
  font-size: 13px;
  color: var(--text-muted);
}

footer.site-footer .links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

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

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

footer.site-footer .footer-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

footer.site-footer .footer-meta a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Legal pages */
.legal h1 {
  font-size: 28px;
}

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

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

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

.legal .draft-note {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 14px;
  text-decoration: none;
}
