/* ========================================= */
/* Custom Styles for Vladimir Vishnevsky Site */
/* ========================================= */

/* Base resets - Tailwind handles most, but add smooth scroll */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* account for sticky header */
}

/* Animation: fade in up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in-up.delay-200 {
  animation-delay: 0.2s;
  opacity: 0;
}

/* Scroll-triggered reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal[style*="--reveal-step:1"] { transition-delay: 0.1s; }
.reveal[style*="--reveal-step:2"] { transition-delay: 0.2s; }
.reveal[style*="--reveal-step:3"] { transition-delay: 0.3s; }
.reveal[style*="--reveal-step:4"] { transition-delay: 0.4s; }

/* FAQ toggle icon rotation */
.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

/* Bottom bar spacing on mobile */
@media (max-width: 1023px) {
  body {
    padding-bottom: 70px;
  }
}

/* Subtle hover on service cards */
.service-card:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
}

/* Phone number formatting */
.phone-link {
  font-variant-numeric: tabular-nums;
}

/* Form focus glow */
input:focus {
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

/* Smooth image loading */
img {
  transition: opacity 0.3s ease;
}

img[onerror] {
  opacity: 1;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ========================================= */
/* Accessibility                             */
/* ========================================= */

/* Respect the system "reduce motion" setting. Without this the hero fade and every
   smooth scroll play anyway, which is a genuine problem for people who feel unwell
   from movement. The explicit opacity:1 matters: both animated blocks start at
   opacity 0, so suppressing the animation must not leave them invisible. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .animate-fade-in-up,
  .animate-fade-in-up.delay-200,
  .reveal { opacity: 1; }
  .reveal { transform: none; }
}

/* Keyboard focus ring visible on BOTH white and brand-blue surfaces. The browser
   default is a 1px dark outline, which all but vanishes on the blue call button -
   the single most important control on the page. White inner ring plus blue outer
   halo, so one of the two always contrasts whatever is underneath. */
:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 0;
  box-shadow: 0 0 0 6px #1a56db;
}

/* Footer contact links measured 17px tall. That passes WCAG through spacing, but
   it is tight for the 45+ audience this site is written for, and these are the
   links people reach for after deciding to get in touch. */
footer ul li a {
  display: inline-block;
  padding: 5px 0;
}

/* Calculator: the two balcony options are <label> tiles wrapping a checkbox.
   :has() gives the chosen state without a Tailwind variant — the compiled
   stylesheet is frozen at 21 KB and contains no has-[...] rules. */
.calc-option {
  transition: border-color .15s ease, background-color .15s ease;
}
.calc-option:hover {
  border-color: rgb(26 86 219 / .4);
}
.calc-option:has(input:checked) {
  border-color: #1a56db;
  background-color: rgb(26 86 219 / .05);
}
.calc-option:focus-within {
  outline: 3px solid rgb(26 86 219 / .35);
  outline-offset: 2px;
}

/* ========================================= */
/* Palette                                   */
/* ========================================= */

/* border-border/50 is used 80 times, on every card on the site. The rule existed but
   its selector was written with a doubled backslash (a doubled backslash before the 50), which CSS
   reads as a class name containing a literal backslash - so it never matched anything
   and every card silently fell back to Tailwind's default border colour, #e5e7eb.
   The escaping is repaired in tailwind.min.css; this pins the value. Half of slate-200
   over white is #f0f4f8, too faint to read as a card edge, so this is slate-200 at full
   strength - the border the reference site uses. */
.border-border\/50 { border-color: #e2e8f0; }

/* Dividers only: the sticky header, the mobile menu and the mobile call bar. */
.border-border\/30 { border-color: rgb(226 232 240 / .6); }

/* The alternating section background. The old class was bg-muted/30, whose rule was
   dead for the same escaping reason, so all six "alternating" sections rendered pure
   white and the page was one unbroken white sheet. A grey at 30% is also too weak to
   see. This is the brand hue at 6% over white: #f2f6fe. */
.bg-tint { background-color: rgb(37 99 235 / .06); }

/* Used in the markup but absent from the frozen compiled sheet, so they did nothing. */
.h-20 { height: 5rem; }
.w-auto { width: auto; }
.leading-snug { line-height: 1.375; }
.pt-6 { padding-top: 1.5rem; }
.hover\:text-foreground:hover { color: #0e164d; }
@media (min-width: 640px) {
  .sm\:gap-6 { gap: 1.5rem; }
  .sm\:p-5 { padding: 1.25rem; }
  .sm\:p-10 { padding: 2.5rem; }
  .sm\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
}

/* Re-found 2026-10 by verify-browser's CSSOM walk (the gate used to crash on the
   retired calculator before ever reaching it). Same story as the block above:
   these did nothing — the savings table lost its right-alignment and its
   strikethrough, the pricing grid its 1024px cap, the review avatar its tint,
   the table header its background. */
.bg-blue-100 { background-color: #dbeafe; }
.text-blue-700 { color: #1d4ed8; }
.max-w-5xl { max-width: 64rem; }
.text-right { text-align: right; }
.line-through { text-decoration-line: line-through; }
.bg-muted\/50 { background-color: rgb(248 250 252 / .5); }
.border-white\/30 { border-color: rgb(255 255 255 / .3); }
.hover\:bg-white\/90:hover { background-color: rgb(255 255 255 / .9); }

/* The old brand blue, kept in step with the regenerated sheet. */
.calc-option:hover { border-color: rgb(37 99 235 / .4); }
.calc-option:has(input:checked) { border-color: #2563eb; background-color: rgb(37 99 235 / .05); }
.calc-option:focus-within { outline: 3px solid rgb(37 99 235 / .35); }

/* ========================================= */
/* Col 3:23 quote strip above the header      */
/* ========================================= */

/* Light topbar carrying the Bible quote directly above the sticky header.
   Deliberately NOT sticky: it scrolls away and the header takes the viewport
   top, exactly as before this existed. Background is the brand hue at 6% over
   white (#f2f6fe), the documented .bg-tint colour. Muted slate-600 on it
   measures ~6.9:1 — WCAG AA with room to spare, for a 45+ audience. */
.qstrip {
  padding: 8px 16px;
  text-align: center;
  background: #f2f6fe;
  border-bottom: 1px solid #e2e8f0;
}
.qstrip p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #475569;
}
.qstrip .qref {
  font-style: normal;
  font-weight: 600;
  color: #0e164d;
}
@media (min-width: 640px) {
  .qstrip p { font-size: 14px; }
}

/* ========================================= */
/* Contact funnel: phone only                */
/* ========================================= */

/* Owner decision 2026-10-18: the phone is the ONLY contact option. WhatsApp and
   Telegram buttons stay in the markup (keeps the HTML valid — the earlier manual
   comment-wrapping produced nested comments) but render nowhere. Anchors are not
   focusable when display:none, so they leave the tab order and screen readers too.
   The landing pages keep a phone control in the same row at every width: the header
   phone is md: and the fixed bottom bar is lg:hidden, so at 768-1023px BOTH are off
   and that gap needs one extra rule (last block below). */
a[href*="wa.me"],
a[href*="t.me"] {
  display: none !important;
}
@media (max-width: 767px) {
  header a[href^="tel:"] { display: block !important; }
}
/* Service pages (404, offer, privacy, consent) have no fixed bottom bar, so phone
   alone in the footer would vanish below 768px too — show the footer phone there. */
@media (max-width: 767px) {
  footer a[href^="tel:"] { display: block !important; }
}

