/* ===============================================================
   Ashland Motel — Immersive depth pass (v1)
   Layered perspective, ambient light, soft shadows, sheen.
   Keeps the flat MCM language; adds modern 3D depth.
   =============================================================== */

/* ---------- scroll progress ---------- */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 4px; z-index: 2000;
  width: 0%;
  background: linear-gradient(90deg, var(--teal-soft), var(--mustard) 55%, var(--terra));
  background-size: 200% 100%;
  box-shadow: 0 1px 0 rgba(43,36,27,.35);
  transition: width .08s linear;
}

/* ---------- film grain + vignette ---------- */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image: radial-gradient(120% 120% at 50% 0%, transparent 60%, rgba(43,36,27,.10));
  mix-blend-mode: multiply;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ---------- hero : layered 3D scene ---------- */
.hero {
  perspective: 1200px;
  background:
    radial-gradient(110% 80% at 80% -10%, rgba(228,202,109,.28), transparent 55%),
    radial-gradient(90% 60% at 8% 108%, rgba(87,178,153,.20), transparent 58%),
    var(--cream);
}

.hero-grid { perspective: 1200px; }

.hero-figure {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
}

.hero-figure .sunburst {
  z-index: 0;
  filter: drop-shadow(0 0 26px rgba(217,168,62,.45));
  animation: sun-spin 46s linear infinite;
  will-change: transform;
}

@keyframes sun-spin { to { transform: rotate(360deg); } }

.hero-figure .photo-arch {
  transform: translateZ(40px);
  box-shadow:
    0 2px 0 var(--ink),
    0 22px 40px -16px rgba(43,36,27,.45),
    10px 12px 0 var(--mustard);
  transition: box-shadow .5s ease;
}
.hero-figure .photo-arch::before {
  /* glass sheen across the arched image */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(118deg, transparent 30%, rgba(246,238,220,.35) 46%, transparent 60%);
  opacity: .0;
  transition: opacity .6s ease;
}
.hero-figure:hover .photo-arch::before { opacity: 1; }

.hero-badge {
  transform: rotate(-9deg) translateZ(70px);
  will-change: transform;
  animation: badge-bob 5.5s ease-in-out infinite;
  box-shadow:
    inset 0 -6px 0 rgba(43,36,27,.22),
    5px 6px 0 rgba(43,36,27,.85),
    0 18px 26px -10px rgba(43,36,27,.5);
}
@keyframes badge-bob {
  0%, 100% { transform: rotate(-9deg) translateZ(70px) translateY(0); }
  50%      { transform: rotate(-6deg) translateZ(96px) translateY(-11px); }
}

.hero-figure .chip {
  transform: translateZ(64px);
  will-change: transform;
  animation: chip-bob 4.5s ease-in-out infinite reverse;
}
@keyframes chip-bob {
  0%, 100% { transform: translateZ(64px) translateX(0); }
  50%      { transform: translateZ(86px) translateX(8px); }
}

/* soft floating shadow beneath the arch */
.hero-figure::after {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: -18px; height: 30px;
  background: radial-gradient(50% 100% at 50% 0%, rgba(43,36,27,.38), transparent 78%);
  border-radius: 50%; filter: blur(7px); z-index: 0;
  pointer-events: none;
}

/* floating rays behind hero headline */
.hero-copy-rays {
  position: absolute; left: -180px; top: -60px; width: 560px; height: 560px;
  color: var(--mustard); opacity: .16; z-index: 0; pointer-events: none;
  animation: sun-spin 70s linear infinite reverse;
}
.hero .hero-grid, .hero .wrap { position: relative; z-index: 1; }
.page-hero .sunburst {
  animation: sun-spin 70s linear infinite reverse;
  filter: drop-shadow(0 0 20px rgba(228,202,109,.4));
}

/* ---------- header: glass + depth ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(246,238,220,.86);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  border-bottom: 2px solid var(--ink);
  box-shadow: 0 6px 24px -14px rgba(43,36,27,.4);
}
/* thin mustard lip under the header */
.site-header::after {
  content: ""; display: block; height: 3px;
  background: linear-gradient(90deg, var(--teal) 0%, var(--mustard) 50%, var(--terra) 100%);
}

/* ---------- buttons: sheen + lift ---------- */
.btn-book, .book-mobile .btn-book, .btn, .btn-ghost {
  position: relative; overflow: hidden;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease;
}
.btn-book::after, .btn::after, .btn-ghost::after {
  content: ""; position: absolute; top: -40%; bottom: -40%; left: -70%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg);
  transition: left .55s ease;
  pointer-events: none;
}
.btn-book:hover::after, .btn:hover::after, .btn-ghost:hover::after { left: 130%; }
.btn-book:hover, .btn:hover, .btn-ghost:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -10px rgba(43,36,27,.55), 0 3px 0 var(--ink);
}
.btn-book:active, .btn:active { transform: translateY(-1px); }

/* ---------- rooms: tilt + soft depth ---------- */
.rooms .room-photo {
  position: relative;
  transform-style: preserve-3d;
  transition: transform .45s cubic-bezier(.22,1,.36,1), box-shadow .45s ease;
  will-change: transform;
  box-shadow:
    0 2px 0 var(--ink),
    12px 14px 0 var(--teal),
    0 26px 44px -18px rgba(43,36,27,.4);
}
.rooms .room-photo img {
  transition: transform .8s cubic-bezier(.22,1,.36,1), filter .8s ease;
  filter: saturate(1.04) contrast(1.03);
}
.rooms .room-row:hover .room-photo img { transform: scale(1.06); }
.rooms .room-row:hover .room-photo {
  box-shadow:
    0 2px 0 var(--ink),
    16px 18px 0 var(--teal),
    0 34px 56px -18px rgba(43,36,27,.45);
}
.rooms .room-photo::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(31,74,64,.45));
}
.rooms .room-photo::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(118deg, transparent 35%, rgba(246,238,220,.32) 48%, transparent 62%);
  opacity: 0; transition: opacity .5s ease;
}
.rooms .room-row:hover .room-photo::before { opacity: 1; }

/* ---------- amenity tiles : float ---------- */
.amen-grid .tile {
  position: relative;
  transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s ease;
  will-change: transform;
}
.amen-grid .tile:hover {
  transform: translateY(-8px) rotateX(4deg);
  box-shadow:
    0 3px 0 var(--ink),
    12px 14px 0 rgba(43,36,27,.28),
    0 30px 46px -18px rgba(43,36,27,.4);
}
.tile-pool .sunburst { animation: sun-spin 60s linear infinite reverse; }

/* ---------- offers : depth ---------- */
.offer { transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s ease; }
.offer:hover {
  transform: translateY(-6px);
  box-shadow:
    0 3px 0 var(--ink),
    10px 10px 0 rgba(43,36,27,.3),
    0 32px 50px -18px rgba(43,36,27,.42);
}

/* ---------- reviews : card depth ---------- */
.review {
  transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s ease;
}
.review:hover {
  transform: translateY(-7px) rotateX(3deg);
  box-shadow: 0 4px 0 var(--ink), 0 26px 44px -16px rgba(43,36,27,.38);
}
.review::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  background: linear-gradient(90deg, var(--mustard), var(--terra), var(--teal-soft));
}
.review { position: relative; overflow: hidden; }

/* ---------- reveal : smoother entrance ---------- */
.js .reveal { will-change: transform, opacity; }
.js .reveal:not(.in) { transform: translateY(34px) scale(.985); filter: blur(2px); }
.js .reveal.in { transform: none; filter: none; }

/* ---------- focus + selection polish ---------- */
:focus-visible { outline: 3px solid var(--teal-soft); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--mustard); color: var(--ink); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-figure .sunburst, .tile-pool .sunburst, .hero-copy-rays,
  .hero-badge, .hero-figure .chip { animation: none !important; }
  .js .reveal:not(.in) { transform: none; filter: none; opacity: 1; }
  #scroll-progress { transition: none; }
  .hero, .hero-grid { perspective: none; }
  .hero-figure .photo-arch, .hero-badge, .hero-figure .chip { transform: none !important; }
}
