/* =====================================================================================================================
   PMS AIF World page design system (source of truth: the Best PMS in India page, /pms/best-pms-in-india/,
   wt-includes/assets/css/style.css). Guideline: wt-pms-admin/docs/DESIGN-GUIDELINES.md.

   1. Tokens (--ds-*): colours, type, spacing. Dark is the default theme, light under :root[data-theme="light"].
   2. Components (.ds-*): hero, section header, table, rank badge, tag, buttons, tabs / pills, FAQ, CTA, disclaimer.
      New pages use these classes. Existing pages keep their own classes and map them to the tokens
      (Best AIF: block "aligned to Best PMS" at the end of best-aif.css).
   PHP 7.4 era browsers: plain CSS custom properties only, no nesting.
   ===================================================================================================================== */

/* ---------------------------------------------------------------------------------------------------------------------
   Avenir web fonts. The shared header copies header.min.css into the page (<style>), so its "../fonts/" paths resolve
   against the page address (/aif/fonts/..., /pms/fonts/...) and 404: the browser then falls back to whatever Avenir is
   installed on the computer (or Arial) and swaps faces while loading (thin heading, then heavier). These faces are in a
   linked file, so "../fonts/" is right; declared later, they win over the broken ones for the same weight and style.
   --------------------------------------------------------------------------------------------------------------------- */
@font-face { font-family: Avenir; src: url("../fonts/Avenir-Light-07.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: Avenir; src: url("../fonts/Avenir-LightOblique-08.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: Avenir; src: url("../fonts/Avenir-Book-01.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Avenir; src: url("../fonts/Avenir-Medium-09.woff2") format("woff2"); font-weight: 500 600; font-style: normal; font-display: swap; }
@font-face { font-family: Avenir; src: url("../fonts/Avenir-MediumOblique-10.woff2") format("woff2"); font-weight: 500 600; font-style: italic; font-display: swap; }
@font-face { font-family: Avenir; src: url("../fonts/Avenir-Black-03.woff2") format("woff2"); font-weight: 700 900; font-style: normal; font-display: swap; }

:root {
  /* colour (dark) */
  --ds-bg: linear-gradient(289deg, #2b1a00, #120900);   /* page / section background */
  --ds-bg-solid: #1e1200;                               /* where a gradient cannot be used */
  --ds-surface: #2b1a00;                                /* table body, cards */
  --ds-text: #ffffff;
  --ds-text-rgb: 255, 255, 255;                         /* rgba(var(--ds-text-rgb), .6) = secondary text */
  --ds-gold: #956e36;                                   /* accents, eyebrows, row lines, em in headings */
  --ds-gold-light: #d4af37;
  --ds-btn: #b78b36;                                    /* primary button */
  --ds-btn-outline-line: rgba(204, 163, 84, .5);
  --ds-score: #9a7c0a;                                  /* highlighted (score) column header */
  --ds-table-head-bg: #000000;
  --ds-table-head-text: #ffffff;
  --ds-rank-bg: #ede8de;                                /* rank 4+ badge */
  --ds-rank-text: #7a7a7a;
  --ds-tag-bg: rgba(184, 150, 12, .1);
  --ds-green: #16a34a;
  --ds-red: #dc2626;
  --ds-radius: 4px;
  --ds-cta-bg: var(--ds-surface);                       /* CTA box = surface (guideline: no grey / black boxes) */
  --ds-cta-title: var(--ds-text);
  --ds-cta-text: rgba(var(--ds-text-rgb), .6);
  --ds-card-line: rgba(149, 110, 54, .45);              /* card border */

  /* type: Avenir everywhere; headings are LIGHT (300), never bold */
  --ds-font: "Avenir", sans-serif;
  --ds-h1: clamp(34px, 5vw, 58px);       /* weight 300, line-height 1.1 */
  --ds-h2: clamp(26px, 3vw, 38px);       /* weight 300, line-height 1.15 */
  --ds-h3: clamp(17px, 2vw, 22px);       /* weight 300 */
  --ds-body: 16px;                       /* line-height 1.75 */
  --ds-intro: 15px;                      /* hero intro, 60% text colour */
  --ds-small: 13px;                      /* tables, buttons */
  --ds-micro: 11px;                      /* eyebrows, table headers, rank badge, tags */
  --ds-label: 10px;                      /* section label above h2 */

  /* layout */
  --ds-container: 1360px;
  --ds-gutter: 24px;                     /* left / right padding of the container at every width */
  --ds-section-y: 60px;                  /* section padding top and bottom */
  --ds-hero-y: 100px;                    /* hero padding top and bottom */
}

:root[data-theme="light"] {
  --ds-bg: linear-gradient(289deg, #f3e9d6, #fbf7ef);
  --ds-bg-solid: #f7efe1;
  --ds-surface: #fffdf8;
  --ds-text: #1f1812;
  --ds-text-rgb: 31, 24, 18;
  --ds-gold: #845f22;
  --ds-gold-light: #8a6414;
  --ds-table-head-bg: #efe4cf;
  --ds-table-head-text: #1f1812;
  --ds-green: #15803d;
  --ds-red: #b91c1c;
}

/* ---------------------------------------------------------------- page + container */
.ds-page { background: var(--ds-bg); color: var(--ds-text); font-family: var(--ds-font); font-size: var(--ds-body); line-height: 1.75; }
.ds-wrap { max-width: var(--ds-container); margin: 0 auto; padding: 0 var(--ds-gutter); }
.ds-section { padding: var(--ds-section-y) 0; }
.ds-page *, .ds-page *::before, .ds-page *::after { box-sizing: border-box; }
.ds-page a { color: var(--ds-gold-light); }

/* ---------------------------------------------------------------- hero */
.ds-hero { background: var(--ds-bg); padding: var(--ds-hero-y) var(--ds-gutter); text-align: center; }
.ds-eyebrow { font-size: var(--ds-micro); font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: var(--ds-gold); margin-bottom: 16px; }
.ds-hero h1 { font-size: var(--ds-h1); font-weight: 300; line-height: 1.1; color: var(--ds-text); max-width: 900px; margin: 20px auto; }
.ds-hero h1 em, .ds-h2 em { color: var(--ds-gold); font-style: italic; }
.ds-hero-sub { font-size: var(--ds-intro); line-height: 1.7; color: rgba(var(--ds-text-rgb), .6); max-width: 620px; margin: 0 auto 24px; padding: 0 8px; }
.ds-hero-btns { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- section header: label, h2, intro */
.ds-label { display: flex; align-items: center; gap: 10px; font-size: var(--ds-label); font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: var(--ds-gold); margin-bottom: 14px; }
.ds-label::before, .ds-label::after { content: ''; flex: 0 0 22px; height: 1px; background: var(--ds-gold); opacity: .5; }
.ds-h2 { font-size: var(--ds-h2); font-weight: 300; line-height: 1.15; color: var(--ds-text); margin: 0 0 10px; }
.ds-h3 { font-size: var(--ds-h3); font-weight: 300; color: var(--ds-text); margin: 24px 0 6px; }
.ds-sub { font-size: var(--ds-body); line-height: 1.7; color: var(--ds-text); margin: 0 0 28px; }
.ds-caption { font-size: var(--ds-small); color: rgba(var(--ds-text-rgb), .6); margin: 0 0 12px; }

/* ---------------------------------------------------------------- buttons */
.ds-btn { display: inline-block; font-size: var(--ds-small); font-weight: 500; letter-spacing: .09em; text-transform: uppercase; padding: 13px 24px; border-radius: var(--ds-radius); text-decoration: none; }
.ds-btn-primary { background: var(--ds-btn); color: #fff; }
.ds-btn-primary:hover { color: #fff; }
.ds-btn-outline { background: none; color: var(--ds-text); border: 1px solid var(--ds-btn-outline-line); }
.ds-page a.ds-btn-primary { color: #fff; }
.ds-page a.ds-btn-outline { color: var(--ds-text); }

/* ---------------------------------------------------------------- table (the Best PMS "Top 10" table) */
.ds-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--ds-gold); border-radius: var(--ds-radius); margin-bottom: 8px; }
.ds-table { width: 100%; border-collapse: collapse; font-size: var(--ds-small); background: var(--ds-surface); }
.ds-table thead { background: var(--ds-table-head-bg); }
.ds-table th { padding: 12px 13px; font-size: var(--ds-micro); font-weight: 300; letter-spacing: .1em; text-transform: uppercase; color: var(--ds-table-head-text); white-space: nowrap; text-align: center; }
.ds-table td { padding: 13px; color: var(--ds-text); vertical-align: middle; text-align: center; }
.ds-table th.ds-left, .ds-table td.ds-left { text-align: left; }      /* name, manager, category columns */
.ds-table tbody tr { border-bottom: 1px solid var(--ds-gold); }
.ds-table tbody tr:last-child { border-bottom: 0; }
.ds-table tbody tr:hover { background: rgba(201, 168, 76, .04); }
.ds-table th.ds-score { background: var(--ds-score); color: #fff; }
:root[data-theme="light"] .ds-table th.ds-score { color: var(--ds-table-head-text); }
.ds-rank { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: var(--ds-micro); background: var(--ds-rank-bg); color: var(--ds-rank-text); }
.ds-rank.ds-top { background: var(--ds-gold); color: #fff; }                /* ranks 1-3 */
.ds-name { font-weight: 800; }
.ds-subline { display: block; font-weight: 400; }
.ds-tag { display: inline-block; padding: 3px 9px; border-radius: 2px; font-size: var(--ds-micro); font-weight: 500; text-transform: uppercase; background: var(--ds-tag-bg); color: var(--ds-gold); border: 1px solid var(--ds-gold); white-space: nowrap; }

/* ---------------------------------------------------------------- tabs / pills */
.ds-tab { font-size: var(--ds-small); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; padding: 9px 18px; border-radius: var(--ds-radius); border: 1px solid var(--ds-btn-outline-line); background: none; color: var(--ds-text); cursor: pointer; }
.ds-tab[aria-selected="true"], .ds-tab.is-active { background: var(--ds-btn); border-color: var(--ds-btn); color: #fff; }
.ds-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.ds-tab { font-family: inherit; }

/* ---------------------------------------------------------------- cards */
.ds-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.ds-card { background: var(--ds-surface); border: 1px solid var(--ds-card-line); border-radius: var(--ds-radius); padding: 24px; }
.ds-card .ds-h3 { margin-top: 0; }
.ds-card p { font-size: 14px; line-height: 1.8; margin: 0; }

/* ---------------------------------------------------------------- FAQ, CTA, disclaimer */
.ds-faq-item { border-bottom: 1px solid var(--ds-gold); }
.ds-faq-item:last-child { border-bottom: 0; }
.ds-faq-q { font-size: 15px; font-weight: 500; color: var(--ds-text); padding: 16px 0; }
.ds-faq-a { font-size: 14px; line-height: 1.8; color: var(--ds-text); }
.ds-faq-q { cursor: pointer; }
.ds-faq-a { padding-bottom: 18px; }
.ds-cta { background: var(--ds-cta-bg); color: var(--ds-cta-title); border: 1px solid var(--ds-card-line); border-radius: var(--ds-radius); padding: 40px; text-align: center; margin: 48px 0; }
.ds-cta p { font-size: 14px; color: var(--ds-cta-text); }
.ds-cta .ds-h2 { color: var(--ds-cta-title); }
.ds-disclaimer { font-size: 12px; line-height: 1.7; color: rgba(var(--ds-text-rgb), .6); border-top: 1px solid rgba(var(--ds-text-rgb), .12); padding-top: 20px; }

@media (max-width: 640px) {
  .ds-section { padding: 44px 0; }
  .ds-cta { padding: 28px 20px; }
}
