/* ------------------------------------------------------------
   Kelowna Computer Co. — base styles
   ------------------------------------------------------------ */

:root {
  --navy: #14335c;
  --navy-dark: #0e2647;
  --blue: #2f6fed;
  --blue-dark: #1f56c9;
  --blue-tint: #eaf2fb;
  --blue-chip: #dceafb;
  --ink: #1c2733;
  --grey: #5b6b7c;
  --grey-light: #8694a3;
  --line: #e2e8f0;
  --white: #ffffff;

  --blue-bright: #3b8bff;
  --star: #f5b301;

  --badge-blue-bg: #dbeafe;
  --badge-blue-fg: #2563eb;
  --badge-green-bg: #dcf5e6;
  --badge-green-fg: #1f9d55;
  --badge-purple-bg: #ece3fb;
  --badge-purple-fg: #7c3aed;
  --badge-teal-bg: #d9f3f2;
  --badge-teal-fg: #0d9488;
  --badge-orange-bg: #fde4cf;
  --badge-orange-fg: #ea7b2c;
  --badge-red-bg: #fee2e2;
  --badge-red-fg: #ef4444;

  --radius-card: 14px;
  --radius-btn: 999px;
  --shadow-card: 0 1px 2px rgba(20, 51, 92, 0.06), 0 8px 20px rgba(20, 51, 92, 0.05);

  --max-width: 1180px;
}

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

html { -webkit-text-size-adjust: 100%; }

html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
}

h1, h2, h3 { margin: 0; font-weight: 800; color: var(--navy); }

p { margin: 0; }

a { color: inherit; text-decoration: none; }

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

.wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7em 1.6em;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover { background: var(--blue-dark); }

/* ---------------- Header ---------------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--white);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-block: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

.logo-mark { border-radius: 50%; }

.logo-text {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.22em;
  color: var(--navy);
  line-height: 1.15; 
}

.logo-text span {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--grey-light);
}

.main-nav {
  display: flex;
  gap: 28px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--grey);
}

main {
  padding-top: 72px;
}

.main-nav a { padding-block: 4px; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--navy); }
.main-nav a.active { color: var(--blue); border-bottom-color: var(--blue); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  color: var(--white);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(14,38,71,0.88) 0%, rgba(14,38,71,0.62) 45%, rgba(14,38,71,0.15) 75%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 100px 38px;
  max-width: var(--max-width);
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-lede {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 36px;
}

.hero-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.hero-badges li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-badges .icon {
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255,255,255,0.8);
  border-radius: 50%;
  padding: 4px;
  box-sizing: content-box;
}

/* ---------------- Services ---------------- */

.services {
  background: var(--blue-tint);
  padding-block: 72px;
}

.section-head {
  text-align: center;
  max-width: 520px;
  margin: 0 auto 44px;
}

.section-head h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.section-head p { color: var(--grey); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px 22px;
}

.service-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  margin-bottom: 0;
}

.icon-badge .icon { width: 22px; height: 22px; }

.icon-badge-blue   { background: var(--badge-blue-bg);   color: var(--badge-blue-fg); }
.icon-badge-green  { background: var(--badge-green-bg);  color: var(--badge-green-fg); }
.icon-badge-purple { background: var(--badge-purple-bg); color: var(--badge-purple-fg); }
.icon-badge-teal   { background: var(--badge-teal-bg);   color: var(--badge-teal-fg); }
.icon-badge-orange { background: var(--badge-orange-bg); color: var(--badge-orange-fg); }
.icon-badge-red    { background: var(--badge-red-bg);    color: var(--badge-red-fg); }

.service-card h3 {
  font-size: 1.05rem;
  line-height: 1.25;
  margin-bottom: 0;
}

.service-card p {
  color: var(--grey);
  font-size: 0.92rem;
  margin-bottom: 0;
}

.learn-more {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.learn-more:hover { color: var(--blue-dark); }

/* ---------------- Reviews (Carousel) ---------------- */

.reviews {
  background: var(--white);
  padding-block: 72px;
}

.reviews[hidden] { display: none; }

.reviews-carousel {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius-card);
}

.carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}

.review-card {
  /* Width is set by JS so 1-up (mobile) / 3-up (desktop) is accurate */
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--blue-tint);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px 26px;
  box-sizing: border-box;
  min-height: 220px;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  background: var(--blue);
}

.review-avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
}

.review-name {
  font-size: 1rem;
  line-height: 1.25;
}

.review-rating-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 4px;
}

.review-stars {
  display: flex;
  gap: 2px;
}

.review-date {
  font-size: 0.82rem;
  color: var(--grey);
}

.review-stars svg {
  width: 16px;
  height: 16px;
  fill: #cbd5e1;
}

.review-stars svg.on { fill: var(--star); }

/* Truncate to 4 lines so every card stays the same size */
.review-text {
  color: var(--grey);
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reviews-summary {
  margin-top: 8px;
  font-weight: 700;
  color: var(--navy);
}

.review-name a:hover { color: var(--blue); text-decoration: underline; }

.reviews-more {
  text-align: center;
  margin-top: 36px;
}

/* Carousel controls */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(20, 51, 92, 0.08);
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  z-index: 2;
}

.carousel-btn:hover {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
  box-shadow: 0 4px 12px rgba(47, 111, 237, 0.25);
}

.carousel-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.carousel-btn svg {
  width: 20px;
  height: 20px;
}

.carousel-prev { left: 0; }
.carousel-next { right: 0; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: #cbd5e1;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.carousel-dot[aria-selected="true"],
.carousel-dot.active {
  background: var(--blue);
  transform: scale(1.2);
}

.carousel-dot:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .reviews-carousel {
    padding: 0 40px;
  }
  .carousel-btn {
    width: 36px;
    height: 36px;
  }
  .carousel-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* ---------------- About ---------------- */

.about {
  background: var(--blue-tint);
  padding-block: 72px;
}

/* ---------------- Contact ---------------- */

.contact {
  background: var(--blue-chip);
  padding-block: 72px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 32px;
  align-items: start;
  min-width: 0;
}

.contact-info,
.contact-form {
  min-width: 0;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-image {
  width: 100%;
  min-height: 220px;
  border-radius: var(--radius-card);
  background-size: cover;
  background-position: center;
  background-color: var(--blue-tint);
  box-shadow: var(--shadow-card);
}

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--white);
  border-top: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  margin-bottom: 10px;
}

/* Phone card – entire block is a tel: link on mobile; desktop copies via JS */
a.contact-card-phone {
  position: relative;
  background: #14335c;
  color: var(--white);
  border-top: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}

a.contact-card-phone:hover {
  background: #0f2a4d;
}

a.contact-card-phone:active {
  transform: scale(0.985);
}

a.contact-card-phone .contact-card-content h3 {
  color: #ffffff; /* brighter white */
}

a.contact-card-phone .contact-card-number {
  color: var(--white);
  font-weight: bold;
}

a.contact-card-phone .contact-card-subtext {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
}

/* Mobile-only “tap to call” indicator — right-aligned + attention animation */
.tap-to-call {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  margin-left: auto; /* push to the right */
  padding: 6px 12px;
  width: fit-content;
  border-radius: var(--radius-btn);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  animation: tap-pulse 2s ease-in-out infinite;
}

.tap-to-call svg {
  flex-shrink: 0;
  opacity: 0.95;
}

@keyframes tap-pulse {
  0%, 100% {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.25);
  }
  50% {
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
  }
}

@media (max-width: 900px) {
  .tap-to-call {
    display: inline-flex;
  }
}

/* Desktop copy-toast (appears inside the phone card) */
.copy-toast {
  position: absolute;
  bottom: 14px;
  right: 18px;
  padding: 6px 14px;
  border-radius: var(--radius-btn);
  background: var(--badge-green-fg);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 3;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.copy-toast[hidden] {
  display: none;
}

.copy-toast:not([hidden]) {
  display: inline-block;
}

@media (max-width: 900px) {
  .copy-toast {
    display: none !important; /* only relevant on desktop */
  }
}

.contact-card:nth-child(2) {
  background: #f1f5f9; /* light gray background */
  border-top: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
}

.contact-card:nth-child(2) .contact-card-content h3 {
  color: var(--blue-bright); /* brighter blue for label */
}

.contact-card:nth-child(2) .contact-card-hours {
  color: var(--navy);
  font-weight: bold;
}

.contact-card:nth-child(2) .contact-card-subtext {
  color: var(--grey);
  font-size: 0.92rem;
}

.contact-card:nth-child(3) {
  background: #f1f5f9; /* light gray background */
  border-top: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
  margin-bottom: 0;
}

.contact-card:nth-child(3) .contact-card-content h3 {
  color: var(--blue-bright); /* same blue as Hours */
}

.contact-card:nth-child(3) .contact-card-description {
  color: var(--navy);
  font-weight: bold;
}

.contact-card:nth-child(3) .contact-card-subtext {
  color: var(--grey);
  font-size: 0.92rem;
}

/* Font size classes (win over the base .contact-card-* sizes) */
.contact-card .fs-lg { font-size: 1.3rem; line-height: 1.3; }
.contact-card .fs-xl { font-size: 1.85rem; line-height: 1.2; }

/* Live open / closing soon / closed badge (hours.js sets data-state) */
.hours-status {
  --status-bg: #e2e8f0;
  --status-fg: #475569;
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px 0;
  padding: 4px 12px 4px 8px;
  border-radius: var(--radius-btn);
  background: var(--status-bg);
  color: var(--status-fg);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}

.hours-status[hidden] { display: none; }

.hours-status svg {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hours-status[data-state="open"] { --status-bg: var(--badge-green-bg); --status-fg: #146c3a; }
.hours-status[data-state="closing"] { --status-bg: #fef3c7; --status-fg: #92400e; }
.hours-status[data-state="closed"] { --status-bg: #e2e8f0; --status-fg: #475569; }

/* White icon on a blue circle, sized to match the label's line height */
.contact-card { --label-lh: 1.5rem; }

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--label-lh);
  height: var(--label-lh);
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
}

.contact-icon .icon { width: 60%; height: 60%; }
.icon.icon-solid { fill: currentColor; stroke: none; }

.contact-card-icon {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.contact-card-content {
  flex: 1;
}

.contact-card-content h3 {
  font-size: 1rem;
  line-height: var(--label-lh);
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: bold;
}

.contact-card-number,
.contact-card-hours,
.contact-card-description {
  margin: 0 0 4px 0;
  font-weight: bold;
  font-size: 1.1rem;
}

.contact-card-subtext {
  color: var(--grey);
  font-size: 0.92rem;
  margin: 0;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
}

.contact-detail h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.contact-detail p {
  color: var(--grey);
  font-size: 0.92rem;
}

.contact-detail a { color: var(--blue); font-weight: 600; }
.contact-detail a:hover { color: var(--blue-dark); }

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  min-width: 0;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.form-field label,
.form-label-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

.form-field .optional {
  font-weight: 400;
  color: var(--grey-light);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field textarea {
  font: inherit;
  color: var(--ink);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.65em 0.9em;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field textarea { resize: vertical; }

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.15);
}

/* Mobile – kill the resize handle */
@media (max-width: 768px) {
  .form-field textarea {
    resize: none;
  }
}

.pref-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.pref-group input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.pref-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--grey);
  padding: 0.55em 1.2em;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pref-group input[type="radio"]:checked + label {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.pref-group input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.recaptcha-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.btn-block {
  width: 100%;
}

.form-status {
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.2em;
}

.form-status.success { color: var(--badge-green-fg); }
.form-status.error { color: var(--badge-red-fg); }

/* Success state: fields are hidden, confirmation takes their place */
.contact-form.is-sent > *:not(.form-success) { display: none; }

.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 32px 8px;
  min-height: 320px;
  outline: none;
}

.form-success[hidden] { display: none; }

.form-success-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--badge-green-fg);
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 10px var(--badge-green-bg);
  margin-bottom: 14px;
  animation: success-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}

.form-success-icon svg { width: 44px; height: 44px; }

.form-success-icon path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: success-draw 0.4s ease-out 0.25s forwards;
}

.form-success h3 {
  font-size: 1.5rem;
  color: var(--navy);
  margin: 0;
}

.form-success p {
  font-size: 1.05rem;
  color: var(--grey);
  max-width: 34ch;
  margin: 0;
}

@keyframes success-pop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes success-draw {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .form-success-icon,
  .form-success-icon path { animation: none; stroke-dashoffset: 0; }
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  
  /* Icon stays beside the label; big text and subtext use the full card width */
  .contact-card {
    display: grid;
    grid-template-columns: var(--label-lh) 1fr;
    column-gap: 12px;
    row-gap: 0;
    align-items: start;
  }

  .contact-card-content { display: contents; }

  .contact-card-icon { grid-column: 1; grid-row: 1; }
  .contact-card-content h3 { grid-column: 2; grid-row: 1; }

  .contact-card-number,
  .contact-card-hours,
  .contact-card-description { grid-column: 1 / -1; grid-row: 2; }

  .contact-card-subtext { grid-column: 1 / -1; grid-row: 3; }

  .hours-card .hours-status { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .hours-card .contact-card-hours { grid-row: 3; }
  .hours-card .contact-card-subtext { grid-row: 4; }

  /* Tap indicator sits after the subtext on the phone card, right-aligned */
  a.contact-card-phone .tap-to-call {
    grid-column: 1 / -1;
    grid-row: 4;
    justify-self: end;
  }
}

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }
}

/* ---------------- Footer ---------------- */

.site-footer {
  padding-block: 24px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  color: var(--grey-light);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }

  .hero-inner { padding-block: 64px 56px; }
  .hero-badges { gap: 20px; }

  .service-grid { grid-template-columns: 1fr; }

  /* Mobile navigation */
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    gap: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 10;
    display: none;
  }

  .main-nav.open {
    transform: translateY(0);
    display: flex;
  }
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------------- Animation styles ---------------- */

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

.site-header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

/* ---------------- Service cards animation ---------------- */
/* Hidden start states are gated on .js (like the hero) so cards stay visible if animation.js never runs */
.js .service-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.service-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- Highlight cards animation (About) ---------------- */
.js .highlight-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.highlight-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- Contact cards animation (Contact) ---------------- */
.js .contact-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.contact-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- Highlight Banner (About) ---------------- */
.highlight-banner {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.highlight-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden; /* clips image cleanly to radius — avoids arc artifacts */
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  isolation: isolate; /* prevents subpixel blending arcs at rounded corners */
}

.highlight-card:hover {
  box-shadow: 0 8px 28px rgba(20, 51, 92, 0.12);
}

.highlight-image {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--navy-dark);
  /* Explicit top radii so the image itself is clipped even if parent overflow fails */
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  transform: translateZ(0); /* promote to own layer, reduces corner artifacts */
}

.highlight-content {
  padding: 20px 22px 22px;
  background: var(--white);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

.highlight-content h3 {
  margin-bottom: 6px;
  font-size: 1.1rem;
  color: var(--navy);
}

.highlight-content p {
  color: var(--grey);
  font-size: 0.95rem;
  margin-bottom: 0;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .highlight-banner {
    grid-template-columns: 1fr;
  }
  .highlight-image {
    height: 160px;
  }
}

/* Hide Google reCAPTCHA badge */
.grecaptcha-badge {
  visibility: hidden !important;
}

.recaptcha-notice {
  font-size: 0.75rem;
  color: var(--grey-light);
  text-align: center;
  margin-top: 6px;
  line-height: 1.35;
}

.recaptcha-notice a {
  color: var(--grey);
  text-decoration: underline;
}

.recaptcha-notice a:hover {
  color: var(--blue);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------------- Page-load veil ---------------- */
/* Pure white cover that lifts once fonts, images and reviews have settled.
   Only active when the inline <script> in <head> has added .js to <html>. */
.page-veil {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #ffffff;
  pointer-events: none;
}

html:not(.js) .page-veil { display: none; }

html.is-ready .page-veil {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

/* Hero entrance: hidden in CSS (no flash), revealed as the veil lifts */
.js .hero h1,
.js .hero-lede,
.js .hero-badges {
  opacity: 0;
  transform: translateY(20px);
}

.js.is-ready .hero h1,
.js.is-ready .hero-lede,
.js.is-ready .hero-badges {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.js.is-ready .hero h1 { transition-delay: 0.1s; }
.js.is-ready .hero-lede { transition-delay: 0.2s; }
.js.is-ready .hero-badges { transition-delay: 0.3s; }
