/* ==========================================================================
   Ananta Designs - the shell

   Header (wordmark, primary nav, search, actions), the category pill rail
   beneath it, the mobile search/menu sheet, the phone bottom tab bar, and
   the footer.

   The tab bar is the point of Direction 04's structure, carried into 05: the
   four things a shopper does most are one thumb-reach away on every screen.
   ========================================================================== */

/* ---- fixed header -------------------------------------------------------- */

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: var(--z-header);
  background: rgba(8, 8, 10, 0.95);
  backdrop-filter: blur(12px);
  transition: box-shadow 0.3s var(--ease-soft);
}

.site-header.is-scrolled {
  border-bottom: 1px solid var(--line);
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: var(--nav-h);
}

/* ---- wordmark ------------------------------------------------------------
   Letterspaced Cormorant. Until the client supplies logo files this IS the
   logo; when an SVG arrives it drops in here and the type falls away. */

.wordmark {
  flex-shrink: 0;
  padding-right: 0.25rem;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.3em;
  color: var(--fg);
}

/* The client's mark: monogram over the ANANTA wordmark, cropped from the
   full lockup. 42px in a 62px bar leaves 10px of air above and below, and
   keeps the wordmark inside it around 13px - the smallest it stays legible.
   The rule and "DESIGNS" are not in this crop; at this height they would
   render at three or four pixels and turn to mud. They appear in the footer,
   where the full lockup has room. */
.wordmark img,
.wordmark svg {
  height: 42px;
  width: auto;
}

@media (max-width: 480px) {
  .wordmark img {
    height: 36px;
  }
}

/* ---- desktop primary nav ------------------------------------------------- */

.primary-nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
  margin-left: 1.5rem;
}

.primary-nav a {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  transition: color 0.3s var(--ease-soft);
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  color: var(--gold);
}

@media (min-width: 1024px) {
  .primary-nav {
    display: flex;
  }
}

/* ---- header search ------------------------------------------------------- */

.header-search {
  display: none;
  flex: 1;
  min-width: 0;
  max-width: 24rem;
  margin-left: auto;
}

@media (min-width: 768px) {
  .header-search {
    display: block;
  }
}

/* ---- header actions ------------------------------------------------------ */

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

@media (min-width: 768px) {
  .header-actions {
    margin-left: 0.5rem;
  }
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  color: var(--fg-dim);
  transition: color 0.3s var(--ease-soft);
}

.icon-btn:hover {
  color: var(--gold);
}

/* Account and bag are desktop-only. On a phone the four tab-bar slots go to
   Home, Shop, Academy and Studio while showcase mode is on; once commerce
   opens, footer.php gives two of those slots back to Account and Bag. */
.icon-btn--desktop {
  display: none;
}

@media (min-width: 1024px) {
  .icon-btn--desktop {
    display: grid;
  }
}

.icon-btn--mobile {
  display: grid;
}

@media (min-width: 768px) {
  .icon-btn--mobile {
    display: none;
  }
}

/* the count dot on the bag */
.count-dot {
  position: absolute;
  top: 6px;
  right: 4px;
  display: grid;
  place-items: center;
  min-width: 18px;
  padding-inline: 4px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}

/* ---- category pill rail --------------------------------------------------
   Both departments sit together at the head of the rail. Putting each one in
   front of its own categories buried Jewellery behind eight clothing chips on
   a phone, which is the opposite of treating it as half the shop. */

.cat-rail {
  border-top: 1px solid rgba(31, 30, 37, 0.7);
}

.cat-rail ul {
  gap: 0.5rem;
  padding-block: 0.625rem;
}

.cat-rail__divider {
  width: 1px;
  flex-shrink: 0;
  align-self: stretch;
  margin-block: 4px;
  background: var(--line-strong);
}

.cat-rail__divider--soft {
  margin-block: 8px;
  background: var(--line);
}

/* ---- mobile bottom tab bar ----------------------------------------------- */

.tabbar {
  position: fixed;
  inset-inline: 0;
  z-index: var(--z-header);
  border-top: 1px solid var(--line);
  background: rgba(8, 8, 10, 0.96);
  backdrop-filter: blur(12px);
}

@media (min-width: 1024px) {
  .tabbar {
    display: none;
  }
}

.tabbar ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: var(--tabbar-h);
}

.tabbar a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  height: 100%;
  color: var(--muted);
  transition: color 0.3s var(--ease-soft);
}

.tabbar a[aria-current="page"] {
  color: var(--gold);
}

.tabbar__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* the active rule that draws itself across the top of the tab */
.tabbar a::before {
  content: "";
  position: absolute;
  inset-inline: 1.5rem;
  top: 0;
  height: 1px;
  transform: scaleX(0);
  background: var(--gold);
  transition: transform 0.3s var(--ease-soft);
}

.tabbar a[aria-current="page"]::before {
  transform: scaleX(1);
}

.tabbar__badge {
  position: absolute;
  top: -6px;
  right: -10px;
  display: grid;
  place-items: center;
  min-width: 16px;
  padding-inline: 4px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 9px;
  font-weight: 600;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
}

/* ---- the mobile search + menu sheet -------------------------------------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: var(--z-sheet);
  display: flex;
  flex-direction: column;
  background: rgba(8, 8, 10, 0.98);
  backdrop-filter: blur(12px);
}

.sheet[hidden] {
  display: none;
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: var(--nav-h);
}

.sheet__body {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 2.5rem;
}

.sheet__section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.75rem;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.sheet__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.sheet__grid a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 0.875rem;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--fg-dim);
  transition:
    border-color 0.3s var(--ease-soft),
    color 0.3s var(--ease-soft);
}

.sheet__grid a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.sheet__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--fg-dim);
  transition: color 0.3s var(--ease-soft);
}

.sheet__list a:hover {
  color: var(--gold);
}

/* Lock the page behind an open sheet without losing scroll position. */
body.is-locked {
  overflow: hidden;
}

/* ---- main ---------------------------------------------------------------- */

.site-main {
  /* room for the bottom tab bar on phones */
  padding-bottom: var(--tabbar-h);
}

@media (min-width: 1024px) {
  .site-main {
    padding-bottom: 0;
  }
}

/* ---- footer -------------------------------------------------------------- */

.site-footer {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.site-footer__inner {
  padding-block: 2.5rem;
}

@media (min-width: 768px) {
  .site-footer__inner {
    padding-block: 3.5rem;
  }
}

/* the four assurances across the top of the footer */
.assurances {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .assurances {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .assurances {
    grid-template-columns: repeat(4, 1fr);
  }
}

.assurance {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--line);
  background: var(--ink);
  border-radius: var(--radius-lg);
  font-size: 13px;
  line-height: 1.4;
  color: var(--fg-dim);
}

.assurance svg {
  flex-shrink: 0;
  color: var(--gold);
}

.footer-cols {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

@media (min-width: 640px) {
  .footer-cols {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 2.5rem;
    margin-top: 3rem;
  }

  .footer-cols {
    margin-top: 0;
  }
}

.footer-col h2 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 1rem;
}

.footer-col a {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.3s var(--ease-soft);
}

.footer-col a:hover {
  color: var(--gold);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---- the gold marquee strip ----------------------------------------------
   The one place on the site where something loops. Short, horizontal, and it
   stops entirely for anyone who has asked for reduced motion - the strip
   still reads, because the content is duplicated rather than scrolled into
   view. */

.gold-strip {
  overflow: hidden;
  padding-block: 0.75rem;
  background-image: var(--gold-leaf);
}

.gold-strip__track {
  display: flex;
  width: max-content;
}

@media (prefers-reduced-motion: no-preference) {
  .gold-strip__track {
    animation: marquee 38s linear infinite;
  }
}

.gold-strip__item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-inline: 1.5rem;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--on-gold);
}

.gold-strip__item::after {
  content: "";
  width: 4px;
  height: 4px;
  transform: rotate(45deg);
  background: color-mix(in srgb, var(--on-gold) 50%, transparent);
}

/* ---- opening splash ------------------------------------------------------
   The lockup over a blurred page for a little under three seconds.

   The animation is what removes it. Not JavaScript - if the script never
   runs the splash must still clear, or one failed request hides the entire
   site behind a logo. `forwards` holds the end state after it finishes.

   The blur is backdrop-filter on this overlay rather than a filter on the
   page: a filtered ancestor becomes the containing block for its fixed
   children, which would unstick the header and the tab bar while it applied.
   ========================================================================= */

.splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgba(8, 8, 10, 0.82);
  backdrop-filter: blur(22px) saturate(1.05);
  animation: splash-out 0.7s var(--ease-soft) 2.2s forwards;
}

@keyframes splash-out {
  from {
    opacity: 1;
    visibility: visible;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.splash__logo {
  width: min(320px, 58vw);
  height: auto;
  animation: splash-in 0.9s var(--ease-lux) both;
}

@keyframes splash-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Already seen this session - the class is set by an inline script in the
   head, before first paint, so there is no flash of the splash. */
.splash-seen .splash {
  display: none;
}

/* Decoration should never delay content. */
@media (prefers-reduced-motion: reduce) {
  .splash {
    display: none;
  }
}

/* ---- the opening promotion -----------------------------------------------
   The academy poster, after the splash has cleared.

   It ships with the `hidden` attribute and JavaScript removes it, so the
   explicit `[hidden]` rule below has to beat the display value - otherwise a
   visitor without JavaScript gets a panel over the site and no way to close
   it. Same reasoning as the splash, one step stricter: the splash clears
   itself on a timer, this one waits for a click. */

.promo {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vh, 2.5rem) 1rem;
}

.promo[hidden] {
  display: none;
}

.promo__scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0.78);
  backdrop-filter: blur(10px);
}

.promo__dialog {
  position: relative;
  width: min(26rem, 92vw);
  /* The poster is tall. On a short window it scrolls inside the dialog
     rather than running off the screen and taking the close button with it. */
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.promo__art {
  display: block;
}

.promo__img {
  display: block;
  width: 100%;
  height: auto;
}

/* Top right, over the artwork, on its own solid ground so it stays legible
   whatever is behind it. Sits outside the poster's link. */
.promo__close {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(8, 8, 10, 0.82);
  color: var(--fg);
  cursor: pointer;
  transition:
    background-color 0.3s var(--ease-soft),
    border-color 0.3s var(--ease-soft),
    color 0.3s var(--ease-soft);
}

.promo__close:hover {
  border-color: var(--gold);
  background: var(--ink, #08080a);
  color: var(--gold);
}

.js .promo__dialog {
  animation: promo-in 0.45s var(--ease-lux) both;
}

@keyframes promo-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* It carries course lengths, fees and an address, so unlike the splash it is
   information rather than decoration and still shows - it just arrives
   without movement. */
@media (prefers-reduced-motion: reduce) {
  .js .promo__dialog {
    animation: none;
  }
}
