/* pillars.com.sa fixes (2026-10-08). Loaded after the Astro brand stylesheet on every page. */

/* Mobile menu: hide the closed panel from keyboard and screen readers, not just off-screen. */
@media (max-width: 900px) {
  .header__nav { visibility: hidden; transition: transform var(--dur) var(--ease), visibility 0s linear var(--dur); }
  .header__nav[data-open=true] { visibility: visible; transition: transform var(--dur) var(--ease), visibility 0s; }
}

/* Light outline button (Jade Room "Visit jaderoom.sa"): keep the label readable on hover. */
.btn--light:hover > *, .btn--light:focus-visible > * { color: var(--c-ink); }

/* Concept pages: Instagram (and Jade Room website) buttons under the intro. */
.pl-follow { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-6); }

/* Our Story hero: darken the photo behind the quote so the text reads clearly. */
.hero:has(.hero__story-intro) .hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgb(0 0 0 / .72) 0%, rgb(0 0 0 / .55) 70%);
}
/* Centre the quote block and its text (it sat left of centre, with left-aligned text). */
.hero__story-intro { margin-inline: auto; text-align: center; text-shadow: 0 1px 3px rgb(0 0 0 / .45); }
.hero__story-intro .quote { text-align: center; margin-inline: auto; }
.hero__story-intro .quote__attr { color: #ffffffe6; }
@media (max-width: 700px) {
  .hero:has(.hero__story-intro) .hero__media::after { background: rgb(0 0 0 / .68); }
}

/* Shorter title banners on phones. */
@media (max-width: 600px) {
  .hero--compact { min-height: clamp(180px, 26vh, 240px); }
}

/* Contact on phones: phone, WhatsApp and email come before the form. */
@media (max-width: 899px) {
  main:has(.details) { display: flex; flex-direction: column; }
  main:has(.details) > .hero { order: -2; }
  main:has(.details) > section:has(.details) { order: -1; }
}

/* Footer: line the details up with the page content on desktop. */
@media (min-width: 900px) {
  .footer__details { margin-left: 0; }
}

/* Brand logo in its brand colour: the white logo PNG is a mask over the colour; the img is invisible but
   keeps the size and alt text. Used by the Our Story timeline and the 404 page. */
.pl-brandmark {
  display: block; background: var(--brand-accent, var(--fg));
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
  transition: transform var(--dur) var(--ease);
}
.pl-brandmark img { display: block; height: 48px; width: auto; max-width: 150px; object-fit: contain; opacity: 0; }

/* Our Story: brands timeline. Logos are the white brand-page versions, shown black here. */
.pl-timeline__title { text-align: center; margin-bottom: var(--s-7); }
.pl-timeline__item a { display: flex; flex-direction: column; align-items: center; gap: var(--s-4); text-align: center; }
.pl-timeline__year {
  font-family: var(--font-display); font-weight: var(--w-display); font-size: var(--t-h2);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.pl-timeline__mark { position: relative; width: 100%; height: 14px; }
.pl-timeline__mark::before {
  content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 2px;
  background: var(--fg); transform: translateY(-50%);
}
.pl-timeline__item:first-child .pl-timeline__mark::before { left: 50%; }
.pl-timeline__item:last-child .pl-timeline__mark::before { right: 50%; }
.pl-timeline__mark::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--fg); transform: translate(-50%, -50%);
  transition: background var(--dur) var(--ease);
}
.pl-timeline__item a:hover .pl-timeline__mark::after,
.pl-timeline__item a:focus-visible .pl-timeline__mark::after { background: var(--brand-accent, var(--fg)); border-color: var(--brand-accent, var(--fg)); }
.pl-timeline__item a:hover .pl-brandmark,
.pl-timeline__item a:focus-visible .pl-brandmark { transform: translateY(-3px); }
@media (min-width: 900px) {
  .pl-timeline__list { display: grid; grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 899px) {
  .pl-timeline__list { position: relative; display: grid; gap: var(--s-6); max-width: 420px; margin-inline: auto; }
  .pl-timeline__list::before {
    content: ""; position: absolute; left: 6px; top: 24px; bottom: 24px; width: 2px; background: var(--fg);
  }
  .pl-timeline__item a {
    display: grid; grid-template-columns: 14px 5.5rem 1fr; align-items: center;
    gap: var(--s-4); min-height: 48px; text-align: left;
  }
  .pl-timeline__mark { order: -1; }
  .pl-timeline__mark::before { display: none; }
  .pl-timeline .pl-brandmark { justify-self: start; -webkit-mask-position: left center; mask-position: left center; }
  .pl-timeline .pl-brandmark img { height: 40px; }
}

/* 404 page */
.pl-404 { min-height: clamp(380px, 60vh, 560px); }
.pl-404__code {
  margin: 0 0 var(--s-3); font-family: var(--font-display); font-weight: var(--w-display);
  font-size: clamp(4.5rem, 3rem + 7vw, 9rem); line-height: 1; letter-spacing: -.02em; color: #ffffff2e;
}
.pl-404 .hero__sub { margin-bottom: var(--s-6); }
.pl-404__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-4); }
.pl-404__actions .btn { min-width: 13.5rem; justify-content: center; }
.btn--invert { background: var(--c-white); border-color: var(--c-white); color: var(--c-ink); }
.btn--invert:hover, .btn--invert:focus-visible { background: transparent; }
.btn--invert:hover > *, .btn--invert:focus-visible > * { color: var(--c-white); }
.pl-404__more { text-align: center; font-size: var(--t-h3); margin-bottom: var(--s-7); }
.pl-404__brands {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: var(--s-6) clamp(var(--s-6), 5vw, var(--s-9));
}
.pl-404__brands a { display: block; padding: var(--s-2); }
.pl-404__brands a:hover .pl-brandmark, .pl-404__brands a:focus-visible .pl-brandmark { transform: translateY(-3px); }
@media (max-width: 600px) {
  .pl-404__brands { gap: var(--s-5) var(--s-6); }
  .pl-404__brands .pl-brandmark img { height: 36px; }
}
