/* =========================
   ClipSurface - Modern Bold UI
   Author: Senior CSS Developer & UI Designer
   Notes:
   - Mobile-first, flexbox-only layouts (NO CSS Grid/Columns)
   - Bold typography, bright accents, high contrast
   - Matches provided HTML classes exactly
   ========================= */

/* ========== CSS Reset & Normalize ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus { outline: 2px solid #1E7F76; outline-offset: 2px; }
:root {
  /* Brand palette */
  --primary: #0B2E3B;
  --secondary: #1E7F76;
  --accent: #F5FAFF;
  --ink: #0A1F28; /* deep ink for text */
  --muted: #55727E; /* muted text */
  --line: #D9E6EE; /* light divider */
  --white: #ffffff;
  --black: #000000;

  /* Elevation */
  --shadow-1: 0 2px 8px rgba(11, 46, 59, 0.12);
  --shadow-2: 0 8px 24px rgba(11, 46, 59, 0.18);
  --radius-6: 6px;
  --radius-10: 10px;

  /* Spacing scale */
  --sp-8: 8px; --sp-12: 12px; --sp-16: 16px; --sp-20: 20px;
  --sp-24: 24px; --sp-32: 32px; --sp-40: 40px; --sp-60: 60px;
}
html { scroll-behavior: smooth; }

/* ========== Typography ========== */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif; /* body */
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}
h1, h2, h3, h4 {
  font-family: "Trebuchet MS", "Segoe UI", Helvetica, Arial, sans-serif; /* display */
  color: var(--primary);
  font-weight: 800;
  letter-spacing: -0.2px;
  margin: 0 0 var(--sp-16) 0;
}
h1 { font-size: 40px; line-height: 1.15; }
h2 { font-size: 32px; line-height: 1.2; }
h3 { font-size: 24px; line-height: 1.25; }
p { margin: 0 0 var(--sp-16) 0; color: var(--ink); }
small, .breadcrumb { font-size: 14px; color: var(--muted); }
strong { font-weight: 800; }

/* Links */
a { color: var(--secondary); text-decoration: none; font-weight: 700; }
a:hover { color: var(--primary); }
a:active { opacity: 0.9; }

/* Lists - flex-column for consistent spacing (no CSS grid/columns) */
ul, ol { padding-left: 22px; margin: 0 0 var(--sp-16) 0; display: flex; flex-direction: column; gap: 8px; }
li { color: var(--ink); }

/* ========== Layout Utilities (Flex-only) ========== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-20);
  display: flex;
  flex-direction: column; /* overridden where needed */
  gap: var(--sp-20);
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--sp-20);
}

/* Mandatory spacing & alignment patterns (exact as required) */
.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; }

/* Section baseline spacing */
section { margin-bottom: var(--sp-60); padding: var(--sp-40) 0; }

/* ========== Header & Navigation ========== */
header { position: sticky; top: 0; background: var(--white); box-shadow: var(--shadow-1); z-index: 1000; }
header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--sp-16); padding-top: var(--sp-12); padding-bottom: var(--sp-12); }
.brand { display: flex; align-items: center; }
.brand img { height: 36px; width: auto; }

.main-nav { display: none; align-items: center; gap: var(--sp-16); }
.main-nav a { color: var(--primary); padding: 10px 12px; border-radius: var(--radius-6); font-weight: 800; }
.main-nav a:hover { background: var(--accent); color: var(--secondary); }

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

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 2px solid var(--primary);
  border-radius: 8px;
  background: var(--white);
  color: var(--primary);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}
.mobile-menu-toggle:hover { background: var(--accent); transform: translateY(-1px); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; background: var(--primary);
  color: var(--white);
  display: flex; flex-direction: column; gap: var(--sp-20);
  padding: var(--sp-20);
  transform: translateX(100%);
  transition: transform 260ms ease-in-out;
  z-index: 2000;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close {
  align-self: flex-end;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 8px;
  border: 2px solid var(--white);
  background: transparent; color: var(--white);
  cursor: pointer; transition: background 180ms ease, transform 180ms ease;
}
.mobile-menu-close:hover { background: rgba(255,255,255,0.08); transform: translateY(-1px); }
.mobile-nav { display: flex; flex-direction: column; gap: var(--sp-12); }
.mobile-nav a {
  color: var(--white); font-weight: 800; padding: 14px 10px; border-radius: 8px;
  background: rgba(255,255,255,0.06);
}
.mobile-nav a:hover { background: rgba(255,255,255,0.12); }

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

/* ========== Hero ========== */
.hero { background: var(--accent); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; right: -10%; top: -30%; width: 70%; height: 200%;
  transform: rotate(8deg);
  background: rgba(30, 127, 118, 0.08); /* geometric stripe */
  pointer-events: none; z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: var(--primary); }
.hero p { font-size: 18px; color: var(--ink); }
.cta-group { display: flex; flex-wrap: wrap; gap: var(--sp-12); }
.social-proof { display: flex; flex-direction: column; gap: var(--sp-12); padding: var(--sp-16); border: 2px solid var(--line); border-radius: var(--radius-10); background: var(--white); }
.social-proof ul { gap: 6px; }

/* Breadcrumb */
.breadcrumb {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 999px; background: var(--accent);
  text-transform: uppercase; letter-spacing: 0.6px; font-weight: 800;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  padding: 12px 18px; border-radius: 10px;
  border: 2px solid transparent;
  font-weight: 800; letter-spacing: 0.2px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn.primary { background: var(--secondary); color: var(--white); box-shadow: var(--shadow-1); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn.secondary { background: transparent; color: var(--secondary); border-color: var(--secondary); }
.btn.secondary:hover { background: var(--secondary); color: var(--white); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: none; }

/* ========== Content sections & cards ========== */
.text-image-section { background: var(--white); border: 2px solid var(--line); border-radius: var(--radius-10); padding: var(--sp-20); }

.card {
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius-10);
  padding: var(--sp-20); box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: var(--sp-12);
}

.testimonial-card {
  background: var(--accent); border: 2px solid var(--line); border-radius: var(--radius-10);
  box-shadow: var(--shadow-1); flex-direction: column; /* keep readable */
}
.testimonial-card p { margin: 0; color: var(--ink); }

/* Lists inside cards */
.text-image-section ul, .card ul { padding-left: 18px; gap: 6px; }

/* ========== Footer ========== */
footer { background: var(--primary); color: var(--white); }
footer a { color: #B7F2EB; }
footer a:hover { color: var(--white); }
footer section { padding: var(--sp-40) 0; }
footer .content-wrapper { display: flex; flex-wrap: wrap; gap: var(--sp-24); }
footer .content-wrapper > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: var(--sp-12); }
footer h3 { color: var(--white); }

/* ========== Forms (generic) ========== */
input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 8px; border: 2px solid var(--line);
  background: var(--white); color: var(--ink);
}
input:focus, textarea:focus, select:focus { border-color: var(--secondary); outline: none; box-shadow: 0 0 0 3px rgba(30,127,118,0.18); }

/* ========== Cookie Consent Banner & Modal ========== */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px;
  background: var(--primary); color: var(--white);
  border-radius: 12px; box-shadow: var(--shadow-2);
  padding: 16px; z-index: 3000;
  display: flex; flex-direction: column; gap: 12px;
  transform: translateY(120%);
  transition: transform 260ms ease-in-out;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner p { margin: 0; color: var(--white); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cookie-banner .btn { border-color: var(--white); }
.cookie-banner .btn.primary { background: var(--secondary); border-color: var(--secondary); }
.cookie-banner .btn.secondary { background: transparent; color: var(--white); border-color: var(--white); }

/* Cookie preferences modal */
.cookie-modal {
  position: fixed; inset: 0; z-index: 4000;
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 0;
}
.cookie-modal.open { display: flex; }
.cookie-modal .backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); }
.cookie-modal .panel {
  position: relative; z-index: 1;
  width: min(720px, 92%);
  background: var(--white); color: var(--ink);
  border-radius: 12px; box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px;
  transform: translateY(20px); opacity: 0; transition: transform 220ms ease, opacity 220ms ease;
}
.cookie-modal.open .panel { transform: translateY(0); opacity: 1; }
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cookie-row:last-child { border-bottom: 0; }
.cookie-toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }

/* ========== Micro components ========== */
.hr-line { height: 2px; background: var(--line); width: 100%; }
.badge { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; background: var(--accent); color: var(--primary); font-weight: 800; }

/* ========== Responsive rules ========== */
/* Mobile-first defaults above */

@media (min-width: 600px) {
  h1 { font-size: 44px; }
}
@media (min-width: 768px) {
  h1 { font-size: 48px; }
  .text-image-section { flex-direction: row; align-items: center; }
  .cta-group { gap: var(--sp-16); }
}
@media (min-width: 992px) {
  .container { gap: var(--sp-24); }
  .hero p { max-width: 880px; }
}

/* ========== High-contrast blocks & emphasis ========== */
.highlight {
  background: var(--primary); color: var(--white);
  padding: var(--sp-20); border-radius: var(--radius-10);
  display: flex; flex-direction: column; gap: var(--sp-12);
}

/* ========== Page-specific touches ========== */
/* Index/social-proof in hero already styled */

/* Pricing plans: turn text-image-section into bold plan cards on larger screens */
/* (structure is reused so we keep generic styles) */

/* Resources list spacing */
.hero + section ul li { line-height: 1.5; }

/* ========== Navigation link sizes for touch ========== */
.mobile-nav a { min-height: 44px; }

/* ========== Accessibility & states ========== */
.btn:focus-visible, .mobile-menu-toggle:focus-visible, .mobile-menu-close:focus-visible { box-shadow: 0 0 0 3px rgba(30,127,118,0.35); }

/* ========== Geometric accents for sections (decorative only) ========== */
section::after {
  content: ""; display: block; height: 0; /* placeholder for consistency; add per-section if needed */
}

/* ========== Ensure adequate spacing between elements ========== */
.content-wrapper > * + * { margin-top: 0; }

/* ========== Ensure testimonials readability (dark text on light BG) ========== */
.testimonial-card, .testimonial-card * { color: var(--ink); }

/* ========== Prevent overlapping and maintain spacing via flex gaps ========== */
/* Already ensured by container/content-wrapper/text-image-section/testimonial-card */

/* ========== Additional structural styles to match HTML ========== */
/* Keep nav items from wrapping too tightly on desktop */
.main-nav { flex-wrap: wrap; }

/* Header spacing when many items */
header .container { flex-wrap: wrap; }

/* Generic helpers */
.centered { display: flex; align-items: center; justify-content: center; text-align: center; }
.right { display: flex; justify-content: flex-end; }

/* ========== Print basic cleanup ========== */
@media print {
  .mobile-menu, .cookie-banner, .cookie-modal, header, footer { display: none !important; }
  section { padding: 0; margin-bottom: 24px; }
}
