/* CharmAI — shared styles */

:root {
  --white:  #FFFFFF;
  --cream:  #FFF7ED;
  --paper:  #FFFCFA;

  --ink:    #1C1917;
  --body:   #57534E;
  --muted:  #78716C;
  --line:   #F0EDEA;

  --brand:      #F97316;
  --brand-dark: #EA580C;
  --brand-deep: #C2410C;

  --peach-bg:  #FFE4D0; --peach-text:  #6B2500;
  --rose-bg:   #FFD6E4; --rose-text:   #6B0025;
  --amber-bg:  #FEF3C7; --amber-text:  #92400E;
  --teal-bg:   #CCFBF1; --teal-text:   #064E3B;
  --red-bg:    #FFE4E1; --red-text:    #7F1D1D;
  --purple-bg: #E9D5FF; --purple-text: #4C1D95;

  --gold: #FBBF24;

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Radius scale: tighter inside, softer outside */
  --r-xs:   6px;
  --r-sm:   10px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-pill: 999px;

  /* Shadows carry the warm hue of the page, never neutral black */
  --shadow-sm: 0 1px 2px rgba(120, 53, 15, 0.06);
  --shadow-md: 0 6px 20px -8px rgba(120, 53, 15, 0.14);
  --shadow-lg: 0 22px 54px -24px rgba(120, 53, 15, 0.26);

  --container: 1040px;
  --z-nav: 100;
  --z-overlay: 200;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
/* Large display sizes need tighter tracking than headings do */
h1 { letter-spacing: -0.04em; }

p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--peach-bg); color: var(--peach-text); }

:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 3px; border-radius: 3px; }

.skip-link {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: var(--z-overlay);
  padding: 12px 22px;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* Nav */

.site-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease);
}
.site-nav[data-scrolled='true'] { border-bottom-color: var(--line); }
.site-nav .container { display: flex; align-items: center; gap: 14px; height: 70px; }

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18.5px;
  letter-spacing: -0.03em;
}
.brand-mark img { width: 32px; height: 32px; border-radius: var(--r-sm); }

.nav-links { display: flex; gap: 2px; margin-left: auto; list-style: none; }
.nav-links a {
  display: block;
  padding: 8px 13px;
  border-radius: var(--r-xs);
  font-size: 14.5px;
  color: var(--body);
  transition: color 0.18s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current='page'] { color: var(--brand-deep); }

.brand-mark + .nav-cta { margin-left: auto; }

.nav-cta {
  margin-left: 14px;
  padding: 10px 19px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  font-size: 14.5px;
  transition: background-color 0.18s;
}
.nav-cta:hover { background: #332E2B; }

@media (max-width: 700px) { .nav-links { display: none; } .nav-cta { margin-left: auto; } }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 14px 25px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: background-color 0.18s, border-color 0.18s, box-shadow 0.18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 21px; height: 21px; flex-shrink: 0; }

.btn-store .label small {
  display: block;
  font-size: 9.5px;
  font-weight: 500;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1.5;
}
.btn-store .label span {
  display: block;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.btn-dark { background: var(--ink); color: var(--white); box-shadow: var(--shadow-md); }
.btn-dark:hover { background: #332E2B; box-shadow: var(--shadow-lg); }

.btn-light { background: var(--white); color: var(--ink); border-color: #E7E2DD; }
.btn-light:hover { border-color: #CFC7C0; box-shadow: var(--shadow-sm); }

/* Sections */

.band { padding: 88px 0; }
.band-tint { background: var(--paper); }
.rule { border-top: 1px solid var(--line); }

.head { max-width: 560px; margin: 0 auto 48px; text-align: center; }
.head h2 { font-size: clamp(28px, 3.8vw, 40px); margin-bottom: 12px; }
.head p { font-size: 17px; color: var(--body); }

/* Footer */

.site-footer { padding: 44px 0 40px; border-top: 1px solid var(--line); }
.footer-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-left: auto;
  list-style: none;
  font-size: 14.5px;
}
.footer-links a { color: var(--body); transition: color 0.18s; }
.footer-links a:hover { color: var(--brand-deep); }
.footer-note {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

/* Legal pages */

.legal-hero {
  padding: 64px 0 44px;
  background: linear-gradient(180deg, var(--cream), var(--white));
  border-bottom: 1px solid var(--line);
}
.legal-hero h1 { font-size: clamp(31px, 4.6vw, 44px); margin-bottom: 10px; }
.legal-hero .updated { font-size: 14.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.legal-body {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding: 56px 0 96px;
}

.legal-toc { position: sticky; top: 96px; font-size: 13.5px; }
.legal-toc h2 {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.legal-toc ol { list-style: none; display: flex; flex-direction: column; }
.legal-toc a {
  display: block;
  padding: 6px 11px;
  color: var(--body);
  border-left: 1.5px solid var(--line);
  transition: color 0.18s, border-color 0.18s;
}
.legal-toc a:hover { color: var(--brand-deep); border-left-color: var(--brand); }

.legal-intro {
  font-size: 16.5px;
  color: var(--body);
  line-height: 1.75;
  padding: 22px 26px;
  background: var(--cream);
  border-left: 2px solid var(--brand);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin-bottom: 44px;
}

.legal-section { margin-bottom: 42px; scroll-margin-top: 96px; }
.legal-section h2 { font-size: 21px; margin-bottom: 12px; display: flex; align-items: baseline; gap: 11px; }
.legal-section h2 .num {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.legal-section p, .legal-section li {
  font-size: 15.5px;
  color: var(--body);
  line-height: 1.78;
  max-width: 66ch;
}
.legal-section p { margin-bottom: 12px; }
.legal-section strong { color: var(--ink); font-weight: 600; }
.legal-section ul { padding-left: 20px; margin-bottom: 14px; }
.legal-section li { margin-bottom: 6px; }
.legal-section li::marker { color: var(--brand); }
.legal-section a {
  color: var(--brand-deep);
  text-decoration: underline;
  text-decoration-color: rgba(194, 65, 12, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.18s;
}
.legal-section a:hover { text-decoration-color: var(--brand-deep); }

.highlight-box { padding: 20px 24px; background: var(--amber-bg); border-radius: var(--r-md); margin: 18px 0; }
.highlight-box p { color: var(--amber-text); margin-bottom: 0; }
.highlight-box strong { color: var(--amber-text); }

@media (max-width: 900px) {
  .legal-body { grid-template-columns: 1fr; gap: 0; }
  .legal-toc { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
