/* ==========================================================================
   AWC — WordPress layer. site.css is the reference site's stylesheet as-is;
   this file maps core-block markup (paragraphs, groups, images, buttons,
   details, latest posts, Contact Form 7) onto it. No blue anywhere.
   ========================================================================== */

:root {
  --font-serif: 'Newsreader';
  --font-sans: 'Inter';
  --font-ar-serif: 'Noto Naskh Arabic';
  --font-ar-sans: 'IBM Plex Sans Arabic';
}

/* ---------- Core block resets ---------- */
/* Zero-specificity resets: site.css's own classes (.container, .section-head …) must still win. */
:where(figure, .wp-block-image) {
  margin: 0;
}
:where(.wp-block-group, .wp-block-post-content, .awc-header-part, .awc-footer-part) {
  margin: 0;
}
:where(.wp-site-blocks, .is-layout-flow) > * + * {
  margin-block-start: 0;
}
.awc-header-part {
  display: contents;
}
ul.wp-block-group,
ol.wp-block-group {
  list-style: none;
}
.wp-block-image img {
  height: auto;
}

/* Images that fill their frame (next/image "fill" on the reference site). */
.img-frame img,
.hero-home__media img,
.cta__media img,
.audience-card__media img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  max-width: none;
  object-fit: cover;
}
.img-frame:hover img {
  transform: scale(1.03);
}
.hero-home__media,
.cta__media {
  overflow: hidden;
}

/* ---------- Buttons: block styles = .btn variants ---------- */
.wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.wp-block-button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  background: var(--ink);
  color: var(--white);
  transition:
    background 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}
.wp-block-button .wp-block-button__link:hover {
  background: var(--ink-2);
}
.wp-block-button.is-style-awc-outline .wp-block-button__link {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.wp-block-button.is-style-awc-outline .wp-block-button__link:hover {
  border-color: var(--ink);
}
.wp-block-button.is-style-awc-light .wp-block-button__link {
  background: var(--paper);
  color: var(--ink);
}
.wp-block-button.is-style-awc-light .wp-block-button__link:hover {
  background: var(--white);
}
.wp-block-button.is-style-awc-ghost-light .wp-block-button__link {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}
.wp-block-button.is-style-awc-ghost-light .wp-block-button__link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}
@media (max-width: 560px) {
  .wp-block-button .wp-block-button__link {
    white-space: normal;
    text-align: center;
  }
}

/* ---------- Icons (SVG masks, coloured by currentColor / brass) ---------- */
.icon-brokerage { --icon: url(../icons/brokerage.svg); }
.icon-etrading { --icon: url(../icons/etrading.svg); }
.icon-margin { --icon: url(../icons/margin.svg); }
.icon-liquidity { --icon: url(../icons/liquidity.svg); }
.icon-chart { --icon: url(../icons/chart.svg); }
.icon-individual { --icon: url(../icons/individual.svg); }
.icon-institution { --icon: url(../icons/institution.svg); }
.icon-issuer { --icon: url(../icons/issuer.svg); }
.icon-shield { --icon: url(../icons/shield.svg); }
.icon-globe { --icon: url(../icons/globe.svg); }
.icon-document { --icon: url(../icons/document.svg); }
.icon-handshake { --icon: url(../icons/handshake.svg); }
[class*='icon-']::before {
  content: '';
  display: block;
  inline-size: 40px;
  block-size: 40px;
  margin-bottom: 28px;
  background: var(--brass);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

/* ---------- Arrow links: a paragraph with class link-arrow holding one link ---------- */
p.link-arrow,
p.is-style-awc-link-arrow {
  display: block;
  border: 0;
  padding: 0;
  margin-bottom: 0;
}
p.link-arrow > a,
p.is-style-awc-link-arrow > a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  transition: border-color 0.3s var(--ease);
}
p.link-arrow > a::after,
p.is-style-awc-link-arrow > a::after {
  content: '';
  inline-size: 18px;
  block-size: 18px;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: url(../icons/arrow.svg) center / contain no-repeat;
  mask: url(../icons/arrow.svg) center / contain no-repeat;
  transition: transform 0.35s var(--ease);
}
p.link-arrow--external > a::after {
  -webkit-mask-image: url(../icons/external.svg);
  mask-image: url(../icons/external.svg);
}
p.link-arrow > a:hover,
p.is-style-awc-link-arrow > a:hover {
  border-color: var(--ink);
}
p.link-arrow:not(.link-arrow--external) > a:hover::after {
  transform: translateX(4px);
}
[dir='rtl'] p.link-arrow:not(.link-arrow--external) > a::after {
  transform: scaleX(-1);
}
[dir='rtl'] p.link-arrow:not(.link-arrow--external) > a:hover::after {
  transform: scaleX(-1) translateX(4px);
}
.section--ink p.link-arrow > a,
.cta p.link-arrow > a {
  border-color: var(--line-light);
}

/* ---------- Home hero: shade and scroll cue as pseudo-elements ---------- */
.hero-home__media {
  z-index: 0;
}
.hero-home::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, rgba(20, 19, 18, 0.88) 0%, rgba(20, 19, 18, 0.35) 55%, rgba(20, 19, 18, 0.25) 100%),
    linear-gradient(to right, rgba(20, 19, 18, 0.55), transparent 70%);
}
[dir='rtl'] .hero-home::before {
  background:
    linear-gradient(to top, rgba(20, 19, 18, 0.88) 0%, rgba(20, 19, 18, 0.35) 55%, rgba(20, 19, 18, 0.25) 100%),
    linear-gradient(to left, rgba(20, 19, 18, 0.55), transparent 70%);
}
.hero-home__content {
  z-index: 2;
}
.hero-home::after {
  content: '';
  position: absolute;
  z-index: 2;
  inset-inline-end: var(--gutter);
  bottom: 40px;
  inline-size: 1px;
  block-size: 64px;
  background: linear-gradient(var(--paper), var(--paper)) 0 0 / 100% 100% no-repeat, rgba(255, 255, 255, 0.25);
  animation: awc-cue 2.4s var(--ease) infinite;
}
@keyframes awc-cue {
  0% { background-position: 0 -64px, 0 0; }
  60%, 100% { background-position: 0 64px, 0 0; }
}
.hero-home .btn-row {
  margin-top: 36px;
}

/* ---------- Stat rows ---------- */
.mini-stats div.mini-stats__item {
  flex-direction: column;
}
.mini-stats__value {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.1;
}
.mini-stats__label {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.anniversary__num {
  margin: 0;
}
/* The Next site wraps the number in a <span>; here the paragraph itself carries it. */
p.anniversary__num {
  display: block;
  font-family: var(--font-serif), Georgia, serif;
  font-weight: 300;
  font-size: clamp(140px, 18vw, 260px);
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px var(--brass);
  letter-spacing: -0.04em;
}

/* ---------- Cards ---------- */
.service-card p.link-arrow {
  flex: 0 0 auto;
  margin-top: 8px;
}
.audience-card p.link-arrow {
  margin-top: auto;
}

/* ---------- Quote ---------- */
.quote::before {
  content: '';
  display: block;
  inline-size: 44px;
  block-size: 33px;
  margin: 0 auto 32px;
  background: var(--brass);
  -webkit-mask: url(../icons/quote.svg) center / contain no-repeat;
  mask: url(../icons/quote.svg) center / contain no-repeat;
}
[dir='rtl'] .quote::before {
  transform: scaleX(-1);
}
.quote figcaption p {
  margin: 0;
}
.quote p.link-arrow {
  margin-top: 32px;
}

/* ---------- People: initials instead of portraits ---------- */
p.person__photo {
  inline-size: 120px;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1;
  color: var(--brass-ink);
}

/* ---------- Documents ---------- */
li.doc {
  position: relative;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-rows: auto auto;
  column-gap: 20px;
  row-gap: 2px;
}
li.doc::before {
  content: '';
  grid-row: 1 / span 2;
  inline-size: 28px;
  block-size: 28px;
  background: var(--brass);
  -webkit-mask: url(../icons/document.svg) center / contain no-repeat;
  mask: url(../icons/document.svg) center / contain no-repeat;
}
li.doc::after {
  content: '';
  grid-column: 4;
  grid-row: 1 / span 2;
  inline-size: 44px;
  block-size: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: url(../icons/download.svg) center / 18px no-repeat;
  transition: background-color 0.25s, border-color 0.25s, filter 0.25s;
}
li.doc:hover::after {
  background-color: var(--paper);
  filter: invert(1);
  border-color: var(--ink);
}
li.doc p {
  margin: 0;
}
.doc__title {
  grid-column: 2;
  grid-row: 1;
}
.doc__title a {
  text-decoration: none;
}
.doc__title a::before {
  content: '';
  position: absolute;
  inset: 0;
}
.doc__desc {
  grid-column: 2;
  grid-row: 2;
}
.doc__meta {
  grid-column: 3;
  grid-row: 1 / span 2;
}
@media (max-width: 640px) {
  li.doc {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  li.doc::before {
    grid-row: 1 / span 3;
  }
  .doc__meta {
    grid-column: 2;
    grid-row: 3;
  }
  li.doc::after {
    grid-column: 3;
    grid-row: 1 / span 3;
  }
}

/* ---------- FAQs (core Details block) ---------- */
.wp-block-details.faq > summary::after {
  content: '';
  flex-shrink: 0;
  inline-size: 20px;
  block-size: 20px;
  background: var(--brass-ink);
  -webkit-mask: url(../icons/plus.svg) center / contain no-repeat;
  mask: url(../icons/plus.svg) center / contain no-repeat;
  transition: transform 0.35s var(--ease);
}
.wp-block-details.faq[open] > summary::after {
  transform: rotate(45deg);
}
.wp-block-details.faq > summary::marker {
  content: '';
}
.wp-block-details.faq > :not(summary) {
  padding-bottom: 24px;
  margin: 0;
  color: var(--ink-soft);
  max-width: 48em;
  animation: rise 0.4s var(--ease);
}

/* ---------- Announcements (core Latest Posts block) ---------- */
.wp-block-latest-posts.news {
  padding: 0;
  margin: 0;
}
.wp-block-latest-posts.news > li {
  border-top: 1px solid var(--line-strong);
  padding-top: 24px;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.news .wp-block-latest-posts__post-date {
  order: -1;
  font-size: 13px;
  color: var(--brass-ink);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.news .wp-block-latest-posts__post-title {
  font-family: var(--serif);
  font-size: clamp(20px, 1.8vw, 24px);
  line-height: 1.3;
  text-decoration: none;
  margin-bottom: 12px;
}
.news .wp-block-latest-posts__post-title:hover {
  text-decoration: underline;
}
.news .wp-block-latest-posts__post-excerpt {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0;
}
.news .wp-block-latest-posts__post-excerpt a {
  display: none;
}

/* Single announcement / archive */
.article__inner {
  max-width: 860px;
}
.article__inner .wp-block-post-date {
  margin-bottom: 20px;
}
.article__inner .wp-block-post-title {
  margin-bottom: 40px;
}
.news--archive {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
  margin-top: 48px;
}
.news--archive > li {
  border-top: 1px solid var(--line-strong);
  padding-top: 24px;
}
@media (max-width: 900px) {
  .news--archive {
    grid-template-columns: 1fr;
  }
}

/* ---------- Contact ---------- */
.contact-list div.contact-list__row p {
  margin: 0;
}
.contact-list__label {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
  padding-top: 3px;
}
.contact-list__value a {
  text-decoration: none;
}
.contact-list__value a:hover {
  text-decoration: underline;
}
[dir='rtl'] .contact-list__value a[dir='ltr'] {
  display: inline-block;
}

/* ---------- Enquiry form (Contact Form 7) ---------- */
.wpcf7 .wpcf7-form-control-wrap {
  display: block;
}
.wpcf7 .field br,
.wpcf7 .consent br {
  display: none;
}
.wpcf7 .consent .wpcf7-list-item {
  margin: 0;
}
.wpcf7 .consent label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.wpcf7 .wpcf7-not-valid {
  border-color: var(--danger);
}
.wpcf7 .wpcf7-not-valid-tip {
  color: var(--danger);
  font-size: 14px;
  margin-top: 6px;
}
.wpcf7 .wpcf7-submit {
  margin-top: 24px;
  min-inline-size: 220px;
  font-family: var(--sans);
}
.wpcf7 .wpcf7-spinner {
  vertical-align: middle;
  margin-inline: 12px 0;
}
.wpcf7 form .wpcf7-response-output {
  margin: 24px 0 0;
  padding: 20px 24px;
  border: 0;
  border-inline-start: 2px solid var(--line-strong);
  background: var(--stone);
  font-size: 15px;
}
.wpcf7 form.sent .wpcf7-response-output {
  border-color: var(--ok);
  background: rgba(47, 107, 79, 0.06);
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output {
  border-color: var(--danger);
  background: rgba(160, 50, 36, 0.05);
}
@media (max-width: 560px) {
  .wpcf7 .wpcf7-submit {
    inline-size: 100%;
  }
}

/* ---------- Legal ---------- */
.legal__toc ol {
  padding: 0;
}
.legal__toc li {
  margin: 0;
}
.legal__toc li::marker {
  content: '';
}

/* ---------- Misc ---------- */
.not-found {
  min-height: 50vh;
}
.prose > :last-child,
.section-head > :last-child {
  margin-bottom: 0;
}

/* Sticky header clears the admin bar for signed-in staff. */
.admin-bar .site-header {
  top: 32px;
}
@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}
@media (max-width: 600px) {
  .admin-bar .site-header {
    top: 0;
  }
}

/* Looking Ahead: the planned services, as a quieter strip under the licensed ones. */
.section.planned {
  padding-block: clamp(40px, 5vw, 64px);
}
.section--stone + .section.planned {
  padding-top: 0;
}
.section--stone:has(+ .section--stone.planned) {
  padding-bottom: clamp(48px, 6vw, 88px);
}
.planned__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 10px 48px;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.planned__inner > * {
  grid-column: 2;
  margin: 0;
}
.planned__inner > .planned__eyebrow {
  grid-column: 1;
  grid-row: 1 / span 3;
}
.planned__list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  font-size: 18px;
  color: var(--ink);
}
.planned__note {
  font-size: 15px;
  font-weight: 600;
  color: var(--brass-ink);
}
.planned__body {
  font-size: 15px;
  color: var(--muted);
  max-width: 62ch;
}
@media (max-width: 800px) {
  .planned__inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .planned__inner > *,
  .planned__inner > .planned__eyebrow {
    grid-column: 1;
    grid-row: auto;
  }
}
