/* ============================================================
   Cactus Bloom Enterprises LLC
   Design system aligned with DESIGN.md (inspired by Claude/Anthropic)
   ============================================================ */

/* --- Google Fonts (Playfair Display ≈ Anthropic Serif, Inter ≈ Anthropic Sans) --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500&family=Inter:wght@400;500;600&display=swap');

/* --- Design Tokens (from DESIGN.md) --- */
:root {
  /* Backgrounds */
  --color-parchment:    #f5f4ed;   /* primary page bg */
  --color-ivory:        #faf9f5;   /* card/elevated surface */
  --color-white:        #ffffff;   /* max-contrast surfaces */
  --color-warm-sand:    #e8e6dc;   /* secondary btn bg, prominent surfaces */

  /* Dark surfaces */
  --color-dark-surface: #30302e;   /* dark containers, nav border */
  --color-deep-dark:    #141413;   /* footer, dark sections */

  /* Brand */
  --color-terracotta:   #c96442;   /* primary CTA, brand moments */
  --color-coral:        #d97757;   /* text links on dark, secondary accent */

  /* Text */
  --color-near-black:   #141413;   /* primary text */
  --color-charcoal:     #4d4c48;   /* button text on warm surfaces */
  --color-olive-gray:   #5e5d59;   /* secondary body text */
  --color-stone-gray:   #87867f;   /* tertiary, footnotes, metadata */
  --color-warm-silver:  #b0aea5;   /* text on dark surfaces */

  /* Borders */
  --color-border-cream: #f0eee6;   /* standard light-theme border */
  --color-border-warm:  #e8e6dc;   /* prominent borders, dividers */
  --color-border-dark:  #30302e;   /* border on dark surfaces */

  /* Ring shadow */
  --color-ring:         #d1cfc5;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --max-width: 1100px;
  --transition: 0.15s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-near-black);
  background-color: var(--color-parchment);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; display: block; }

a {
  color: var(--color-terracotta);
  text-decoration: underline;
  transition: color var(--transition);
}

a:hover, a:focus { color: var(--color-coral); }

ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;           /* single weight — intentional per DESIGN.md */
  color: var(--color-near-black);
  line-height: 1.15;
}

h1 { font-size: clamp(2rem, 5vw, 4rem); line-height: 1.10; }
h2 { font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.20; margin-bottom: 0.75rem; }
h3 { font-size: 1.3rem; line-height: 1.30; margin-bottom: 0.5rem; }

p {
  font-family: var(--font-sans);
  line-height: 1.60;
  margin-bottom: 1rem;
  color: var(--color-olive-gray);
}

p:last-child { margin-bottom: 0; }

/* --- Layout Helpers --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

hr.divider {
  border: none;
  border-top: 1px solid var(--color-border-cream);
  margin: 2rem 0;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav {
  background: var(--color-ivory);
  border-bottom: 1px solid var(--color-border-cream);
  box-shadow: rgba(0,0,0,0.04) 0px 2px 12px;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 60px;
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-near-black);
  text-decoration: none;
  white-space: nowrap;
}

.nav-brand:hover { color: var(--color-terracotta); }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-olive-gray);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: color var(--transition), background-color var(--transition);
}

.nav-links a:hover {
  color: var(--color-near-black);
  background-color: var(--color-warm-sand);
}

.nav-links a.active {
  color: var(--color-terracotta);
  font-weight: 600;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background-color: var(--color-parchment);
  border-bottom: 1px solid var(--color-border-cream);
  padding: 7rem 1.5rem 6rem;
  text-align: center;
}

.hero h1 {
  color: var(--color-near-black);
  margin-bottom: 1.25rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--color-olive-gray);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.60;
}

.hero-ctas {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Page hero (sub-pages) */
.page-hero {
  background-color: var(--color-parchment);
  border-bottom: 1px solid var(--color-border-cream);
  padding: 4rem 1.5rem 3.5rem;
}

.page-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-hero h1 { margin-bottom: 0.6rem; }

.page-hero .subtitle {
  color: var(--color-olive-gray);
  font-size: 1.1rem;
  line-height: 1.60;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: box-shadow var(--transition), background-color var(--transition), color var(--transition);
  cursor: pointer;
  border: none;
  line-height: 1.4;
}

/* Terracotta primary */
.btn-primary {
  background-color: var(--color-terracotta);
  color: var(--color-ivory);
  box-shadow: #c96442 0px 0px 0px 0px, #c96442 0px 0px 0px 1px;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #b5593b;
  color: var(--color-ivory);
  box-shadow: #c96442 0px 0px 0px 0px, #b5593b 0px 0px 0px 1px;
}

/* Warm sand secondary */
.btn-secondary {
  background-color: var(--color-warm-sand);
  color: var(--color-charcoal);
  box-shadow: var(--color-warm-sand) 0px 0px 0px 0px, var(--color-ring) 0px 0px 0px 1px;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #dddbd1;
  color: var(--color-near-black);
  box-shadow: #dddbd1 0px 0px 0px 0px, var(--color-ring) 0px 0px 0px 1px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--color-ivory);
  border: 1px solid var(--color-border-cream);
  border-radius: 8px;
  padding: 1.75rem;
  box-shadow: rgba(0,0,0,0.05) 0px 4px 24px;
}

.card h3 {
  color: var(--color-near-black);
  margin-bottom: 0.6rem;
}

.card p { color: var(--color-olive-gray); }

/* Highlighted card (legal entity, featured) */
.card-highlight {
  background: var(--color-ivory);
  border: 1px solid var(--color-border-warm);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: rgba(0,0,0,0.05) 0px 4px 24px;
}

.card-highlight h3 {
  color: var(--color-terracotta);
  font-family: var(--font-serif);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

/* ============================================================
   GRID LAYOUTS
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

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

.principles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

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

/* ============================================================
   DARK SECTION (alternating light/dark — key Claude pattern)
   ============================================================ */
.section-dark {
  background-color: var(--color-deep-dark);
  padding: 5rem 1.5rem;
  border-top: 1px solid var(--color-border-dark);
  border-bottom: 1px solid var(--color-border-dark);
}

.section-dark-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-dark h2 {
  color: var(--color-ivory);
  margin-bottom: 0.75rem;
}

.section-dark p {
  color: var(--color-warm-silver);
}

.section-dark .card {
  background: var(--color-dark-surface);
  border-color: var(--color-border-dark);
  box-shadow: none;
}

.section-dark .card h3 { color: var(--color-ivory); }
.section-dark .card p  { color: var(--color-warm-silver); }

.section-dark a {
  color: var(--color-coral);
}

.section-dark a:hover { color: var(--color-warm-silver); }

/* ============================================================
   LEGAL LINKS STRIP
   ============================================================ */
.legal-strip {
  background: var(--color-warm-sand);
  border-top: 1px solid var(--color-border-warm);
  border-bottom: 1px solid var(--color-border-warm);
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.legal-strip-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-charcoal);
}

.legal-strip a {
  color: var(--color-charcoal);
  text-decoration: none;
}

.legal-strip a:hover {
  color: var(--color-terracotta);
  text-decoration: underline;
}

.legal-strip .separator {
  color: var(--color-stone-gray);
  user-select: none;
}

/* ============================================================
   CONTACT CARD
   ============================================================ */
.contact-card {
  background: var(--color-ivory);
  border-radius: 12px;
  border: 1px solid var(--color-border-warm);
  padding: 2.5rem;
  box-shadow: rgba(0,0,0,0.05) 0px 4px 24px;
  max-width: 520px;
}

.contact-card h2 {
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  color: var(--color-near-black);
}

.contact-card dt {
  font-weight: 600;
  color: var(--color-stone-gray);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 1.25rem;
  font-family: var(--font-sans);
}

.contact-card dt:first-of-type { margin-top: 0; }

.contact-card dd {
  color: var(--color-olive-gray);
  margin-left: 0;
  margin-bottom: 0;
  font-family: var(--font-sans);
}

.contact-card dd a { font-weight: 500; }

.email-highlight {
  font-size: 1.05rem;
  font-weight: 600;
}

/* ============================================================
   LEGAL / POLICY CONTENT
   ============================================================ */
.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.legal-meta {
  font-size: 0.875rem;
  color: var(--color-stone-gray);
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border-cream);
  font-family: var(--font-sans);
}

.legal-content h2 {
  font-size: 1.35rem;
  margin-top: 3rem;
  margin-bottom: 0.75rem;
  color: var(--color-near-black);
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border-cream);
}

.legal-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.legal-content h3 {
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--color-charcoal);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-content p { color: var(--color-olive-gray); }

.legal-content ul,
.legal-content ol {
  list-style: disc;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content ol { list-style: decimal; }

.legal-content li {
  color: var(--color-olive-gray);
  margin-bottom: 0.4rem;
  font-family: var(--font-sans);
  line-height: 1.60;
}

.legal-content strong { color: var(--color-near-black); }

.legal-contact-box {
  background: var(--color-ivory);
  border: 1px solid var(--color-border-warm);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-olive-gray);
  line-height: 1.8;
}

/* ============================================================
   CTA SECTION (dark alternating section)
   ============================================================ */
.cta-section {
  background-color: var(--color-deep-dark);
  border-top: 1px solid var(--color-border-dark);
  padding: 4.5rem 1.5rem;
  text-align: center;
}

.cta-section h2 {
  color: var(--color-ivory);
  margin-bottom: 0.75rem;
}

.cta-section p {
  color: var(--color-warm-silver);
  max-width: 440px;
  margin: 0 auto 2rem;
}

.cta-section .btn-primary {
  background-color: var(--color-terracotta);
  color: var(--color-ivory);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-deep-dark);
  border-top: 1px solid var(--color-border-dark);
  color: var(--color-warm-silver);
  padding: 4rem 1.5rem 0;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 640px) {
  .footer-container { grid-template-columns: 2fr 1fr 1.5fr; }
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-ivory);
  margin-bottom: 0.6rem;
  display: block;
}

.site-footer p {
  color: var(--color-warm-silver);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  line-height: 1.60;
}

.site-footer h3 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-stone-gray);
  margin-bottom: 1rem;
}

.site-footer ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer ul a {
  color: var(--color-warm-silver);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}

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

.site-footer .footer-contact a {
  color: var(--color-warm-silver);
  font-size: 0.9rem;
}

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

.footer-bottom {
  max-width: var(--max-width);
  margin: 3rem auto 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--color-dark-surface);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.825rem;
  color: var(--color-stone-gray) !important;
  margin: 0;
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
