/* ============================================================
   PosturePal marketing site: shared design system
   ============================================================
   Design plan (see build notes):
   - Color: cool off-white base, near-black ink, indigo brand
     (carried over from the app itself), mint for "good" moments.
     Deliberately not the cream+terracotta or black+acid-green
     defaults.
   - Type: Space Grotesk (display, geometric/confident) + Inter
     (body, readable). Not the serif-on-cream pairing.
   - Signature: a horizon line that's tilted in "problem" framing
     and level in "fix" framing, the one visual idea the whole
     site is built around, because that IS the product.
   ============================================================ */

:root {
  /* Color */
  --bg: #F6F7FB;
  --surface: #FFFFFF;
  --surface-sunken: #ECEEF6;
  --ink: #1B1D2A;
  --ink-soft: #565A72;
  --ink-faint: #8A8DA3;
  --indigo: #5B5FEF;
  --indigo-deep: #3730A3;
  --indigo-pale: #EAEAFC;
  --mint: #2DD4A7;
  --mint-deep: #0F9D78;
  --amber: #F0A937;
  --coral: #F0645F;
  --line: #E1E3EF;

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Layout */
  --max-width: 1180px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--indigo);
}

.eyebrow.on-dark { color: #B7B9FF; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--indigo);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--indigo);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(91, 95, 239, 0.55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -6px rgba(91, 95, 239, 0.6); }

.btn-ghost-dark {
  background: transparent;
  border-color: rgba(255,255,255,0.28);
  color: #fff;
}
.btn-ghost-dark:hover { background: rgba(255,255,255,0.08); }

.btn-ghost-light {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost-light:hover { background: var(--surface-sunken); }

.btn-danger {
  background: transparent;
  border-color: var(--coral);
  color: var(--coral);
}
.btn-danger:hover { background: #FDEEED; }

.btn-block { width: 100%; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 247, 251, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(155deg, var(--indigo), var(--indigo-deep));
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-mark svg { width: 16px; height: 16px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
}
.nav-links a:hover { color: var(--ink); }

.nav-cta { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 6px;
}

.nav-mobile-panel {
  display: none;
  flex-direction: column;
  padding: 8px 32px 20px;
  border-top: 1px solid var(--line);
}

.nav-mobile-panel a {
  padding: 12px 0;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}
.nav-mobile-panel a:last-child { border-bottom: none; }

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

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- Tilting horizon signature element ---------- */

.horizon {
  --tilt: -6deg;
  position: relative;
  height: 2px;
  background: currentColor;
  transform: rotate(var(--tilt));
  transform-origin: left center;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.horizon.level { --tilt: 0deg; }

.horizon-label {
  position: absolute;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Sections ---------- */

section { padding: 96px 0; }
@media (max-width: 640px) { section { padding: 64px 0; } }

.section-dark {
  background: linear-gradient(165deg, #1B1D2A 0%, #232544 55%, #2B2D5C 100%);
  color: #fff;
}

.section-sunken { background: var(--surface-sunken); }

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2 {
  font-size: 40px;
  margin-top: 14px;
}

.section-head p {
  margin-top: 16px;
  font-size: 17px;
  color: var(--ink-soft);
}

.section-dark .section-head p { color: #C7C9EE; }

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

/* ---------- Cards / grids ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-5 { grid-template-columns: 1fr; } }

/* ---------- GIF / media placeholder ---------- */

.media-slot {
  position: relative;
  border-radius: var(--radius-md);
  border: 1.5px dashed rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 220px;
}

.media-slot.light {
  border-color: #C7CAE8;
  background: var(--indigo-pale);
}

.media-slot img, .media-slot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.media-slot-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--ink-faint);
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}
.section-dark .media-slot-hint { color: #A6A9E0; }

.media-slot-hint .dim { font-size: 12px; opacity: 0.75; }

/* ---------- Stat callouts ---------- */

.stat {
  text-align: center;
}

.stat .num {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 700;
  color: var(--indigo);
  line-height: 1;
}

.section-dark .stat .num { color: #A8ABFF; }

.stat .cap {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.section-dark .stat .cap { color: #C7C9EE; }

.stat .src {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-faint);
}
.section-dark .stat .src { color: #8286C4; }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

.footer-grid h4 {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

.footer-grid a, .footer-grid p {
  display: block;
  font-size: 14.5px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.footer-grid a:hover { color: var(--indigo); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-faint);
}

@media (max-width: 560px) {
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.teams-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid, .teams-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Utility ---------- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

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