/* =========================================================
   NAVAO - The NAVAO Guide
   File: css/guide-hub.css
   Page: /blog/
   Load order: tokens.css > global.css > components.css >
               guide.css > guide-hub.css

   IMPORTANT:
   This version matches the current HTML structure:

   <section class="hub-doors">
     <div class="hub-intro">...</div>
     <div class="hub-doors__grid">
       <a class="hub-door hub-door--left">...</a>
       <a class="hub-door hub-door--right">...</a>
     </div>
   </section>
   ========================================================= */

/* ---------------------------------------------------------
   PAGE
   --------------------------------------------------------- */
.guide.hub {
  margin: 0;
  overflow-x: hidden;
  background: var(--guide-ink);
  color: var(--guide-text-inverse);
}

.hub .guide__container--wide {
  width: min(100% - 3rem, 78rem);
}

/* =========================================================
   FULL-SCREEN SPLIT HERO
   .hub-doors is the full hero wrapper.
   .hub-doors__grid holds the two photographs.
   ========================================================= */
.hub-doors {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 40rem;
  overflow: hidden;
  background: var(--guide-ink);
}

.hub-doors__grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

/* ---------------------------------------------------------
   ONE DOOR
   Both doors start at 50% width. On hover, the selected
   door grows slightly toward the center.
   --------------------------------------------------------- */
.hub-door {
  position: relative;
  flex: 1 1 50%;
  width: 50%;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  background: #141414;
  color: var(--guide-text-inverse);
  text-decoration: none;
  transition: flex-grow 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hub-door--left {
  border-right: 1px solid rgba(190, 160, 91, 0.85);
}

.hub-door__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.hub-door__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
  transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Keep the main subjects visible in each vertical half. */
.hub-door--left .hub-door__media img {
  object-position: center center;
}

.hub-door--right .hub-door__media img {
  object-position: center center;
}

/* Dark top for the main title and dark bottom for door text. */
.hub-door__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.68) 0%,
      rgba(0, 0, 0, 0.22) 28%,
      rgba(0, 0, 0, 0.08) 52%,
      rgba(0, 0, 0, 0.28) 70%,
      rgba(0, 0, 0, 0.88) 100%
    );
  transition: background-color 0.6s ease;
}

.hub-door__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: clamp(2rem, 4vw, 4rem);
  padding-bottom: clamp(2.5rem, 6vh, 4.5rem);
}

.hub-door--right .hub-door__content {
  text-align: right;
}

.hub-door__kicker {
  display: block;
  margin-bottom: 0.9rem;
  font-family: var(--guide-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--guide-accent);
}

.hub-door__title {
  margin: 0 0 0.6rem;
  font-family: var(--guide-serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 4.6vw, 4.75rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--guide-text-inverse);
  white-space: nowrap;
}

.hub-door__lead {
  margin: 0;
  font-family: var(--guide-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 1.5vw, 1.4rem);
  color: var(--guide-muted-inverse);
}

/* Hidden until hover: action line and guide name. */
.hub-door__reveal {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.5s ease, opacity 0.4s ease;
}

.hub-door__reveal-inner {
  min-height: 0;
  overflow: hidden;
}

.hub-door__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.4rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--guide-accent);
  font-family: var(--guide-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--guide-text-inverse);
}

.hub-door__inside {
  margin: 1rem 0 0;
  font-family: var(--guide-sans);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--guide-muted-inverse);
}

.hub-door__inside strong {
  font-weight: 500;
  color: var(--guide-text-inverse);
}

.hub-door:focus-visible {
  outline: 2px solid var(--guide-accent);
  outline-offset: -6px;
}

/* ---------------------------------------------------------
   HOVER: CHOOSING A DOOR
   --------------------------------------------------------- */
@media (hover: hover) and (min-width: 761px) {
  .hub-door:hover,
  .hub-door:focus-visible {
    flex-grow: 1.18;
  }

  .hub-door:hover .hub-door__media img,
  .hub-door:focus-visible .hub-door__media img {
    transform: scale(1.07);
  }

  .hub-doors__grid:hover .hub-door:not(:hover) .hub-door__scrim {
    background-color: rgba(0, 0, 0, 0.28);
  }
}

.hub-door:hover .hub-door__reveal,
.hub-door:focus-visible .hub-door__reveal {
  grid-template-rows: 1fr;
  opacity: 1;
}

@media (hover: none) {
  .hub-door__reveal {
    grid-template-rows: 1fr;
    opacity: 1;
  }
}

/* =========================================================
   TITLE OVER BOTH PHOTOGRAPHS
   The title is an overlay, not a flex/grid column.
   ========================================================= */
.hub-intro {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 10;
  width: min(100% - 3rem, 48rem);
  margin: 0;
  padding: clamp(6.5rem, 12vh, 9rem) 0 0;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.hub-intro::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  z-index: -1;
  width: min(100vw, 70rem);
  height: 24rem;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at top,
    rgba(0, 0, 0, 0.68) 0%,
    rgba(0, 0, 0, 0.28) 48%,
    transparent 75%
  );
  filter: blur(8px);
}

.hub-intro__kicker {
  display: block;
  margin-bottom: 1.1rem;
  font-family: var(--guide-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--guide-accent);
}

.hub-intro__title {
  margin: 0 auto 1rem;
  font-family: var(--guide-serif);
  font-weight: 400;
  font-size: clamp(3.2rem, 7vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--guide-text-inverse);
  text-shadow: 0 3px 30px rgba(0, 0, 0, 0.75);
}

.hub-intro__lead {
  margin: 0 auto;
  max-width: 32rem;
  font-family: var(--guide-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1.7vw, 1.5rem);
  line-height: 1.4;
  color: rgba(248, 245, 239, 0.88);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
}

.hub-intro__lead[data-typewriter] {
  min-height: 2.8em;
}

/* =========================================================
   OPENING ANIMATION
   ========================================================= */
@keyframes hubOpenLeft {
  from { clip-path: inset(0 0 0 100%); }
  to   { clip-path: inset(0 0 0 0); }
}

@keyframes hubOpenRight {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

@keyframes hubOpenDown {
  from { clip-path: inset(0 0 100% 0); }
  to   { clip-path: inset(0 0 0 0); }
}

@keyframes hubFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hub-door--left {
  animation: hubOpenLeft 1.2s cubic-bezier(0.7, 0, 0.2, 1) 0.1s both;
}

.hub-door--right {
  animation: hubOpenRight 1.2s cubic-bezier(0.7, 0, 0.2, 1) 0.1s both;
}

.hub-door__content {
  animation: hubFadeUp 0.8s ease 1.1s both;
}

.hub-intro__kicker,
.hub-intro__title,
.hub-intro__lead {
  animation: hubFadeUp 0.9s ease both;
}

.hub-intro__kicker { animation-delay: 0.9s; }
.hub-intro__title  { animation-delay: 1s; }
.hub-intro__lead   { animation-delay: 1.1s; }

/* =========================================================
   SHELVES
   ========================================================= */
.hub-shelf {
  padding: clamp(3.5rem, 7vw, 5rem) 0;
  border-top: 1px solid var(--guide-line-dark);
}

.hub-shelf__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hub-shelf__title {
  margin: 0;
  font-family: var(--guide-serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.05;
  color: var(--guide-text-inverse);
}

.hub-shelf__note {
  margin: 0;
  font-family: var(--guide-sans);
  font-size: 0.8125rem;
  color: var(--guide-muted-inverse);
}

.hub-shelf__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.9rem, 2vw, 1.5rem);
}

.hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  color: var(--guide-text-inverse);
  text-decoration: none;
}

button.hub-card {
  cursor: pointer;
}

article.hub-card {
  cursor: default;
}

.hub-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 0.9rem;
  background: #1a1a1a;
}

.hub-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

a.hub-card:hover .hub-card__media img,
a.hub-card:focus-visible .hub-card__media img {
  transform: scale(1.04);
}

.hub-card__place {
  font-family: var(--guide-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--guide-accent);
}

.hub-card__title {
  margin: 0.2rem 0 0;
  font-family: var(--guide-serif);
  font-weight: 400;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  line-height: 1.15;
  color: var(--guide-text-inverse);
}

.hub-card:focus-visible {
  outline: 2px solid var(--guide-accent);
  outline-offset: 6px;
  border-radius: 1rem;
}

.hub-card--soon .hub-card__media img {
  filter: grayscale(0.6) brightness(0.55);
}

.hub-card__badge {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(6px);
  font-family: var(--guide-sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--guide-text-inverse);
}

/* =========================================================
   CLOSING BLOCK
   ========================================================= */
.hub-close {
  padding: clamp(4rem, 8vw, 6rem) 0 clamp(5rem, 9vw, 7rem);
  border-top: 1px solid var(--guide-line-dark);
  text-align: center;
}

.hub-close__title {
  margin: 0 auto 1rem;
  max-width: 18ch;
  font-family: var(--guide-serif);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--guide-text-inverse);
}

.hub-close__text {
  margin: 0 auto 2rem;
  max-width: 32rem;
  font-family: var(--guide-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--guide-muted-inverse);
}

.hub-close__foot {
  margin-top: 3rem;
  font-family: var(--guide-sans);
  font-size: 0.75rem;
  color: var(--guide-muted-inverse);
}

/* WhatsApp button used in the closing block. */
.hub-dialog__primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  background: var(--guide-accent);
  color: #0a0a0a;
  font-family: var(--guide-sans);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease;
}

.hub-dialog__primary:hover,
.hub-dialog__primary:focus-visible {
  background: #cdb471;
}

/* =========================================================
   REVEAL EFFECTS
   ========================================================= */
.has-js .hub [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.has-js .hub [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

.hub [data-reveal-delay="1"] { transition-delay: 0.08s; }
.hub [data-reveal-delay="2"] { transition-delay: 0.16s; }
.hub [data-reveal-delay="3"] { transition-delay: 0.24s; }
.hub [data-reveal-delay="4"] { transition-delay: 0.32s; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .hub-shelf__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hub-door__title {
    white-space: normal;
  }
}

/* Phones: title first, then two large vertical photographs. */
@media (max-width: 760px) {
  .hub-doors {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .hub-intro {
    position: relative;
    top: auto;
    left: auto;
    z-index: 2;
    width: min(100% - 3rem, 44rem);
    margin: 0 auto;
    padding: 7rem 0 2.5rem;
    transform: none;
  }

  .hub-intro::before {
    display: none;
  }

  .hub-intro__lead[data-typewriter] {
    min-height: 4.2em;
  }

  .hub-doors__grid {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
  }

  .hub-door {
    flex: none;
    width: 100%;
    min-height: 68svh;
  }

  .hub-door--left {
    border-right: 0;
    border-bottom: 1px solid rgba(190, 160, 91, 0.85);
    animation-name: hubOpenDown;
  }

  .hub-door--right {
    animation-name: hubOpenDown;
    animation-delay: 0.3s;
  }

  .hub-door--right .hub-door__content {
    text-align: left;
  }

  .hub-door__content {
    padding: 2rem 1.5rem 2.5rem;
  }

  .hub-shelf__head {
    flex-direction: column;
    gap: 0.4rem;
  }
}

@media (max-width: 560px) {
  .hub-shelf__grid {
    grid-template-columns: 1fr;
  }
}

/* Visitors who turn off animations see everything in place. */
@media (prefers-reduced-motion: reduce) {
  .hub-door--left,
  .hub-door--right,
  .hub-door__content,
  .hub-intro__kicker,
  .hub-intro__title,
  .hub-intro__lead {
    animation: none;
  }

  .hub-door,
  .hub-door__media img,
  .hub-card__media img,
  .hub-door__reveal {
    transition: none;
  }

  .has-js .hub [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
