/* ===== CSS Reset & Normalize ===== */
*, *::before, *::after { box-sizing: border-box; }
html { line-height: 1.15; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0 0 0 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }

/* ===== Design Tokens (Industrial Modern) ===== */
:root {
  --color-bg: #0D1114; /* coal */
  --color-surface: #12171B; /* dark steel */
  --color-surface-2: #171D22; /* panel */
  --color-line: #2B343A; /* iron line */
  --color-metal: #9AA3A7; /* brushed metal */
  --color-metal-lite: #C0C7CC; /* stainless */
  --brand-primary: #1F3A44; /* deep teal */
  --brand-secondary: #C46E3A; /* rust */
  --brand-accent: #F4F7F8; /* light panel */
  --text-high: #E6ECEF; /* light text */
  --text-mid: #C5CDD2; /* medium text */
  --text-low: #94A0A6; /* low text */
  --text-dark: #0F1416; /* dark text for light surfaces */
  --radius-sm: 8px; --radius-md: 12px;
  --shadow-1: 0 1px 0 rgba(255,255,255,0.02), 0 8px 24px rgba(0,0,0,0.35);
  --shadow-2: 0 1px 0 rgba(255,255,255,0.03), 0 10px 30px rgba(0,0,0,0.45);
  --focus: 0 0 0 3px rgba(196,110,58,0.35);
}

/* ===== Base ===== */
body {
  background: var(--color-bg);
  color: var(--text-high);
  font-family: Verdana, "Trebuchet MS", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
}

h1, h2, h3, h4 { font-family: "Trebuchet MS", Verdana, system-ui, sans-serif; color: var(--text-high); letter-spacing: 0.2px; }
h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 24px; margin-bottom: 12px; }
h3 { font-size: 18px; color: var(--brand-accent); }
p { color: var(--text-mid); font-size: 16px; }
small, .eyebrow { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--brand-secondary); }

/* spacing rhythm inside content wrappers */
.content-wrapper > * + * { margin-top: 16px; }

/* Lists with industrial bullets */
ul li, ol li { position: relative; padding-left: 18px; color: var(--text-mid); }
ul li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--brand-secondary); position: absolute; left: 0; top: 9px; box-shadow: 0 0 0 1px rgba(0,0,0,0.25); }
ol { counter-reset: step; }
ol li { padding-left: 22px; }
ol li::before { counter-increment: step; content: counter(step) "."; position: absolute; left: 0; top: 0; color: var(--brand-secondary); font-weight: bold; }

/* Links */
a { color: var(--brand-secondary); }
a:hover { color: #da7d45; }
a:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* ===== Containers & Layout (Flex-only) ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex; /* FLEX ONLY */
  flex-direction: column; /* mobile first */
  gap: 20px; /* mandatory spacing */
}

/* Sections */
section { margin-bottom: 60px; padding: 40px 0; background: transparent; border-top: 1px solid rgba(255,255,255,0.02); border-bottom: 1px solid rgba(0,0,0,0.5); }

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

/* Generic Card Styling */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-1);
}

/* Text-Image style boxes (used as feature tiles) */
.text-image-section > div {
  flex: 1 1 280px;
  min-width: 260px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  padding: 18px;
  box-shadow: var(--shadow-1);
}
.text-image-section > div h3 { color: var(--metal); color: var(--brand-accent); }

/* Content grid children safety spacing */
.content-grid > * { flex: 1 1 260px; min-width: 240px; }

/* ===== Header & Navigation ===== */
header { position: sticky; top: 0; z-index: 1000; background: rgba(13,17,20,0.9); backdrop-filter: saturate(120%) blur(6px); border-bottom: 1px solid var(--color-line); }
header .container { flex-direction: row; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.logo img { height: 32px; filter: brightness(0) invert(0.9); }

.main-nav { display: none; align-items: center; gap: 16px; }
.main-nav a { color: var(--text-mid); font-size: 14px; text-transform: uppercase; letter-spacing: 1px; padding: 8px 10px; border-radius: 6px; border: 1px solid transparent; }
.main-nav a:hover { color: var(--text-high); border-color: var(--color-line); background: rgba(255,255,255,0.03); }
.main-nav a:focus-visible { box-shadow: var(--focus); }

/* Header CTA */
header .btn.btn-primary { display: none; }

/* Mobile menu toggle */
.mobile-menu-toggle {
  background: var(--brand-secondary);
  color: #fff;
  border: 0;
  border-radius: 8px;
  width: 44px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(196,110,58,0.35);
  transition: transform .2s ease, background .2s ease;
}
.mobile-menu-toggle:hover { transform: translateY(-1px); background: #da7d45; }
.mobile-menu-toggle:active { transform: translateY(0); }
.mobile-menu-toggle:focus-visible { box-shadow: var(--focus); }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(10,12,14,0.72);
  display: flex; /* container */
  flex-direction: column; justify-content: flex-start; align-items: flex-end;
  transform: translateX(100%);
  transition: transform .35s ease;
  display: none;
}
.mobile-menu.active { transform: translateX(0); }
.mobile-menu > nav, .mobile-nav {
  background: var(--color-surface-2);
  width: 86%; max-width: 420px; height: 100%;
  border-left: 1px solid var(--color-line);
  box-shadow: var(--shadow-2);
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px; align-items: stretch;
}
.mobile-menu-close {
  position: relative; margin: 12px 16px 0 0; align-self: flex-end;
  background: transparent; color: var(--brand-accent);
  border: 1px solid var(--color-line); border-radius: 8px;
  width: 40px; height: 40px;
}
.mobile-nav a {
  display: flex; align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.03);
  color: var(--text-high);
  background: rgba(255,255,255,0.02);
  transition: background .2s ease, border-color .2s ease;
}
.mobile-nav a:hover { background: rgba(255,255,255,0.05); border-color: var(--color-line); }

/* Desktop Nav Breakpoint */
@media (min-width: 992px) {
  .main-nav { display: flex; }
  header .btn.btn-primary { display: inline-flex; }
  .mobile-menu-toggle { display: none; }
}

/* ===== Hero ===== */
.hero { background: var(--color-surface); border-bottom: 1px solid var(--color-line); }
.hero .container { padding-top: 32px; padding-bottom: 32px; }
.hero .content-wrapper { display: flex; flex-direction: column; gap: 16px; max-width: 900px; }
.hero h1 { font-size: 28px; }
.hero p { font-size: 16px; color: var(--text-mid); }

@media (min-width: 768px) {
  .hero h1 { font-size: 36px; }
}
@media (min-width: 1200px) {
  .hero h1 { font-size: 42px; }
}

/* CTA group */
.cta-group { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--color-metal);
  color: var(--brand-accent);
  background: linear-gradient(to bottom, rgba(255,255,255,0.03), rgba(0,0,0,0.25));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 16px rgba(0,0,0,0.35);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--color-metal-lite); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 24px rgba(0,0,0,0.45); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }

.btn-primary {
  background: var(--brand-secondary);
  border-color: #E6A17B;
  color: #fff;
  box-shadow: 0 8px 18px rgba(196,110,58,0.38);
}
.btn-primary:hover { background: #da7d45; }

/* ===== Testimonials (Light background, dark text for readability) ===== */
.testimonial-card {
  background: var(--brand-accent);
  color: var(--text-dark);
  border: 1px solid #E0E5E8;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 24px rgba(0,0,0,0.15);
}
.testimonial-card p { color: var(--text-dark); }
.testimonial-card strong { color: #1B2428; }

/* ===== Footer ===== */
footer { background: #0B0F12; border-top: 1px solid var(--color-line); }
footer .container { padding-top: 32px; padding-bottom: 32px; gap: 28px; }
footer .brand { display: flex; flex-direction: column; gap: 12px; }
footer .brand img { height: 28px; filter: brightness(0) invert(0.9); }
footer .brand p { color: var(--text-low); font-size: 14px; }

.footer-nav { display: flex; flex-direction: column; gap: 16px; }
.footer-nav nav { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.footer-nav a { color: var(--text-low); font-size: 14px; padding: 6px 8px; border-radius: 6px; border: 1px solid transparent; }
.footer-nav a:hover { color: var(--text-high); border-color: var(--color-line); background: rgba(255,255,255,0.02); }

footer .contact { display: flex; flex-direction: column; gap: 8px; }
footer .contact p, footer .contact a { color: var(--text-low); font-size: 14px; }
footer .copy { border-top: 1px solid var(--color-line); padding-top: 16px; }
footer .copy p { color: var(--text-low); font-size: 12px; }

@media (min-width: 992px) {
  footer .container { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  footer .brand { max-width: 360px; }
  .footer-nav { flex: 1; }
}

/* ===== Utility & Micro-interactions ===== */
.divider { height: 1px; background: var(--color-line); }
.muted { color: var(--text-low); }

/* ===== Responsive Layout Controls ===== */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

@media (min-width: 768px) {
  .text-image-section { align-items: stretch; }
}

/* ===== Forms (links/contacts) basic polish (if any used later) ===== */
input[type="text"], input[type="email"], textarea {
  width: 100%; background: var(--color-surface); color: var(--text-high);
  border: 1px solid var(--color-line); border-radius: 10px; padding: 12px 14px;
}
input:focus, textarea:focus { outline: none; box-shadow: var(--focus); border-color: var(--brand-secondary); }

/* ===== Page-specific accents ===== */
/* Alternating subtle panels for long content pages */
main section:nth-child(odd) { background: transparent; }
main section:nth-child(even) { background: #0F1417; }

/* ===== Header page titles spacing ===== */
.content-wrapper h2 + p { margin-top: 8px; }

/* ===== Ensure minimum gaps between any content blocks ===== */
.container > * + * { margin-top: 0; }
.content-wrapper > * { margin-bottom: 0; }

/* ===== Mobile-first nav visibility ===== */
@media (min-width: 992px) {
  header .container { gap: 18px; }
}

/* ===== Accessibility focus ring for key navigations ===== */
nav a:focus-visible, .mobile-nav a:focus-visible { box-shadow: var(--focus); outline: none; }

/* ===== Cookie Consent Banner ===== */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2500;
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-line);
  box-shadow: 0 -10px 24px rgba(0,0,0,0.35);
  display: flex; /* container */
  flex-direction: column; gap: 12px;
  padding: 16px 20px;
}
.cookie-banner .cookie-inner { display: flex; flex-direction: column; gap: 12px; }
.cookie-text { color: var(--text-mid); font-size: 14px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-btn { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--color-metal); color: var(--brand-accent); background: rgba(255,255,255,0.03); }
.cookie-btn:hover { background: rgba(255,255,255,0.06); }
.cookie-accept { background: var(--brand-secondary); color: #fff; border-color: #E6A17B; }
.cookie-accept:hover { background: #da7d45; }
.cookie-reject { background: rgba(255,255,255,0.06); }
.cookie-settings { background: transparent; }

@media (min-width: 768px) {
  .cookie-banner .cookie-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .cookie-text { max-width: 760px; }
}

/* ===== Cookie Preferences Modal ===== */
.cookie-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 3000;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.cookie-modal-backdrop.active { display: flex; }
.cookie-modal {
  background: var(--color-surface);
  width: 100%; max-width: 720px;
  border: 1px solid var(--color-line);
  border-radius: 12px; box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(10px); opacity: 0; transition: transform .25s ease, opacity .25s ease;
}
.cookie-modal-backdrop.active .cookie-modal { transform: translateY(0); opacity: 1; }
.cookie-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--color-line); }
.cookie-modal-header h3 { color: var(--brand-accent); font-size: 18px; }
.cookie-modal-body { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; }
.cookie-options { display: flex; flex-direction: column; gap: 12px; }
.cookie-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--color-surface-2); border: 1px solid var(--color-line); border-radius: 10px; padding: 12px 14px; }
.cookie-option .info { display: flex; flex-direction: column; gap: 2px; }
.cookie-option .label { color: var(--text-high); font-weight: 600; }
.cookie-option .desc { color: var(--text-low); font-size: 14px; }

/* Toggle switch */
.toggle { position: relative; width: 48px; height: 28px; border-radius: 14px; background: #30383D; border: 1px solid #3B454C; display: flex; align-items: center; padding: 2px; }
.toggle.knob-on { background: #325A66; border-color: #3E6E7C; }
.toggle .knob { width: 24px; height: 24px; border-radius: 50%; background: #E9EEF1; box-shadow: 0 2px 6px rgba(0,0,0,0.4); transform: translateX(0); transition: transform .2s ease; }
.toggle.knob-on .knob { transform: translateX(20px); }

.cookie-modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--color-line); }

/* ===== Accessibility: ensure readable testimonials on light bg ===== */
section .testimonial-card p { color: var(--text-dark); }

/* ===== Additional Layout Helpers for provided pages ===== */
/* Feature list blocks within sections */
.content-wrapper { display: flex; flex-direction: column; gap: 16px; }

/* Portfolio or list items maintain spacing */
.content-wrapper ul + p, .content-wrapper ol + p { margin-top: 10px; }

/* Ensure min spacing between all content cards/sections */
.card, .testimonial-card, .text-image-section > div { margin-right: 0; }

/* ===== Tables (not present but safe defaults) ===== */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--color-line); color: var(--text-mid); }

/* ===== Desktop Enhancements ===== */
@media (min-width: 992px) {
  .hero .container { padding-top: 48px; padding-bottom: 48px; }
  .content-wrapper { max-width: 980px; }
}

/* ===== Print safe minimal ===== */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal-backdrop { display: none !important; }
  body { background: #fff; color: #000; }
}
