/* ========================================
   CRYSTAL PARK
   RESPONSIVE MAIN WEBSITE
======================================== */

:root {
  --dark: #101820;
  --gold: #c9a86a;
  --soft: #f4f3ef;
}

/* ========================================
   GLOBAL
======================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #1d252c;
  overflow-x: hidden;
}

body.splash-lock {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

section {
  scroll-margin-top: 80px;
}

/* ========================================
   NAVIGATION
======================================== */

#nav {
  padding: 1rem 0;
  transition:
    background 0.25s,
    padding 0.25s;
}

#nav.scrolled {
  background: rgba(16, 24, 32, 0.97);
  padding: 0.65rem 0;
}

/* ========================================
   SPLASH SCREEN
======================================== */

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: grid;
  place-items: center;

  background: url("../assets/images/hero-1920.webp") center center / cover no-repeat;

  animation: splashExit 0.8s ease forwards;
  animation-delay: 6.35s;
}

.splash-shade {
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at center,
      rgba(16, 24, 32, 0.08),
      rgba(16, 24, 32, 0.45)
    ),
    linear-gradient(rgba(8, 13, 18, 0.42), rgba(8, 13, 18, 0.64));
}

.splash-logo {
  position: relative;
  z-index: 1;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;

  color: #fff;
  text-align: center;
  text-transform: uppercase;

  animation: splashLogo 4.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.splash-logo span {
  font-size: clamp(2.4rem, 7vw, 6.5rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 0.08em;
}

.splash-logo small {
  font-size: clamp(0.65rem, 1.6vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.72);
}

@keyframes splashLogo {
  0% {
    opacity: 0;
    transform: translateY(44px) scale(0.92);
  }

  38% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  68% {
    opacity: 1;
    transform: translateY(0) scale(1.08);
  }

  100% {
    opacity: 0;
    transform: translateY(0) scale(1.28);
  }
}

@keyframes splashExit {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* ========================================
   HERO
======================================== */

.hero {
  min-height: min(92vh, 900px);

  background: url("../assets/images/hero-1920.webp") center center / cover no-repeat;

  display: flex;
  align-items: flex-end;

  position: relative;

  color: #fff;
}

.splash-screen,
.hero {
  background-image: image-set(
    url("../assets/images/hero-1920.webp") 1x,
    url("../assets/images/hero-2560.webp") 2x
  );
}

.shade {
  position: absolute;
  inset: 0;

  background: linear-gradient(
    90deg,
    rgba(8, 13, 18, 0.88) 0%,
    rgba(8, 13, 18, 0.48) 45%,
    rgba(8, 13, 18, 0.15) 100%
  );
}

.hero .container {
  position: relative;
  z-index: 2;

  padding-top: 8rem;
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.hero h1 {
  max-width: 900px;

  margin-bottom: 1.5rem;

  font-size: clamp(3rem, 7vw, 7rem);

  font-weight: 800;

  line-height: 0.95;

  letter-spacing: -0.05em;
}

/* ========================================
   TYPOGRAPHY
======================================== */

.eyebrow {
  font-size: 0.75rem;
  font-weight: 800;

  letter-spacing: 0.18em;

  color: #9a7840;
}

h2 {
  font-size: clamp(2.1rem, 4.5vw, 4.2rem);

  font-weight: 750;

  line-height: 1;

  letter-spacing: -0.04em;
}

/* ========================================
   SECTIONS
======================================== */

.pad {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.soft {
  background: var(--soft);
}

.dark {
  background: var(--dark);
}

.intro {
  width: 100%;
  max-width: 700px;

  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   BUTTONS
======================================== */

.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #111;
}

.btn-gold:hover,
.btn-gold:focus {
  background: #b99758;
  border-color: #b99758;
  color: #111;
}

/* ========================================
   IMAGES
======================================== */

.section-img {
  display: block;

  width: 100%;

  height: clamp(320px, 42vw, 560px);

  object-fit: cover;
}

/* ========================================
   STATS
======================================== */

.stat {
  border-top: 1px solid #ccc;

  padding-top: 1rem;

  display: flex;
  flex-direction: column;
}

.stat b {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
}

.stat span {
  color: #777;
}

/* ========================================
   PANELS
======================================== */

.panel {
  width: 100%;

  background: #fff;

  padding: clamp(1.75rem, 4vw, 3rem);

  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.06);
}

/* ========================================
   PHOTO BREAK
======================================== */

.photo-break {
  min-height: clamp(380px, 50vw, 520px);

  background:
    linear-gradient(rgba(16, 24, 32, 0.6), rgba(16, 24, 32, 0.6)),
    var(--photo-break-image, none) center center / cover no-repeat;

  display: flex;
  align-items: center;
}

.photo-break.is-image-loaded {
  --photo-break-image: image-set(
    url("../assets/images/photobreak-1920.webp") 1x,
    url("../assets/images/photobreak-2560.webp") 2x
  );
}

.photo-break h2 {
  max-width: 700px;
}

/* ========================================
   AVAILABILITY LEGEND
======================================== */

.legend {
  display: flex;

  gap: 0.75rem 1.2rem;

  flex-wrap: wrap;
}

.legend span:nth-child(1) {
  color: #258f59;
}

.legend span:nth-child(2) {
  color: #d68c2d;
}

.legend span:nth-child(3) {
  color: #6e757a;
}

/* ========================================
   BROCHURE BOOK
======================================== */

.book-stack {
  position: relative;
  isolation: isolate;
  width: min(calc(100% - 56px), 330px);
  margin: 2.5rem auto 3rem;
}

.book-stack .book {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0;
}

.book-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 12px 30px #0004;
  pointer-events: none;
}

.book-back--left {
  z-index: 0;
  transform: translate(-22px, -10px) rotate(-10deg);
}

.book-back--right {
  z-index: 1;
  transform: translate(22px, -10px) rotate(7deg);
}

.book {
  width: min(100%, 330px);
  height: auto;
  aspect-ratio: 330 / 420;
  object-fit: cover;
  margin: 1.5rem auto 2rem;
  display: block;

  box-shadow:
    20px 20px 0 #c9b595,
    0 30px 60px #0006;

  transform: rotate(-2deg);
}

.brochure-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0.5rem 1rem;
  margin-left: 8px;
  vertical-align: middle;
}

.brochure-share img {
  filter: invert(1);
}

.brochure-share:hover img,
.brochure-share:active img {
  filter: none;
}

.share-status {
  display: block;
  min-height: 24px;
  margin-top: 8px;
  color: #fff;
  font-size: 0.875rem;
}

.back-to-top {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 1030;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 16px #0003;
  cursor: pointer;
}

.back-to-top[hidden] {
  display: none;
}

.back-to-top:hover {
  background: #eee;
}

.back-to-top:focus-visible {
  outline: 3px solid #897b65;
  outline-offset: 3px;
}

/* ========================================
   MAP
======================================== */

.google-map {
  width: 100%;
  height: 390px;
  background: #e8e6e0;
  overflow: hidden;
}

.google-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ========================================
   CONTACT
======================================== */

.contact {
  width: 100%;

  background: var(--soft);

  border-left: 4px solid var(--gold);

  padding: clamp(2rem, 5vw, 4rem);

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 2rem;
}

/* ========================================
   FOOTER
======================================== */

footer {
  background: #0b1116;

  color: #aaa;

  padding: 2rem 0;
}

.seeff-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.seeff-brand:hover {
  color: #fff;
}

.seeff-brand span {
  font-size: 0.75rem;
}

.seeff-brand img {
  display: block;
  width: 96px;
  height: auto;
  aspect-ratio: 1040 / 651;
  object-fit: contain;
}

.seeff-brand--hero {
  margin-top: 24px;
}

.seeff-brand:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 5px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.seeff-brand--footer img {
  width: 128px;
}

.footer-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 460px;
}

footer b {
  color: #fff;
}

/* ========================================
   TABLET
   768px - 991px
======================================== */

@media (max-width: 991.98px) {
  #nav {
    background: rgba(16, 24, 32, 0.97);
  }

  .hero {
    min-height: 75vh;

    background-position: center;
  }

  .hero .container {
    padding-top: 8rem;
    padding-bottom: 4rem;
  }

  .hero h1 {
    font-size: clamp(3rem, 9vw, 5rem);
  }

  .section-img {
    height: clamp(320px, 55vw, 480px);
  }

  .contact {
    align-items: flex-start;
    flex-direction: column;
  }

  .book {
    width: min(85%, 330px);
  }
}

/* ========================================
   MOBILE
   <= 767px
======================================== */

@media (max-width: 767.98px) {
  .book-stack {
    width: min(calc(100% - 72px), 300px);
  }

  .book-back--left {
    transform: translate(-14px, -8px) rotate(-8deg);
  }

  .book-back--right {
    transform: translate(14px, -8px) rotate(6deg);
  }

  .splash-screen,
  .hero {
    background-image: url("../assets/images/hero-1280.webp");
    background-image: image-set(
      url("../assets/images/hero-1280.webp") 1x,
      url("../assets/images/hero-1920.webp") 2x
    );
  }

  .photo-break.is-image-loaded {
    --photo-break-image: image-set(
      url("../assets/images/photobreak-960.webp") 1x,
      url("../assets/images/photobreak-1280.webp") 2x
    );
  }

  .brochure-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }

  .brochure-actions .brochure-share {
    margin-left: 0;
  }

  section {
    scroll-margin-top: 70px;
  }

  .hero {
    min-height: 650px;

    background-position: 60% center;
  }

  .shade {
    background: linear-gradient(
      0deg,
      rgba(8, 13, 18, 0.92) 0%,
      rgba(8, 13, 18, 0.6) 50%,
      rgba(8, 13, 18, 0.25) 100%
    );
  }

  .hero .container {
    padding-top: 7rem;
    padding-bottom: 3.5rem;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 14vw, 4.5rem);

    line-height: 0.95;

    letter-spacing: -0.045em;
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .pad {
    padding: 4rem 0;
  }

  .panel {
    padding: 1.75rem;
  }

  .section-img {
    height: 320px;
    min-height: 0;
  }

  .photo-break {
    min-height: 420px;
  }

  .contact {
    padding: 2rem;

    gap: 1.5rem;
  }

  .google-map {
    height: 300px;
  }

  .book {
    width: min(calc(100% - 30px), 300px);

    transform: rotate(-2deg);

    box-shadow:
      14px 14px 0 #897b65,
      0 20px 40px #0005;
  }
}

/* ========================================
   SMALL PHONES
   <= 420px
======================================== */

@media (max-width: 420px) {
  .hero {
    min-height: 600px;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 15vw, 3.8rem);
  }

  .hero .container {
    padding-bottom: 3rem;
  }

  .pad {
    padding: 3.5rem 0;
  }

  .panel {
    padding: 1.4rem;
  }

  .contact {
    padding: 1.75rem 1.5rem;
  }

  .section-img {
    height: 280px;
  }

  .photo-break {
    min-height: 380px;
  }

  .book {
    width: calc(100% - 35px);
  }

  .legend {
    gap: 0.5rem 0.9rem;
  }
}
