/* =========================================================
   Sylvia Grey — cross-browser compatibility (UK)
   Chrome · Safari · Firefox · Edge · Samsung Internet
   ========================================================= */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(184, 154, 94, 0.25);
}

body {
  background-color: #faf6ef;
  color: #0d1117;
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

/* Full-height sections — mobile Safari */
.hero,
.page-hero {
  min-height: -webkit-fill-available;
}

/* backdrop-filter (Safari / older WebKit) */
.navbar-lux.scrolled {
  -webkit-backdrop-filter: blur(14px);
}
.trust-pill {
  -webkit-backdrop-filter: blur(8px);
}
.hero-float,
.svc .svc-no {
  -webkit-backdrop-filter: blur(12px);
}

/* inset — fallback for browsers without shorthand */
@supports not (inset: 0) {
  .btn-lux::after,
  .hero-slides,
  .hero-slide,
  .hero-grain,
  .hero-frame-inner,
  .hero-frame-slide,
  .hero-slides::before,
  .hero-slides::after,
  .mobile-panel,
  .svc .svc-bg,
  .svc .svc-bg::before,
  .intro-panel::before,
  .intro-visual-card::after,
  .page-hero-img,
  .service-band::before,
  .quote-panel::before {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
  }
  .hero-frame-border {
    top: -14px;
    right: -14px;
    bottom: 14px;
    left: 14px;
  }
}

/* aspect-ratio — fallback */
@supports not (aspect-ratio: 4 / 5) {
  .hero-frame {
    height: 0;
    padding-bottom: 125%;
    position: relative;
  }
  .hero-frame-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  .intro-visual-card img {
    width: 100%;
    height: auto;
  }
}

/* Logical properties — margin/padding inline */
@supports not (margin-inline: auto) {
  .sg-container {
    margin-left: auto;
    margin-right: auto;
    padding-left: calc(var(--bs-gutter-x, 0.75rem) * 1);
    padding-right: calc(var(--bs-gutter-x, 0.75rem) * 1);
  }
  .policy-content {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Flex gap — older Safari (< 14.1) */
@supports not (gap: 1rem) {
  .nav-menu > li + li { margin-left: 2.4rem; }
  .nav-cta > * + * { margin-left: 1.4rem; }
  .hero-cta > * + * { margin-left: 0.85rem; }
  .topbar .tb-group > * + * { margin-left: 1.8rem; }
  .footer-social > a + a { margin-left: 1rem; }
  .burger span + span { margin-top: 5px; }
}

/* Form controls — iOS / Android consistency */
input,
textarea,
select,
button {
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239aa3b2' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 1.25rem;
}
input[type="checkbox"],
input[type="radio"] {
  -webkit-appearance: auto;
  appearance: auto;
}

/* Focus — keyboard users (where :focus-visible unsupported, show outline on focus) */
@supports not selector(:focus-visible) {
  a:focus,
  button:focus,
  input:focus,
  textarea:focus,
  select:focus {
    outline: 2px solid #b89a5e;
    outline-offset: 2px;
  }
}

/* Reduced motion — accessibility */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  .marquee-track {
    animation: none !important;
  }
  .hero-reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* Print */
@media print {
  .topbar,
  .mobile-panel,
  .to-top,
  .hero-dots,
  .scroll-cue,
  .marquee-wrap,
  .burger {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }
}
