/* =====================================
   Nova Riser Automation — Elegant Classic Theme
   style.css — Mobile-first, flexbox-only
   ===================================== */

/* ---------- CSS Reset & Base ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; padding: 0; }
img, svg { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 16px; padding-left: 20px; }
figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 3px; }

/* ---------- Theme Variables ---------- */
:root {
  --color-primary: #0B3D91;
  --color-primary-700: #0A357F;
  --color-secondary: #0F766E;
  --color-secondary-700: #0D5F59;
  --color-accent: #F5F7FA;
  --color-paper: #FFFFFF;
  --color-ink: #1A1A1A;
  --color-muted: #60656F;
  --color-border: #E3E7EF;
  --color-shadow: rgba(10, 20, 40, 0.08);

  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 14px;

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

  --shadow-card: 0 6px 16px var(--color-shadow);
  --shadow-soft: 0 3px 10px var(--color-shadow);

  --maxw: 1180px;
}

/* ---------- Typography ---------- */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-ink, #1A1A1A);
  background: var(--color-paper, #FFFFFF);
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Trebuchet MS", Tahoma, Verdana, sans-serif;
  color: var(--color-ink, #1A1A1A);
  margin: 0 0 12px 0;
  line-height: 1.3;
}

h1 { font-size: 32px; letter-spacing: 0.2px; }
h2 { font-size: 24px; margin-bottom: 16px; }
h3 { font-size: 18px; margin-bottom: 10px; }
h4 { font-size: 16px; }

p { margin: 0 0 16px; color: var(--color-ink); }
.small, small { font-size: 14px; color: var(--color-muted); }

blockquote, .quote { font-style: italic; color: var(--color-ink); }
.author { color: var(--color-muted); font-size: 14px; letter-spacing: 0.2px; }

/* Links */
a { color: var(--color-primary); text-decoration: underline; }
a:hover { color: var(--color-primary-700); }
a.btn { text-decoration: none; }

/* ---------- Layout Containers (Flex-only) ---------- */
.container {
  display: flex; /* flex-only requirement */
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0 var(--space-20);
}

.content-wrapper {
  display: flex; /* flex-only requirement */
  flex-direction: column; /* mobile-first */
  gap: var(--space-24);
  width: 100%;
  max-width: var(--maxw);
}

main > section { /* general breathing room for every section */
  padding: var(--space-40) 0;
}

/* 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; }
.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; }

/* ---------- Header & Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: saturate(120%) blur(4px);
}

.site-header .content-wrapper { /* header-specific layout */
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-20);
  padding: var(--space-12) 0;
}

.logo-link img { height: 32px; width: auto; }

.main-nav { display: none; /* hidden on mobile */ }
.main-nav a { color: var(--color-ink); text-decoration: none; padding: 8px 10px; border-radius: 6px; }
.main-nav a:hover { background: var(--color-accent); }

.header-cta { display: none; }

/* Mobile burger */
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-paper);
  color: var(--color-ink);
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease;
}
.mobile-menu-toggle:hover { background: var(--color-accent); transform: translateY(-1px); }
.mobile-menu-toggle:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0;
  display: flex; /* flex-only */
  justify-content: flex-end;
  background: rgba(10, 14, 20, 0.35);
  transform: translateX(100%);
  transition: transform 280ms ease, opacity 280ms ease;
  opacity: 0;
  z-index: 1200;
}
.mobile-menu.open, .mobile-menu.is-open { transform: translateX(0); opacity: 1; }

.mobile-menu .mobile-nav {
  display: flex; flex-direction: column; gap: 4px;
  width: 84%; max-width: 380px; height: 100%;
  background: var(--color-paper);
  padding: var(--space-24);
  box-shadow: -6px 0 20px var(--color-shadow);
  transform: translateX(20%);
  transition: transform 280ms ease;
}
.mobile-menu.open .mobile-nav, .mobile-menu.is-open .mobile-nav { transform: translateX(0); }

.mobile-menu-close {
  align-self: flex-end;
  background: transparent;
  border: 0;
  color: var(--color-ink);
  font-size: 22px;
  cursor: pointer;
  padding: 6px;
}
.mobile-nav a {
  display: flex; align-items: center;
  padding: 12px 10px;
  border-radius: 8px;
  color: var(--color-ink);
  text-decoration: none;
}
.mobile-nav a:hover { background: var(--color-accent); }

/* ---------- Hero ---------- */
.hero { background: var(--color-accent); }
.hero .content-wrapper { padding: var(--space-32) 0; }
.hero h1 { font-size: 32px; }
.hero p { max-width: 52ch; color: var(--color-muted); }
.hero ul { display: flex; flex-direction: column; gap: 8px; }
.hero li { color: var(--color-ink); }

.cta-group { display: flex; flex-wrap: wrap; gap: var(--space-12); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px;
  border-radius: var(--radius-m);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 120ms ease;
}
.btn:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.btn:active { transform: translateY(1px); }

.btn.primary { background: var(--color-primary); color: #fff; box-shadow: var(--shadow-soft); }
.btn.primary:hover { background: var(--color-primary-700); box-shadow: var(--shadow-card); }

.btn.secondary { background: #fff; color: var(--color-secondary); border: 1px solid var(--color-secondary); }
.btn.secondary:hover { background: var(--color-secondary); color: #fff; }

/* Subtle link button variant for text links within paragraphs */
.link-btn { color: var(--color-primary); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link-btn:hover { color: var(--color-primary-700); }

/* ---------- Text-Image Sections ---------- */
.text-image-section > div { flex: 1 1 300px; }
.text-image-section img { border-radius: var(--radius-m); box-shadow: var(--shadow-soft); background: #fff; }

/* ---------- Lists & Tables ---------- */
ul li { margin: 6px 0; }

.table, table { width: 100%; border-collapse: collapse; }
.table th, table th { text-align: left; font-weight: 700; }
.table th, .table td, table th, table td { padding: 12px 14px; border: 1px solid var(--color-border); }
.table tbody tr:nth-child(even), table tbody tr:nth-child(even) { background: var(--color-accent); }

/* ---------- Testimonials ---------- */
.testimonial-card {
  background: #FBFBFD; /* light paper for contrast */
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft);
}
.testimonial-card .quote { margin: 0; font-size: 18px; color: #121212; }
.testimonial-card .author { margin: 0; }

/* ---------- Generic Cards & Utilities ---------- */
.card {
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  padding: var(--space-20);
  box-shadow: var(--shadow-soft);
}

.muted { color: var(--color-muted); }
.accent-bg { background: var(--color-accent); }
.center { text-align: center; }

/* ---------- Footer ---------- */
.site-footer {
  background: #FAFBFD;
  border-top: 1px solid var(--color-border);
}
.site-footer .content-wrapper {
  flex-direction: column;
  gap: var(--space-24);
  padding: var(--space-32) 0;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand img { height: 28px; width: auto; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-nav a { text-decoration: none; color: var(--color-ink); padding: 6px 8px; border-radius: 6px; }
.footer-nav a:hover { background: var(--color-accent); }
.footer-contact p { margin: 0 0 8px; }

/* ---------- Cookie Consent Banner ---------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; /* flex-only */
  flex-wrap: wrap; gap: var(--space-12);
  align-items: center; justify-content: center;
  background: var(--color-paper);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -6px 20px var(--color-shadow);
  padding: var(--space-16) var(--space-20);
  z-index: 1300;
  transform: translateY(110%);
  opacity: 0; transition: transform 260ms ease, opacity 260ms ease;
}
.cookie-banner.show { transform: translateY(0); opacity: 1; }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 8px; max-width: var(--maxw); width: 100%; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-btn { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--color-border); background: var(--color-accent); color: var(--color-ink); cursor: pointer; }
.cookie-btn.primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.cookie-btn.secondary { background: #fff; color: var(--color-secondary); border-color: var(--color-secondary); }
.cookie-btn:hover { filter: brightness(0.98); }

/* Cookie Preferences Modal */
.cookie-modal {
  position: fixed; inset: 0; z-index: 1400;
  display: none; /* toggled by JS */
  align-items: center; justify-content: center;
  background: rgba(10, 14, 20, 0.45);
}
.cookie-modal.open { display: flex; }
.cookie-dialog {
  display: flex; flex-direction: column; gap: var(--space-16);
  width: min(94%, 720px);
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  padding: var(--space-24);
  box-shadow: var(--shadow-card);
  transform: translateY(12px);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}
.cookie-modal.open .cookie-dialog { transform: translateY(0); opacity: 1; }
.cookie-dialog .dialog-header { display: flex; justify-content: space-between; align-items: center; }
.cookie-dialog .dialog-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.cookie-options { display: flex; flex-direction: column; gap: var(--space-12); }
.cookie-option { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 10px; }
.cookie-option .label { display: flex; flex-direction: column; }

/* Simple switch */
.switch { position: relative; display: inline-flex; align-items: center; width: 44px; height: 24px; background: #d6dbe6; border-radius: 999px; transition: background 180ms ease; }
.switch::after { content: ""; width: 18px; height: 18px; background: #fff; border-radius: 50%; margin-left: 3px; box-shadow: 0 1px 2px rgba(0,0,0,0.2); transition: transform 180ms ease; }
.switch.on { background: var(--color-secondary); }
.switch.on::after { transform: translateX(20px); }

/* ---------- Forms (generic) ---------- */
input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  background: #fff;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* ---------- Elegant Dividers & Accents ---------- */
hr { border: 0; height: 1px; background: var(--color-border); margin: var(--space-24) 0; }

/* ---------- Page-specific refinements ---------- */
/* KPI/Badges/Logos inline groups use text-image-section visuals */
.text-image-section .badge, .text-image-section .logo { max-height: 42px; }

/* Pricing lists & feature blocks */
.content-grid > * { flex: 1 1 260px; }

/* Footer social link separator inline dots already in HTML; keep spacing consistent */
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Accessibility & States ---------- */
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* ---------- Responsive (mobile-first) ---------- */
@media (min-width: 600px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .hero h1 { font-size: 40px; }
}

@media (min-width: 768px) {
  .main-nav { display: flex; gap: 6px; }
  .header-cta { display: flex; gap: 8px; }
  .mobile-menu-toggle { display: none; }

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

  .site-footer .content-wrapper { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .footer-brand, .footer-nav, .footer-contact { flex: 1 1 260px; }

  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  h3 { font-size: 20px; }
}

@media (min-width: 1024px) {
  .site-header .content-wrapper { padding: var(--space-16) 0; }
  .hero .content-wrapper { padding: var(--space-48) 0; }
  h1 { font-size: 56px; }
}

/* ---------- Shadows & Micro-interactions ---------- */
.section, .card, .testimonial-card, .cookie-dialog, .hero img { transition: box-shadow 220ms ease, transform 220ms ease; }
.card:hover, .testimonial-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }

/* ---------- Ensure proper spacing between elements ---------- */
main > section .content-wrapper > * + * { margin-top: 0; }

/* ---------- Additional utility classes for layout consistency ---------- */
.stack-20 { display: flex; flex-direction: column; gap: 20px; }
.inline-12 { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Contrast for testimonials (dark text on light bg) ---------- */
/* Already ensured via testimonial-card styles: dark text on very light background */

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