/* =========================================================
   Twist Moon Flux - Nature Organic Theme (Flexbox Only)
   Complete CSS for all pages
   ========================================================= */

/* ----------------------------
   CSS RESET & NORMALIZE
   ---------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { line-height: 1.4; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
ul, ol { margin: 0 0 16px; padding-left: 20px; }
p { margin: 0 0 16px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #18B7A0; outline-offset: 2px; }

/* ----------------------------
   THEME TOKENS (with fallbacks)
   ---------------------------- */
:root {
  --brand-primary: #0F2E4F;
  --brand-secondary: #18B7A0; /* mint/green accent */
  --brand-accent: #F5F9FF;

  /* Nature Organic supporting palette */
  --earth-cream: #F4EFE6; /* warm, natural base */
  --earth-sand: #E9E2D0;
  --earth-clay: #C8B8A6;
  --forest-deep: #1B3A2F; /* deep natural green */
  --moss: #2F6B59; /* darker green for text contrast */
  --leaf: #9FD3C7; /* soft green accent */
  --bark: #5A4633; /* earthy brown accent */

  --text-main: #1E2A2A;
  --text-muted: #506566;
  --surface: #FFFFFF;
  --shadow: rgba(16, 35, 26, 0.12);
  --shadow-strong: rgba(16, 35, 26, 0.18);

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 22px; /* organic rounded corners */
  --radius-xl: 30px; /* pill/organic */

  --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;

  --transition-fast: 150ms ease;
  --transition: 220ms ease;
}

/* ----------------------------
   TYPOGRAPHY
   ---------------------------- */
body {
  font-family: Verdana, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text-main);
  background: var(--earth-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { font-family: "Trebuchet MS", Verdana, Arial, sans-serif; color: var(--brand-primary); margin: 0 0 12px; line-height: 1.2; }
h1 { font-size: 32px; }
h2 { font-size: 24px; margin-top: 8px; }
h3 { font-size: 18px; }
.subheadline { color: var(--text-muted); font-size: 16px; }
strong { color: var(--moss); }
small { font-size: 12px; color: var(--text-muted); }

/* ----------------------------
   LAYOUT HELPERS (Flex-only)
   ---------------------------- */
.container {
  display: flex; /* Flexbox only */
  flex-direction: column; /* mobile-first */
  gap: var(--space-20);
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-20);
  position: relative;
  z-index: 1;
}
.content-wrapper {
  display: flex; /* Flexbox */
  flex-direction: column;
  gap: var(--space-20);
}

/* Mandatory spacing patterns */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; display: flex; flex-direction: column; }
.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 styling */
article, .testimonial-card, .card {
  background: var(--surface);
  border-radius: var(--radius-l);
  box-shadow: 0 8px 24px var(--shadow);
  padding: var(--space-20);
}

/* ----------------------------
   HEADER & NAVIGATION
   ---------------------------- */
header {
  position: sticky; top: 0; z-index: 50; background: var(--surface);
  box-shadow: 0 6px 18px var(--shadow);
  border-bottom-left-radius: 22px; border-bottom-right-radius: 22px;
}
header .container { flex-direction: row; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
.logo img { height: 36px; width: auto; }

.main-nav, .cta-nav {
  display: none; /* mobile-first hidden */
}
.main-nav a, .cta-nav a {
  padding: 10px 14px; border-radius: 999px; color: var(--brand-primary);
  transition: background-color var(--transition), color var(--transition), transform var(--transition-fast);
}
.main-nav a[aria-current="page"], .main-nav a:hover { background: var(--leaf); color: var(--forest-deep); }

/* Primary CTA style in header */
.cta-nav a:first-child { background: var(--brand-accent); color: var(--brand-primary); border: 1px solid #D9E9F6; }
.cta-nav a:last-child { background: var(--brand-secondary); color: #0C2A25; font-weight: 700; border: 1px solid #0FA78F; }
.cta-nav a:hover { transform: translateY(-2px); }

/* Mobile burger */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 1px solid var(--leaf); border-radius: 10px; background: var(--surface);
  color: var(--moss); cursor: pointer; transition: transform var(--transition), background var(--transition);
}
.mobile-menu-toggle:hover { background: var(--leaf); transform: translateY(-2px); }

/* Mobile slide-in menu */
.mobile-menu {
  position: fixed; inset: 0; display: flex; flex-direction: column; gap: var(--space-16);
  background: rgba(15,46,79,0.25); backdrop-filter: blur(2px);
  transform: translateX(100%);
  transition: transform 320ms ease; z-index: 100;
}
.mobile-menu.active, .mobile-menu.open { transform: translateX(0); }
.mobile-menu .mobile-nav {
  margin-left: auto; height: 100%; width: 86%; max-width: 360px; background: var(--surface);
  display: flex; flex-direction: column; gap: 6px; padding: 70px 20px 20px; box-shadow: -6px 0 18px var(--shadow-strong);
  border-top-left-radius: 22px; border-bottom-left-radius: 22px;
}
.mobile-menu-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid var(--leaf); background: var(--surface); color: var(--moss);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.mobile-nav a {
  padding: 12px 14px; border-radius: 12px; color: var(--brand-primary);
  transition: background var(--transition), transform var(--transition-fast);
}
.mobile-nav a:hover { background: var(--earth-sand); transform: translateX(3px); }
.mobile-nav a[aria-current="page"] { background: var(--leaf); color: var(--forest-deep); font-weight: 700; }

/* Show desktop nav on larger screens */
@media (min-width: 992px) {
  .main-nav, .cta-nav { display: flex; align-items: center; gap: var(--space-8); }
  .mobile-menu-toggle { display: none; }
}

/* ----------------------------
   HERO SECTIONS (Organic look)
   ---------------------------- */
.hero {
  position: relative; overflow: hidden; padding: var(--space-32) 0;
}
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  width: 420px; height: 420px; border-radius: 50% 45% 60% 40% / 45% 50% 35% 55%;
  background: radial-gradient(ellipse at 30% 30%, rgba(159,211,199,0.35), rgba(159,211,199,0) 60%);
}
.hero::before { top: -120px; left: -140px; }
.hero::after { bottom: -160px; right: -120px; background: radial-gradient(ellipse at 70% 70%, rgba(24,183,160,0.18), rgba(24,183,160,0) 60%); }
.hero .container { position: relative; z-index: 1; }
.hero .content-wrapper { gap: var(--space-16); }
.hero h1 { font-size: 28px; }
.hero .subheadline { font-size: 16px; max-width: 60ch; }

/* Action buttons */
.actions { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; }
.actions a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 999px; border: 1px solid transparent;
  transition: transform var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
}
.actions a:first-child { background: var(--brand-secondary); color: #0C2A25; font-weight: 700; box-shadow: 0 6px 16px rgba(24,183,160,0.35); }
.actions a:last-child { background: var(--surface); color: var(--brand-primary); border-color: var(--leaf); }
.actions a:hover { transform: translateY(-2px); box-shadow: 0 10px 24px var(--shadow); }

/* Lists & badges in hero */
.trust-badges ul, .value-bullets, .platform-badges ul {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding-left: 0; list-style: none; margin: 0;
}
.trust-badges li, .platform-badges li {
  display: flex; align-items: center; gap: 8px; background: var(--surface);
  border: 1px solid var(--leaf); border-radius: 999px; padding: 8px 12px; color: var(--moss);
}
.value-bullets li { position: relative; padding-left: 22px; color: var(--text-main); }
.value-bullets li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-secondary); position: absolute; left: 0; top: 9px; }

/* ----------------------------
   FLEX GRIDS (No CSS Grid)
   ---------------------------- */
/* 2-4 column responsive layouts using flex-basis */
.feature-grid, .module-grid, .solution-cards-grid, .industry-cards, .deployment-cards,
.category-cards, .pricing-table, .quote-cards {
  display: flex; flex-wrap: wrap; gap: var(--space-20);
}
/* default: single column on mobile */
.feature-grid article, .module-grid article, .solution-cards-grid article, .industry-cards article,
.deployment-cards article, .category-cards article, .pricing-table article, .quote-cards > * {
  flex: 1 1 100%;
}
@media (min-width: 600px) {
  .feature-grid article, .module-grid article, .solution-cards-grid article, .industry-cards article,
  .deployment-cards article, .category-cards article {
    flex: 1 1 calc(50% - 10px);
  }
  .pricing-table article { flex: 1 1 calc(50% - 10px); }
}
@media (min-width: 992px) {
  .feature-grid article, .module-grid article, .solution-cards-grid article, .industry-cards article,
  .deployment-cards article, .category-cards article {
    flex: 1 1 calc(25% - 15px);
  }
  .pricing-table article { flex: 1 1 calc(33.333% - 14px); }
  .quote-cards > * { flex: 1 1 calc(50% - 10px); }
}

/* Card look across grids */
.feature-grid article h3, .module-grid article h3, .solution-cards-grid article h3, .industry-cards article h3,
.deployment-cards article h3, .category-cards article h3, .pricing-table article h3 { margin-bottom: 8px; }
.feature-grid article p, .module-grid article p, .solution-cards-grid article p, .industry-cards article p,
.deployment-cards article p, .category-cards article p, .pricing-table article p { color: var(--text-main); }

/* Pricing / plan cards emphasis */
.pricing-table article { border: 1px solid var(--leaf); border-radius: var(--radius-xl); background: #FFFFFF; }
.pricing-table article:hover { box-shadow: 0 12px 30px var(--shadow-strong); transform: translateY(-3px); }
.pricing-table ul { padding-left: 18px; }

/* ----------------------------
   METRICS, BARS & ROWS
   ---------------------------- */
.metrics-bar ul, .kpi-before-after ul, .impact-metrics ul {
  display: flex; flex-wrap: wrap; gap: 14px; padding-left: 0; margin: 0;
}
.metrics-bar li, .kpi-before-after li, .impact-metrics li {
  list-style: none; background: var(--brand-accent); border: 1px solid #D6E6F6; color: var(--brand-primary);
  padding: 10px 14px; border-radius: 999px; box-shadow: 0 6px 18px var(--shadow);
}
.security-row, .support-channels, .uptime-badge, .rating-badges {
  display: flex; align-items: center; gap: 10px; color: var(--moss);
}

/* ----------------------------
   TIMELINES, TABS & LISTS
   ---------------------------- */
.step-timeline { display: flex; flex-direction: column; gap: 12px; padding-left: 0; }
.step-timeline li { list-style: none; background: var(--surface); border: 1px solid var(--earth-clay); border-radius: var(--radius-m); padding: 12px 14px; }
.capability-tabs, .featured-items, .tags-cloud, .integration-list, .sla-tiers, .security-features, .compliance-icons {
  display: flex; flex-direction: column; gap: 10px;
}
.capability-tabs ul, .featured-items ul, .security-features ul, .sla-tiers ul, .compliance-icons ul {
  display: flex; flex-wrap: wrap; gap: 10px; padding-left: 0; margin: 0;
}
.capability-tabs li, .featured-items li, .security-features li, .sla-tiers li, .compliance-icons li {
  list-style: none; background: var(--earth-sand); color: var(--bark); border-radius: 999px; padding: 8px 12px;
}

/* ----------------------------
   TESTIMONIALS (high contrast)
   ---------------------------- */
.testimonial-card {
  background: #FAF7F2; /* light warm base */
  border: 1px solid #E3D9C8; color: #14302A; /* dark text for readability */
  border-radius: var(--radius-l);
}
.testimonial-card blockquote { margin: 0; font-style: italic; color: #14302A; }
.testimonial-card p { margin: 0; color: #1A2F2B; }

/* ----------------------------
   ACCORDION LIST (static styling)
   ---------------------------- */
.accordion-list { display: flex; flex-direction: column; gap: var(--space-12); }
.accordion-list article { border: 1px solid var(--earth-clay); border-radius: var(--radius-m); padding: var(--space-16); background: var(--surface); box-shadow: 0 6px 18px var(--shadow); }
.accordion-list article h3 { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }

/* ----------------------------
   CONTACT DETAILS
   ---------------------------- */
.contact-details { display: flex; flex-wrap: wrap; gap: var(--space-16); }
.contact-details .text-section { flex: 1 1 calc(50% - 10px); background: var(--surface); border: 1px solid var(--leaf); border-radius: var(--radius-m); padding: var(--space-16); box-shadow: 0 6px 16px var(--shadow); }
@media (min-width: 992px) { .contact-details .text-section { flex: 1 1 calc(25% - 15px); } }

/* ----------------------------
   FOOTER
   ---------------------------- */
footer { background: var(--brand-primary); color: #E7F3F0; padding: var(--space-32) 0; margin-top: var(--space-48); }
footer .container { gap: var(--space-24); }
footer .content-wrapper { display: flex; flex-wrap: wrap; gap: var(--space-24); }
.brand-summary { display: flex; flex-direction: column; gap: var(--space-12); flex: 1 1 220px; }
.brand-summary img { width: 42px; height: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-20); flex: 2 1 420px; }
.footer-links > div { display: flex; flex-direction: column; gap: 6px; background: rgba(255,255,255,0.04); padding: 14px; border-radius: 12px; }
footer a { color: #D4F2EB; }
footer a:hover { color: #9FD3C7; }

/* Optional newsletter block */
.newsletter-signup { display: flex; flex-direction: column; gap: 8px; background: rgba(255,255,255,0.06); padding: 16px; border-radius: 14px; flex: 1 1 240px; }

/* ----------------------------
   PAGE-SPECIFIC UTILS
   ---------------------------- */
.search-filter { display: flex; align-items: center; padding: 12px 14px; background: var(--brand-accent); border: 1px solid #CFE4F9; border-radius: var(--radius-m); }
.api-teaser a { color: var(--brand-secondary); text-decoration: underline; }
.data-residency-note { color: var(--text-muted); font-style: italic; }
.notes { color: var(--text-muted); }
.success-icon img { width: 54px; }
.booking-notes ul { display: flex; flex-direction: column; gap: 6px; }
.help-center-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ----------------------------
   SECTION WRAPPING & SPACING
   ---------------------------- */
main section { padding: var(--space-32) 0; }
main section .container { gap: var(--space-20); }

/* Ensure at least 20px spacing between content groups */
.container > * + * { margin-top: 0; }
.content-wrapper > * + * { margin-top: 0; }

/* ----------------------------
   LINKS & HOVERS
   ---------------------------- */
a { color: var(--moss); }
a:hover { color: var(--brand-secondary); }

/* ----------------------------
   RESPONSIVE TYPE & ALIGNMENTS
   ---------------------------- */
@media (min-width: 600px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
}
@media (min-width: 992px) {
  h1 { font-size: 44px; }
  .text-image-section { flex-direction: row; }
}
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

/* ----------------------------
   ACCESSIBILITY & MICRO-UX
   ---------------------------- */
button, a, [role="button"] { transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform var(--transition-fast), box-shadow var(--transition); }
button:active, a:active { transform: translateY(0); }

/* ----------------------------
   COOKIE CONSENT BANNER & MODAL
   ---------------------------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
  background: #FFFCF7; color: #2A2A24; border-top: 1px solid #E5DCCB;
  padding: 14px 16px; box-shadow: 0 -10px 24px rgba(0,0,0,0.08);
}
.cookie-banner .cookie-inner { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 1100px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn { padding: 10px 14px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; }
.cookie-actions .btn-accept { background: var(--brand-secondary); color: #0C2A25; font-weight: 700; }
.cookie-actions .btn-reject { background: var(--surface); border-color: var(--leaf); color: var(--brand-primary); }
.cookie-actions .btn-settings { background: var(--brand-accent); border-color: #CFE4F9; color: var(--brand-primary); }
.cookie-actions .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px var(--shadow); }

.cookie-backdrop {
  position: fixed; inset: 0; background: rgba(15,46,79,0.35); display: none; z-index: 140;
}
.cookie-backdrop.active { display: flex; }
.cookie-modal {
  margin: auto; width: 92%; max-width: 720px; background: var(--surface); border-radius: 22px; box-shadow: 0 20px 48px rgba(0,0,0,0.25);
  display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid var(--leaf);
}
.cookie-modal .header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .body { display: flex; flex-direction: column; gap: 10px; }
.cookie-modal .category { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--earth-clay); border-radius: 14px; padding: 10px 12px; }
.toggle { width: 46px; height: 26px; border-radius: 999px; background: #D3DCD7; position: relative; display: inline-flex; align-items: center; padding: 3px; }
.toggle::after { content: ""; width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transform: translateX(0); transition: transform var(--transition); }
.toggle.on { background: var(--brand-secondary); }
.toggle.on::after { transform: translateX(20px); }
.cookie-modal .footer { display: flex; justify-content: flex-end; gap: 10px; }

/* ----------------------------
   ACCESSIBLE REVIEW/RATING BADGES
   ---------------------------- */
.rating-badges { background: var(--brand-accent); border: 1px solid #D6E6F6; border-radius: var(--radius-m); padding: 10px 12px; color: var(--brand-primary); }

/* ----------------------------
   ORGANIC EDGES & DECORATIVE BORDERS
   ---------------------------- */
article, .testimonial-card, .card, .contact-details .text-section, .accordion-list article, .newsletter-signup {
  border-top-left-radius: 28px; border-bottom-right-radius: 28px; /* subtle organic angle */
}

/* ----------------------------
   PRINT & MISC
   ---------------------------- */
@media print { header, footer, .mobile-menu, .cookie-banner, .cookie-backdrop { display: none !important; } }

/* ----------------------------
   PAGE HEADLINE TUNING
   ---------------------------- */
.hero h1 { letter-spacing: 0.2px; }

/* ----------------------------
   SECTIONS THAT NEED CLEAR CONTRAST
   ---------------------------- */
/* Testimonials/reviews: ensure dark text on light backgrounds */
section .testimonial-card { background: #FAF7F2; color: #10241F; }
section .testimonial-card blockquote { color: #10241F; }

/* ----------------------------
   ORGANIC BUTTON VARIANTS FOR LINKS OUTSIDE .actions
   ---------------------------- */
.content-wrapper > p > a, .content-wrapper > div > p > a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--leaf); color: var(--moss);
}
.content-wrapper > p > a:hover { background: var(--leaf); color: var(--forest-deep); }

/* ----------------------------
   UTIL ROWS
   ---------------------------- */
.security-row img, .support-channels img, .uptime-badge img, .rating-badges img { width: 18px; height: 18px; }

/* ----------------------------
   HERO VARIANTS ACROSS PAGES
   ---------------------------- */
/* Slightly different background hue per page for organic variety */
body .hero { background: linear-gradient(180deg, #FFFDF8, #F4EFE6 60%); }
body.platform .hero, body[data-page="platform"] .hero { background: linear-gradient(180deg, #FBFFFC, #EDF6F3 60%); }
body.solutions .hero, body[data-page="solutions"] .hero { background: linear-gradient(180deg, #FFFDF9, #F2EFE8 60%); }

/* ----------------------------
   HEADER HOVER MICRO SHADOW
   ---------------------------- */
header:hover { box-shadow: 0 10px 28px var(--shadow-strong); }

/* ----------------------------
   FORMS PLACEHOLDER (if added later)
   ---------------------------- */
input[type="text"], input[type="email"], textarea {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--leaf); background: var(--surface);
}
input:focus, textarea:focus { border-color: var(--brand-secondary); box-shadow: 0 0 0 3px rgba(24,183,160,0.25); }

/* ----------------------------
   ENSURE NO OVERLAPS & SAFE Z-INDEX
   ---------------------------- */
.hero, header, footer, .mobile-menu, .cookie-banner, .cookie-backdrop { will-change: transform; }

/* ----------------------------
   MANDATORY FLEX ALIGNMENTS
   ---------------------------- */
/* Ensure vertical centering where required */
.text-image-section { align-items: center; }
.card-content { display: flex; flex-direction: column; justify-content: center; }

/* ----------------------------
   DESKTOP ENHANCEMENTS
   ---------------------------- */
@media (min-width: 1100px) {
  .container { max-width: 1180px; }
}

/* ----------------------------
   ACCESSIBLE SKIP LINK (optional if added)
   ---------------------------- */
.skip-link { position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: static; width: auto; height: auto; padding: 8px 12px; background: var(--brand-secondary); color: #0C2A25; border-radius: 8px; }

/* ----------------------------
   TABLE-LIKE LISTS (feature matrix)
   ---------------------------- */
.feature-matrix { display: flex; flex-direction: column; gap: 8px; background: var(--brand-accent); border: 1px solid #D6E6F6; border-radius: 12px; padding: 14px; }
.plan-comparison { display: flex; flex-direction: column; gap: 8px; }

/* ----------------------------
   RICH ADDRESS BLOCKS
   ---------------------------- */
address { font-style: normal; color: #D4F2EB; }

/* End of stylesheet */
