/*
  Deligria Estrich Lugano — Monochrome Sophisticated UI
  Role: Senior CSS Developer & UI Designer
  Notes:
  - Mobile-first, flexbox-only layouts (no CSS Grid or Columns)
  - Dramatic black/white/gray palette with refined typography
  - Brand accents used subtly (focus/lines) to honor guidelines
  - Includes mobile menu and cookie consent banner/modal
*/

/* ==========================
   Reset & Base
========================== */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Poppins', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; color: #121212; background: #ffffff; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: #111111; text-decoration: none; }
a:hover { color: #000000; }
ul, ol { margin: 0 0 16px 20px; padding: 0; }
p { margin: 0 0 16px; }
small { color: #666666; }
strong { font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 3px solid #1B3A4B; outline-offset: 2px; }

/* ==========================
   CSS Variables (with fallbacks)
========================== */
:root {
  --ink: #121212;
  --ink-2: #1f1f1f;
  --ink-3: #2d2d2d;
  --muted: #555555;
  --line: #e6e6e6;
  --surface: #f7f7f8;
  --surface-2: #f0f0f1;
  --bg: #ffffff;
  --hero: #0f0f11;
  --brand-primary: #1B3A4B; /* subtle, for focus/accents */
  --brand-secondary: #C6802A; /* subtle hover/border accent */
  --brand-accent: #F6F8FA;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 12px 30px rgba(0,0,0,0.18);
  --trans: 200ms ease;
}

/* ==========================
   Typography
========================== */
h1, h2, h3, h4 { font-family: 'Montserrat', 'Poppins', 'Segoe UI', Arial, sans-serif; color: var(--ink); margin: 0 0 12px; line-height: 1.2; letter-spacing: 0.2px; }
h1 { font-size: 34px; font-weight: 700; }
h2 { font-size: 26px; font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }
.subheadline { color: #d0d0d0; font-size: 16px; line-height: 1.5; }

/* scale up on wider screens */
@media (min-width: 768px) {
  h1 { font-size: 44px; }
  h2 { font-size: 32px; }
  h3 { font-size: 22px; }
  .subheadline { font-size: 18px; }
}
@media (min-width: 1100px) {
  h1 { font-size: 52px; }
  h2 { font-size: 36px; }
  h3 { font-size: 24px; }
}

/* ==========================
   Layout Primitives (Flex-only)
========================== */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; align-items: stretch; }
.content-wrapper { display: flex; flex-direction: column; gap: 24px; width: 100%; }

/* MANDATORY SPACING & ALIGNMENT 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; gap: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.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; border-radius: var(--radius); border: 1px solid var(--line); background: #ffffff; color: #111111; box-shadow: var(--shadow-sm); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Global section spacing for raw <section> elements */
main > section { padding: 48px 0; }
main > section .content-wrapper > * { margin: 0; }

/* Ensure minimum spacing between content blocks */
.content-wrapper { gap: 24px; }
.content-wrapper > * + * { margin-top: 0; }

/* ==========================
   Header & Navigation
========================== */
.site-header { background: #ffffff; border-bottom: 1px solid var(--line); position: relative; z-index: 1000; }
.site-header .container { padding-top: 14px; padding-bottom: 14px; }
.site-header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; }
.logo img { height: 36px; width: auto; }

.main-nav { display: none; align-items: center; gap: 18px; }
.main-nav a { color: #111111; padding: 8px 10px; border-radius: 6px; transition: color var(--trans), background var(--trans); }
.main-nav a:hover { background: var(--surface); }
.main-nav a:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }

.header-cta { display: none; align-items: center; gap: 10px; }

.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 8px; background: #111111; color: #ffffff; border: 1px solid #111111; cursor: pointer; transition: transform var(--trans), background var(--trans); }
.mobile-menu-toggle:hover { transform: translateY(-1px); background: #000000; }
.mobile-menu-toggle:active { transform: translateY(0); }

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

/* ==========================
   Mobile Menu Overlay
========================== */
.mobile-menu { position: fixed; inset: 0; display: flex; flex-direction: column; gap: 16px; padding: 20px; background: rgba(10,10,12,0.98); color: #ffffff; transform: translateX(100%); opacity: 0; visibility: hidden; transition: transform 350ms ease, opacity 350ms ease, visibility 350ms ease; z-index: 1100; }
.mobile-menu.open, .mobile-menu.active, .mobile-menu.is-open, body.menu-open .mobile-menu { transform: translateX(0); opacity: 1; visibility: visible; }
.mobile-menu-close { align-self: flex-end; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: #222222; color: #ffffff; border: 1px solid #333333; cursor: pointer; }
.mobile-menu-close:hover { background: #2a2a2a; }
.mobile-nav { display: flex; flex-direction: column; gap: 6px; }
.mobile-nav a { color: #ffffff; padding: 14px 10px; border-bottom: 1px solid rgba(255,255,255,0.12); font-size: 18px; }
.mobile-nav a:hover { background: rgba(255,255,255,0.06); }

/* ==========================
   Hero Section
========================== */
.hero { background: var(--hero); color: #ffffff; }
.hero .container { padding-top: 64px; padding-bottom: 64px; }
.hero h1 { color: #ffffff; }
.hero .subheadline { color: #cfcfcf; max-width: 900px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.trust-row { display: flex; flex-wrap: wrap; gap: 16px; }
.trust-row .text-section { display: flex; flex-direction: row; flex-wrap: wrap; gap: 12px 24px; }
.trust-row .text-section p { display: flex; align-items: center; gap: 8px; margin: 0; color: #e6e6e6; }
.trust-row img { width: 18px; height: 18px; }
.contact-snippet { display: flex; padding: 12px 14px; border: 1px solid rgba(255,255,255,0.16); border-radius: var(--radius); color: #eaeaea; background: rgba(255,255,255,0.03); }

/* ==========================
   Generic Content Sections
========================== */
.text-section { display: flex; flex-direction: column; gap: 10px; }
.text-section ul { margin-left: 18px; }
.text-section li { margin-bottom: 8px; }
.text-section ol { margin-left: 18px; }

/* ==========================
   Buttons
========================== */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; border-radius: 10px; border: 1px solid #1a1a1a; background: #ffffff; color: #111111; font-weight: 600; letter-spacing: 0.2px; box-shadow: var(--shadow-sm); transition: background var(--trans), color var(--trans), border-color var(--trans), transform var(--trans), box-shadow var(--trans); }
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.button:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.button-primary { background: #111111; color: #ffffff; border-color: #111111; }
.button-primary:hover { background: #000000; border-color: #000000; }

.button-secondary { background: #ffffff; color: #111111; border-color: #2a2a2a; }
.button-secondary:hover { background: #f2f2f2; border-color: #000000; }

/* Link-as-button fallback */
a.button { text-decoration: none; }

/* ==========================
   Cards & Testimonials
========================== */
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

/* Testimonials: light background and dark text for readability */
.testimonial-card p { margin: 0; color: #111111; }
.testimonial-card p + p { color: #2d2d2d; }

/* ==========================
   Footer
========================== */
.site-footer { background: #111111; color: #eaeaea; padding-top: 36px; padding-bottom: 36px; border-top: 1px solid #1c1c1c; }
.site-footer h3 { color: #ffffff; font-size: 16px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.site-footer a { color: #f0f0f0; border-bottom: 1px solid transparent; }
.site-footer a:hover { border-bottom-color: rgba(255,255,255,0.35); }
.site-footer .content-wrapper { flex-direction: column; gap: 16px; }
@media (min-width: 768px) {
  .site-footer .content-wrapper { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .site-footer .text-section { max-width: 33%; }
}

/* ==========================
   Lists inside dark/hero context
========================== */
.hero .text-section, .hero ul, .hero ol { color: #e8e8e8; }
.hero a { color: #ffffff; border-bottom: 1px solid rgba(255,255,255,0.25); }
.hero a:hover { border-bottom-color: #ffffff; }

/* ==========================
   Content Utilities
========================== */
.content-grid > * { flex: 1 1 280px; min-width: 260px; }
.text-image-section > * { flex: 1 1 320px; }
.card-container > * { flex: 1 1 280px; }

/* Responsive alignments */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: flex-start; }
  .cta-row { flex-direction: column; align-items: stretch; }
}

/* ==========================
   Tables (generic)
========================== */
table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: block; }
tr { display: flex; width: 100%; }
th, td { flex: 1 1 0; padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: var(--surface); font-weight: 600; }

/* ==========================
   Forms (generic)
========================== */
input[type="text"], input[type="email"], input[type="tel"], textarea, select { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid #cfcfcf; background: #ffffff; color: #111111; transition: border-color var(--trans), box-shadow var(--trans); }
input:focus, textarea:focus, select:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(27,58,75,0.2); }
label { display: flex; margin-bottom: 6px; color: #2b2b2b; font-weight: 600; }

/* ==========================
   Dividers & Accents
========================== */
.hr { height: 1px; background: var(--line); width: 100%; display: flex; }
.muted { color: var(--muted); }
.surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }

/* ==========================
   Cookie Consent Banner & Modal
========================== */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; background: #111111; color: #f2f2f2; border-top: 1px solid #1d1d1d; transform: translateY(110%); opacity: 0; visibility: hidden; transition: transform 300ms ease, opacity 300ms ease, visibility 300ms ease; z-index: 1200; }
.cookie-banner.show, body.cookie-open .cookie-banner { transform: translateY(0); opacity: 1; visibility: visible; }
.cookie-banner .cookie-text { display: flex; flex-direction: column; gap: 8px; }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-buttons .button { border-color: #2a2a2a; }
.cookie-buttons .button-primary { background: #ffffff; color: #111111; border-color: #ffffff; }
.cookie-buttons .button-secondary { background: transparent; color: #f2f2f2; border-color: #3a3a3a; }

.cookie-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); opacity: 0; visibility: hidden; transition: opacity 250ms ease, visibility 250ms ease; z-index: 1300; }
.cookie-backdrop.show { opacity: 1; visibility: visible; }

.cookie-modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, calc(-50% + 20px)); display: flex; flex-direction: column; gap: 16px; width: min(680px, 92%); background: #ffffff; color: #111111; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 20px; opacity: 0; visibility: hidden; transition: opacity 250ms ease, transform 250ms ease, visibility 250ms ease; z-index: 1400; }
.cookie-modal.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%); }
.cookie-modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.cookie-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Toggle switch for cookie options */
.cookie-switch { position: relative; width: 44px; height: 26px; display: inline-flex; align-items: center; }
.cookie-switch input { appearance: none; width: 100%; height: 100%; border-radius: 26px; background: #cfcfcf; outline: none; transition: background var(--trans); border: 1px solid #bdbdbd; }
.cookie-switch input:checked { background: #111111; border-color: #111111; }
.cookie-switch .knob { position: absolute; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 2px rgba(0,0,0,0.25); transition: transform var(--trans); }
.cookie-switch input:checked + .knob { transform: translateX(18px); }

/* ==========================
   Accessibility & Micro-interactions
========================== */
button, .button, .mobile-menu-toggle, .mobile-menu-close { cursor: pointer; }
.button:focus-visible, .mobile-menu-toggle:focus-visible, .mobile-menu-close:focus-visible { outline: 3px solid var(--brand-primary); outline-offset: 2px; }

/* ==========================
   Page-specific tweaks
========================== */
/* Contact snippets within hero on index */
.hero .contact-snippet { border-color: rgba(255,255,255,0.16); }

/* Inline icon text rows */
.text-section p img { width: 18px; height: 18px; }

/* ==========================
   Responsive Enhancements
========================== */
@media (min-width: 768px) {
  .container { padding-left: 24px; padding-right: 24px; }
  main > section { padding: 64px 0; }
  .logo img { height: 42px; }
}

@media (min-width: 992px) {
  .content-wrapper.row { flex-direction: row; }
}

/* ==========================
   Subtle Brand Accents (borders/underlines)
========================== */
a { border-bottom: 1px solid transparent; transition: border-color var(--trans), color var(--trans); }
a:hover { border-bottom-color: rgba(0,0,0,0.25); }
.hero a:hover { border-bottom-color: rgba(255,255,255,0.5); }

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