/* ===== CornerStones Building LLC ===== */
:root {
  --white: #ffffff;
  --off-white: #f4f7fb;
  --blue: #1e6fb8;        /* primary blue */
  --blue-bright: #2f8fe0; /* lighter accent */
  --blue-dark: #14507f;
  --navy: #1c2a3a;        /* dark blue/grey */
  --navy-2: #243447;
  --slate: #5a6b7e;
  --line: #e2e8f0;
  --shadow: 0 10px 30px rgba(28, 42, 58, 0.10);
  --shadow-lg: 0 20px 50px rgba(28, 42, 58, 0.18);
  --radius: 14px;
  --radius-sm: 9px;
}

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

html {
  scroll-behavior: smooth;
  /* Prevent iOS Safari from arbitrarily inflating font sizes */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Anchor targets land below the sticky header instead of underneath it */
section[id] { scroll-margin-top: 86px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--navy);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1160px, 92%); margin-inline: auto; }

h1, h2, h3 {
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  line-height: 1.08;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--navy);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: 0.3px; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== Icons ===== */
.svg-ico { display: block; width: 18px; height: 18px; flex: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(30, 111, 184, 0.3); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-block { width: 100%; }

/* ===== Top bar ===== */
.topbar {
  background: var(--navy);
  color: #d7e2ee;
  font-size: 0.85rem;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar-contact { display: flex; gap: 20px; flex-wrap: wrap; }
.topbar-contact a { display: inline-flex; align-items: center; gap: 7px; }
.topbar-contact a:hover { color: var(--blue-bright); }
.topbar-contact .svg-ico { width: 15px; height: 15px; }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--blue);
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  border-radius: 10px;
  letter-spacing: 1px;
}
.logo-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}
.logo-text em { display: block; font-size: 0.72rem; font-style: normal; color: var(--blue); letter-spacing: 2px; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a { font-weight: 600; font-size: 0.95rem; color: var(--navy-2); }
.nav a:not(.nav-cta) {
  position: relative;
  padding-bottom: 4px;
}
.nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--blue);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav a:not(.nav-cta):hover { color: var(--blue); }
.nav a:not(.nav-cta):hover::after,
.nav a.active:not(.nav-cta)::after { transform: scaleX(1); }
.nav a.active:not(.nav-cta) { color: var(--blue); }
.nav-cta {
  background: var(--blue);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
}
.nav-cta:hover { background: var(--blue-dark); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--navy); border-radius: 3px; transition: 0.25s; }

/* ===== Hero ===== */
.hero {
  position: relative;
  color: #fff;
  background:
    linear-gradient(100deg, rgba(16,36,56,0.93) 0%, rgba(20,54,84,0.82) 45%, rgba(28,42,58,0.55) 100%),
    url("images/hero.jpg") center 40% / cover no-repeat,
    var(--navy);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.25;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; padding: 110px 0 130px; max-width: 760px; }
.hero::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 70px;
  background: linear-gradient(transparent, rgba(16, 30, 46, 0.55));
  z-index: 1;
  pointer-events: none;
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue-bright);
  margin-bottom: 16px;
}
.hero h1 { color: #fff; margin-bottom: 22px; }
.hero-sub { font-size: 1.15rem; color: #d8e3ef; max-width: 600px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 38px; font-size: 0.95rem; color: #cfe0f0; }
.hero-badges span { display: inline-flex; align-items: center; gap: 8px; }
.hero-badges .svg-ico { width: 18px; height: 18px; color: var(--blue-bright); }

/* ===== Page banner (subpages) ===== */
.page-banner {
  position: relative;
  color: #fff;
  padding: 70px 0 60px;
  background:
    linear-gradient(120deg, rgba(20,80,127,0.94), rgba(28,42,58,0.9)),
    var(--navy);
  overflow: hidden;
}
.page-banner::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.6;
}
.page-banner .container { position: relative; z-index: 2; }
.page-banner h1 { color: #fff; margin: 8px 0 10px; }
.page-banner-sub { color: #cfe0f0; font-size: 0.98rem; }

/* ===== Legal content ===== */
.legal { max-width: 820px; }
.legal h2 {
  font-size: 1.5rem;
  margin: 38px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}
.legal p { color: var(--slate); margin-bottom: 16px; }
.legal ul { color: var(--slate); margin: 0 0 18px 22px; display: grid; gap: 8px; }
.legal a { color: var(--blue); font-weight: 600; }
.legal a:hover { text-decoration: underline; }
.legal-contact {
  background: var(--off-white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 8px 0 30px;
}
.legal-contact p { margin-bottom: 6px; color: var(--navy); }
.legal-disclaimer {
  font-size: 0.9rem;
  color: var(--slate);
  font-style: italic;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

/* ===== Sections ===== */
.section { padding: 90px 0; }
.section-alt { background: var(--off-white); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head h2::after {
  content: "";
  display: block;
  width: 56px; height: 4px;
  margin: 16px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--blue-bright));
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 12px;
}
.section-lead { color: var(--slate); font-size: 1.08rem; margin-top: 14px; }

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--blue-bright); }
.service-card .svg-ico { transition: transform 0.25s ease; }
.service-card:hover .svg-ico { transform: scale(1.1) rotate(-3deg); }
.service-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: var(--off-white);
  border-radius: 12px;
  margin-bottom: 18px;
  color: var(--blue);
  transition: background 0.25s ease, color 0.25s ease;
}
.service-icon .svg-ico { width: 30px; height: 30px; }
.service-card:hover .service-icon { background: var(--blue); color: #fff; }
.service-card h3 { margin-bottom: 8px; }
.service-card p { color: var(--slate); font-size: 0.96rem; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: center; }
.about-media {
  border-radius: var(--radius);
  min-height: 420px;
  background:
    linear-gradient(150deg, rgba(20,80,127,0.9), rgba(28,42,58,0.92)),
    radial-gradient(circle at 70% 30%, rgba(47,143,224,0.4), transparent 60%);
  position: relative;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.build-illo {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  height: auto;
  color: rgba(255, 255, 255, 0.85);
  padding: 34px 26px 86px;
}
.about-media::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 38px 38px;
}
.about-media-inner {
  position: absolute;
  inset: auto 24px 24px 24px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.about-stat {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  flex: 1;
  min-width: 140px;
}
.about-stat strong { display: block; font-size: 1.7rem; font-family: 'Barlow Condensed', sans-serif; }
.about-text h2 { margin-bottom: 18px; }
.about-text p { color: var(--slate); margin-bottom: 16px; }
.checklist { list-style: none; margin: 22px 0 30px; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 32px; font-weight: 500; }
.checklist li::before {
  content: "";
  position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px;
  background: var(--blue);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4 4 10-10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

/* ===== Why ===== */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.why-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 32px 26px;
}
.why-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--blue-bright);
  line-height: 1;
  margin-bottom: 12px;
}
.why-card h3 { margin-bottom: 10px; }
.why-card p { color: var(--slate); font-size: 0.96rem; }

/* ===== Process ===== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  position: relative;
}
.process-step {
  text-align: center;
  padding: 10px 14px;
  position: relative;
}
.process-num {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(30,111,184,0.35);
  position: relative;
  z-index: 2;
  transition: transform 0.25s ease;
}
.process-step:hover .process-num { transform: translateY(-4px) scale(1.05); }
/* connecting line between steps (desktop) */
.process-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 32px; left: 50%;
  width: 100%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--blue-bright) 0 8px, transparent 8px 16px);
  opacity: 0.4;
  z-index: 1;
}
.process-step h3 { margin-bottom: 8px; }
.process-step p { color: var(--slate); font-size: 0.96rem; }

/* ===== FAQ ===== */
.faq-list { max-width: 800px; margin: 0 auto; display: grid; gap: 14px; }
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.faq-item[open] { box-shadow: var(--shadow); border-color: var(--blue-bright); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 22px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon {
  position: relative;
  width: 18px; height: 18px;
  flex: none;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--blue);
  border-radius: 2px;
  transition: transform 0.25s ease;
}
.faq-icon::before { top: 8px; left: 0; width: 18px; height: 2px; }
.faq-icon::after  { top: 0; left: 8px; width: 2px; height: 18px; }
.faq-item[open] .faq-icon::after { transform: rotate(90deg); opacity: 0; }
.faq-answer { padding: 0 22px 20px; }
.faq-answer p { color: var(--slate); margin: 0; }

/* ===== CTA band ===== */
.cta-band {
  position: relative;
  color: #fff;
  padding: 60px 0;
  background:
    linear-gradient(120deg, rgba(16,36,56,0.92), rgba(20,54,84,0.82)),
    url("images/cta-band.jpg") center / cover no-repeat,
    var(--navy);
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.6;
}
.cta-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-text h2 { color: #fff; margin-bottom: 8px; }
.cta-text p { color: #d8e3ef; font-size: 1.08rem; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== Gallery ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.gallery-item {
  aspect-ratio: 1 / 1;
  margin: 0;
  border-radius: var(--radius);
  background: var(--navy);
  position: relative;
  overflow: hidden;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 34px 18px 14px;
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: linear-gradient(transparent, rgba(28, 42, 58, 0.85));
  pointer-events: none;
}

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.contact-info h2 { margin-bottom: 16px; }
.contact-info > p { color: var(--slate); margin-bottom: 30px; }
.contact-list { list-style: none; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-ico {
  width: 46px; height: 46px;
  flex: none;
  display: grid; place-items: center;
  background: var(--off-white);
  border-radius: 12px;
  color: var(--blue);
}
.contact-ico .svg-ico { width: 22px; height: 22px; }
.contact-list strong { display: block; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--navy); }
.contact-list a, .contact-list span { color: var(--slate); }
.contact-list a:hover { color: var(--blue); }

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label { display: grid; gap: 7px; font-weight: 600; font-size: 0.9rem; color: var(--navy); }
.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: inherit;
  font-size: 0.98rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--off-white);
  color: var(--navy);
  font-weight: 400;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30,111,184,0.12);
}
.contact-form textarea { resize: vertical; }

/* ===== Footer ===== */
.footer { background: var(--navy); color: #cdd9e6; padding-top: 50px; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding-bottom: 36px; }
.footer-brand { display: flex; gap: 16px; align-items: center; }
.footer-brand strong { color: #fff; font-family: 'Barlow Condensed', sans-serif; font-size: 1.4rem; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-brand p { font-size: 0.92rem; }
.footer-reg { margin-top: 4px; font-size: 0.82rem; color: #9fb0c2; letter-spacing: 0.5px; }
.footer-reg span { color: var(--blue-bright); font-weight: 600; }
.footer-contact { display: grid; gap: 8px; align-content: center; }
.footer-contact a:hover { color: var(--blue-bright); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 0; font-size: 0.85rem; color: #9fb0c2; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 22px; }
.footer-links a:hover { color: var(--blue-bright); }

/* ===== Floating Widget ===== */
.widget { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.widget-fab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 22px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(30,111,184,0.45);
  transition: transform 0.18s ease, background 0.2s ease;
}
.widget-fab:hover { transform: translateY(-3px); background: var(--blue-dark); }
.widget-fab-icon { display: inline-flex; }
.widget-fab-icon .svg-ico { width: 20px; height: 20px; }

.widget-panel {
  width: 290px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  padding: 20px;
  transform: translateY(12px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: 0.22s ease;
}
.widget.open .widget-panel { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.widget-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.widget-head strong { font-family: 'Barlow Condensed', sans-serif; font-size: 1.25rem; text-transform: uppercase; color: var(--navy); }
.widget-close { background: none; border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--slate); }
.widget-text { font-size: 0.9rem; color: var(--slate); margin-bottom: 16px; }
.widget-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 10px;
  transition: 0.18s ease;
}
.widget-btn .svg-ico { width: 18px; height: 18px; }
.widget-call { background: var(--blue); color: #fff; }
.widget-call:hover { background: var(--blue-dark); }
.widget-text-btn { background: var(--off-white); color: var(--navy); border: 1px solid var(--line); }
.widget-text-btn:hover { border-color: var(--blue); color: var(--blue); }
.widget-email { background: var(--navy); color: #fff; margin-bottom: 0; }
.widget-email:hover { background: var(--navy-2); }

/* ===== Back to top ===== */
.to-top {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 80;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease, color 0.2s ease;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.to-top .svg-ico { width: 20px; height: 20px; }

/* ===== Responsive ===== */
/* ===== Animations ===== */

/* Hero entrance */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
.hero-eyebrow, .hero h1, .hero-sub, .hero-actions, .hero-badges {
  opacity: 0;
  animation: fadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-eyebrow { animation-delay: 0.10s; }
.hero h1       { animation-delay: 0.25s; }
.hero-sub      { animation-delay: 0.45s; }
.hero-actions  { animation-delay: 0.62s; }
.hero-badges   { animation-delay: 0.78s; }

/* Header shadow on scroll */
.header { transition: box-shadow 0.3s ease, background 0.3s ease; }
.header.scrolled { box-shadow: 0 8px 26px rgba(28, 42, 58, 0.12); }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* Primary button shine sweep */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0; left: -130%;
  width: 65%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-22deg);
  transition: left 0.65s ease;
}
.btn-primary:hover::after { left: 150%; }

/* Self-drawing illustration */
.build-illo path, .build-illo rect, .build-illo circle {
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gallery hover lift */
.gallery-item { transition: transform 0.4s ease, box-shadow 0.4s ease; }
.gallery-item:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); }

/* Why-card lift */
.why-card { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.why-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

/* Widget attention pulse */
@keyframes fabPulse {
  0%, 100% { box-shadow: 0 12px 28px rgba(30,111,184,0.45); }
  50%      { box-shadow: 0 14px 38px rgba(30,111,184,0.75); }
}
.widget-fab { animation: fabPulse 2.6s ease-in-out infinite; }
.widget.open .widget-fab { animation: none; }
.widget-fab-icon { transition: transform 0.3s ease; }
.widget.open .widget-fab-icon { transform: rotate(8deg) scale(1.05); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-eyebrow, .hero h1, .hero-sub, .hero-actions, .hero-badges { opacity: 1; }
  .build-illo path, .build-illo rect, .build-illo circle { stroke-dashoffset: 0 !important; }
}

@media (max-width: 760px) {
  .process-step:not(:last-child)::after { display: none; }
  .cta-inner { flex-direction: column; text-align: center; align-items: center; }
}

@media (max-width: 860px) {
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 24px; }
  .nav-cta { margin: 8px 24px; text-align: center; }
  .nav-toggle { display: flex; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-media { min-height: 280px; }
  .topbar-inner { justify-content: center; }
  .topbar-item { display: none; }
}
/* ===== Phones ===== */
@media (max-width: 640px) {
  /* Compact top bar: phone number only, single tidy row */
  .topbar-inner { padding: 7px 0; gap: 6px; }
  .topbar-contact { gap: 14px; justify-content: center; width: 100%; }
  .topbar-contact a { font-size: 0.8rem; }
  .topbar-contact a[href^="mailto"] { display: none; }

  /* Header: tighter */
  .header-inner { padding: 10px 0; }
  .logo-mark { width: 38px; height: 38px; font-size: 1.1rem; }
  .logo-text { font-size: 1.2rem; }

  /* Hero: let the headline flow naturally, right-size the type */
  .hero h1 br { display: none; }
  h1 { font-size: clamp(2rem, 8.5vw, 2.6rem); }
  h2 { font-size: clamp(1.6rem, 6.5vw, 2.1rem); }
  .hero-content { padding: 54px 0 66px; }
  .hero-eyebrow { letter-spacing: 2.5px; font-size: 0.74rem; }
  .hero-sub { font-size: 1rem; margin-bottom: 26px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { width: 100%; }
  .hero-badges { gap: 12px 18px; margin-top: 28px; font-size: 0.86rem; }

  /* Sections: tighter rhythm */
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 34px; }
  .section-lead { font-size: 0.98rem; }
  .eyebrow { font-size: 0.74rem; }

  /* Cards */
  .services-grid { gap: 14px; }
  .service-card { padding: 22px 20px; }
  .service-icon { width: 48px; height: 48px; margin-bottom: 14px; }
  .why-card { padding: 24px 20px; }
  .why-num { font-size: 2rem; }
  .process-grid { gap: 18px; }

  /* About */
  .about-grid { gap: 26px; }
  .about-media { min-height: 240px; }
  .about-text .btn { width: 100%; }

  /* FAQ */
  .faq-item summary { padding: 15px 16px; font-size: 0.98rem; }
  .faq-answer { padding: 0 16px 15px; }
  .faq-answer p { font-size: 0.94rem; }

  /* Gallery: two-up so it doesn't scroll forever */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-item { border-radius: 10px; }
  .gallery-item figcaption { font-size: 0.92rem; letter-spacing: 0.8px; padding: 22px 10px 9px; }

  /* CTA band */
  .cta-band { padding: 44px 0; }
  .cta-actions { width: 100%; flex-direction: column; }
  .cta-actions .btn { width: 100%; }

  /* Contact form */
  .form-row { grid-template-columns: 1fr; }
  .contact-grid { gap: 30px; }
  .contact-form { padding: 20px 16px; }

  /* Footer */
  .footer-inner { flex-direction: column; gap: 18px; }
  .footer-bottom-inner { justify-content: center; text-align: center; }

  /* Floating controls: smaller, out of the way */
  .widget { right: 14px; bottom: 14px; }
  .widget-fab-label { display: none; }
  .widget-fab { padding: 15px; }
  .widget-panel { width: min(290px, calc(100vw - 28px)); }
  .to-top { left: 14px; bottom: 14px; width: 42px; height: 42px; }
}
