/* ============== Phygital Business Center — main.css ==============
   Layered on top of Tailwind CDN. Apple-style white aesthetic with
   ink-dark text and restrained gold accents.
*/

:root {
  --ink:    #20201C;
  --ink2:   #5E594F;
  --ink3:   #6F695E;
  --paper:  #FFFFFF;
  --paper2: #F7F5EF;
  --paper3: #EDEAE0;
  --line:   #E5E1D6;
  --gold:   #8F6A12;
  --gold1:  #C8A23E;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background: var(--paper);
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.011em;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

/* ============== Nav scroll state ============== */
#nav {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

#nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

/* ============== Gallery items ============== */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  cursor: pointer;
  background: var(--paper2);
  aspect-ratio: 4 / 3;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.4s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
              filter 0.4s ease;
}

.gallery-item:hover {
  box-shadow: 0 18px 40px -18px rgba(29, 29, 31, 0.25);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(29, 29, 31, 0.72) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-item .gallery-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  color: #FFFFFF;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item.wide {
  aspect-ratio: 16 / 9;
}

/* ============== Scroll reveal ============== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* ============== Lightbox ============== */
#lightbox.open {
  display: flex;
  animation: lightboxFade 0.25s ease both;
}

#lightbox-img {
  animation: imgZoom 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes lightboxFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes imgZoom {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* ============== Form niceties ============== */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 50px var(--paper) inset !important;
  -webkit-text-fill-color: var(--ink) !important;
  caret-color: var(--ink);
}

select option {
  background: var(--paper);
  color: var(--ink);
}

/* Subtle focus ring for inputs */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(29, 29, 31, 0.08);
}

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ============== Lead form ============== */
.lf-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 12px 32px -18px rgba(32, 32, 28, 0.25);
}
@media (min-width: 640px) { .lf-card { padding: 32px; } }
.lf { display: grid; gap: 16px; text-align: left; }
.lf-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}
.lf-sub { font-size: 14px; color: var(--ink2); margin-top: -10px; }
.lf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lf-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.lf-opt { font-weight: 400; color: var(--ink3); }
/* 16px text stops iPhones zooming the page when a field is focused. */
.lf-input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  background: var(--paper);
  border: 1px solid #CFC9B9;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lf-input::placeholder { color: var(--ink3); opacity: 1; }
textarea.lf-input { resize: vertical; }
.lf-input[aria-invalid="true"] { border-color: #B3261E; }
.lf-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(179, 38, 30, 0.12); border-color: #B3261E; }
.lf-phone { display: flex; gap: 8px; }
.lf-phone .lf-input:not(.lf-code) { flex: 1; min-width: 0; }
.lf-code { width: 112px; flex-shrink: 0; padding-left: 10px; padding-right: 6px; }
.lf-error { margin-top: 6px; font-size: 14px; color: #B3261E; }
.lf-alert {
  padding: 12px 14px;
  border-radius: 10px;
  background: #FCEEED;
  border: 1px solid #F0C9C6;
  font-size: 14px;
  line-height: 1.45;
  color: #8C1D18;
}
.lf-alert a { font-weight: 600; text-decoration: underline; }
.lf-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.lf-submit:hover { background: #75570E; }
.lf-submit:disabled { cursor: progress; opacity: 0.8; }
.lf-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: lf-spin 0.8s linear infinite;
}
.lf.is-busy .lf-spinner { display: inline-block; }
@keyframes lf-spin { to { transform: rotate(360deg); } }
.lf-privacy { font-size: 13px; color: var(--ink3); text-align: center; margin-top: -4px; }

/* Keep page ends clear of the phone-only sticky contact bar. */
@media (max-width: 767px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  body.is-typing .fixed.bottom-0.inset-x-0 { display: none; }
}

/* Larger tap areas on touch screens */
@media (pointer: coarse) {
  .hr-dot { width: 36px; height: 36px; }
  .hr-dot::after { top: 15px; left: 15px; }
  .hr-dot.active::after { left: 10px; }
  .hr-more { padding: 10px 0; }
  .rev-btn { width: 44px; height: 44px; }
}

/* ============== Landing page: photo strip and FAQ ============== */
.ofr-photos {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 20px;
  padding: 0 20px 6px;
  scrollbar-width: none;
}
.ofr-photos::-webkit-scrollbar { display: none; }
.ofr-photos figure { flex: 0 0 82%; max-width: 420px; margin: 0; scroll-snap-align: start; }
.ofr-photos img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; background: var(--paper3); }
.ofr-photos figcaption { margin-top: 8px; font-size: 14px; color: var(--ink2); }
@media (min-width: 1248px) { .ofr-photos { padding-left: calc((100vw - 1136px) / 2); scroll-padding-left: calc((100vw - 1136px) / 2); } }
.ofr-faq details { border-bottom: 1px solid var(--line); }
.ofr-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.ofr-faq summary::-webkit-details-marker { display: none; }
.ofr-faq summary::after { content: "+"; font-size: 24px; font-weight: 400; color: var(--gold); line-height: 1; }
.ofr-faq details[open] summary::after { content: "\2212"; }
.ofr-faq p { padding-bottom: 16px; color: var(--ink2); line-height: 1.6; }

/* ============== Video sound toggle hover ============== */
#sound-toggle {
  transition: transform 0.2s ease, background-color 0.2s ease;
}

#sound-toggle:hover {
  transform: scale(1.04);
}

#sound-toggle:active {
  transform: scale(0.97);
}

/* ============== Reduced motion ============== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============== Print: hide controls, keep content ============== */
@media print {
  #nav, #lightbox, .fixed, iframe { display: none !important; }
  body { color: #000; background: #fff; }
}

/* ============== Logo hover underline ============== */
.logo-link { position: relative; }
.logo-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 1px;
  width: 0;
  background: #8F6A12;
  transition: width 0.4s ease;
}
.logo-link:hover::after { width: 100%; }

/* ============== Nav: top gold hairline + active page indicator ============== */
#nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(168, 126, 26, 0.55) 50%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}
#nav a[aria-current="page"] {
  color: #20201C;
  position: relative;
}
#nav a[aria-current="page"]:not(.logo-link)::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #8F6A12;
  box-shadow: 0 0 6px rgba(168, 126, 26, 0.6);
}

/* ============== Footer ============== */
.footer-est-pill {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(168, 126, 26, 0.25);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6F695E;
  font-weight: 600;
}
.footer-est-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8F6A12;
  box-shadow: 0 0 6px rgba(168, 126, 26, 0.7);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* ============== Reviews — carousel ============== */
.reviews-viewport {
  position: relative;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 4px 14px;
}
.reviews-viewport::-webkit-scrollbar { display: none; }
.reviews-card {
  flex: 0 0 auto;
}
.rev-btn {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  border: 1px solid #E5E1D6;
  background: #FFFFFF;
  color: #5E594F;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.rev-btn:hover {
  border-color: #8F6A12;
  color: #8F6A12;
  transform: translateY(-1px);
}
.rev-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #E5E1D6;
  padding: 0;
  border: 0;
  cursor: pointer;
  transition: background 0.25s ease, width 0.25s ease;
}
.rev-dot.active {
  width: 18px;
  background: #8F6A12;
}

/* ============== Nav WhatsApp button ============== */
.nav-cta {
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}
.nav-cta:hover { background: #3A3A33; }
.nav-cta svg { width: 16px; height: 16px; color: #25D366; flex-shrink: 0; }

/* ============== Floating "Talk to sales" launcher ============== */
#sales-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 55;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
@media (min-width: 768px) { #sales-fab { display: flex; } }
#sales-fab-opts {
  width: 272px;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px -12px rgba(32, 32, 28, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
#sales-fab.open #sales-fab-opts { opacity: 1; visibility: visible; transform: none; }
.sales-fab-head {
  display: grid;
  gap: 2px;
  padding: 10px 10px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.sales-fab-head strong { font-size: 15px; font-weight: 700; }
.sales-fab-reply { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); }
.sales-fab-reply i { width: 7px; height: 7px; border-radius: 50%; background: #1FA85B; flex-shrink: 0; }
.sales-fab-hours { font-size: 13px; color: var(--ink2); }
.sales-fab-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  color: var(--ink);
  transition: background-color 0.15s ease;
}
.sales-fab-opt:hover { background: var(--paper2); }
.sales-fab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--paper3);
  color: var(--ink);
  flex-shrink: 0;
}
.sales-fab-icon.is-wa { background: #E3F3E9; color: var(--wa, #0F7F46); }
.sales-fab-icon svg { width: 18px; height: 18px; }
.sales-fab-text { display: flex; flex-direction: column; line-height: 1.3; }
.sales-fab-text strong { font-size: 14px; font-weight: 600; }
.sales-fab-text small { font-size: 13px; color: var(--ink2); }
#sales-fab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px -8px rgba(32, 32, 28, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: background-color 0.15s ease;
}
#sales-fab-btn:hover { background: #3A3A33; }
#sales-fab-btn:focus-visible { outline: 2px solid var(--gold1); outline-offset: 2px; }
#sales-fab-btn svg { width: 16px; height: 16px; color: var(--gold1); }

/* ============== Hero reviews card ============== */
.hr-card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px;
  padding: 18px 20px 16px;
  box-shadow: 0 12px 32px -18px rgba(0, 0, 0, 0.5);
}
.hr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.hr-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink2);
  margin-right: 2px;
}
.hr-score { font-weight: 700; font-size: 15px; }
.hr-count { font-size: 13px; color: var(--ink2); }
/* Slides share one grid cell, so the card height never jumps. */
.hr-slides { display: grid; margin-top: 10px; cursor: pointer; }
.hr-slides:hover .hr-quote { color: var(--gold); }
.hr-slide {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}
.hr-slide.active { opacity: 1; visibility: visible; }
.hr-quote { font-size: 15px; line-height: 1.5; color: var(--ink); transition: color 0.15s ease; }
.hr-by { margin-top: 6px; font-size: 13px; color: var(--ink2); }
.hr-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.hr-dots { display: flex; align-items: center; gap: 2px; margin-left: -8px; }
.hr-more { font-size: 13px; font-weight: 600; color: var(--gold); padding: 4px 0; }
.hr-more:hover { color: #75570E; }
.hr-dot {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.hr-dot::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}
.hr-dot.active::after { left: 4px; width: 16px; background: var(--gold); }

/* ============== Hover lift — cards rise on hover ============== */
.hover-lift {
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.45s ease,
              border-color 0.45s ease;
  will-change: transform;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
  border-color: rgba(168, 126, 26, 0.5);
}

/* ============== Image zoom on hover (wrap with .zoom-on-hover) ============== */
.zoom-on-hover { overflow: hidden; }
.zoom-on-hover img {
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
.zoom-on-hover:hover img { transform: scale(1.06); }

/* ============== Float — gentle vertical drift for ornaments ============== */
@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
.float-soft { animation: float-soft 6s ease-in-out infinite; }

/* ============== Stagger reveal for grid children ============== */
.stagger-reveal > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.stagger-reveal.reveal-active > *,
.reveal-active.stagger-reveal > * {
  opacity: 1;
  transform: translateY(0);
}
.stagger-reveal.reveal-active > *:nth-child(1) { transition-delay: 0ms; }
.stagger-reveal.reveal-active > *:nth-child(2) { transition-delay: 80ms; }
.stagger-reveal.reveal-active > *:nth-child(3) { transition-delay: 160ms; }
.stagger-reveal.reveal-active > *:nth-child(4) { transition-delay: 240ms; }
.stagger-reveal.reveal-active > *:nth-child(5) { transition-delay: 320ms; }
.stagger-reveal.reveal-active > *:nth-child(6) { transition-delay: 400ms; }
.stagger-reveal.reveal-active > *:nth-child(7) { transition-delay: 480ms; }
.stagger-reveal.reveal-active > *:nth-child(8) { transition-delay: 560ms; }

/* Honour the user's reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .float-soft { animation: none; }
  .reviews-viewport { scroll-behavior: auto; }
  .hover-lift,
  .zoom-on-hover img,
  .stagger-reveal > * { transition: none; }
}
