/* ═══════════════════════════════════════════════════════════════════
   RENTCAN — PREMIUM MOTION SYSTEM
   Inspired by Apple, Linear, Vercel, Arc, Nothing
   GPU-only animations · easeOutExpo · Respect prefers-reduced-motion
   ═══════════════════════════════════════════════════════════════════ */

/* ── Design Tokens ─────────────────────────────────────────────────── */
:root {
  --primary:   #183D35;
  --secondary: #5F5D58;
  --accent:    #B9654A;
  --gold:      #B9654A;
  --brown:     #183D35;
  --ink:       #111111;
  --bg:        #F5F3EE;

  /* Easing library */
  --ease-out-expo:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart:  cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out:     cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring:     cubic-bezier(0.34, 1.2, 0.64, 1);

  /* Duration scale */
  --dur-instant:  80ms;
  --dur-fast:     180ms;
  --dur-base:     260ms;
  --dur-slow:     380ms;
  --dur-reveal:   540ms;

  /* Shadow scale */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.04), 0 1px 6px rgba(0,0,0,0.03);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:  0 12px 32px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-xl:  0 24px 64px rgba(0,0,0,0.10), 0 8px 16px rgba(0,0,0,0.05);
}

/* ── Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html, body { margin: 0; padding: 0; background: var(--bg); overflow-x: hidden; }

/* Page loader removed — content renders immediately */

/* ── Scroll Reveal ────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  will-change: opacity, transform;
  transition: opacity var(--dur-reveal) var(--ease-out-expo),
              transform var(--dur-reveal) var(--ease-out-expo);
}

.reveal-group > * {
  opacity: 0;
  transform: translateY(16px);
  will-change: opacity, transform;
  transition: opacity var(--dur-reveal) var(--ease-out-expo),
              transform var(--dur-reveal) var(--ease-out-expo);
}

.reveal.in-view,
.reveal-group.in-view > * {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1  { transition-delay: 60ms  !important; }
.stagger-2  { transition-delay: 120ms !important; }
.stagger-3  { transition-delay: 180ms !important; }
.stagger-4  { transition-delay: 240ms !important; }
.stagger-5  { transition-delay: 300ms !important; }
.stagger-6  { transition-delay: 360ms !important; }

.reveal-fade {
  opacity: 0;
  will-change: opacity;
  transition: opacity var(--dur-reveal) var(--ease-out-expo);
}
.reveal-fade.in-view { opacity: 1; }

.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  will-change: opacity, transform;
  transition: opacity var(--dur-reveal) var(--ease-out-expo),
              transform var(--dur-reveal) var(--ease-out-expo);
}
.reveal-left.in-view { opacity: 1; transform: translateX(0); }

/* ── Tile scroll-hover animation ──────────────────────────────────── */
.tile-scroll-hover {
  opacity: 0;
  transform: translateY(32px) scale(0.97);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.tile-scroll-hover.tile-visible {
  opacity: 1;
  transform: translateY(-4px) scale(1);
}

.tile-scroll-hover.tile-settled {
  transform: translateY(0) scale(1);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tile-scroll-hover:nth-child(2) { transition-delay: 80ms; }
.tile-scroll-hover:nth-child(3) { transition-delay: 160ms; }
.tile-scroll-hover:nth-child(4) { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  .tile-scroll-hover {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Page Enter ───────────────────────────────────────────────────── */
@keyframes page-enter {
  from { opacity: 0; }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-load {
  animation: page-enter var(--dur-slow) var(--ease-out-expo) both;
  will-change: opacity, transform;
}

/* ── Navbar ───────────────────────────────────────────────────────── */
.nav-premium {
  transition: transform  var(--dur-base) var(--ease-out-quart),
              background var(--dur-base) var(--ease-out-quart),
              box-shadow var(--dur-base) var(--ease-out-quart),
              opacity    var(--dur-base) var(--ease-out-quart);
  will-change: transform;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.nav-premium.scrolled {
  background: rgba(255,255,255,0.88) !important;
  box-shadow: var(--shadow-sm);
}

.nav-premium.nav-hidden { transform: translateY(-100%); opacity: 0; }

.nav-link {
  position: relative;
  transition: color var(--dur-fast) var(--ease-out-quart);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1.5px;
  background: currentColor;
  transition: width var(--dur-base) var(--ease-out-expo);
  will-change: width;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn-primary-premium {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform  var(--dur-fast) var(--ease-out-quart),
              box-shadow var(--dur-fast) var(--ease-out-quart),
              background var(--dur-base) var(--ease-out-quart);
  will-change: transform, box-shadow;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.btn-primary-premium:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: var(--shadow-md);
  background: var(--ink);
}
.btn-primary-premium:active {
  transform: scale(0.99);
  box-shadow: var(--shadow-sm);
  transition-duration: var(--dur-instant);
}

.btn-ghost-premium {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform     var(--dur-fast) var(--ease-out-quart),
              background    var(--dur-base) var(--ease-out-quart),
              border-color  var(--dur-base) var(--ease-out-quart),
              color         var(--dur-base) var(--ease-out-quart);
  will-change: transform;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-decoration: none;
}
.btn-ghost-premium:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.btn-ghost-premium:active {
  transform: scale(0.99);
  transition-duration: var(--dur-instant);
}

/* ── Cards ────────────────────────────────────────────────────────── */
.card-premium {
  transition: transform    var(--dur-base) var(--ease-out-expo),
              box-shadow   var(--dur-base) var(--ease-out-expo),
              border-color var(--dur-base) var(--ease-out-quart);
  will-change: transform, box-shadow;
  box-shadow: var(--shadow-sm);
}
.card-premium:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.bento-card {
  transition: transform    var(--dur-slow) var(--ease-out-expo),
              box-shadow   var(--dur-slow) var(--ease-out-expo),
              border-color var(--dur-base) var(--ease-out-quart),
              background   var(--dur-base) var(--ease-out-quart);
  will-change: transform, box-shadow;
}
.bento-card:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow: 0 20px 48px rgba(78, 66, 56, 0.08), 0 4px 12px rgba(78, 66, 56, 0.05);
  border-color: rgba(107, 72, 34, 0.18) !important;
}
.bento-card:active {
  transform: translateY(-2px) scale(1.002);
  transition-duration: var(--dur-instant);
}

/* ── Hero video ───────────────────────────────────────────────────── */
.hero-video-container {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: ken-burns 30s var(--ease-in-out) alternate infinite;
  will-change: transform;
}
@keyframes ken-burns {
  from { transform: scale(1); }
  to   { transform: scale(1.04); }
}
.hero-video-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(78, 66, 56, 0.28) 0%,
    rgba(78, 66, 56, 0.52) 60%,
    rgba(78, 66, 56, 0.70) 100%
  );
}

/* ── Swiss bento grid ─────────────────────────────────────────────── */
.swiss-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

/* ── Pricing rows ─────────────────────────────────────────────────── */
.pricing-row {
  transition: background var(--dur-fast) var(--ease-out-quart);
}
.pricing-row:hover { background: rgba(207, 223, 222, 0.35); }

/* ── Footer links ─────────────────────────────────────────────────── */
.footer-link {
  transition: color var(--dur-fast) var(--ease-out-quart),
              opacity var(--dur-fast) var(--ease-out-quart);
  opacity: 0.65;
}
.footer-link:hover { opacity: 1; }

/* ── Page transition overlay ──────────────────────────────────────── */
#page-transition {
  position: fixed;
  inset: 0;
  background: #F2F5F4;
  z-index: 8888;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms var(--ease-out-quart);
  will-change: opacity;
}
#page-transition.out { opacity: 1; pointer-events: all; }

/* ── Line accent ──────────────────────────────────────────────────── */
.line-accent {
  width: 0;
  height: 2px;
  background: rgba(213, 178, 89, 0.45);
  transition: width var(--dur-slow) var(--ease-out-expo);
  will-change: width;
}
.line-accent.in-view { width: 96px; }

/* ── Underline link ───────────────────────────────────────────────── */
.underline-link {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--dur-base) var(--ease-out-expo);
}
.underline-link:hover { background-size: 100% 1px; }

/* ── Icon arrow micro-animation ───────────────────────────────────── */
.icon-hover-parent .icon-arrow {
  display: inline-block;
  transition: transform var(--dur-base) var(--ease-spring);
  will-change: transform;
}
.icon-hover-parent:hover .icon-arrow { transform: translateX(4px); }

/* ── Lazy images blur-up ──────────────────────────────────────────── */
.img-lazy {
  opacity: 0;
  filter: blur(8px);
  transition: opacity var(--dur-slow) var(--ease-out-expo),
              filter  var(--dur-slow) var(--ease-out-expo);
  will-change: opacity, filter;
}
.img-lazy.loaded {
  opacity: 1;
  filter: blur(0);
}

/* ── Mobile menu sheet ────────────────────────────────────────────── */
.mobile-sheet {
  position: fixed;
  inset: 0;
  z-index: 7777;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out-quart);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.mobile-sheet.open { opacity: 1; pointer-events: all; }

.mobile-sheet-panel {
  position: absolute;
  top: 0; right: 0;
  width: min(300px, 88vw);
  height: 100%;
  background: #F2F5F4;
  padding: 28px 24px;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out-expo);
  will-change: transform;
  box-shadow: var(--shadow-xl);
}
.mobile-sheet.open .mobile-sheet-panel { transform: translateX(0); }

/* ── Skeleton ─────────────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 4px;
}

/* ── Focus ────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── prefers-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;
  }
  .reveal, .reveal-fade, .reveal-left,
  .reveal-group > * {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.animate-marquee {
  animation: marquee 30s linear infinite;
  display: flex;
  width: max-content;
}
.animate-marquee:hover {
  animation-play-state: paused;
}

summary::-webkit-details-marker { display: none; }
summary { list-style: none; outline: none; }
/* Soft page helpers — never blank the whole site */
html.rc-exit body {
  /* intentionally empty: previous opacity:0 blanked pages when nav failed */
}
body.rc-fade-boot {
  opacity: 1;
}
@supports (padding: env(safe-area-inset-bottom)) {
  #rc-mobile-nav {
    padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
  }
}

/* Auth waiting overlay */
.rc-auth-wait {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #F2F5F4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}
.rc-auth-wait.show {
  opacity: 1;
  pointer-events: auto;
}
.rc-auth-wait .rc-auth-mark {
  display: inline-flex;
  margin-bottom: 28px;
}
.rc-auth-wait .rc-auth-title {
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 8px;
}
.rc-auth-wait .rc-auth-sub {
  font-size: 14px;
  color: #5c4a3a;
  max-width: 280px;
  line-height: 1.5;
  margin-bottom: 28px;
}
.rc-auth-wait .rc-auth-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  width: min(280px, 100%);
  text-align: left;
}
.rc-auth-wait .rc-auth-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #bec9c5;
  padding: 8px 0;
  transition: color 300ms ease;
}
.rc-auth-wait .rc-auth-steps li.active { color: #6B4822; font-weight: 700; }
.rc-auth-wait .rc-auth-steps li.done { color: #6B4822; opacity: 0.65; }
.rc-auth-wait .rc-auth-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.rc-auth-wait .rc-auth-dot.pulse {
  animation: rc-pulse 1.1s ease-in-out infinite;
}
.rc-auth-cancel {
  margin-top: 24px;
  padding: 10px 18px;
  border: 1.5px solid #bec9c5;
  border-radius: 10px;
  background: #F2F5F4;
  color: #3f4946;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.rc-auth-cancel:hover {
  border-color: #6B4822;
  color: #6B4822;
}
@keyframes rc-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
}
.rc-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #bec9c5;
  border-top-color: #6B4822;
  border-radius: 50%;
  animation: rc-spin 0.75s linear infinite;
  margin-bottom: 22px;
}
@keyframes rc-spin { to { transform: rotate(360deg); } }

