/* web/style.css — Shared visual language for Mirkale Saheb Farmhouse landing & film pages.
 * Echoes film.css lower-third design: frosted warm cream panels, spaced uppercase kickers,
 * light-weight Segoe UI / system-ui headings, thin terracotta/bronze accent rules.
 */

:root {
  --bg-paper: #f3efe7;
  --panel-cream: rgba(250, 246, 238, 0.88);
  --panel-cream-strong: rgba(250, 246, 238, 0.94);
  --ink: #232b28;
  --ink-line: #2b2620;
  --ink-muted: #5b5248;
  --kicker: #614634;
  --accent: #a9542f;
  --accent-rule: #956342;
  --accent-hover: #8f4323;
  --dark-bg: #080a09;
  --dark-surface: rgba(20, 24, 22, 0.84);
  --dark-border: rgba(250, 246, 238, 0.16);
  --shadow-soft: 0 12px 40px rgba(35, 43, 40, 0.12);
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Landing page (web/index.html)
   ========================================================================== */

body.landing {
  background: var(--bg-paper);
  color: var(--ink);
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

.landing-canvas-host {
  position: fixed;
  inset: 0;
  z-index: 1;
}

.landing-shell {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding:
    max(24px, env(safe-area-inset-top, 24px))
    max(28px, env(safe-area-inset-right, 28px))
    max(22px, calc(env(safe-area-inset-bottom, 0px) + 18px))
    max(28px, env(safe-area-inset-left, 28px));
  pointer-events: none;
}

.hero-card {
  width: min(640px, 100%);
  padding: 28px 32px 26px;
  background: var(--panel-cream);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 3px solid var(--accent);
  box-shadow: var(--shadow-soft);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  visibility: hidden;
}

.landing--ready .hero-card {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.landing--ready .mk-loader__brand {
  opacity: 0;
}

.hero-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--kicker);
}

.hero-title {
  margin: 6px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 350;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: 2px;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
  cursor: pointer;
}

.cta-btn:active {
  transform: translateY(1px);
}

.cta-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.cta-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.cta-btn--primary {
  background: var(--ink);
  color: #faf6ee;
  border: 1px solid var(--ink);
}

.cta-btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.cta-btn--secondary {
  background: rgba(250, 246, 238, 0.72);
  color: var(--ink);
  border: 1px solid rgba(43, 38, 32, 0.36);
}

.cta-btn--secondary:hover {
  background: #faf6ee;
  border-color: var(--accent);
  color: var(--accent-hover);
}

.hero-facts {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--ink-muted);
  letter-spacing: 0.015em;
}

.hero-facts::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent-rule);
  flex-shrink: 0;
}

.landing-footer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(43, 38, 32, 0.68);
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.7s ease 0.2s;
}

.landing--ready .landing-footer {
  opacity: 1;
}

.landing-footer__credit {
  padding: 4px 10px;
  background: rgba(243, 239, 231, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

@media (max-width: 640px) {
  .landing-shell {
    padding:
      max(16px, env(safe-area-inset-top, 16px))
      max(16px, env(safe-area-inset-right, 16px))
      max(14px, calc(env(safe-area-inset-bottom, 0px) + 12px))
      max(16px, env(safe-area-inset-left, 16px));
  }

  .hero-card {
    padding: 20px 18px 18px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
  }

  .cta-btn {
    width: 100%;
    min-height: 50px;
  }

  .hero-facts {
    font-size: 13px;
    margin-top: 14px;
  }

  .hero-facts::before {
    width: 16px;
  }

  .landing-footer {
    margin-top: 10px;
    justify-content: center;
    text-align: center;
  }
}

/* ==========================================================================
   Film page (web/film.html)
   ========================================================================== */

body.film-page {
  background: var(--dark-bg);
  color: #faf6ee;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

.film-viewport {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
  overflow: hidden;
  touch-action: manipulation;
}

.film-frame {
  position: relative;
  width: min(100vw, calc(100dvh * 16 / 9));
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.film-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* Top bar ("← Home") */
.film-topbar {
  position: fixed;
  top: max(18px, env(safe-area-inset-top, 18px));
  left: max(20px, env(safe-area-inset-left, 20px));
  right: max(20px, env(safe-area-inset-right, 20px));
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.film-page--idle .film-topbar {
  opacity: 0;
}

.film-home-link {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  background: var(--panel-cream);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-left: 2px solid var(--accent);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.32);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.film-home-link:hover {
  background: var(--panel-cream-strong);
  color: var(--accent-hover);
}

.film-home-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Center play overlay (shown when paused / autoplay blocked) */
.film-center-play {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 28px;
  background: var(--panel-cream);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0;
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  transition: opacity 0.3s ease, transform 0.25s ease, background-color 0.2s ease;
}

.film-center-play:hover {
  background: var(--panel-cream-strong);
  transform: translate(-50%, -51%);
}

.film-center-play.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -48%);
}

.film-center-play__kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--kicker);
}

.film-center-play__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 350;
}

/* End / 130 s "Walk the property →" CTA */
.film-walk-cta {
  position: fixed;
  right: max(24px, env(safe-area-inset-right, 24px));
  bottom: max(92px, calc(env(safe-area-inset-bottom, 0px) + 88px));
  z-index: 26;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--panel-cream-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-left: 3px solid var(--accent);
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease, background-color 0.2s ease, color 0.2s ease;
}

.film-walk-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.film-walk-cta:hover {
  background: #fffdf8;
  color: var(--accent-hover);
}

.film-walk-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Minimal custom controls in caption style */
.film-controls {
  position: fixed;
  left: 50%;
  bottom: max(18px, calc(env(safe-area-inset-bottom, 0px) + 14px));
  transform: translateX(-50%);
  width: min(860px, calc(100vw - 32px));
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--panel-cream);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-left: 2px solid var(--accent);
  color: var(--ink);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.36);
  opacity: 1;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.film-page--idle .film-controls {
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
}

.film-ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(43, 38, 32, 0.22);
  border-radius: 2px;
  background: rgba(255, 253, 248, 0.65);
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.film-ctrl-btn:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
  background: #fffdf8;
}

.film-ctrl-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.film-ctrl-btn svg {
  width: 16px;
  height: 16px;
}

.film-scrub {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 28px;
  display: flex;
  align-items: center;
}

.film-scrub__track {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(43, 38, 32, 0.18);
  pointer-events: none;
}

.film-scrub__buffered {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: rgba(43, 38, 32, 0.32);
}

.film-scrub__played {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--accent);
}

.film-scrub__input {
  position: relative;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.film-scrub__input::-webkit-slider-runnable-track {
  height: 3px;
  background: transparent;
}

.film-scrub__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #faf6ee;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.film-scrub__input::-moz-range-track {
  height: 3px;
  background: transparent;
}

.film-scrub__input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #faf6ee;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.film-time {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.film-error {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  max-width: min(440px, calc(100vw - 40px));
  padding: 20px 24px;
  background: var(--panel-cream-strong);
  border-left: 3px solid var(--accent);
  color: var(--ink);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  display: none;
}

.film-error.is-visible {
  display: block;
}

.film-error__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
}

.film-error__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
}

@media (max-width: 640px) {
  .film-controls {
    width: calc(100vw - 20px);
    padding: 8px 10px;
    gap: 8px;
  }

  .film-ctrl-btn {
    width: 34px;
    height: 34px;
  }

  .film-time {
    font-size: 11px;
  }

  .film-walk-cta {
    left: 50%;
    right: auto;
    transform: translate(-50%, 10px);
    bottom: max(78px, calc(env(safe-area-inset-bottom, 0px) + 74px));
    white-space: nowrap;
  }

  .film-walk-cta.is-visible {
    transform: translate(-50%, 0);
  }
}
