/* ============================================
   StyleHome AI — Brand System
   ============================================ */

:root {
  /* Clean white + mint palette */
  --bg: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-deep: #F2FBF6;
  --bg-mint: #EAFBF2;
  --bg-mint-soft: #F4FDF8;
  --ink: #16201B;
  --ink-soft: #4A554F;
  --ink-muted: #8A958F;
  --rule: #E3EEE8;

  /* Mint-forward accents */
  --mint: #A8F0D1;
  --mint-bright: #7FE8BF;
  --mint-deep: #3CCB8E;
  --mint-deeper: #2BAE78;
  --mint-ink: #1B7A52;     /* readable mint-green text on white */
  --pro-red: #FF5A6A;

  /* Legacy aliases now mapped to mint (no more dark green) */
  --forest: #2BAE78;
  --forest-soft: #3CCB8E;

  /* Type scale — soft rounded geometric sans */
  --display: 'Poppins', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 28px;
  --radius-pill: 999px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  overflow-x: hidden;
}

/* sections control their own backgrounds now */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

main, header, footer, section { position: relative; z-index: 2; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--mint); color: var(--ink); }

/* ============================================
   Typography
   ============================================ */

.display {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.display em {
  font-style: normal;
  font-weight: 600;
  color: var(--mint-deep);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--ink-muted);
}

/* ============================================
   Layout
   ============================================ */

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

.container-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 768px) {
  .container, .container-narrow { padding: 0 20px; }
}

/* ============================================
   Navigation
   ============================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 20px 0;
  background: rgba(234, 251, 242, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.nav.scrolled {
  border-bottom-color: var(--rule);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(31, 58, 46, 0.15);
}

.nav-brand .ai-mark {
  color: var(--ink);
  font-weight: 600;
  margin-left: -0.08em;
}

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

.nav-links a {
  font-size: 14px;
  color: var(--ink-soft);
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a:hover { color: var(--ink); }

.nav-cta {
  background: var(--mint-deep);
  color: var(--ink);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover {
  background: var(--mint-bright);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -6px rgba(60, 203, 142, 0.6);
}

@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg-elevated);
}

.btn-primary:hover {
  background: var(--forest);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(31, 58, 46, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

/* ============================================
   App Store badges
   ============================================ */

.store-badges {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.badge-app-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--bg-elevated);
  padding: 12px 22px;
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.badge-app-store:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -12px rgba(0,0,0,0.35);
}

.badge-app-store svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.badge-app-store-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.badge-app-store-text .small {
  font-size: 10px;
  opacity: 0.75;
  letter-spacing: 0.05em;
}

.badge-app-store-text .big {
  font-size: 18px;
  font-weight: 500;
  margin-top: 2px;
}

.coming-soon-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px dashed var(--rule);
  border-radius: 12px;
  font-size: 13px;
  color: var(--ink-muted);
  background: transparent;
}

.coming-soon-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint-deep);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* ============================================
   Footer
   ============================================ */

.footer {
  margin-top: 120px;
  padding: 80px 0 40px;
  background: var(--bg-deep);
  border-top: 1px solid var(--rule);
}

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

.footer-brand {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.footer-brand .ai-mark {
  color: var(--ink);
  font-weight: 600;
  margin-left: -0.08em;
}

.footer-tagline {
  color: var(--ink-soft);
  max-width: 320px;
  font-size: 15px;
  margin-bottom: 24px;
}

.footer-col h4 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  margin-bottom: 18px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 14px;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--ink); }

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ink-muted);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-socials {
  display: flex;
  gap: 14px;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.footer-socials a:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  transform: translateY(-2px);
}

.footer-socials svg { width: 16px; height: 16px; }

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

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

/* ============================================
   Reveal animations
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Legal page styles (shared by privacy, terms, support)
   ============================================ */

.legal-hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--rule);
}

.legal-hero .display {
  font-size: clamp(48px, 7vw, 84px);
  margin-bottom: 16px;
}

.legal-hero .updated {
  color: var(--ink-muted);
  font-size: 14px;
  font-family: var(--mono);
}

.legal-content {
  padding: 60px 0 100px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.legal-content h2 {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  margin: 56px 0 16px;
  letter-spacing: -0.02em;
}

.legal-content h2:first-child { margin-top: 0; }

.legal-content h3 {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 32px 0 12px;
}

.legal-content p { margin-bottom: 16px; }

.legal-content ul {
  margin: 0 0 24px 20px;
  padding-left: 0;
}

.legal-content ul li {
  margin-bottom: 8px;
  list-style: none;
  position: relative;
  padding-left: 20px;
}

.legal-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint-deep);
}

.legal-content strong { color: var(--ink); font-weight: 600; }

.legal-content a {
  color: var(--mint-ink);
  border-bottom: 1px solid var(--mint-bright);
  transition: border-color 0.2s ease;
}

.legal-content a:hover { border-bottom-color: var(--ink); }

.legal-toc {
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 60px;
}

.legal-toc h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  margin-bottom: 16px;
  font-weight: 500;
}

.legal-toc ol {
  list-style: none;
  counter-reset: toc-counter;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

@media (max-width: 600px) {
  .legal-toc ol { grid-template-columns: 1fr; }
}

.legal-toc li {
  counter-increment: toc-counter;
  font-size: 14px;
}

.legal-toc li::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-family: var(--mono);
  color: var(--ink-muted);
  margin-right: 12px;
  font-size: 12px;
}

.legal-toc a {
  color: var(--ink);
  border: none;
  transition: color 0.2s ease;
}

.legal-toc a:hover { color: var(--mint-deep); }

.placeholder-flag {
  background: rgba(255, 90, 106, 0.08);
  border-left: 3px solid var(--pro-red);
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 14px;
  color: var(--ink);
  border-radius: 0 8px 8px 0;
  font-family: var(--mono);
}

/* ============================================
   Legal page table (privacy subprocessors)
   ============================================ */
.legal-content .legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 28px;
  font-size: 15px;
}

.legal-content .legal-table th,
.legal-content .legal-table td {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  vertical-align: top;
}

.legal-content .legal-table th {
  background: var(--bg-mint);
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ink);
}

.legal-content .legal-table tbody tr:nth-child(even) {
  background: var(--bg-mint-soft);
}

@media (max-width: 600px) {
  .legal-content .legal-table { font-size: 13px; }
  .legal-content .legal-table th,
  .legal-content .legal-table td { padding: 9px 10px; }
}
