/*
 * The VIP LUXE article kit.
 *
 * Designed components that written pages are composed from — an eyebrow, a
 * lead, icon cards, a row of figures, a callout, numbered steps, a checklist,
 * a two-column split, link cards and a comparison table — so a page written in
 * the builder or through the API looks like the rest of the site instead of a
 * wall of headings and paragraphs.
 *
 * One file, served by the website at /kit.css and loaded by both: the website
 * links it on every page, and the CMS's visual builder loads the same URL into
 * its canvas, so what an editor sees there is what is served. The classes are
 * documented for writers in the agent API (`GET /api/agent`, `composing`).
 *
 * Unlayered on purpose: the site's own styles live in cascade layers, and an
 * unlayered sheet wins over every layer, so a kit list is not given bullets by
 * the prose styles around it. Logical properties throughout, for Arabic.
 * Every value falls back to the literal brand colour, because the builder's
 * canvas does not carry the site's custom properties.
 */

.vl-section {
  /* The site's own container (the `wrap` utility): the same width and the
     same gutter, so written content lines up with every band around it. */
  max-width: 1340px;
  margin-inline: auto;
  padding-block: clamp(28px, 4vw, 56px);
  padding-inline: var(--spacing-gutter, 24px);
}

.vl-section + .vl-section {
  padding-top: 0;
}

/* A section that ends on its heading is the title of the band after it — an
   FAQ, a card grid — so it sits right on top of it. */
.vl-section:has(> h2:last-child) {
  padding-bottom: 0;
}

.vl-section > h2:last-child {
  margin-bottom: 0;
}

.vl-eyebrow {
  margin: 0 0 12px;
  color: var(--color-gold, #9c8763);
  font-size: 12px;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.vl-section h2,
.vl-title {
  margin: 0 0 0.5em;
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  font-weight: 400;
  line-height: 1.1;
}

.vl-lead {
  /* The paragraph under a heading, set exactly like every other paragraph:
     the same size, and the full width of its section. Never narrower than the
     text around it, which read as a paragraph cut short. */
  margin: 0 0 1em;
}

.vl-icon {
  display: inline-block;
  width: 26px;
  height: 26px;
  color: var(--color-gold, #9c8763);
  vertical-align: middle;
}

/* ------------------------------------------------------------- icon cards -- */

.vl-cards {
  display: grid;
  /* Three to a row, so five and six cards balance (3 + 2, 3 + 3) instead of
     leaving one card alone on a row of its own; four go two by two. */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1.6em 0;
  border-block-start: 1px solid rgba(156, 135, 99, 0.28);
  border-inline-start: 1px solid rgba(156, 135, 99, 0.28);
  /* The property cards' own radius, so a grid of cards reads as one family
     with the listings above it. */
  border-radius: var(--radius-xl, 26px);
  overflow: hidden;
}

.vl-cards:has(> :nth-child(4):last-child),
.vl-cards:has(> :nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .vl-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .vl-cards,
  .vl-cards:has(> :nth-child(4):last-child),
  .vl-cards:has(> :nth-child(2):last-child) {
    grid-template-columns: 1fr;
  }
}

.vl-card {
  padding: clamp(24px, 3vw, 36px);
  background: #f2efe9;
  border-block-end: 1px solid rgba(156, 135, 99, 0.28);
  border-inline-end: 1px solid rgba(156, 135, 99, 0.28);
}

.vl-card .vl-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-block-end: 18px;
  padding: 9px;
  border: 1px solid rgba(156, 135, 99, 0.4);
  border-radius: 999px;
}

.vl-card h3 {
  margin: 0 0 0.4em;
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.2;
}

.vl-card p {
  margin: 0;
  color: rgba(21, 25, 34, 0.72);
  font-size: 0.97rem;
  line-height: 1.65;
}

/* -------------------------------------------------------------- figures -- */

.vl-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  margin: 1.8em 0;
  border-block: 1px solid rgba(21, 25, 34, 0.12);
}

.vl-stat {
  padding: 22px 20px;
}

.vl-stat + .vl-stat {
  border-inline-start: 1px solid rgba(21, 25, 34, 0.12);
}

.vl-stat-value {
  display: block;
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1;
}

.vl-stat-label {
  display: block;
  margin-block-start: 8px;
  color: rgba(21, 25, 34, 0.62);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* -------------------------------------------------------------- callout -- */

.vl-callout {
  margin: 1.8em 0;
  padding: 22px 26px;
  background: #fbfaf7;
  border: 1px solid rgba(156, 135, 99, 0.3);
  border-inline-start: 3px solid var(--color-gold, #9c8763);
  border-radius: var(--radius-lg, 18px);
}

.vl-callout > :first-child {
  margin-top: 0;
}

.vl-callout > :last-child {
  margin-bottom: 0;
}

.vl-callout-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 0.4em;
  font-weight: 600;
}

/* ---------------------------------------------------------------- steps -- */

ol.vl-steps {
  counter-reset: vl-step;
  margin: 1.6em 0;
  padding: 0;
  list-style: none;
}

ol.vl-steps > li {
  position: relative;
  counter-increment: vl-step;
  margin: 0;
  padding-block: 0 1.2em;
  padding-inline-start: 64px;
}

ol.vl-steps > li::before {
  content: counter(vl-step, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 0;
  top: -0.15em;
  color: var(--color-gold, #9c8763);
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.9rem;
  line-height: 1;
}

ol.vl-steps > li > strong:first-child {
  display: block;
  margin-block-end: 0.2em;
}

/* ------------------------------------------------------------ checklist -- */

ul.vl-checklist {
  margin: 1.2em 0;
  padding: 0;
  list-style: none;
}

ul.vl-checklist > li {
  position: relative;
  margin: 0 0 0.7em;
  padding-inline-start: 32px;
}

ul.vl-checklist > li::before {
  content: '';
  position: absolute;
  inset-inline-start: 4px;
  top: 0.45em;
  width: 12px;
  height: 7px;
  border-block-end: 2px solid var(--color-gold, #9c8763);
  border-inline-start: 2px solid var(--color-gold, #9c8763);
  transform: rotate(-45deg);
}

/* ---------------------------------------------------------------- split -- */

.vl-split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  margin: 1.8em 0;
}

.vl-split img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl, 26px);
}

@media (max-width: 760px) {
  .vl-split {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------- link cards -- */

.vl-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 1.6em 0;
}

a.vl-link-card {
  display: block;
  padding: 20px 22px;
  color: inherit;
  text-decoration: none;
  background: #fbfaf7;
  border: 1px solid rgba(21, 25, 34, 0.12);
  border-radius: var(--radius-lg, 18px);
  transition:
    border-color 0.3s,
    transform 0.3s;
}

a.vl-link-card:hover {
  border-color: var(--color-gold, #9c8763);
  transform: translateY(-2px);
}

a.vl-link-card strong {
  display: block;
  margin-block-end: 4px;
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.3rem;
  font-weight: 400;
}

a.vl-link-card strong::after {
  content: ' →';
  color: var(--color-gold, #9c8763);
}

[dir='rtl'] a.vl-link-card strong::after {
  content: ' ←';
}

a.vl-link-card span {
  display: block;
  color: rgba(21, 25, 34, 0.62);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- table -- */

.vl-table-wrap {
  margin: 1.8em 0 2.2em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--color-paper, #fbfaf7);
  border: 1px solid rgba(21, 25, 34, 0.12);
  border-top: 2px solid var(--color-gold, #9c8763);
  border-radius: var(--radius-xl, 26px);
}

table.vl-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.94em;
  line-height: 1.55;
}

table.vl-table thead th {
  padding: 15px 20px;
  color: var(--color-gold-light, #dcc99c);
  font-size: 0.72em;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-align: start;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--color-ink, #151922);
  border: 0;
}

table.vl-table tbody td {
  padding: 16px 20px;
  color: var(--color-ink-soft, #222732);
  text-align: start;
  vertical-align: top;
  border: 0;
  border-top: 1px solid rgba(21, 25, 34, 0.12);
  transition: background-color 0.2s ease;
}

table.vl-table tbody tr:first-child td {
  border-top: 0;
}

table.vl-table tbody tr:nth-child(even) td {
  background: rgba(245, 243, 239, 0.7);
}

table.vl-table tbody tr:hover td {
  background: #efe9de;
}

table.vl-table tbody td:first-child {
  color: var(--color-ink, #151922);
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.14em;
  line-height: 1.35;
  white-space: nowrap;
}

table.vl-table tbody td:last-child {
  color: var(--color-bronze, #74664f);
  font-weight: 500;
}

table.vl-table td a {
  color: inherit;
  text-decoration-color: var(--color-gold, #9c8763);
}

/* On a phone each row becomes a card: the first cell is its title, and every
   other cell is labelled with its column, from the cell's data-label. */
@media (max-width: 680px) {
  .vl-table-wrap {
    background: transparent;
    border-inline: 0;
    border-radius: 0;
  }

  table.vl-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  table.vl-table,
  table.vl-table tbody,
  table.vl-table tr,
  table.vl-table td {
    display: block;
    width: 100%;
  }

  table.vl-table tbody tr {
    padding: 16px 4px;
    border-top: 1px solid rgba(21, 25, 34, 0.12);
  }

  table.vl-table tbody tr:first-child {
    border-top: 0;
  }

  table.vl-table tbody tr:nth-child(even) td,
  table.vl-table tbody tr:hover td {
    background: transparent;
  }

  table.vl-table tbody td {
    display: grid;
    grid-template-columns: 38% 1fr;
    gap: 14px;
    padding: 5px 0;
    border: 0;
  }

  table.vl-table tbody td::before {
    content: attr(data-label);
    padding-top: 0.35em;
    color: var(--color-mist, #6c6a64);
    font-size: 0.7em;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  table.vl-table tbody td:first-child {
    display: block;
    padding-bottom: 8px;
    font-size: 1.25em;
    white-space: normal;
  }

  table.vl-table tbody td:first-child::before {
    display: none;
  }
}
