/*
 * The Coffee World: entry-point page. Loaded after /styles.css, which supplies the tokens, header, footer and buttons.
 * Direction: quiet luxury. Deep espresso, warm ivory type, champagne hairlines, one cinematic highland photograph.
 * Everything specific to the placeholder lives under .cw-*; the future 3D prototype replaces the [data-world-mount]
 * section and never touches the header, the footer or these hero rules.
 */
body.world {
  --cw-champagne: #d8b978;
  --cw-ivory: #f5ebdd;
  --cw-hair: rgba(216, 185, 120, 0.3);
  background: var(--espresso);
  color: #e6dbc7;
}

/* ---------- Hero ---------- */
.cw-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(30rem, 84vh, 50rem);
  min-height: clamp(30rem, 84svh, 50rem);
  overflow: hidden;
  padding-block: clamp(3rem, 8vw, 6rem);
}
.cw-hero__img {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 55%;
}
.cw-hero__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(20, 15, 11, 0.5) 0%, rgba(20, 15, 11, 0) 28%, rgba(20, 15, 11, 0) 58%, var(--espresso) 100%),
    linear-gradient(90deg, rgba(20, 15, 11, 0.93) 0%, rgba(20, 15, 11, 0.78) 38%, rgba(20, 15, 11, 0.34) 74%, rgba(20, 15, 11, 0.18) 100%);
}
.cw-topo {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  color: var(--cw-champagne);
  opacity: 0.28;
  pointer-events: none;
}
.cw-hero__inner {
  width: 100%;
  max-width: var(--wrap);
}
.cw-eyebrow {
  margin: 0 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cw-champagne);
}
.cw-hero .cw-eyebrow::before {
  content: "";
  flex: none;
  width: 2.25rem;
  height: 1px;
  background: var(--cw-champagne);
}
.cw-h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 8vw, 5rem);
  line-height: 1.05;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--cw-ivory);
}
.cw-tag {
  margin: 0 0 2.25rem;
  max-width: 28ch;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 3.2vw, 2rem);
  line-height: 1.3;
  color: var(--cw-champagne);
}
.cw-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1rem;
}
.cw-enter {
  letter-spacing: 0.12em;
}
.cw-note {
  margin: 1.5rem 0 0;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: #b9ae99;
}

/* ---------- World mount (placeholder content; replaced by the 3D prototype later) ---------- */
.cw-status {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-top: 1px solid var(--cw-hair);
}
.cw-status__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.75rem, 5vw, 4rem);
  align-items: center;
}
.cw-h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.15;
  color: var(--cw-ivory);
}
.cw-status__copy p:not(.cw-eyebrow) {
  max-width: 36rem;
  margin: 0 0 1.5rem;
  font-size: clamp(0.9375rem, 1.1vw, 1.0625rem);
  line-height: 1.7;
}
.cw-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cw-links a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cw-champagne);
  padding-block: 0.5rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.cw-links a:hover,
.cw-links a:focus-visible {
  color: var(--gold-light);
  border-bottom-color: var(--cw-champagne);
}

/* A quiet frame that marks where the interactive world will appear: corner brackets and one line of text. */
.cw-frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(160deg, rgba(23, 56, 43, 0.55), rgba(20, 15, 11, 0.4));
  border: 1px solid var(--cw-hair);
}
.cw-frame p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.375rem);
  line-height: 1.4;
  color: #cdbf9f;
}
.cw-frame__c {
  position: absolute;
  width: 1.5rem;
  height: 1.5rem;
  border: 0 solid var(--cw-champagne);
}
.cw-frame__c--tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.cw-frame__c--tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.cw-frame__c--bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.cw-frame__c--br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

/* ---------- "Not open yet" notice (native dialog) ---------- */
.cw-dialog {
  width: min(32rem, calc(100vw - 2rem));
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid var(--cw-champagne);
  border-radius: 4px;
  color: #e6dbc7;
  background: #1d1612;
}
.cw-dialog::backdrop {
  background: rgba(10, 8, 6, 0.72);
}
.cw-dialog h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.75rem;
  color: var(--cw-ivory);
}
.cw-dialog p:not(.cw-eyebrow) {
  margin: 0 0 1.5rem;
  line-height: 1.65;
}
.cw-dialog .cw-eyebrow {
  margin-bottom: 0.75rem;
}
.cw-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cw-status__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .cw-frame {
    aspect-ratio: 16 / 9;
  }
}
@media (max-width: 560px) {
  .cw-hero__shade {
    background:
      linear-gradient(180deg, rgba(20, 15, 11, 0.55) 0%, rgba(20, 15, 11, 0.6) 40%, var(--espresso) 100%);
  }
  .cw-cta {
    flex-direction: column;
    align-items: stretch;
  }
  .cw-cta .btn {
    justify-content: center;
    text-align: center;
  }
  .cw-eyebrow {
    letter-spacing: 0.14em;
  }
}

/* ---------- Motion: one-time reveal and a very slow drift; off under reduced motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .cw-rv {
    opacity: 0;
    transform: translateY(14px);
    transition:
      opacity 0.9s var(--ease) var(--d, 0s),
      transform 0.9s var(--ease) var(--d, 0s);
  }
  .js .cw-rv.cw-in {
    opacity: 1;
    transform: none;
  }
  .cw-hero__img {
    animation: cw-drift 60s ease-in-out infinite alternate;
    transform-origin: 62% 55%;
  }
}
@keyframes cw-drift {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.09);
  }
}
