/* ==========================================================================
   Phantom Glider Culture Co. — Minimalist Flexbox CSS
   Mobile-first, clean typography, generous spacing, subtle shadows
   Brand: Primary #1F3A2E, Secondary #B65E38, Accent #F2EFE7
   Fonts: Display Georgia, Body Arial
   ========================================================================== */

/* Reset & base normalize */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; line-height: 1.7; background: #FFFFFF; color: #1F3A2E; }
img, svg, video { max-width: 100%; height: auto; display: block; }
img { vertical-align: middle; }
a { color: #1F3A2E; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid #B65E38; outline-offset: 2px; }

/* CSS Custom Properties (with sensible fallbacks inline where used) */
:root {
  --color-primary: #1F3A2E; /* deep eucalyptus */
  --color-secondary: #B65E38; /* warm ochre */
  --color-accent: #F2EFE7; /* soft paper */
  --color-ink: #1F3A2E; /* text */
  --color-muted: #6E756F; /* subdued text */
  --color-border: #E6E3DA; /* light border */

  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.08);

  --space-8: 8px; --space-12: 12px; --space-16: 16px; --space-20: 20px; --space-24: 24px; --space-30: 30px; --space-32: 32px; --space-40: 40px; --space-48: 48px; --space-60: 60px; --space-80: 80px;
}

/* Typography */
h1, h2, h3, h4 { font-family: Georgia, "Times New Roman", serif; color: var(--color-primary); line-height: 1.25; margin: 0 0 var(--space-16) 0; }
h1 { font-size: 32px; letter-spacing: -0.2px; }
h2 { font-size: 24px; letter-spacing: -0.1px; }
h3 { font-size: 18px; }
p { margin: 0 0 var(--space-16) 0; }
small, .muted { color: var(--color-muted); }
strong { font-weight: 700; }

/* Lists */
ul, ol { margin: 0 0 var(--space-16) 0; padding-left: 20px; }
li { margin: 6px 0; }

/* Layout containers — Flex-only architecture */
.container { width: 100%; display: flex; justify-content: center; padding: 0 16px; }
.content-wrapper { width: 100%; max-width: 1140px; display: flex; flex-direction: column; gap: var(--space-20); }

/* Mandatory spacing pattern — will also apply to section variants */
.section { margin-bottom: 60px; padding: 40px 20px; }

/* Section shells with minimalist spacing */
.hero, .features, .about, .services, .testimonials, .contact { margin-bottom: var(--space-60); padding: var(--space-40) var(--space-20); }
.hero { background: var(--color-accent); border-bottom: 1px solid var(--color-border); }

/* Breadcrumb */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--color-muted); }
.breadcrumb a { color: var(--color-muted); }
.breadcrumb span { color: var(--color-muted); }

/* Hero specifics */
.hero h1 { font-size: 32px; }
.hero p { max-width: 70ch; color: var(--color-ink); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; }
.supporting-points { display: flex; flex-direction: column; gap: 8px; padding-left: 20px; }

/* Text content blocks */
.text-section { display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-16); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #FFFFFF; box-shadow: var(--shadow-sm); }
.text-section a { color: var(--color-primary); }
.text-section .tagline { font-style: italic; color: var(--color-muted); }

/* Features, Services grouping — flex layout with wrap, heading spans full width */
.features .content-wrapper, .services .content-wrapper { display: flex; flex-wrap: wrap; gap: var(--space-20); align-items: flex-start; }
.features .content-wrapper > h2, .services .content-wrapper > h2 { flex: 0 0 100%; margin-bottom: var(--space-8); }
.features .text-section, .services .text-section { flex: 1 1 280px; min-width: 260px; }

/* About sections */
.about .content-wrapper { display: flex; flex-direction: column; gap: var(--space-20); }
.about .text-section { border: none; box-shadow: none; padding: 0; background: transparent; }

/* Contact blocks inside sections */
.contact .content-wrapper { display: flex; flex-wrap: wrap; gap: var(--space-24); align-items: flex-start; }
.contact .text-section { flex: 1 1 320px; }
.contact img { width: 18px; height: 18px; display: inline-block; margin-right: 8px; vertical-align: middle; }

/* Testimonials — ensure contrast on light cards */
.testimonials .content-wrapper { display: flex; flex-wrap: wrap; gap: var(--space-20); align-items: stretch; }
.testimonials .content-wrapper > h2 { flex: 0 0 100%; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; background: #FFFFFF; border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); flex: 1 1 320px; color: var(--color-ink); }
.testimonial-card p { margin: 0; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 600; line-height: 1.2; transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .12s ease, box-shadow .2s ease; }
.button.primary { background: var(--color-primary); color: #FFFFFF; box-shadow: var(--shadow-sm); }
.button.primary:hover { background: #183025; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.button.secondary { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.button.secondary:hover { background: var(--color-accent); border-color: #183025; transform: translateY(-1px); }
.button:active { transform: translateY(0); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 1000; background: #FFFFFF; border-bottom: 1px solid var(--color-border); box-shadow: 0 1px 0 rgba(0,0,0,0.02); }
.site-header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-16); padding: var(--space-12) 0; }
.logo { display: inline-flex; align-items: center; }
.logo img { height: 32px; width: auto; }

/* Desktop nav (hidden on mobile) */
.main-nav { display: none; align-items: center; gap: var(--space-16); }
.main-nav a { padding: 8px 6px; border-radius: 6px; color: var(--color-ink); }
.main-nav a:hover { background: var(--color-accent); text-decoration: none; }
.header-ctas { display: none; align-items: center; gap: var(--space-12); }

/* Mobile menu toggle */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--color-border); background: #FFFFFF; box-shadow: var(--shadow-sm); }
.mobile-menu-toggle:hover { background: var(--color-accent); }

/* Mobile menu overlay */
.mobile-menu { position: fixed; inset: 0 0 0 auto; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; background: #FFFFFF; transform: translateX(100%); transition: transform .3s ease; z-index: 1100; box-shadow: -16px 0 40px rgba(0,0,0,0.08); }
.mobile-menu[aria-hidden="false"] { transform: translateX(0%); }
.mobile-menu-close { align-self: flex-end; margin: var(--space-16); width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--color-border); background: #FFFFFF; box-shadow: var(--shadow-sm); }
.mobile-nav { display: flex; flex-direction: column; gap: 10px; padding: 0 var(--space-20) var(--space-40); }
.mobile-nav a { padding: 14px 10px; border-radius: 8px; border: 1px solid var(--color-border); background: #FFFFFF; color: var(--color-ink); }
.mobile-nav a:hover { background: var(--color-accent); text-decoration: none; }

/* Footer */
.site-footer { background: var(--color-accent); border-top: 1px solid var(--color-border); padding-top: var(--space-40); padding-bottom: var(--space-40); }
.site-footer .content-wrapper { display: flex; flex-wrap: wrap; gap: var(--space-24); align-items: flex-start; }
.footer-primary-links, .footer-legal-links, .footer-news { flex: 1 1 240px; display: flex; flex-direction: column; gap: var(--space-12); }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: var(--color-primary); }
.footer-meta { flex: 1 1 100%; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--color-border); padding-top: var(--space-16); color: var(--color-muted); }
.social-links { display: flex; align-items: center; gap: 10px; }

/* Utility layouts (Flex-only) */
/* Mandatory patterns: */
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Generic card look for optional use */
.card, .feature-item { background: #FFFFFF; border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: var(--space-16); }
.card:hover, .text-section:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); transition: box-shadow .25s ease, transform .12s ease; }

/* Links in content */
.content-wrapper a { transition: color .2s ease, background-color .2s ease, border-color .2s ease; }

/* Tables (if ever used) kept minimal and readable */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--color-border); }

/* Cookie Consent — Banner and Modal */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; background: rgba(255,255,255,0.96); border-top: 1px solid var(--color-border); box-shadow: 0 -10px 30px rgba(0,0,0,0.06); z-index: 1200; transform: translateY(100%); transition: transform .35s ease; }
.cookie-banner.is-visible { transform: translateY(0%); }
.cookie-banner .cookie-inner { width: 100%; max-width: 1140px; display: flex; flex-direction: column; gap: var(--space-16); padding: var(--space-16); }
.cookie-banner p { margin: 0; color: var(--color-ink); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .button { padding: 10px 14px; }
.cookie-actions .button.accept { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.cookie-actions .button.reject { background: #FFFFFF; color: var(--color-primary); border: 1px solid var(--color-primary); }
.cookie-actions .button.settings { background: var(--color-accent); color: var(--color-primary); border: 1px solid var(--color-border); }
.cookie-actions .button:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* Cookie Preferences Modal */
.cookie-modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.4); z-index: 1300; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.cookie-modal[aria-hidden="false"] { opacity: 1; pointer-events: auto; }
.cookie-dialog { width: min(92%, 720px); display: flex; flex-direction: column; gap: var(--space-16); background: #FFFFFF; border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: var(--space-24); }
.cookie-dialog h3 { margin: 0; }
.cookie-categories { display: flex; flex-direction: column; gap: var(--space-16); }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: var(--space-16); padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.cookie-category:last-child { border-bottom: none; }
/* Toggle switch */
.switch { position: relative; width: 48px; height: 28px; border-radius: 999px; background: var(--color-border); transition: background .2s ease; display: inline-flex; align-items: center; padding: 2px; }
.switch input { appearance: none; width: 0; height: 0; margin: 0; }
.switch::after { content: ""; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; box-shadow: var(--shadow-sm); transform: translateX(0); transition: transform .2s ease, background .2s ease; }
.switch input:checked + .switch { background: var(--color-secondary); }
.switch input:checked + .switch::after { transform: translateX(20px); }
.cookie-dialog .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Accessibility helpers */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Responsive rules */
@media (min-width: 480px) {
  h1 { font-size: 36px; }
  .hero h1 { font-size: 36px; }
}

@media (min-width: 768px) {
  h1 { font-size: 42px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }

  .text-image-section { flex-direction: row; }
}

@media (min-width: 992px) {
  /* Show desktop nav */
  .main-nav { display: flex; }
  .header-ctas { display: flex; }
  .mobile-menu-toggle { display: none; }
  .mobile-menu { display: none; }

  /* Hero layout breathing room */
  .hero .content-wrapper { flex-direction: column; gap: var(--space-24); }

  /* Footer layout */
  .site-footer .content-wrapper { gap: var(--space-32); }
}

/* Additional subtle details */
hr { border: none; border-top: 1px solid var(--color-border); margin: var(--space-24) 0; }
blockquote { margin: 0; padding-left: 16px; border-left: 3px solid var(--color-border); color: var(--color-ink); font-style: italic; }

/* Ensure adequate spacing between stacked elements globally */
main > section + section { margin-top: 0; }

/* Prevent overlap; encourage wrapping everywhere relevant */
.content-wrapper, .card-container, .content-grid, .features .content-wrapper, .services .content-wrapper, .testimonials .content-wrapper, .contact .content-wrapper { gap: var(--space-20); flex-wrap: wrap; }

/* Link states for clarity */
a:focus-visible { outline: 2px solid var(--color-secondary); outline-offset: 2px; border-radius: 6px; }

/* Print adjustments (simple) */
@media print {
  .site-header, .site-footer, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
}
