/**
 * Layout: Vista — an airy magazine.
 *
 * Loaded after main.css when Customizer → Layout & colours → Layout is "Vista"
 * (inc/design.php). A soft page tone with white rounded tiles, a floating pill
 * masthead with topic chips, a big cover story with three cards overlapping
 * its foot, a light "Popular" panel, an accent newsletter card and a light
 * footer. Fonts: Outfit (display) and DM Sans (body).
 * Colours come from the palette tokens, so any palette works.
 */

/* ═══ Tokens ═══════════════════════════════════════════════════════════════ */
body.l-vista {
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 22px;
  --r-xl: 30px;
  --shadow-sm: 0 1px 2px rgba(var(--ink-rgb), 0.04), 0 6px 18px rgba(var(--ink-rgb), 0.05);
  --shadow-md: 0 2px 6px rgba(var(--ink-rgb), 0.05), 0 18px 40px rgba(var(--ink-rgb), 0.09);
  background: var(--paper-2);
  letter-spacing: 0;
}

.l-vista h1,
.l-vista h2,
.l-vista h3,
.l-vista h4 {
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* ═══ No notches: plain rounded plates ═════════════════════════════════════ */
.l-vista .notch {
  display: none;
}

.l-vista .lead__clip,
.l-vista .digest__media-clip,
.l-vista .hcard__media-clip,
.l-vista .popular__media-clip,
.l-vista .mini__media-clip,
.l-vista .notch-clip,
.l-vista .card__media-clip,
.l-vista .highlight__clip,
.l-vista .archive-lead__clip,
.l-vista .footer-top-link__clip {
  -webkit-mask: none;
  mask: none;
  clip-path: none;
}

/* ═══ Buttons & chips ══════════════════════════════════════════════════════ */
.l-vista .btn--primary:not(.btn--split) {
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.28);
}

/* The liquid split pill becomes an ink capsule with an accent dot-arrow. */
.l-vista .btn--split .btn__goo {
  display: none;
}

.l-vista .btn--split,
.l-vista .btn--split:hover,
.l-vista .btn--split:focus-visible {
  filter: none;
}

.l-vista .btn--split {
  gap: 10px;
  padding: 5px 5px 5px 18px;
  background: var(--ink);
  color: #fff;
  transition:
    background-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.l-vista .btn--split .btn__label {
  margin-right: 0;
  padding: 0;
}

.l-vista .btn--split .btn__arrow {
  position: static;
  width: 32px;
  height: 32px;
  aspect-ratio: auto;
  border-radius: 50%;
  background: var(--gold);
  transition: transform 0.25s var(--ease);
}

.l-vista .btn--split .btn__arrow svg {
  width: 16px;
  height: 16px;
}

.l-vista .btn--split:hover .btn__arrow {
  transform: rotate(45deg);
}

.l-vista .chip {
  padding: 5px 12px;
  background: var(--gold-wash);
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* ═══ Header — floating pill + topic chips ═════════════════════════════════ */
.l-vista .site-header,
.l-vista.home .site-header:not(.site-header--scrolled) {
  background: transparent;
  border-bottom: 0;
}

/* The header is an island: no full-width strip behind it, even when the
   page scrolls under it — only the pill itself lifts with a deeper shadow. */
.l-vista .site-header.site-header--scrolled {
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.l-vista .site-header > .container {
  pointer-events: auto;
}

.l-vista .site-header--scrolled .masthead {
  box-shadow: var(--shadow-md);
}

/* 901–1199px: the topic chips sit in their own row under the pill and would
   float over the content, so that range keeps a page-tone strip behind them. */
@media (min-width: 901px) and (max-width: 1199px) {
  .l-vista .site-header.site-header--scrolled {
    background: var(--paper-2);
    box-shadow: 0 10px 24px -18px rgba(var(--ink-rgb), 0.35);
  }
}

.l-vista .site-header > .container {
  padding-top: 14px;
}

.l-vista .masthead {
  justify-content: space-between;
  gap: 16px;
  padding: 10px 10px 10px clamp(16px, 2vw, 26px);
  border-radius: var(--r-pill);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.l-vista .masthead__brand {
  justify-content: flex-start;
}

.l-vista .header-cta {
  display: inline-flex;
}

.l-vista .nav-primary {
  border-top: 0;
}

.l-vista .nav-inner {
  min-height: 0;
  padding-block: 10px 4px;
}

.l-vista .nav-list {
  gap: 4px;
}

.l-vista .nav-list a {
  padding: 7px 15px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-2);
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.l-vista .nav-list a::after {
  display: none;
}

.l-vista .nav-list a:hover,
.l-vista .nav-list .current-menu-item > a,
.l-vista .nav-list .current-menu-parent > a {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.l-vista .nav-toggle {
  border-radius: 50%;
  right: 8px;
}

/* ═══ Section heads ════════════════════════════════════════════════════════ */
.l-vista .sec-head__title {
  font-size: clamp(26px, 3.2vw, 38px);
}

.l-vista .rail-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.l-vista .rail-btn[data-rail-next] {
  background: var(--ink);
}

.l-vista .rail-btn[data-rail-next]:hover:not(:disabled) {
  background: var(--gold);
}

/* ═══ Front page — Vista cover ═════════════════════════════════════════════ */
.vista-hero {
  padding-block: 14px clamp(36px, 5vw, 60px);
}

.vista-cover {
  position: relative;
  display: block;
  min-height: clamp(440px, 46vw, 610px);
  border-radius: 34px;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink-2);
  color: #fff;
}

.vista-cover__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 1s var(--ease);
}

.vista-cover:hover .vista-cover__img {
  transform: scale(1.035);
}

.vista-cover__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(8, 8, 8, 0.86) 0%, rgba(8, 8, 8, 0.5) 38%, rgba(8, 8, 8, 0.05) 70%),
    linear-gradient(to right, rgba(8, 8, 8, 0.35), transparent 60%);
}

.vista-cover__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  max-width: 820px;
  padding: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(100px, 10vw, 140px);
}

.vista-cover__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 12.5px;
  font-weight: 600;
}

.vista-cover__title {
  font-size: clamp(30px, 4.6vw, 60px);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.035em;
  color: #fff;
  text-wrap: balance;
}

.vista-cover__excerpt {
  max-width: 62ch;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vista-cover__foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 4px;
}

.vista-cover__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  transition:
    background-color 0.25s var(--ease),
    color 0.25s var(--ease);
}

.vista-cover:hover .vista-cover__cta {
  background: var(--gold);
  color: #fff;
}

.vista-trio {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: -78px;
  padding-inline: clamp(14px, 3vw, 40px);
}

.vista-mini {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s var(--ease);
}

.vista-mini:hover {
  transform: translateY(-3px);
}

.vista-mini__media {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--paper-3);
}

.vista-mini__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vista-mini__body {
  min-width: 0;
}

.vista-mini__cat {
  display: block;
  margin-bottom: 4px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.vista-mini__title {
  margin-bottom: 6px;
  font-size: 15.5px;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vista-mini__title a {
  transition: color 0.2s var(--ease);
}

.vista-mini:hover .vista-mini__title a {
  color: var(--gold-deep);
}

.vista-mini__time {
  font-size: 12px;
  color: var(--text-3);
}

.l-vista .loop {
  margin-top: clamp(22px, 2.6vw, 32px);
  border: 0;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.l-vista .loop__tag {
  background: var(--gold);
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* ═══ Latest — white tiles ═════════════════════════════════════════════════ */
.l-vista .rail__item {
  width: clamp(260px, 27vw, 340px);
}

.l-vista .rail__viewport {
  padding-block: 6px 18px;
}

.l-vista .hcard {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 10px 10px 18px;
  border-radius: 26px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.l-vista .hcard__media {
  aspect-ratio: 16 / 11;
}

.l-vista .hcard__media-clip {
  border-radius: 18px;
}

.l-vista .hcard__body {
  padding-inline: 8px;
}

.l-vista .hcard__title {
  font-size: 17.5px;
}

/* ═══ Popular — a light panel instead of the black band ════════════════════ */
.l-vista .is-inverted {
  margin-inline: auto;
  max-width: calc(var(--wrap) + 80px);
  border-radius: 40px;
  background: var(--paper);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.l-vista .is-inverted h1,
.l-vista .is-inverted h2,
.l-vista .is-inverted h3,
.l-vista .is-inverted h4 {
  color: var(--text);
}

.l-vista .is-inverted .byline--on-dark {
  color: var(--text-2);
}

.l-vista .is-inverted .byline--on-dark .byline__avatar {
  box-shadow: none;
}

.l-vista .is-inverted .byline--on-dark .byline__sep {
  color: var(--text-3);
}

.l-vista .popular__excerpt {
  color: var(--text-2);
}

.l-vista .popular__title a:hover,
.l-vista .mini:hover .mini__title {
  color: var(--gold-deep);
}

.l-vista .popular__media-clip {
  border-radius: 28px;
}

.l-vista .mini {
  padding: 10px;
  border-radius: 22px;
  background: var(--paper-2);
}

.l-vista .mini__media-clip {
  background: var(--paper-3);
  border-radius: 14px;
}

/* ═══ Highlight — rounded banner + white tiles ═════════════════════════════ */
.l-vista .highlight__clip {
  border-radius: 34px;
}

.l-vista .highlight__body {
  padding-right: clamp(22px, 3.2vw, 40px);
}

.l-vista .card {
  padding: 10px 10px 18px;
  border-radius: 26px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.l-vista .card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.l-vista .card__media-clip {
  border-radius: 18px;
}

.l-vista .card__body {
  padding-inline: 8px;
}

.l-vista .card__title {
  font-size: 17px;
}

/* ═══ Newsletter — accent card ═════════════════════════════════════════════ */
.l-vista .cta {
  padding-block: clamp(44px, 6vw, 80px) clamp(36px, 5vw, 64px);
  background: transparent;
  border-top: 0;
  overflow: visible;
}

.l-vista .cta .grid-field {
  display: none;
}

.l-vista .cta__inner {
  max-width: none;
  padding: clamp(36px, 6vw, 76px) clamp(20px, 5vw, 64px);
  border-radius: 40px;
  background: var(--gold);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

/* Two soft rings for depth. */
.l-vista .cta__inner::before,
.l-vista .cta__inner::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  border: 56px solid rgba(255, 255, 255, 0.08);
}

.l-vista .cta__inner::before {
  width: 420px;
  height: 420px;
  top: -210px;
  left: -140px;
}

.l-vista .cta__inner::after {
  width: 340px;
  height: 340px;
  right: -110px;
  bottom: -190px;
}

.l-vista .cta__copy,
.l-vista .cta__action {
  max-width: 620px;
  margin-inline: auto;
}

.l-vista .cta__title {
  color: #fff;
  font-size: clamp(30px, 5vw, 54px);
}

.l-vista .cta__sub {
  color: rgba(255, 255, 255, 0.86);
}

.l-vista .cta__row {
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(var(--ink-rgb), 0.18);
}

.l-vista .cta .btn--primary:not(.btn--split) {
  background: var(--ink);
  box-shadow: none;
}

.l-vista .cta .btn--primary:not(.btn--split):hover {
  background: var(--ink-3);
}

.l-vista .cta .st-check {
  color: rgba(255, 255, 255, 0.9);
}

.l-vista .cta .st-check a:hover {
  color: #fff;
}

.l-vista .cta .st-check input[type="checkbox"] {
  accent-color: var(--ink);
}

.l-vista .cta__note {
  color: rgba(255, 255, 255, 0.78);
}

.l-vista .cta .wpcf7 form.st-form .wpcf7-response-output {
  background: #fff;
}

.l-vista .cta .st-form .wpcf7-not-valid-tip {
  padding: 2px 8px;
  border-radius: 6px;
  background: #fff;
}

/* ═══ Footer — light ═══════════════════════════════════════════════════════ */
.l-vista .site-footer {
  margin-top: 0;
  border-radius: 40px 40px 0 0;
  background: var(--paper);
  color: var(--text);
  --st-footer-curve: 0px;
}

.l-vista .site-footer > .container {
  padding-top: 0;
}

.l-vista .footer-brand {
  padding-left: 0;
}

.l-vista .footer-brand__desc,
.l-vista .footer-col__list a {
  color: var(--text-2);
}

.l-vista .footer-col__list a:hover {
  color: var(--gold-deep);
}

.l-vista .footer-col__heading {
  color: var(--text-3);
}

.l-vista .footer-top-link__clip {
  background: var(--paper-2);
}

.l-vista .footer-top-link:hover .footer-top-link__clip {
  background: var(--gold-wash);
}

.l-vista .footer-top-link__label {
  color: var(--text);
}

.l-vista .footer-top-link__label::after {
  content: " \2191";
  color: var(--gold);
}

.l-vista .footer-bottom {
  border-top-color: var(--line);
  color: var(--text-3);
}

.l-vista .footer-bottom a {
  color: var(--text-3);
}

.l-vista .footer-bottom a:hover {
  color: var(--text);
}

/* ═══ Inner pages ══════════════════════════════════════════════════════════ */
.l-vista .archive-hero {
  background: transparent;
  border-bottom: 0;
}

.l-vista .archive-hero .grid-field {
  display: none;
}

.l-vista .archive-lead {
  padding: 12px;
  border-radius: 30px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.l-vista .archive-lead__body {
  padding: 8px 12px 8px 0;
}

.l-vista .static-page,
.l-vista .single-article {
  padding: clamp(22px, 4.5vw, 56px);
  border-radius: 34px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.l-vista .panel {
  border: 0;
  border-radius: 26px;
  box-shadow: var(--shadow-sm);
}

.l-vista .panel--dark {
  background: var(--ink);
}

.l-vista .related {
  margin-top: clamp(28px, 4vw, 44px);
}

.l-vista .contact-form {
  border: 0;
  border-radius: 26px;
}

.l-vista .page-numbers {
  border-radius: var(--r-pill);
  background: var(--paper);
}

.l-vista .error-main .grid-field {
  display: none;
}

/* ═══ Responsive ═══════════════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  .vista-trio {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: -64px;
  }

  .vista-cover__body {
    padding-bottom: 92px;
  }
}

@media (max-width: 900px) {
  .l-vista .header-cta {
    display: none;
  }

  .l-vista .masthead {
    padding-right: 62px;
  }

  .l-vista .nav-menu {
    margin-top: 8px;
    padding: 8px 14px;
    border-top: 0;
    border-radius: 24px;
    background: var(--paper);
    box-shadow: var(--shadow-md);
  }

  .l-vista .nav-menu:not(.is-open) {
    display: none;
  }

  .l-vista .nav-list {
    gap: 0;
  }

  .l-vista .nav-list a,
  .l-vista .nav-list a:hover,
  .l-vista .nav-list .current-menu-item > a {
    padding: 13px 4px;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .l-vista .is-inverted {
    border-radius: 30px;
  }
}

@media (max-width: 700px) {
  .l-vista .archive-lead__body {
    padding: 4px 8px 10px;
  }

  .vista-cover {
    border-radius: 26px;
  }

  .l-vista .cta__inner {
    border-radius: 30px;
  }
}

@media (max-width: 560px) {
  .vista-cover {
    min-height: 480px;
  }

  .vista-cover__excerpt {
    display: none;
  }

  .vista-mini {
    grid-template-columns: 76px minmax(0, 1fr);
  }
}

/* ═══ Wide screens: menu inside the pill (logo · menu · Subscribe) ═════════ */
@media (min-width: 1200px) {
  /* The pill moves from the masthead to the whole header row; its width
     matches the container's content box, so it lines up with the page. */
  .l-vista .site-header > .container {
    display: flex;
    align-items: center;
    gap: 16px;
    width: calc(100% - 2 * var(--gutter));
    max-width: calc(var(--wrap) - 2 * var(--gutter));
    margin-top: 14px;
    padding: 10px 10px 10px 26px;
    border-radius: var(--r-pill);
    background: var(--paper);
    box-shadow: var(--shadow-sm);
  }

  .l-vista .masthead {
    display: contents;
  }

  .l-vista .site-header--scrolled > .container {
    box-shadow: var(--shadow-md);
  }

  .l-vista .masthead__brand {
    order: 1;
  }

  .l-vista .nav-primary {
    order: 2;
    flex: 1;
    min-width: 0;
  }

  .l-vista .header-cta {
    order: 3;
  }

  .l-vista .nav-inner {
    padding: 0;
  }

  .l-vista .nav-list {
    flex-wrap: nowrap;
    gap: 2px;
  }

  .l-vista .nav-list a {
    padding: 8px 12px;
    white-space: nowrap;
  }

  /* Inside the white pill the hover chip takes the page tone instead. */
  .l-vista .nav-list a:hover,
  .l-vista .nav-list .current-menu-item > a,
  .l-vista .nav-list .current-menu-parent > a {
    background: var(--paper-2);
    box-shadow: none;
  }

  .l-vista .vista-hero {
    padding-top: 18px;
  }
}

/* Logged-in admins: keep the floating pill clear of the WordPress admin bar. */
.admin-bar.l-vista .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar.l-vista .site-header {
    top: 46px;
  }
}

@media (max-width: 600px) {
  .admin-bar.l-vista .site-header {
    top: 0;
  }
}
