/* =============================
   Celestial Arc Tech Showcases
   Vintage Retro Theme — Flexbox Only
   style.css
   ============================= */

/* -----------------------------
   0) CSS Reset & Normalize
------------------------------ */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style-position: outside; }
img, picture { max-width: 100%; display: block; height: auto; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; padding: 0; cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 2px dashed #0B1F3A; outline-offset: 2px; }

/* -----------------------------
   1) Theme Tokens — Vintage Retro + Brand
------------------------------ */
:root {
  /* Brand */
  --brand-primary: #0B1F3A; /* deep navy */
  --brand-secondary: #2BC0E4; /* aqua accent */
  --brand-accent: #EAF2FF; /* pale sky */

  /* Vintage paper & inks */
  --paper: #F7EFE2; /* warm paper */
  --paper-2: #F3E7D6; /* slightly deeper for bands */
  --ink: #2A1E18; /* espresso text */
  --ink-soft: #4B3B32; /* softer subtext */
  --rust: #B25B36; /* retro rust */
  --mustard: #D3A448; /* mustard */
  --sage: #6D8B74; /* sage green */
  --rose: #D9A2A0; /* dusty rose */
  --navy: var(--brand-primary);
  --aqua: var(--brand-secondary);

  /* Surfaces */
  --surface: #FFFDF8; /* lightest */
  --surface-contrast: #FFFFFF; /* pure white for cards */

  /* Lines & borders */
  --line: #CDBFAF;
  --line-dark: #9E8E7D;

  /* Effects */
  --shadow-soft: 0 2px 0 rgba(11,31,58,0.04), 0 6px 12px rgba(11,31,58,0.06);
  --shadow-pressed: inset 0 2px 0 rgba(255,255,255,0.5), inset 0 -2px 0 rgba(11,31,58,0.08);
  --ring: 0 0 0 3px rgba(43,192,228,0.25);

  /* Spacing scale */
  --space-4: 4px; --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;

  /* Radius */
  --radius-s: 6px; --radius-m: 10px; --radius-l: 16px; --radius-pill: 999px;

  /* Typography */
  --ff-display: "Trebuchet MS", Verdana, Arial, sans-serif;
  --ff-body: Verdana, "Trebuchet MS", Arial, sans-serif;
  --fs-14: 14px; --fs-16: 16px; --fs-18: 18px; --fs-20: 20px; --fs-24: 24px; --fs-28: 28px; --fs-32: 32px; --fs-40: 40px; --fs-48: 48px;
}

/* -----------------------------
   2) Base Layout & Body
------------------------------ */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: var(--fs-16);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

main, header, footer, section, nav, .container, .content-wrapper {
  display: flex; /* Flexbox only policy */
}

/* Containers */
.container {
  width: 100%;
  justify-content: center;
  padding-left: var(--space-20);
  padding-right: var(--space-20);
}
.content-wrapper {
  width: 100%;
  max-width: 1100px;
  flex-direction: column;
  gap: var(--space-24);
}

/* Generic Section spacing (also separate class .section per requirement) */
section, .section {
  width: 100%;
  margin-bottom: 60px; /* mandatory */
  padding: 40px 20px;  /* mandatory */
  background: var(--surface);
  border: 1px solid var(--line);
  border-left-width: 6px;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft);
}

/* Vintage banded section header accent */
section .content-wrapper::before {
  content: "";
  display: block;
  height: 8px;
  background: linear-gradient(90deg, var(--mustard) 0 25%, var(--rose) 25% 50%, var(--sage) 50% 75%, var(--aqua) 75% 100%);
  border-radius: var(--radius-s);
}

/* -----------------------------
   3) Typography
------------------------------ */
h1, h2, h3, h4 { font-family: var(--ff-display); color: var(--navy); letter-spacing: 0.3px; }
h1 { font-size: var(--fs-32); line-height: 1.15; }
h2 { font-size: var(--fs-24); line-height: 1.25; }
h3 { font-size: var(--fs-20); line-height: 1.3; }
h4 { font-size: var(--fs-18); line-height: 1.35; }

p { color: var(--ink); }
.small-print p { font-size: var(--fs-14); color: var(--ink-soft); }

/* Retro headline embellishment */
h1, h2 { text-transform: none; font-weight: 700; }
h1::after, h2::after {
  content: "";
  display: block; height: 3px; width: 56px; margin-top: 10px;
  background: var(--mustard);
}

/* Lists */
ul { padding-left: var(--space-24); display: flex; flex-direction: column; gap: var(--space-8); }
ol { padding-left: var(--space-24); display: flex; flex-direction: column; gap: var(--space-8); }
li { margin-left: var(--space-8); }
ul li { list-style-type: square; }
ol li { list-style-type: decimal; }

/* Links */
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--rust); text-decoration: underline; }
a.btn.link { color: var(--navy); border-bottom: 2px dotted var(--navy); padding-bottom: 2px; }
a.btn.link:hover { color: var(--rust); border-color: var(--rust); }

/* Breadcrumbs */
.breadcrumbs { font-size: var(--fs-14); color: var(--ink-soft); gap: var(--space-8); align-items: center; }
.breadcrumbs a { color: var(--navy); }
.breadcrumbs span { opacity: 0.7; }

/* Notes */
.note { font-size: var(--fs-14); color: var(--ink-soft); }

/* -----------------------------
   4) Header & Navigation
------------------------------ */
header {
  width: 100%;
  position: sticky; top: 0; z-index: 1000;
  background: var(--paper-2);
  border-bottom: 4px double var(--line-dark);
}
header .container { align-items: center; }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-16); padding-top: var(--space-12); padding-bottom: var(--space-12); }
.logo { display: flex; align-items: center; }
.logo img { height: 40px; width: auto; }

.main-nav { display: none; gap: var(--space-16); align-items: center; }
.main-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.main-nav a:hover { background: var(--surface); border-color: var(--line); transform: translateY(-1px); }

.header-ctas { display: none; gap: var(--space-12); align-items: center; }

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--radius-s);
  border: 1px solid var(--line-dark);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.mobile-menu-toggle:hover { background: var(--brand-accent); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(11,31,58,0.75);
  transform: translateX(100%);
  transition: transform .35s ease;
}
.mobile-menu[aria-hidden="false"] { transform: translateX(0); }
.mobile-menu .mobile-nav {
  position: absolute; /* decorative container only; not a content card */
  right: 0; top: 0; bottom: 0; width: min(88%, 360px);
  background: var(--paper);
  border-left: 6px solid var(--mustard);
  padding: var(--space-32) var(--space-20);
  display: flex; flex-direction: column; gap: var(--space-12);
  box-shadow: -6px 0 16px rgba(0,0,0,0.15);
}
.mobile-menu-close {
  position: absolute; right: 12px; top: 12px; z-index: 1;
  width: 40px; height: 40px; border-radius: var(--radius-s);
  border: 1px solid var(--line-dark); background: var(--surface);
}
.mobile-nav a {
  padding: 12px 10px; border-radius: var(--radius-s);
  border: 1px solid transparent; font-size: var(--fs-18);
}
.mobile-nav a:hover { border-color: var(--line); background: var(--surface-contrast); }

/* -----------------------------
   5) Hero
------------------------------ */
.hero { background: var(--surface-contrast); position: relative; }
.hero .content-wrapper { padding-top: var(--space-20); padding-bottom: var(--space-20); }
.hero h1 { font-size: var(--fs-32); }
.hero p { font-size: var(--fs-16); color: var(--ink); }

/* -----------------------------
   6) Buttons & CTAs
------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius-m); border: 2px solid var(--navy); background: var(--surface); color: var(--navy); font-weight: 700; box-shadow: var(--shadow-pressed); transition: transform .15s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); box-shadow: inset 0 1px 0 rgba(0,0,0,0.06); }

.btn.primary { background: var(--navy); color: #FFFFFF; border-color: var(--navy); }
.btn.primary:hover { background: #0e2748; color: white;}

.btn.secondary { background: var(--mustard); color: #2B1B17; border-color: #A98538; }
.btn.secondary:hover { background: #C79B42; }

.btn.link { border: none; background: transparent; padding: 0; font-weight: 700; }

/* CTA row */
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; }

/* -----------------------------
   7) Cards, Grids & Required Flex Patterns
------------------------------ */
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--surface-contrast); border: 1px solid var(--line); border-radius: var(--radius-l); padding: var(--space-20); box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: var(--space-12); }

.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; background: #FFFDFC; color: #1A1A1A; border: 1px dashed var(--line-dark); border-radius: var(--radius-m); box-shadow: var(--shadow-soft); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Testimonial text hierarchy for readability */
.testimonial-card p { margin: 0; }
.testimonial-card p strong { color: var(--navy); }

/* Text sections */
.text-section { display: flex; flex-direction: column; gap: var(--space-16); color: var(--ink); }

/* -----------------------------
   8) Images & Icons
------------------------------ */
img { border-radius: 0; }
.text-section img { width: 18px; height: 18px; display: inline-block; vertical-align: middle; margin-right: 8px; }

/* -----------------------------
   9) Footer
------------------------------ */
footer section { background: var(--paper-2); border: 1px solid var(--line); border-left-width: 6px; }
footer .content-wrapper { gap: var(--space-20); }
.footer-nav, .footer-legal { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.footer-nav a, .footer-legal a { padding: 6px 8px; border-radius: var(--radius-s); border: 1px solid transparent; }
.footer-nav a:hover, .footer-legal a:hover { border-color: var(--line); background: var(--surface-contrast); }
.social-links { display: flex; gap: var(--space-12); align-items: center; }
.social-links a { display: flex; width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); }
.social-links a:hover { background: var(--brand-accent); }
.small-print { display: flex; }

/* -----------------------------
   10) Cookie Consent Banner & Modal
------------------------------ */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3000;
  background: var(--paper);
  border-top: 4px double var(--line-dark);
  box-shadow: 0 -8px 16px rgba(0,0,0,0.08);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-16) var(--space-20);
  transform: translateY(110%);
  transition: transform .35s ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .banner-inner { display: flex; flex-direction: column; gap: var(--space-12); width: 100%; max-width: 1100px; }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.cookie-banner .btn { padding: 10px 14px; }
.cookie-banner .btn.accept { background: var(--navy); color: #fff; border-color: var(--navy); }
.cookie-banner .btn.reject { background: #fff; color: var(--ink); border-color: var(--line-dark); }
.cookie-banner .btn.settings { background: var(--mustard); color: #2B1B17; border-color: #A98538; }

/* Cookie Preferences Modal */
.cookie-modal-backdrop { position: fixed; inset: 0; background: rgba(11,31,58,0.6); z-index: 3500; display: none; }
.cookie-modal-backdrop.show { display: flex; align-items: center; justify-content: center; }
.cookie-modal { width: min(92%, 680px); background: var(--surface-contrast); border: 1px solid var(--line); border-left: 8px solid var(--mustard); border-radius: var(--radius-l); box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: var(--space-16); padding: var(--space-20); }
.cookie-modal .modal-header { display: flex; justify-content: space-between; align-items: center; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: var(--space-12); }
.cookie-modal .category { display: flex; justify-content: space-between; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.cookie-modal .category.small { opacity: 0.7; }
.cookie-modal .modal-actions { display: flex; gap: var(--space-12); justify-content: flex-end; }

/* Toggle switch */
.toggle { position: relative; width: 46px; height: 26px; border-radius: 26px; background: #E6DED2; border: 1px solid var(--line-dark); box-shadow: var(--shadow-pressed); }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s ease; border: 1px solid var(--line); }
.toggle.on { background: var(--aqua); }
.toggle.on::after { transform: translateX(20px); }

/* -----------------------------
   11) Utilities
------------------------------ */
.hidden { display: none !important; }
.max-w { max-width: 1100px; }
.center { justify-content: center; }
.v-center { align-items: center; }
.stack-8 { display: flex; flex-direction: column; gap: var(--space-8); }
.stack-16 { display: flex; flex-direction: column; gap: var(--space-16); }

/* -----------------------------
   12) Responsive — Mobile First
------------------------------ */
/* Base is mobile; progressively enhance */

@media (min-width: 480px) {
  h1 { font-size: var(--fs-40); }
  h2 { font-size: var(--fs-28); }
}

@media (min-width: 768px) {
  /* Header: show nav & CTAs on tablet+ */
  .main-nav { display: flex; }
  .header-ctas { display: flex; }
  .mobile-menu-toggle { display: none; }

  /* Text-image sections align row */
  .text-image-section { flex-direction: row; }

  /* Hero */
  .hero h1 { font-size: var(--fs-48); }
  .hero p { font-size: var(--fs-18); }
}

@media (min-width: 1024px) {
  .content-grid { justify-content: space-between; }
  .content-grid > * { flex: 1 1 calc(50% - 10px); }
}

/* -----------------------------
   13) Page-specific subtle touches
------------------------------ */
/* Hero border & vintage corners */
.hero { border-left-color: var(--mustard); }
.hero .content-wrapper::before { background: linear-gradient(90deg, var(--mustard) 0 33%, var(--rose) 33% 66%, var(--aqua) 66% 100%); }

/* Testimonials must be readable on light surface */
section .testimonial-card { background: #FFFFFF; color: #1C1C1C; }

/* Breadcrumbs spacing in hero */
.hero .breadcrumbs { margin-top: var(--space-8); }

/* Contact links inline aesthetics */
.text-section a { color: var(--navy); }
.text-section a:hover { color: var(--rust); }

/* -----------------------------
   14) Tables (if any are added later)
------------------------------ */
table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
th { background: var(--paper-2); }

/* -----------------------------
   15) Accessibility helpers
------------------------------ */
.skip-link { position: absolute; left: -9999px; top: -9999px; }
.skip-link:focus { position: static; display: inline-flex; padding: 8px 12px; background: var(--brand-accent); border: 1px solid var(--navy); }

/* -----------------------------
   16) Edge Cases / Extra Patterns
------------------------------ */
/* Ensure minimum spacing between all content clusters */
.content-wrapper > * + * { margin-top: 0; }
section + section { margin-top: 0; }

/* Ensure icons inside list items align */
.text-section li { display: flex; align-items: center; gap: 8px; }

/* Prevent overlap of sticky header */
main { flex-direction: column; gap: var(--space-20); padding-top: var(--space-12); }

/* -----------------------------
   17) Print Styles (lightweight)
------------------------------ */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal-backdrop { display: none !important; }
  section, .section { border: 1px solid #000 !important; }
}
