/* =============================================================================
   Tales of Anamora — Global Styles
   Dark fantasy · cinematic · elegant
   Expand later by adding page-specific stylesheets alongside this file.
   ============================================================================= */

/* ---------------------------------------------------------------------------
   Design tokens
   --------------------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* Palette — midnight, charcoal, soft gold */
  --color-void: #06090d;
  --color-charcoal: #0a0f14;
  --color-gold: #c9a84c;
  --color-gold-soft: #e8d5a3;
  --color-gold-deep: #8a6f2e;
  --color-text: #e6ebe8;
  --color-text-muted: #a8b5ae;

  /* Typography */
  --font-display: "Cinzel", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --font-body: "Cormorant Garamond", "Garamond", "Times New Roman", serif;

  /* Motion */
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fade: 1.6s;

  /* Layout */
  --content-max: 42rem;
  --space-section: clamp(1.5rem, 4vw, 3rem);
}

/* ---------------------------------------------------------------------------
   Reset & base
   Android Chrome / Samsung Internet: shared dark fills + color-scheme prevent
   forced-dark inversion and light overscroll gaps.
   --------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background-color: #06090d;
  background: #06090d;
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--color-text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* ---------------------------------------------------------------------------
   Page shell
   --------------------------------------------------------------------------- */
.page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #0a0f14;
  color-scheme: dark;
}

/* Fade-in when JS marks the page ready */
.page:not(.is-ready) .hero__content > * {
  opacity: 0;
  transform: translateY(1.25rem);
}

.page.is-ready .hero__content > * {
  animation: rise-in var(--duration-fade) var(--ease-out-soft) forwards;
}

.page.is-ready .hero__title { animation-delay: 0.15s; }
.page.is-ready .hero__eyebrow { animation-delay: 0.45s; }
.page.is-ready .hero__tagline { animation-delay: 0.7s; }
.page.is-ready .hero__cta { animation-delay: 1s; }

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------------------------------------------------------
   Full-screen panoramic hero background
   One continuous photo — no CSS mountains, seams, masks, or clipped layers.
   --------------------------------------------------------------------------- */
.scene {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  z-index: 0;
  pointer-events: none;
  background-color: #06090d;
  /* Full native 2944×1648 assets — JPEG fallback, WebP preferred (q93) */
  background-image: url("../assets/images/hero-panorama.jpg?v=2");
  background-image: -webkit-image-set(
    url("../assets/images/hero-panorama.webp?v=2") type("image/webp"),
    url("../assets/images/hero-panorama.jpg?v=2") type("image/jpeg")
  );
  background-image: image-set(
    url("../assets/images/hero-panorama.webp?v=2") type("image/webp"),
    url("../assets/images/hero-panorama.jpg?v=2") type("image/jpeg")
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Keep photographic sharpness — never blur or artificially upscale via filters */
  image-rendering: auto;
  color-scheme: dark;
}

/* Soft readability veil — above the photo, below all text/button */
.scene__overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.18);
  background-image: none;
}

/* ---------------------------------------------------------------------------
   Hero content
   --------------------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--space-section);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: transparent;
}

.hero__content {
  position: relative;
  isolation: isolate;
  max-width: var(--content-max);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.85rem, 2vw, 1.35rem);
}

/* Soft natural shadow behind the full content block — eases blue glow competition */
.hero__content::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 165%;
  height: 175%;
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 75% 70% at 50% 48%,
    rgba(2, 6, 14, 0.42) 0%,
    rgba(2, 6, 14, 0.24) 34%,
    rgba(2, 6, 14, 0.08) 60%,
    transparent 80%
  );
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 7.5vw, 4.75rem);
  letter-spacing: 0.06em;
  line-height: 1.15;
  /* Ordinary fallback if gradient clip is unsupported or inverted */
  color: #c9a84c;
  background-color: transparent;
  background-image: linear-gradient(
    165deg,
    #f0e0b0 0%,
    #e8d5a3 22%,
    #c9a84c 48%,
    #8a6f2e 78%,
    #d4b85c 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 18px rgba(201, 168, 76, 0.2),
    0 0 42px rgba(168, 130, 60, 0.12);
}

.hero__eyebrow {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(0.95rem, 2.2vw, 1.2rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #c9b896;
  text-shadow: 0 0 20px rgba(201, 184, 150, 0.25);
}

.hero__tagline {
  font-family: var(--font-body);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  line-height: 1.55;
  color: #b8c2bc;
  max-width: 28rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.65);
}

/* ---------------------------------------------------------------------------
   CTA button — elegant, quiet glow
   --------------------------------------------------------------------------- */
.hero__cta {
  margin-top: clamp(0.5rem, 1.5vw, 1rem);
  padding: 0.85rem 1.85rem;
  font-family: var(--font-display);
  font-size: clamp(0.75rem, 1.6vw, 0.9rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #e8d5a3;
  border: 1px solid rgba(201, 168, 76, 0.45);
  background-color: rgba(14, 22, 28, 0.55);
  background-image: linear-gradient(
    180deg,
    rgba(201, 168, 76, 0.08) 0%,
    rgba(14, 22, 28, 0.4) 100%
  );
  transition:
    color 0.4s var(--ease-out-soft),
    border-color 0.4s var(--ease-out-soft),
    box-shadow 0.4s var(--ease-out-soft),
    background 0.4s var(--ease-out-soft),
    transform 0.4s var(--ease-out-soft);
}

.hero__cta:hover,
.hero__cta:focus-visible {
  color: #f2e6c4;
  border-color: rgba(232, 213, 163, 0.7);
  background-color: rgba(14, 22, 28, 0.7);
  background-image: linear-gradient(
    180deg,
    rgba(201, 168, 76, 0.16) 0%,
    rgba(14, 22, 28, 0.55) 100%
  );
  box-shadow:
    0 0 20px rgba(201, 168, 76, 0.2),
    0 0 40px rgba(201, 168, 76, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.hero__cta:focus-visible {
  outline: 1px solid rgba(232, 213, 163, 0.5);
  outline-offset: 4px;
}

.hero__cta:active {
  transform: translateY(0);
}

/* ---------------------------------------------------------------------------
   Reduced motion
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .page:not(.is-ready) .hero__content > *,
  .page.is-ready .hero__content > * {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Desktop only — lift the centered content block into the open sky (~40px) */
@media (min-width: 769px) {
  .hero__content {
    transform: translateY(-40px);
  }
}

/* ---------------------------------------------------------------------------
   Small screens
   --------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .hero__title {
    letter-spacing: 0.04em;
  }

  .hero__eyebrow {
    letter-spacing: 0.22em;
  }

  .hero__cta {
    letter-spacing: 0.12em;
    padding: 0.8rem 1.35rem;
  }

  /* Favor the valley / central peaks on narrow phones */
  .scene {
    background-position: center 40%;
  }
}

/* Landscape phones — tighten vertical rhythm */
@media (max-height: 480px) and (orientation: landscape) {
  .hero__content {
    gap: 0.55rem;
  }

  .hero__title {
    font-size: clamp(1.8rem, 6vh, 2.8rem);
  }

  .hero__tagline {
    font-size: 1rem;
  }
}
