/* ==========================================================================
   CRISTAL FIBRAS PISCINAS - DESIGN SYSTEM & GLOBAL STYLES
   Impeccable Craft Floor Edition
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800;900&display=swap');

:root {
  /* Brand Color Tokens */
  --color-brand-navy: #0A2240;
  --color-brand-navy-light: #103460;
  --color-brand-blue: #0284C7;
  --color-brand-blue-hover: #0369A1;
  --color-brand-cyan: #06B6D4;
  --color-brand-cyan-light: #E0F2FE;
  --color-brand-emerald: #10B981;
  --color-brand-gold: #F59E0B;
  --color-brand-gold-glow: rgba(245, 158, 11, 0.25);
  --color-brand-whatsapp: #25D366;
  --color-brand-whatsapp-hover: #1EBE5D;

  /* Surfaces & Backgrounds */
  --color-bg-light: #F8FAFC;
  --color-bg-white: #FFFFFF;
  --color-bg-alt: #F1F5F9;
  --color-surface-card: #FFFFFF;
  --color-border: #E2E8F0;
  --color-border-focus: #0284C7;

  /* Typography Colors (High Contrast >= 4.5:1) */
  --color-text-main: #0F172A;
  --color-text-muted: #475569;
  --color-text-subtle: #64748B;
  --color-text-inverse: #FFFFFF;
  --color-text-inverse-muted: #94A3B8;

  /* Typography Scales */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Elevation Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --shadow-glow-blue: 0 0 25px rgba(2, 132, 199, 0.35);
  --shadow-glow-gold: 0 0 20px rgba(245, 158, 11, 0.35);

  /* Transitions & Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 300ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & BROWSER SURFACES
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-main);
  background-color: var(--color-bg-light);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Custom Selection */
::selection {
  background-color: var(--color-brand-blue);
  color: #FFFFFF;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--color-brand-blue);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-bg-alt);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-brand-navy);
}

/* Focus Ring */
:focus-visible {
  outline: 2px solid var(--color-brand-blue);
  outline-offset: 3px;
}

/* Links & Images */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-brand-navy);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  color: var(--color-text-muted);
  max-width: 75ch;
}

/* ==========================================================================
   LAYOUT CONTAINERS & UTILITIES
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding: 5rem 0;
  position: relative;
}

.section-title-wrap {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-brand-blue);
  background: var(--color-brand-cyan-light);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.125rem;
  margin: 0 auto;
}

/* ==========================================================================
   NAVBAR (FIXED WITH BLUR ON SCROLL)
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(10, 34, 64, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
}

.navbar.scrolled .nav-link {
  color: #E2E8F0;
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
  color: var(--color-brand-cyan);
}

.navbar.scrolled .brand-title {
  color: #FFFFFF;
}

.navbar.scrolled .brand-sub {
  color: var(--color-brand-cyan);
}

.navbar.scrolled .nav-phone-link {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.nav-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-brand-navy);
  line-height: 1;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-brand-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.75rem;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-main);
  position: relative;
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--color-brand-blue);
  transition: width var(--transition-normal);
  border-radius: var(--radius-full);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-brand-blue);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-brand-navy);
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
}

.nav-phone-link:hover {
  border-color: var(--color-brand-blue);
  color: var(--color-brand-blue);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-brand-navy);
}

.navbar.scrolled .nav-toggle {
  color: #FFFFFF;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  background: var(--color-brand-navy);
  color: var(--color-text-inverse);
  padding: 4.5rem 0 2rem 0;
  margin-top: auto;
  border-top: 4px solid var(--color-brand-blue);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  color: var(--color-text-inverse-muted);
  font-size: 0.95rem;
  margin-top: 1rem;
}

.footer-warranty-card {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-warranty-card .icon-gold {
  color: var(--color-brand-gold);
  flex-shrink: 0;
}

.footer-warranty-text strong {
  color: var(--color-brand-gold);
  display: block;
  font-size: 0.95rem;
}

.footer-warranty-text span {
  color: var(--color-text-inverse-muted);
  font-size: 0.8rem;
}

.footer-title {
  color: #FFFFFF;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--color-brand-cyan);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--color-text-inverse-muted);
  font-size: 0.925rem;
  transition: all var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-brand-cyan);
  transform: translateX(4px);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--color-text-inverse-muted);
  font-size: 0.925rem;
  margin-bottom: 1rem;
}

.footer-contact-item svg {
  color: var(--color-brand-cyan);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--color-text-inverse-muted);
  font-size: 0.875rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--color-brand-navy);
    flex-direction: column;
    padding: 2rem;
    gap: 1.25rem;
    transform: translateY(-150%);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-xl);
  }

  .nav-menu.open {
    transform: translateY(0);
  }

  .nav-link {
    color: #FFFFFF;
    font-size: 1.1rem;
  }

  .nav-actions .nav-phone-link {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
