/* ============================================================
   GAVRILIS HVAC & Refrigeration — Design System
   Palette derived from brand logo: ice-blue glow + deep navy
   ============================================================ */

:root {
  /* Color */
  --navy-900: #081523;
  --navy-800: #0B1A2E;
  --navy-700: #122439;
  --navy-card: #16263c;
  --ice-500: #2BA8E8;
  --ice-400: #4FC0F5;
  --ice-300: #7FD3FF;
  --ice-glow: rgba(95, 203, 255, 0.55);
  --paper: #F5F8FB;
  --paper-2: #EAF1F7;
  --white: #FFFFFF;
  --ink: #0F2034;
  --ink-soft: #41566c;
  --line: #d7e3ee;
  --line-dark: rgba(127, 211, 255, 0.18);

  /* Type */
  --font-display: 'Saira', 'Arial Narrow', sans-serif;
  --font-body: 'Mulish', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --maxw: 1200px;
  --gut: clamp(1.1rem, 4vw, 2.5rem);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 10px 30px -12px rgba(11, 26, 46, 0.25);
  --shadow-lift: 0 18px 40px -16px rgba(11, 26, 46, 0.35);
  --t-fast: 0.18s cubic-bezier(.2,.7,.3,1);
  --t: 0.32s cubic-bezier(.2,.7,.3,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

p { margin: 0 0 1.1em; }
a { color: var(--ice-500); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--ice-400); }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }

/* ---------- Eyebrow / section heads ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ice-500);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.9rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: linear-gradient(90deg, var(--ice-500), transparent);
}

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--paper { background: var(--paper); }
.section-head { max-width: 720px; margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.section-head h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
.section-head p { color: var(--ink-soft); font-size: 1.06rem; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 21, 35, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 116px;
}
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand img {
  width: 300px; height: auto; max-width: 52vw; display: block;
  background: #fff; border-radius: 0; padding: 6px 14px;
  box-shadow: 0 6px 18px -8px rgba(0,0,0,0.5);
}
.nav { display: flex; align-items: center; gap: 0.3rem; }
.nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.96rem;
  color: #cfe2f2;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--white); background: rgba(95,203,255,0.12); }

.has-sub { position: relative; }
.submenu {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--navy-800);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lift);
  min-width: 290px; padding: 0.5rem;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all var(--t-fast);
}
.has-sub:hover .submenu, .has-sub:focus-within .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a { display: block; color: #cfe2f2; font-size: 0.92rem; padding: 0.6rem 0.8rem; }
.submenu a:hover { background: rgba(95,203,255,0.12); color: var(--white); }

.header-cta {
  font-family: var(--font-display); font-weight: 600;
  background: var(--ice-500); color: var(--navy-900) !important;
  padding: 0.6rem 1.1rem; border-radius: var(--radius-sm);
  white-space: nowrap; transition: background var(--t-fast), transform var(--t-fast);
}
.header-cta:hover { background: var(--ice-300); transform: translateY(-1px); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: #cfe2f2; margin: 5px 0; transition: var(--t-fast); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 600px at 78% -10%, rgba(43,168,232,0.28), transparent 60%),
    radial-gradient(800px 500px at 10% 110%, rgba(95,203,255,0.14), transparent 60%),
    linear-gradient(160deg, var(--navy-900), var(--navy-700));
  color: var(--white);
  padding-block: clamp(4rem, 9vw, 7.5rem);
}
.hero::after {
  /* frost / circuit signature line */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(transparent 96%, var(--line-dark) 96%),
    linear-gradient(90deg, transparent 96%, var(--line-dark) 96%);
  background-size: 60px 60px;
  mask-image: radial-gradient(900px 500px at 80% 0%, #000, transparent 70%);
  opacity: 0.5; pointer-events: none;
}
.hero .wrap { position: relative; z-index: 2; }
.hero h1 {
  color: var(--white);
  font-size: clamp(2.6rem, 7vw, 5rem);
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.hero h1 .accent {
  background: linear-gradient(100deg, var(--ice-300), var(--ice-500));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead {
  font-size: clamp(1.05rem, 2.3vw, 1.3rem);
  color: #c3d6e8; max-width: 52ch; margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.hero-meta {
  margin-top: 2.6rem; display: flex; flex-wrap: wrap; gap: 2.2rem;
  border-top: 1px solid var(--line-dark); padding-top: 1.8rem;
}
.hero-meta .stat .num { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--ice-300); line-height: 1; }
.hero-meta .stat .lab { font-size: 0.9rem; color: #9fb6cb; margin-top: 0.3rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  padding: 0.85rem 1.5rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; transition: all var(--t-fast);
}
.btn-primary { background: var(--ice-500); color: var(--navy-900); }
.btn-primary:hover { background: var(--ice-300); color: var(--navy-900); transform: translateY(-2px); box-shadow: 0 10px 24px -8px var(--ice-glow); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(127,211,255,0.4); }
.btn-ghost:hover { background: rgba(95,203,255,0.12); color: var(--white); border-color: var(--ice-400); }
.btn-dark { background: var(--navy-800); color: var(--white); }
.btn-dark:hover { background: var(--navy-700); color: var(--white); }

/* ============================================================
   EMERGENCY STRIP
   ============================================================ */
.emergency {
  background: linear-gradient(90deg, var(--ice-500), var(--ice-400));
  color: var(--navy-900);
}
.emergency .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.6rem 1.4rem; padding-block: 0.9rem; text-align: center; }
.emergency strong { font-family: var(--font-display); font-size: 1.05rem; }
.emergency a { color: var(--navy-900); font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: 0.02em; }
.emergency a:hover { color: var(--navy-700); }

/* ============================================================
   SERVICE CARDS
   ============================================================ */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.4rem; }
.card {
  position: relative; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem; overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--ice-500), var(--ice-300));
  transform: scaleX(0); transform-origin: left; transition: transform var(--t);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: var(--ice-300); }
.card:hover::before { transform: scaleX(1); }
.card .ic {
  width: 52px; height: 52px; border-radius: 12px; margin-bottom: 1.1rem;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--navy-800), var(--navy-700));
  color: var(--ice-300);
}
.card .ic svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.28rem; }
.card p { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 1.1rem; }
.card .more { font-family: var(--font-display); font-weight: 600; font-size: 0.92rem; display: inline-flex; align-items: center; gap: 0.4rem; }
.card .more::after { content: "→"; transition: transform var(--t-fast); }
.card:hover .more::after { transform: translateX(4px); }

/* ============================================================
   ABOUT / SPLIT
   ============================================================ */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split .body p { color: var(--ink-soft); }
.checklist { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.8rem; }
.checklist li { display: flex; gap: 0.7rem; align-items: flex-start; font-weight: 500; }
.checklist li::before {
  content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ice-500); color: var(--navy-900); display: grid; place-items: center;
  font-weight: 800; font-size: 0.85rem; margin-top: 2px;
}
.media-frame {
  border-radius: var(--radius); overflow: hidden; position: relative;
  box-shadow: var(--shadow-lift); border: 1px solid var(--line);
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.iso-badge {
  position: absolute; right: 16px; bottom: 16px; background: var(--white);
  border-radius: var(--radius-sm); padding: 8px 10px; box-shadow: var(--shadow-card);
}
.iso-badge img { height: 54px; width: auto; }

/* ============================================================
   LOGO STRIPS (clients / partners)
   ============================================================ */
.logo-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(1.6rem, 4vw, 3rem); }
/* Client logos — full colour, larger, subtle lift on hover */
.logo-strip img {
  height: 74px; width: auto; max-width: 180px; object-fit: contain;
  opacity: 0.92; transition: opacity var(--t), transform var(--t);
}
.logo-strip img:hover { opacity: 1; transform: translateY(-3px); }
/* Partner logos on dark section — placed on white chips so brand colours read correctly */
.logo-strip--dark img {
  height: 60px; width: auto; max-width: 170px; object-fit: contain;
  background: #fff; border-radius: 10px; padding: 12px 18px;
  opacity: 1; filter: none;
  box-shadow: 0 8px 22px -10px rgba(0,0,0,0.5);
  transition: transform var(--t), box-shadow var(--t);
}
.logo-strip--dark img:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -10px rgba(0,0,0,0.6); }

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  background:
    radial-gradient(700px 400px at 85% 50%, rgba(43,168,232,0.3), transparent 65%),
    linear-gradient(150deg, var(--navy-900), var(--navy-700));
  color: var(--white); border-radius: var(--radius); overflow: hidden;
  padding: clamp(2.4rem, 6vw, 4rem); position: relative;
}
.cta-band h2 { color: var(--white); font-size: clamp(1.7rem, 4vw, 2.6rem); max-width: 18ch; }
.cta-band p { color: #c3d6e8; max-width: 46ch; }
.cta-band .hero-actions { margin-top: 1.6rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--navy-900); color: #aebfd0; padding-block: clamp(3rem, 6vw, 4.5rem) 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.site-footer h4 { color: var(--white); font-size: 1.05rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 1.1rem; }
.site-footer img.flogo {
  width: 280px; height: auto; max-width: 100%; margin-bottom: 1.3rem;
  background: #fff; border-radius: 0; padding: 6px 14px;
}
.site-footer a { color: #aebfd0; }
.site-footer a:hover { color: var(--ice-300); }
.fmenu { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.fcontact { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.8rem; }
.fcontact li { display: flex; gap: 0.6rem; align-items: flex-start; }
.fcontact .ico { color: var(--ice-500); flex: none; }
.footer-bottom {
  margin-top: 2.6rem; padding-top: 1.5rem; border-top: 1px solid var(--line-dark);
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; justify-content: space-between;
  font-size: 0.86rem; color: #7d93a8;
}
.footer-bottom a { color: #9fb6cb; }

/* ============================================================
   PAGE HERO (interior pages)
   ============================================================ */
.page-hero {
  background:
    radial-gradient(900px 400px at 85% -20%, rgba(43,168,232,0.25), transparent 60%),
    linear-gradient(160deg, var(--navy-900), var(--navy-700));
  color: var(--white); padding-block: clamp(3rem, 6vw, 4.5rem);
}
.breadcrumbs { font-size: 0.85rem; color: #8fa6bc; margin-bottom: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.breadcrumbs a { color: #8fa6bc; }
.breadcrumbs a:hover { color: var(--ice-300); }
.breadcrumbs .sep { opacity: 0.5; }
.page-hero h1 { color: var(--white); font-size: clamp(2.1rem, 5vw, 3.4rem); max-width: 20ch; }
.page-hero .lead { color: #c3d6e8; max-width: 60ch; font-size: 1.1rem; margin: 0; }

/* ---------- Prose (service body) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2.2rem; }
.prose h3 { font-size: 1.25rem; margin-top: 1.8rem; }
.prose ul { padding-left: 0; list-style: none; display: grid; gap: 0.7rem; margin: 1.2rem 0; }
.prose ul li { display: flex; gap: 0.6rem; }
.prose ul li::before { content: "▸"; color: var(--ice-500); font-weight: 700; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 1.2rem; margin-top: 2rem; }
.feature {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem;
}
.feature h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.feature p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery { columns: 3; column-gap: 1rem; }
.gallery a {
  display: block; margin-bottom: 1rem; break-inside: avoid;
  border-radius: var(--radius-sm); overflow: hidden; position: relative;
  border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.gallery img { width: 100%; transition: transform var(--t); }
.gallery a:hover img { transform: scale(1.05); }
.gallery a::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(8,21,35,0.4));
  opacity: 0; transition: opacity var(--t);
}
.gallery a:hover::after { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(6,15,26,0.94); z-index: 1000;
  display: none; align-items: center; justify-content: center; padding: 4vw;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: var(--radius-sm); box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.lightbox .lb-close { position: absolute; top: 20px; right: 26px; background: none; border: 0; color: #fff; font-size: 2.4rem; cursor: pointer; line-height: 1; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); border: 0; color: #fff; font-size: 2rem; width: 54px; height: 54px; border-radius: 50%; cursor: pointer; transition: background var(--t-fast); }
.lightbox .lb-nav:hover { background: var(--ice-500); color: var(--navy-900); }
.lightbox .lb-prev { left: 3vw; } .lightbox .lb-next { right: 3vw; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,3.5rem); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.4rem; }
.field input, .field textarea {
  width: 100%; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: 0.98rem; background: var(--white); transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ice-500); box-shadow: 0 0 0 3px rgba(43,168,232,0.15); }
.field textarea { min-height: 140px; resize: vertical; }
.contact-info { background: var(--navy-800); color: #c3d6e8; border-radius: var(--radius); padding: clamp(1.6rem,4vw,2.4rem); }
.contact-info h3 { color: var(--white); }
.contact-info .row { display: flex; gap: 0.8rem; align-items: flex-start; margin-bottom: 1.2rem; }
.contact-info .ico { color: var(--ice-400); flex: none; margin-top: 2px; }
.contact-info a { color: var(--ice-300); }
.form-note { font-size: 0.85rem; color: var(--ink-soft); }
.form-status { padding: 0.8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; display: none; }
.form-status.ok { display: block; background: #e3f6e8; color: #1a7d3a; border: 1px solid #b6e6c4; }
.form-status.err { display: block; background: #fdecec; color: #b3261e; border: 1px solid #f5c2c0; }
.hp { position: absolute; left: -9999px; opacity: 0; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .gallery { columns: 2; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 116px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--navy-800); padding: 1rem; gap: 0.2rem; border-bottom: 1px solid var(--line-dark);
    transform: translateY(-130%); transition: transform var(--t); max-height: calc(100vh - 116px); overflow-y: auto;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 0.85rem 1rem; }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: rgba(255,255,255,0.04); margin: 0.2rem 0 0.4rem; }
  .header-cta { margin-top: 0.4rem; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .gallery { columns: 1; }
  .hero-meta { gap: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
