/**
 * GRANDTHAI STY-01 — authoritative typography layer.
 *
 * Loaded after page-specific styles so that typography has one owner while
 * layout, spacing, colour, imagery and component geometry stay untouched.
 */
:root {
  --gt-font-sans: "Nunito Sans", Arial, sans-serif;

  --gt-type-display-size: clamp(34px, 3.45vw, 49px);
  --gt-type-display-weight: 850;
  --gt-type-display-line: 1.07;
  --gt-type-display-track: -.035em;

  /* H1 follows the approved homepage hero, the STY-V1 source of truth. */
  --gt-type-h1-size: clamp(34px, 3.45vw, 49px);
  --gt-type-h1-weight: 850;
  --gt-type-h1-line: 1.07;
  --gt-type-h1-track: -.035em;

  --gt-type-h2-size: clamp(32px, 3.7vw, 50px);
  --gt-type-h2-weight: 850;
  --gt-type-h2-line: 1.08;
  --gt-type-h2-track: -.032em;

  --gt-type-h3-size: 24px;
  --gt-type-h3-weight: 700;
  --gt-type-h3-line: 1.15;
  --gt-type-h3-track: -.012em;

  --gt-type-h4-size: 18px;
  --gt-type-h4-weight: 800;
  --gt-type-h4-line: 1.2;
  --gt-type-h4-track: -.006em;

  --gt-type-lead-size: clamp(16px, 1.45vw, 19px);
  --gt-type-lead-weight: 400;
  --gt-type-lead-line: 1.55;
  --gt-type-lead-track: -.01em;

  --gt-type-hero-lead-size: clamp(14px, 1.08vw, 16px);
  --gt-type-hero-lead-weight: 650;
  --gt-type-hero-lead-line: 1.48;
  --gt-type-hero-lead-track: -.01em;

  --gt-type-body-size: 17px;
  --gt-type-body-weight: 400;
  --gt-type-body-line: 1.55;
  --gt-type-body-track: -.01em;

  --gt-type-small-size: 14px;
  --gt-type-small-weight: 400;
  --gt-type-small-line: 1.5;
  --gt-type-small-track: -.006em;

  --gt-type-caption-size: 11px;
  --gt-type-caption-weight: 700;
  --gt-type-caption-line: 1.35;
  --gt-type-caption-track: .01em;

  --gt-type-eyebrow-size: 12px;
  --gt-type-eyebrow-weight: 900;
  --gt-type-eyebrow-line: 1.2;
  --gt-type-eyebrow-track: .12em;

  --gt-type-button-size: 14px;
  --gt-type-button-weight: 900;
  --gt-type-button-line: 1.2;
  --gt-type-button-track: 0;

  --gt-type-price-size: 18px;
  --gt-type-price-weight: 700;
  --gt-type-price-line: 1.2;
  --gt-type-price-track: -.01em;

  --gt-type-form-label-size: 12px;
  --gt-type-form-label-weight: 900;
  --gt-type-form-label-line: 1.35;
  --gt-type-form-input-size: 16px;
  --gt-type-form-input-weight: 600;
  --gt-type-form-input-line: 1.35;

  --gt-type-nav-size: 13px;
  --gt-type-nav-weight: 800;
  --gt-type-nav-line: 1.25;
  --gt-type-breadcrumb-size: 11px;
  --gt-type-breadcrumb-weight: 400;
  --gt-type-breadcrumb-line: 1.3;
  --gt-type-breadcrumb-track: .02em;

  --gt-type-faq-question-size: 18px;
  --gt-type-faq-question-weight: 850;
  --gt-type-faq-question-line: 1.3;
  --gt-type-faq-answer-size: 15px;
  --gt-type-faq-answer-weight: 400;
  --gt-type-faq-answer-line: 1.6;

  /* /uslugi/ is the source of truth for service-card typography. */
  --gt-service-eyebrow-size: 10px;
  --gt-service-title-size: 21px;
  --gt-service-description-size: 13px;
  --gt-service-meta-size: 10px;
  --gt-service-price-size: 18px;
  --gt-service-link-size: 12px;
  --gt-service-button-size: 14px;
}

body.gt-typography-v1 {
  font-family: var(--gt-font-sans);
  font-size: var(--gt-type-body-size);
  font-weight: var(--gt-type-body-weight);
  line-height: var(--gt-type-body-line);
  letter-spacing: var(--gt-type-body-track);
}

body.gt-typography-v1 :is(button, input, select, textarea) {
  font-family: var(--gt-font-sans);
}

/* H1 and section H2 are the two site-wide display roles. Component-level H3,
   H4 and body copy keep low specificity so approved template geometry wins. */
body.gt-typography-v1 main h1,
body.gt-typography-v1 .gt-page-hero h1,
body.gt-typography-v1 main :is(.wc-page-head, .wc-status-hero, .wc-state-section) h1 {
  font-size: var(--gt-type-h1-size);
  font-weight: var(--gt-type-h1-weight);
  line-height: var(--gt-type-h1-line);
  letter-spacing: var(--gt-type-h1-track);
  text-transform: none;
}

body.gt-typography-v1 main .hero-card h1 {
  font-size: var(--gt-type-display-size);
  font-weight: var(--gt-type-display-weight);
  line-height: var(--gt-type-display-line);
  letter-spacing: var(--gt-type-display-track);
}

body.gt-typography-v1 main h2,
body.gt-typography-v1 main :is(
  .about-section__head,
  .gt-editor-content,
  .back-safety__grid > div:first-child,
  .branches-hub-heading
) h2 {
  font-size: var(--gt-type-h2-size);
  font-weight: var(--gt-type-h2-weight);
  line-height: var(--gt-type-h2-line);
  letter-spacing: var(--gt-type-h2-track);
  text-transform: none;
}

:where(body.gt-typography-v1 main) h3 {
  font-size: var(--gt-type-h3-size);
  font-weight: var(--gt-type-h3-weight);
  line-height: var(--gt-type-h3-line);
  letter-spacing: var(--gt-type-h3-track);
  text-transform: none;
}

:where(body.gt-typography-v1 main) h4 {
  font-size: var(--gt-type-h4-size);
  font-weight: var(--gt-type-h4-weight);
  line-height: var(--gt-type-h4-line);
  letter-spacing: var(--gt-type-h4-track);
  text-transform: none;
}

:where(body.gt-typography-v1 main) :is(p, li, dd, blockquote) {
  font-size: var(--gt-type-body-size);
  font-weight: var(--gt-type-body-weight);
  line-height: var(--gt-type-body-line);
  letter-spacing: var(--gt-type-body-track);
}

body.gt-typography-v1 main :is(.gt-info-card, .gt-review-card) p {
  font-size: var(--gt-type-small-size);
  font-weight: var(--gt-type-small-weight);
  line-height: var(--gt-type-small-line);
  letter-spacing: var(--gt-type-small-track);
}

body.gt-typography-v1 main :is(
  [class*="heading"] > p:not(.section-label):not([class*="kicker"]):not([class*="eyebrow"]):not([class*="category"]),
  [class*="head"] > p:not(.section-label):not([class*="kicker"]):not([class*="eyebrow"]):not([class*="category"]),
  [class*="intro"] > p:not(.section-label):not([class*="kicker"]):not([class*="eyebrow"]):not([class*="category"])
) {
  font-size: var(--gt-type-lead-size);
  font-weight: var(--gt-type-lead-weight);
  line-height: var(--gt-type-lead-line);
  letter-spacing: var(--gt-type-lead-track);
}

/* Hero copy is identical to the approved homepage description. This selector
   deliberately excludes kickers, labels, facts and promo pills. */
body.gt-typography-v1 main :is(
  .hero-description,
  [class*="hero"][class*="__lead"],
  [class*="hero"][class*="-lead"],
  [class*="hero"][class*="description"],
  [class*="hero"] [class*="__lead"],
  [class*="hero"] [class*="-lead"],
  [class*="hero"] [class*="description"],
  .branches-hub-hero__copy > p:not(.section-label)
) {
  font-size: var(--gt-type-hero-lead-size);
  font-weight: var(--gt-type-hero-lead-weight);
  line-height: var(--gt-type-hero-lead-line);
  letter-spacing: var(--gt-type-hero-lead-track);
  text-transform: none;
}

body.gt-typography-v1 .gt-page-hero__lead {
  font-size: var(--gt-type-hero-lead-size);
  font-weight: var(--gt-type-hero-lead-weight);
  line-height: var(--gt-type-hero-lead-line);
  letter-spacing: var(--gt-type-hero-lead-track);
  text-transform: none;
}

body.gt-typography-v1 main :is(small, figcaption, [class*="__caption"], [class*="__meta"]) {
  font-size: var(--gt-type-caption-size);
  font-weight: var(--gt-type-caption-weight);
  line-height: var(--gt-type-caption-line);
  letter-spacing: var(--gt-type-caption-track);
}

body.gt-typography-v1 :is(
  .section-label,
  p[class*="__eyebrow"],
  span[class*="__eyebrow"],
  p[class*="__kicker"],
  span[class*="__kicker"],
  p[class*="__category"],
  span[class*="__category"]
) {
  font-size: var(--gt-type-eyebrow-size);
  font-weight: var(--gt-type-eyebrow-weight);
  line-height: var(--gt-type-eyebrow-line);
  letter-spacing: var(--gt-type-eyebrow-track);
  text-transform: uppercase;
}

body.gt-typography-v1 main :is(.hero-kicker, [class*="hero"][class*="__kicker"]) {
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Buttons and links that behave as buttons. Icon-only controls retain their
   component sizing because no geometry or icon styling is changed here. */
body.gt-typography-v1 :is(
  .btn,
  .wp-element-button,
  .wp-block-button__link,
  .woocommerce button.button,
  .woocommerce a.button,
  .woocommerce input.button
) {
  font-size: var(--gt-type-button-size);
  font-weight: var(--gt-type-button-weight);
  line-height: var(--gt-type-button-line);
  letter-spacing: var(--gt-type-button-track);
  text-transform: none;
}

body.gt-typography-v1 .woocommerce #respond input#submit {
  font-size: var(--gt-type-button-size);
  font-weight: var(--gt-type-button-weight);
  line-height: var(--gt-type-button-line);
  letter-spacing: var(--gt-type-button-track);
  text-transform: none;
}

body.gt-typography-v1 :is(
  strong[class*="__price"],
  b[class*="__price"],
  span[class*="__price"],
  output[class*="__price"],
  [class*="__price"] > strong,
  [class*="__price"] > b,
  .wc-line-price,
  .wc-summary-total strong,
  .service-card__bottom strong
) {
  font-size: var(--gt-type-price-size);
  font-weight: var(--gt-type-price-weight);
  line-height: var(--gt-type-price-line);
  letter-spacing: var(--gt-type-price-track);
}

/* Forms, quizzes and popup. */
body.gt-typography-v1 form :is(label > span, legend),
body.gt-typography-v1 :is(.lead-form, .quiz-form, .selector-form, .woocommerce-form) :is(label, legend) {
  font-size: var(--gt-type-form-label-size);
  font-weight: var(--gt-type-form-label-weight);
  line-height: var(--gt-type-form-label-line);
  letter-spacing: 0;
}

body.gt-typography-v1 form :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  font-size: var(--gt-type-form-input-size);
  font-weight: var(--gt-type-form-input-weight);
  line-height: var(--gt-type-form-input-line);
  letter-spacing: 0;
}

body.gt-typography-v1 :is(.privacy-check, .wc-agreement, .quiz-privacy) span {
  font-size: var(--gt-type-caption-size);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}

/* Global navigation, footer and breadcrumbs. */
body.gt-typography-v1 :is(.main-nav, .mobile-nav, .mobile-menu nav) a,
body.gt-typography-v1 :is(.nav-link, .nav-dropdown a) {
  font-size: var(--gt-type-nav-size);
  font-weight: var(--gt-type-nav-weight);
  line-height: var(--gt-type-nav-line);
  letter-spacing: 0;
}

body.gt-typography-v1 :is(.breadcrumbs, .wc-breadcrumbs, [class*="-breadcrumbs"]) {
  font-size: var(--gt-type-breadcrumb-size);
  font-weight: var(--gt-type-breadcrumb-weight);
  line-height: var(--gt-type-breadcrumb-line);
  letter-spacing: var(--gt-type-breadcrumb-track);
}

body.gt-typography-v1 :is(.breadcrumbs, .wc-breadcrumbs, [class*="-breadcrumbs"]) :is(a, li, span) {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}

body.gt-typography-v1 :is(.site-footer, .footer-v6, .footer-v7) :is(h2, h3) {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}

body.gt-typography-v1 :is(.site-footer, .footer-v6, .footer-v7) :is(p, a) {
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0;
}

body.gt-typography-v1 :is(.footer-v6__contacts, .footer-v7__contacts) :is(h2, h3) a {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

body.gt-typography-v1 :is(.footer-v6__small, .footer-v7__small, .footer-v6__bottom, .footer-v7__bottom) {
  font-size: var(--gt-type-caption-size);
  line-height: var(--gt-type-caption-line);
}

/* FAQ is a named role rather than a collection of page-level summary rules. */
body.gt-typography-v1 main :is(.faq-list, [class*="accordion"], .gt-faq, [class*="faq"]) summary {
  font-size: var(--gt-type-faq-question-size);
  font-weight: var(--gt-type-faq-question-weight);
  line-height: var(--gt-type-faq-question-line);
  letter-spacing: -.006em;
}

body.gt-typography-v1 main :is(.faq-list, [class*="accordion"], .gt-faq, [class*="faq"]) details :is(p, li),
body.gt-typography-v1 main :is(.faq-list, [class*="accordion"], .gt-faq, [class*="faq"]) details > div {
  font-size: var(--gt-type-faq-answer-size);
  font-weight: var(--gt-type-faq-answer-weight);
  line-height: var(--gt-type-faq-answer-line);
  letter-spacing: var(--gt-type-body-track);
}

/* All service/program/recommendation cards inherit the /uslugi/ type model.
   Layout, image ratio, spacing, colours and radii remain component-owned. */
body.gt-typography-v1 main :is(
  .service-card,
  .program-card,
  .spa-program-card,
  .spa-direction-card,
  .seo-program,
  .face-service,
  .gift-service,
  .related-card,
  .plan-card,
  .selector-result-card,
  .promo-direction,
  .spap-directions article,
  .tp-related-grid article,
  .ba-related-grid article,
  .spa-etiquette-related article,
  .face-related__grid article,
  .branch-service-grid article
) h3 {
  font-size: var(--gt-service-title-size);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: var(--gt-type-body-track);
  text-transform: none;
}

body.gt-typography-v1 main :is(
  .service-card,
  .program-card,
  .spa-program-card,
  .spa-direction-card,
  .seo-program,
  .face-service,
  .gift-service,
  .related-card,
  .plan-card,
  .selector-result-card,
  .promo-direction,
  .spap-directions article,
  .tp-related-grid article,
  .ba-related-grid article,
  .spa-etiquette-related article,
  .face-related__grid article,
  .branch-service-grid article
) p {
  font-size: var(--gt-service-description-size);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: var(--gt-type-body-track);
}

body.gt-typography-v1 main :is(
  .service-card__category,
  .program-card__category,
  .spa-program-card > span,
  .spa-direction-card > span,
  .seo-program__top > span,
  .face-service__body > span,
  .plan-card__image > span
) {
  font-size: var(--gt-service-eyebrow-size);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.gt-typography-v1 main :is(.service-card__badge, .selector-result-card figure span) {
  font-size: var(--gt-service-eyebrow-size);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
}

body.gt-typography-v1 main :is(
  .service-card__meta,
  .seo-program__meta,
  .face-service__meta,
  .gift-service__meta,
  .selector-result-card dl
) :is(span:not(.woocommerce-Price-amount):not(.woocommerce-Price-currencySymbol), small, dt, dd, li) {
  font-size: var(--gt-service-meta-size);
  line-height: 1.35;
  letter-spacing: 0;
}

body.gt-typography-v1 main :is(
  .service-card__bottom strong,
  .program-card__price,
  .spa-program-card strong,
  .seo-program__meta b,
  .face-service__meta b,
  .gift-service__meta strong,
  .plan-card__bottom > strong
) {
  font-size: var(--gt-service-price-size);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: var(--gt-type-price-track);
}

body.gt-typography-v1 main .seo-program__meta strong {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
}

body.gt-typography-v1 main :is(
  .service-card__more,
  .program-card__actions .card-text-link,
  .spa-program-card__actions > a,
  .seo-program__actions > a,
  .selector-details-link
) {
  font-size: var(--gt-service-link-size);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0;
}

body.gt-typography-v1 main :is(
  .service-card__book,
  .program-card__actions .btn,
  .spa-program-card__actions .btn,
  .seo-program__actions .btn,
  .selector-result-card__actions .btn
) {
  font-size: var(--gt-service-button-size);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0;
}

/* WooCommerce cards use the same hierarchy without altering Woo totals. */
body.gt-typography-v1 main :is(
  .wc-form-card,
  .wc-summary-card,
  .wc-added-card,
  .wc-product-line,
  .wc-cart-format,
  .gt-commerce-card,
  .gt-order-status-card
) h2 {
  font-size: var(--gt-type-h3-size);
  font-weight: var(--gt-type-h3-weight);
  line-height: var(--gt-type-h3-line);
  letter-spacing: var(--gt-type-h3-track);
}

@media (max-width: 1160px) {
  :root {
    --gt-type-nav-size: 12px;
  }
}

@media (max-width: 1024px) {
  :root {
    --gt-type-display-size: clamp(34px, 5vw, 42px);
    --gt-type-h1-size: clamp(34px, 5vw, 42px);
    --gt-type-h2-size: clamp(32px, 4.8vw, 42px);
    --gt-type-h3-size: 22px;
    --gt-type-lead-size: 17px;
    --gt-type-body-size: 16px;
  }
}

@media (max-width: 820px) {
  :root {
    --gt-type-display-size: clamp(28px, 7.1vw, 32px);
    --gt-type-display-line: 1.08;
    --gt-type-h1-size: clamp(28px, 7.1vw, 32px);
    --gt-type-h1-line: 1.08;
    --gt-type-h2-size: 30px;
    --gt-type-h2-line: 1.1;
    --gt-type-h3-size: 19px;
    --gt-type-h4-size: 16px;
    --gt-type-lead-size: 15px;
    --gt-type-body-size: 16px;
    --gt-type-small-size: 13px;
    --gt-type-caption-size: 10px;
    --gt-type-eyebrow-size: 10px;
    --gt-type-button-size: 11px;
    --gt-type-price-size: 16px;
    --gt-type-nav-size: 14px;
    --gt-type-breadcrumb-size: 10px;
    --gt-type-faq-question-size: 16px;
    --gt-type-faq-answer-size: 14px;
    --gt-service-title-size: 18px;
    --gt-type-hero-lead-size: 12.5px;
  }
}

@media (max-width: 520px) {
  :root {
    --gt-type-h2-size: 29px;
    --gt-service-eyebrow-size: 9px;
    --gt-service-title-size: 16px;
    --gt-service-description-size: 11px;
    --gt-service-meta-size: 8px;
    --gt-service-price-size: 15px;
    --gt-service-link-size: 10px;
    --gt-service-button-size: 12px;
    --gt-type-hero-lead-size: 12px;
  }
}
