/* ============================================================
   Hometown Design — Ox Alpha multi-page build
   Blue & black palette: light blue surfaces, navy accents,
   near-black text.
   ============================================================ */

:root {
  /* Light blue-gray page surface */
  --warm-cream: #EEF3F8;
  /* Light blue borders/panels */
  --warm-tan: #C9D8E8;
  /* Primary accent blue (buttons, active nav, headings) */
  --brick: #2E6DA4;
  --brick-dark: #1F4E79;
  /* Navy (nav bar, badges) */
  --forest: #16324F;
  --forest-dark: #0B1F33;
  /* Near-black text */
  --ink: #101418;
  --muted: #4A5560;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: Georgia, 'Times New Roman', serif;
  background-color: var(--warm-cream);
  color: var(--ink);
  line-height: 1.6;
}

/* Abstract blue watercolor wash behind everything */
body {
  background-image: url('images/abstract-blue-bg.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
}

img { max-width: 100%; display: block; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 24px; }

/* Keep real page content above the fixed watermark layer */
.hero-banner, .main-nav, .wrap, .footer-street, footer {
  position: relative;
  z-index: 1;
}

/* ---------- Masthead ---------- */
/* Full-viewport-width hero banner, height proportional to viewport width
   (clamp keeps it usable on phones and capped on very wide monitors).
   object-fit: cover crops top/bottom; object-position is anchored on the
   baked-in text band (which sits just above the image's vertical middle),
   so the title text stays fully visible at every width and zoom level. */
.hero-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.hero-image {
  width: 100%;
  height: clamp(120px, 20vw, 400px);
  display: block;
  object-fit: cover;
  object-position: center 55%;
}
.hero-text {
  position: absolute;
  left: 5%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35), 0 0 20px rgba(251,246,238,0.5);
}
.hero-town {
  font-family: 'Brush Script MT', 'Segoe Script', 'Apple Chancery', cursive;
  font-size: 2.4rem;
  color: #fff;
  line-height: 1.1;
  letter-spacing: 0.02em;
}
.hero-sub {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}

.masthead {
  text-align: center;
  padding: 36px 0 24px;
}

.tagline {
  font-size: 1.25rem;
  color: var(--forest);
  font-style: italic;
}

/* ---------- Navigation ---------- */
/* Full-viewport-width bar directly below the hero image */
.main-nav {
  background: var(--forest);
  border-bottom: 3px solid var(--warm-tan);
}

.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
}

.main-nav li { margin: 0 10px; }

.main-nav a {
  display: block;
  color: var(--warm-cream);
  text-decoration: none;
  padding: 12px 12px;
  font-size: 0.95rem;
  white-space: nowrap;
}

.main-nav a:hover { background: var(--forest-dark); }
.main-nav a.active { background: var(--brick); }

/* Dynamic menu: the blue bar stays put; each button slides in from the
   LEFT EDGE of the screen to its own position, one at a time, starting
   with the RIGHTMOST and cascading quickly leftward (--r = steps from the
   right end, set per item in inc/header.php). Replayed on every menu
   click (see inc/script.js) and on every navigation, since each page
   re-runs it. */
.main-nav li {
  animation: navItemIn 0.45s ease-out both;
  animation-delay: calc(0.12s + var(--r, 0) * 0.07s);
}
/* Clicking a menu item re-triggers the same cascade (class toggled in JS) */
.main-nav.nav-replay li { animation-name: navItemReplay; }
@keyframes navItemIn {
  from { opacity: 0; transform: translateX(-100vw); }
  to   { opacity: 1; transform: none; }
}
@keyframes navItemReplay {
  from { opacity: 0; transform: translateX(-100vw); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .main-nav li { animation: none; }
}

/* ---------- Page head ---------- */
.page-head { text-align: center; padding: 44px 0 8px; }

.page-head h2 {
  color: var(--brick-dark);
  font-size: 2.1rem;
  margin-bottom: 6px;
}

.page-head .subtitle {
  color: var(--forest);
  font-style: italic;
  font-size: 1.25rem;
}

/* ---------- Content sections ---------- */
.intro-text {
  font-size: 1.2rem;
  text-align: center;
  margin: 40px 0;
  font-weight: bold;
  line-height: 1.8;
}

section.service { padding: 36px 0; border-bottom: 1px solid var(--warm-tan); }
section.service:last-of-type { border-bottom: none; }

h3.service-sub {
  color: var(--forest);
  font-size: 1.3rem;
  margin-bottom: 20px;
  font-style: italic;
  font-weight: normal;
}

.summary { font-size: 1.1rem; margin-bottom: 24px; }

ul.services { list-style: none; padding-left: 0; }

ul.services li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-size: 1.05rem;
}

ul.services li::before {
  content: '\2713';
  color: var(--brick);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* ---------- Home overview cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 32px 0 8px;
}

.card {
  background: rgba(247, 250, 253, 0.88);
  border: 1px solid var(--warm-tan);
  border-radius: 8px;
  padding: 24px;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease,
              background 0.35s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(22, 50, 79, 0.16);
  border-color: var(--brick);
}

/* Blue/white inversion: on hover, or toggled by click (.inverted — see
   inc/script.js). Reverts on mouse-out / a second click / clicking elsewhere. */
.card:hover,
.card.inverted {
  background: #2E6DA4;
  border-color: #2E6DA4;
}
.card:hover h3,
.card.inverted h3 { color: #fff; }
.card:hover p,
.card.inverted p { color: rgba(255, 255, 255, 0.92); }
.card:hover a.more,
.card.inverted a.more { color: #fff; }
.card:hover .card-icon,
.card.inverted .card-icon { background: rgba(255, 255, 255, 0.18); }
.card:hover .card-icon svg,
.card.inverted .card-icon svg { color: #fff; }

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--warm-tan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.card-icon svg {
  width: 30px;
  height: 30px;
  color: var(--brick-dark);
}

.card h3 {
  color: var(--brick);
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.card p {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.card a.more {
  color: var(--forest);
  font-weight: bold;
  text-decoration: none;
}

.card a.more:hover { text-decoration: underline; }

/* ---------- CTA ---------- */
.cta-container {
  text-align: center;
  padding: 56px 32px;
  background-color: rgba(201, 216, 232, 0.85);
  margin: 48px 0 24px;
  border: 2px solid var(--forest-dark);
  border-radius: 14px;
}

.cta-container h2 {
  margin-bottom: 12px;
  color: var(--brick-dark);
}

/* ---------- CTA interactive effects ---------- */
/* The block tilts in 3D toward the cursor (JS sets --tilt-x/--tilt-y),
   sweeps a light sheen on hover, glows, and ripples on click. */
.cta-container {
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Higher-specificity override so the JS tilt transform survives the
   scroll-reveal system's "transform: none !important" once revealed. */
.reveal.in-view.cta-container {
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) !important;
}

/* Light sheen that sweeps across on hover */
.cta-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -80%;
  width: 55%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.9s ease;
  pointer-events: none;
}

.cta-container:hover::after { left: 135%; }

.cta-container:hover {
  border-color: var(--brick);
  box-shadow: 0 18px 40px rgba(22, 50, 79, 0.18);
}

/* Click ripple (span injected by script.js at the click point) */
.cta-ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(46, 109, 164, 0.35) 0%,
    rgba(46, 109, 164, 0.12) 45%,
    transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  animation: ctaRipple 0.7s ease-out forwards;
}

@keyframes ctaRipple {
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

.cta-button {
  display: inline-block;
  background-color: var(--brick);
  color: var(--warm-cream);
  text-decoration: none;
  padding: 16px 32px;
  font-size: 1.2rem;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.3s;
  margin-top: 16px;
}

.cta-button:hover { background-color: var(--brick-dark); }

/* ---------- Service detail cards (per-service pages) ---------- */
.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.service-card {
  background: rgba(247, 250, 253, 0.88);
  border: 1px solid var(--warm-tan);
  border-radius: 8px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brick), var(--forest));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(22, 50, 79, 0.16);
  border-color: var(--brick);
}

.service-card:hover::before { transform: scaleX(1); }

.service-card h4 {
  color: var(--brick-dark);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.service-card p {
  font-size: 0.98rem;
  color: var(--muted);
}

/* ---------- Contact form ---------- */
.contact-form {
  background: rgba(247, 250, 253, 0.88);
  border: 1px solid var(--warm-tan);
  border-radius: 8px;
  padding: 32px;
  margin: 32px 0 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-field { margin-bottom: 18px; }

.form-field label {
  display: block;
  font-weight: bold;
  color: var(--forest);
  margin-bottom: 6px;
}

.form-field .req { color: var(--brick); }

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--warm-tan);
  border-radius: 4px;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brick);
  box-shadow: 0 0 0 3px rgba(46, 109, 164, 0.15);
}

.form-field textarea { resize: vertical; }

.form-note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Center the submit button and privacy note inside the contact form */
.contact-form .cta-button {
  display: block;
  margin: 16px auto 0;
}

.contact-form .form-note {
  text-align: center;
}

/* Honeypot: hidden from humans, still present for bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-panel {
  background: rgba(247, 250, 253, 0.92);
  border: 1px solid var(--warm-tan);
  border-left: 5px solid var(--brick);
  border-radius: 8px;
  padding: 28px 32px;
  margin: 32px 0 8px;
}

.form-panel h3 { color: var(--brick-dark); margin-bottom: 10px; }

.form-errors { border-left-color: #B23A2E; }
.form-errors ul { margin-left: 20px; }

/* Thank-you page success panel: center the content (user request) */
.form-success { text-align: center; }
.form-success .cta-button { display: inline-block; }

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 22px; }
}

/* ---------- Motion: scroll-reveal ---------- */
.reveal {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform, opacity;
}

.reveal.in-view {
  opacity: 1;
  transform: none !important;
}

/* A different entrance motion per page */
.page-home   .reveal { transform: translateY(40px); }
.page-design .reveal { transform: translateY(50px); }
.page-updates .reveal { transform: translateX(-70px); }
.page-repairs .reveal { transform: scale(0.82); }
.page-mobile .reveal { transform: translateX(70px); }
.page-support .reveal { transform: perspective(900px) rotateX(28deg) translateY(40px); }

/* ---------- Motion: ambient effects ---------- */
.hero-image {
  animation: heroZoom 20s ease-in-out infinite alternate;
  /* Anchor the Ken-Burns zoom to the LEFT edge: town header images carry
     their baked-in title text at the left edge (e.g. "Farmville, VA"), and
     a center-origin zoom was pushing that text off-screen. Zooming from
     the left keeps the text pinned; only right-side scenery crops. The
     generic banner's centered text is unaffected (it ends well before the
     right edge). */
  transform-origin: left center;
}

@keyframes heroZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.15); }
}

.cta-button {
  animation: ctaPulse 3.2s ease-out infinite;
}

@keyframes ctaPulse {
  0%   { box-shadow: 0 0 0 0 rgba(46, 109, 164, 0.45); }
  70%  { box-shadow: 0 0 0 16px rgba(46, 109, 164, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 109, 164, 0); }
}

.main-nav a {
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  background: var(--warm-tan);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  .hero-image, .cta-button { animation: none; }
  .reveal { opacity: 1; transform: none !important; transition: none; }
  .cta-container::after { display: none; }
  .cta-ripple { display: none; }
  .reveal.in-view.cta-container { transform: none !important; }
}

/* ---------- Footer ---------- */
/* Full-viewport-width decorative street strip above the footer */
.footer-street {
  width: 100%;
  display: block;
  max-height: 280px;
  object-fit: cover;
  object-position: center;
  margin-top: 48px;
  border-top: 3px solid var(--warm-tan);
}

footer {
  text-align: center;
  padding: 24px 0 48px;
  background: var(--forest-dark);
  color: var(--warm-cream);
  /* Plainer sans-serif for the footer line (was the theme's Georgia serif),
     with a little more breathing room per user feedback */
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  line-height: 1.6;
}

/* ============================================================
   Per-page interactive service presentations
   (each service page gets its own distinct treatment)
   ============================================================ */

/* --- 1. Website Design: interactive tabbed showcase --- */
.design-showcase {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  margin-top: 32px;
  align-items: stretch;
}
.design-tablist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.design-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(247, 250, 253, 0.85);
  border: 1px solid var(--warm-tan);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background 0.25s ease, border-color 0.25s ease,
              transform 0.25s ease, box-shadow 0.25s ease;
}
.design-tab .tab-icon {
  width: 34px; height: 34px; flex: 0 0 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(46, 109, 164, 0.12);
  color: var(--brick-dark);
}
.design-tab .tab-icon svg { width: 18px; height: 18px; }
.design-tab:hover { transform: translateX(4px); border-color: var(--brick); }
.design-tab.is-active {
  background: var(--brick-dark);
  border-color: var(--brick-dark);
  color: #fff;
  box-shadow: 0 6px 16px rgba(31, 78, 121, 0.25);
}
.design-tab.is-active .tab-icon { background: rgba(255, 255, 255, 0.18); color: #fff; }
.design-stage {
  position: relative;
  display: grid;
  background: rgba(247, 250, 253, 0.88);
  border: 1px solid var(--warm-tan);
  border-radius: 14px;
  padding: 36px 32px;
  min-height: 260px;
}
.design-slide {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
  text-align: center;
}
.design-slide.is-active { opacity: 1; transform: none; pointer-events: auto; }
.design-big-icon { width: 72px; height: 72px; margin: 0 auto 16px; }
.design-big-icon svg { width: 38px; height: 38px; }
.design-slide h4 { color: var(--brick-dark); font-size: 1.35rem; margin-bottom: 10px; }
.design-slide p { color: var(--muted); max-width: 46ch; margin: 0 auto; }
.design-points {
  list-style: none;
  margin: 20px auto 0;
  padding: 0;
  max-width: 46ch;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.design-points li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}
.design-points li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brick);
  font-weight: 700;
}

/* --- 2. Updates & Maintenance: self-checking checklist --- */
.update-checklist {
  list-style: none;
  margin: 32px auto 0;
  display: grid;
  gap: 14px;
  max-width: 760px;
}
.check-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: rgba(247, 250, 253, 0.85);
  border: 1px solid var(--warm-tan);
  border-radius: 12px;
  padding: 16px 20px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.check-item:hover { border-color: var(--brick); transform: translateX(4px); }
/* Blue/white inversion: on hover, or toggled by click (.inverted — see
   inc/script.js). Reverts on mouse-out / a second click / clicking elsewhere. */
.check-item:hover,
.check-item.inverted {
  background: #2E6DA4;
  border-color: #2E6DA4;
}
.check-item:hover .check-text h4,
.check-item.inverted .check-text h4 { color: #fff; }
.check-item:hover .check-text p,
.check-item.inverted .check-text p { color: rgba(255, 255, 255, 0.92); }
.check-item.checked {
  border-color: var(--brick);
  box-shadow: 0 4px 14px rgba(46, 109, 164, 0.15);
}
.check-box {
  position: relative;
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 50%;
  border: 2px solid var(--warm-tan);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--brick-dark);
  background: rgba(46, 109, 164, 0.08);
  transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
}
.check-item.checked .check-box {
  background: var(--brick);
  border-color: var(--brick);
  transform: scale(1.08);
}
.check-box > svg:first-child { width: 20px; height: 20px; }
.check-item.checked .check-box > svg:first-child { opacity: 0; transition: opacity 0.2s ease; }
.check-mark {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px; height: 22px;
  color: #fff;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
}
.check-item.checked .check-mark { animation: drawCheck 0.45s ease forwards; }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

/* Blue/white inversion of the check circle (hover or click-locked).
   These rules sit AFTER the .checked rules on purpose: same specificity,
   later position, so the inverted state always wins over the brick circle. */
.check-item:hover .check-box,
.check-item.inverted .check-box {
  background: #fff;
  border-color: #fff;
  color: #2E6DA4;
}
/* Hover: the checkmark itself, fully drawn in blue on the white circle. */
.check-item:hover .check-box .check-mark {
  animation: none;
  stroke-dashoffset: 0;
  opacity: 1;
  color: #2E6DA4;
}
/* Click-locked: the item's own icon returns (blue on the white circle). */
.check-item.inverted .check-box > svg:first-child { opacity: 1; }
.check-item.inverted .check-box .check-mark {
  animation: none;
  opacity: 0;
}
.check-text h4 { color: var(--brick-dark); font-size: 1.05rem; }
.check-text p { color: var(--muted); font-size: 0.95rem; }

/* --- 3. Repairs & Fixes: click-to-flip problem/fix cards --- */
.fix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 32px;
}
/* Center a lone card in the last row (the grid is at most 3 columns wide). */
@media (min-width: 560px) {
  .flip-card:last-child:nth-child(3n + 1) { grid-column: 2; }
}
.flip-card {
  perspective: 1000px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.flip-inner {
  position: relative;
  display: block;
  width: 100%;
  min-height: 215px;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
}
.flip-card.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px;
  border-radius: 14px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip-front {
  background: rgba(247, 250, 253, 0.9);
  border: 1px solid var(--warm-tan);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.flip-card:hover .flip-front {
  border-color: var(--brick);
  box-shadow: 0 8px 20px rgba(31, 78, 121, 0.15);
}
.flip-back {
  background: var(--brick-dark);
  color: #fff;
  border: 1px solid var(--brick-dark);
  transform: rotateY(180deg);
}
.flip-title {
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--brick-dark);
  text-align: center;
}
.flip-desc { font-size: 0.95rem; text-align: center; line-height: 1.5; }
.flip-hint {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.flip-back .flip-hint { color: rgba(255, 255, 255, 0.75); }
.flip-check {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex; align-items: center; justify-content: center;
}
.flip-check svg { width: 24px; height: 24px; color: #fff; }
.flip-icon { width: 48px; height: 48px; }
.flip-icon svg { width: 26px; height: 26px; }

/* --- 4. Mobile & Performance: draggable phone-card strip --- */
.phone-strip {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 26px 8px 18px;
  cursor: grab;
  scrollbar-width: thin;
}
.phone-strip.dragging { cursor: grabbing; }
.phone-card {
  flex: 0 0 230px;
  background: var(--forest-dark);
  border-radius: 30px;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(11, 31, 51, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.phone-card:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 16px 32px rgba(11, 31, 51, 0.3);
}
.phone-notch {
  display: block;
  width: 80px; height: 6px;
  border-radius: 3px;
  background: rgba(238, 243, 248, 0.35);
  margin: 4px auto 10px;
}
.phone-screen {
  background: rgba(247, 250, 253, 0.96);
  border-radius: 20px;
  padding: 22px 16px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.phone-icon { width: 52px; height: 52px; }
.phone-icon svg { width: 28px; height: 28px; }
.phone-screen h4 { color: var(--brick-dark); font-size: 1rem; }
.phone-screen p { color: var(--muted); font-size: 0.88rem; }
.phone-home {
  display: block;
  width: 34px; height: 34px;
  border: 2px solid rgba(238, 243, 248, 0.35);
  border-radius: 50%;
  margin: 10px auto 2px;
}

/* Device variety: modern phones (punch-hole camera, no home button)
   and tablets mixed in with the classic phones. */
.device-cam {
  display: block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(238, 243, 248, 0.35);
  margin: 6px auto 8px;
}
.punch-hole {
  display: block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--forest-dark);
  margin: 0 auto;
  flex: 0 0 auto;
}
.device-phone-modern {
  flex-basis: 230px;
  border-radius: 34px;
  padding: 8px;
}
.device-phone-modern .phone-screen {
  border-radius: 27px;
  min-height: 252px;
  padding-top: 14px;
}
.device-tablet {
  flex-basis: 330px;
  border-radius: 22px;
  padding: 14px;
}
.device-tablet .phone-screen {
  border-radius: 12px;
  min-height: 212px;
}
.device-tablet .phone-screen h4 { font-size: 1.1rem; }
.device-tablet .phone-screen p { font-size: 0.92rem; }
.device-tablet .phone-icon { width: 60px; height: 60px; }
.device-tablet .phone-icon svg { width: 32px; height: 32px; }
.strip-hint {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 6px;
  font-style: italic;
}

/* --- 5. Tech Support: chat-style replay conversation --- */
.chat-replay {
  max-width: 640px;
  margin: 32px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-bubble {
  position: relative;
  max-width: 82%;
  padding: 14px 18px;
  border-radius: 16px;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
}
.chat-user {
  align-self: flex-end;
  background: var(--brick-dark);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bot {
  align-self: flex-start;
  background: rgba(247, 250, 253, 0.92);
  border: 1px solid var(--warm-tan);
  border-bottom-left-radius: 4px;
}
.chat-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
  opacity: 0.75;
}
.chat-text { font-size: 0.98rem; }
.chat-replay.in .chat-bubble {
  animation: chatPop 0.4s ease forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes chatPop { to { opacity: 1; transform: none; } }
.typing-dots {
  position: absolute;
  top: -14px;
  left: 18px;
  display: inline-flex;
  gap: 5px;
  padding: 10px 14px;
  background: rgba(247, 250, 253, 0.92);
  border: 1px solid var(--warm-tan);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  opacity: 0;
}
.typing-dots i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brick);
  animation: typingBounce 1s infinite ease-in-out;
}
.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}
.chat-replay.in .chat-bot .typing-dots {
  animation: dotsShow 0.01s linear forwards, dotsHide 0.01s linear forwards;
  animation-delay: calc(var(--d, 0ms) - 450ms), var(--d, 0ms);
}
@keyframes dotsShow { to { opacity: 1; } }
@keyframes dotsHide { to { opacity: 0; } }

/* ---------- Background script watermark (decorative, fixed to viewport) ---------- */
.bg-watermark {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.45) 55%, transparent 92%);
          mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.45) 55%, transparent 92%);
}
.bg-watermark-word {
  position: absolute;
  left: 50%;
  /* Bands spread evenly across the viewport for any word count:
     --wm-i = word index, --wm-d = word count - 1 (set inline per word). */
  top: calc(5vh + (86vh * var(--wm-i, 0) / var(--wm-d, 2)));
  transform: translateX(-50%);
  font-family: 'Brush Script MT', 'Segoe Script', 'Apple Chancery', cursive;
  line-height: 1;
  white-space: nowrap;
  /* Blues from the site theme, fading to fully transparent at the bottom */
  background: linear-gradient(180deg, #1F3D5C 0%, #3E6B96 55%, rgba(110, 147, 184, 0) 96%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  opacity: 0.16;
  animation: watermarkDrift var(--wm-dur, 44s) ease-in-out infinite alternate;
  animation-delay: calc(var(--wm-i, 0) * -13s);
}
/* Each word: own (large) size, vertical band, speed, and travel direction.
   Bands start below the hero header so the top word stays visible. */
.bg-watermark-word:nth-child(1) {
  font-size: 16vw;
  animation: watermarkDriftX 9s ease-in-out infinite alternate;
}
.bg-watermark-word:nth-child(2) {
  font-size: 10vw;
  animation: watermarkDriftDiagA 12s ease-in-out infinite alternate;
}
.bg-watermark-word:nth-child(3) {
  font-size: 21vw;
  animation: watermarkDriftDiagB 10s ease-in-out infinite alternate;
}
.bg-watermark-word:nth-child(n+4) {
  font-size: 11vw;
  animation: watermarkDriftY 14s ease-in-out infinite alternate;
}
/* Alternate words get a lighter blue */
.bg-watermark-word:nth-child(even) {
  background: linear-gradient(180deg, #2E5A8F 0%, #7FA3C6 55%, rgba(158, 186, 214, 0) 96%);
  -webkit-background-clip: text;
          background-clip: text;
}
/* Ken Burns-style motion: each word pans along its own path while slowly
   zooming in or out. */
/* Word 1: slides horizontally, dramatic zoom in */
@keyframes watermarkDriftX {
  from { transform: translateX(calc(-50% - 8vw)) scale(1); }
  to   { transform: translateX(calc(-50% + 8vw)) scale(1.25); }
}
/* Word 2: travels down-right / up-left, dramatic zoom out */
@keyframes watermarkDriftDiagA {
  from { transform: translate(calc(-50% - 6vw), -3vh) scale(1.18); }
  to   { transform: translate(calc(-50% + 6vw), 3vh) scale(1); }
}
/* Word 3: the opposite diagonal, dramatic zoom in */
@keyframes watermarkDriftDiagB {
  from { transform: translate(calc(-50% + 8vw), -2.5vh) scale(1); }
  to   { transform: translate(calc(-50% - 8vw), 2.5vh) scale(1.22); }
}
/* Word 4: mostly vertical, gentle breathing zoom */
@keyframes watermarkDriftY {
  from { transform: translate(calc(-50% - 3vw), -5vh) scale(1.1); }
  to   { transform: translate(calc(-50% + 3vw), 5vh) scale(0.94); }
}
@media (prefers-reduced-motion: reduce) {
  .bg-watermark-word { animation: none; }
}

@media (max-width: 760px) {
  .design-showcase { grid-template-columns: 1fr; }
  .design-tablist { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .design-tab { flex: 0 0 auto; }
  .design-tab:hover { transform: none; }
}

/* Reduced motion: show final states of the per-page presentations */
@media (prefers-reduced-motion: reduce) {
  .design-slide, .design-tab, .check-item, .check-box,
  .flip-inner, .flip-front, .phone-card { transition: none; }
  .check-mark { animation: none; stroke-dashoffset: 0; }
  .chat-bubble { opacity: 1; transform: none; animation: none; }
  .typing-dots { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .page-head h2 { font-size: 1.7rem; }
  /* Small screens: allow the menu to wrap again so it stays readable */
  .main-nav ul { flex-wrap: wrap; }
  .main-nav a { padding: 10px 12px; font-size: 0.9rem; }
  .cta-container { padding: 40px 20px; }
}