/*
 * cms-public-page.css — base stylesheet for React-rendered public CMS pages.
 *
 * VERBATIM copy of VisitorEngine.CMS.Renderer.base_css/0. The legacy
 * server-rendered path inlines that Elixir string; the React CSR shell
 * (cms_public_page.html.heex) links this file instead. Both must stay
 * byte-identical while the feature flag can still switch between them —
 * a parity test asserts this (test/visitor_engine/cms/cms_public_css_parity_test.exs).
 *
 * Do not hand-edit one side only.
 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6; color: #333; background: #ffffff;
}
.landing-container { min-height: 100vh; display: flex; flex-direction: column; container-type: inline-size; container-name: cms-canvas; }
.header {
  color: white; position: relative; overflow: hidden;
  min-height: 60vh; display: flex; align-items: center;
}
.header-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1;
}
.header-content {
  position: relative; z-index: 2; max-width: 1200px; margin: 0 auto;
  padding: 0 3rem 6rem; display: flex; justify-content: space-between;
  align-items: flex-start; width: 100%;
}
.logo { margin-bottom: 3rem; display: flex; flex-direction: column; align-items: flex-start; flex: 1; }
.logo-text {
  font-size: 4.5rem; font-weight: 700; color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3); display: block;
}
.tagline { font-size: 1rem; opacity: 0.9; color: #fff; letter-spacing: 0.1em; margin-top: 0.5rem; }
.cta-button {
  display: inline-block; background: #fff; color: #667eea;
  padding: 0.6rem 1.4rem; text-decoration: none; border-radius: 50px;
  font-weight: 600; font-size: 0.85rem; transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2); position: absolute; bottom: 2rem; left: 3rem;
}
.cta-button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); color: #5a67d8; }
.main-content { flex: 1; max-width: 1200px; margin: 0 auto; width: 100%; }
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.feature-card {
  background: #f8f9fa; padding: 2rem; border-radius: 12px;
  border: 1px solid #e9ecef; transition: all 0.3s ease; display: block;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.feature-title { font-size: 1.3rem; font-weight: 600; margin-bottom: 0.75rem; color: #333; }
.feature-description { color: #666; line-height: 1.6; }
.cms-rich-text p { margin: 0 0 0.75em; }
.cms-rich-text p:last-child { margin-bottom: 0; }
.cms-rich-text h1,.cms-rich-text h2,.cms-rich-text h3,.cms-rich-text h4 { color: inherit; margin: 0 0 0.5em; }
.cms-rich-text ul,.cms-rich-text ol { margin: 0 0 0.75em; padding-left: 1.5em; }
.cms-rich-text li { margin-bottom: 4px; }
.cms-rich-text a { color: #2563eb; text-decoration: underline; }
.cms-rich-text strong { font-weight: 700; }
/* Desktop/mobile document switching — pages that have a dedicated mobile
   document render both; the container width decides which is visible. */
.cms-doc-mobile { display: none; }
@container cms-canvas (max-width: 768px) {
  .cms-doc-desktop { display: none; }
  .cms-doc-mobile { display: block; }
}
@container cms-canvas (max-width: 768px) {
  .logo-text { font-size: 2.8rem; }
  .header-content { padding: 0 1.5rem 4rem; flex-direction: column; }
  .features-grid { grid-template-columns: 1fr; }
  .cta-button { left: 1.5rem; }

  /* ── CMS Block Responsiveness ───────────────────────────── */

  /* 2-col and 3-col grids collapse to single column on mobile */
  .cms-grid-2col { grid-template-columns: 1fr !important; }
  .cms-grid-3col { grid-template-columns: 1fr !important; }
}
