/* Shared type scale. Loaded last so every page follows the same hierarchy. */
:root {
  --text-xs: .75rem;    /* 12px: short labels */
  --text-sm: .875rem;   /* 14px: navigation, captions, buttons */
  --text-base: 1rem;    /* 16px: reading and form fields */
  --text-lg: 1.125rem;  /* 18px: emphasized copy */
  --text-xl: 1.25rem;   /* 20px: introductions */
  --heading-1: clamp(2.25rem, 1.6rem + 2.8vw, 4rem);
  --heading-2: clamp(1.875rem, 1.5rem + 1.6vw, 2.625rem);
  --heading-3: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
}
html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-size: var(--text-base); line-height: 1.65; }
h1, h2, h3 { letter-spacing: -.03em; overflow-wrap: break-word; }
h1 { font-size: var(--heading-1); line-height: 1.12; }
h2 { font-size: var(--heading-2); line-height: 1.2; }
h3 { font-size: var(--heading-3); line-height: 1.3; }

/* Reading text stays readable at every breakpoint. */
:is(p, .hero p, .page-intro p, .product-info p, .selector p,
  .process p, .article-card p, .faq p, .three-col p, .notice,
  .detail-secondary p, .article-body p, .oil-hero-copy>p,
  .oil-editorial p, .oil-grade-explanation p, .oil-spec-layout>div>p,
  .oil-selection-heading>p, .oil-selection-steps p, .oil-faq-layout>div>p,
  .oil-enquiry-banner p) {
  font-size: var(--text-base);
  line-height: 1.7;
}
:is(.lead, .oil-editorial p.lead) { font-size: var(--text-xl); line-height: 1.55; }
:is(.hero h1, .page-intro h1, .article-body h1) { font-size: var(--heading-1); line-height: 1.12; }
:is(.section h2, .split h2, .final-cta h2, .enquiry-form h2,
  .featured-resource h2, .detail-layout h2, .article-body h2, .prose h2,
  .oil-editorial h2, .oil-story-title h2, .oil-more-heading h2) {
  font-size: var(--heading-2); line-height: 1.2;
}
:is(.product-info h3, .process h3, .article-card h3, .document-list h3,
  .detail-secondary h3, .oil-selection-steps h3) {
  font-size: var(--heading-3); line-height: 1.3;
}
.product-info p { min-height: 0; }
.product-info h3 { margin-bottom: 12px; }
.card-links { flex-wrap: wrap; gap: 12px; }

/* Navigation and controls use one consistent size. */
:is(#navigation, #navigation button, #menu-toggle, .button, .header-cta,
  .hero .button, .final-cta .button, .text-link, .card-links a,
  .filters button, .form-result .button, .oil-secondary,
  .oil-hero-copy .button, .oil-enquiry-banner .button,
  .oil-related-product .text-link, .oil-more-heading>a,
  .oil-section-nav, .oil-section-nav a, .oil-section-nav>.container>a,
  .oil-section-nav>.container>span, .toc a) {
  font-size: var(--text-sm); line-height: 1.5;
}
.button { min-height: 46px; }
:is(input, select, textarea, .footer-email-line input) { font-size: var(--text-base); line-height: 1.5; }
:is(.filters label, .enquiry-form label, .spec-table, .oil-spec-table,
  .document-list span, .contact-links, .map-block, .map-block small,
  .form-result .copy-status) { font-size: var(--text-sm); line-height: 1.6; }
.error { font-size: var(--text-sm); font-weight: 400; }
.faq summary, .oil-faq-layout summary { font-size: var(--text-lg); line-height: 1.5; }
.steps { font-size: var(--text-lg); }

/* Supporting labels never shrink into 6–10px microcopy. */
:is(.eyebrow, .hero .eyebrow, .product-info .eyebrow, .article-card>.eyebrow,
  .oil-hero-copy>.eyebrow, .oil-related-product .eyebrow,
  .topbar, .breadcrumbs, .oil-hero .breadcrumbs, .brand-strip,
  .hero-bottom, .hero-product-label, .hero-product-label small,
  .article-art>span, .oil-stage-index, .oil-pack-stage figcaption,
  .oil-hero-foot, .oil-number small, .oil-endorsement,
  .oil-endorsement strong, .oil-selection-steps li>span) {
  font-size: var(--text-xs); line-height: 1.6; letter-spacing: .07em;
}
:is(.caption, .oil-spec-layout .caption, .oil-spec-table caption,
  .oil-docs span, .oil-docs small) { font-size: var(--text-sm); line-height: 1.6; }
.hero-product-label small { display: block; }
.oil-hero h1 { line-height: 1.05; letter-spacing: -.03em; }
.oil-brand { font-size: var(--text-lg); line-height: 1.4; }
.oil-grade { font-size: clamp(3.5rem, 6.2vw, 5.5rem); line-height: 1.05; }
.oil-category { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.15; }
.oil-number { font-size: clamp(3.25rem, 5vw, 4.5rem); }
.oil-related-product h3 { font-size: 2rem; line-height: 1.2; }
.oil-related-product h3 small { font-size: var(--text-base); line-height: 1.5; }
.oil-enquiry-banner h2 { font-size: clamp(2.5rem, 4.5vw, 3.5rem); line-height: 1.12; }

/* Footer uses the same readable scale; the oversized RABS is decorative. */
.rabs-footer-connect h2 { font-size: clamp(1.75rem, 2.5vw, 2.25rem); line-height: 1.3; }
.rabs-footer h3 { font-size: var(--text-xl); line-height: 1.4; letter-spacing: -.02em; }
.rabs-footer-contact .footer-phone { font-size: var(--text-lg); line-height: 1.5; letter-spacing: 0; }
:is(.rabs-footer-contact .footer-mail, .rabs-footer-contact .footer-whatsapp-link,
  .rabs-footer-company>a, .rabs-footer-contact p, .footer-email-note,
  .footer-update-result, .rabs-footer-legal) {
  font-size: var(--text-sm); line-height: 1.65; letter-spacing: 0;
}
:is(.rabs-footer-baseline, .rabs-footer-connect>.eyebrow) { font-size: var(--text-xs); line-height: 1.7; }
.rabs-footer-legal { flex-wrap: wrap; }
.rabs-footer-legal>div { flex-wrap: wrap; flex-shrink: 1; }
.rabs-footer-baseline { flex-wrap: wrap; }

/* Open the mobile menu earlier instead of squeezing the desktop labels. */
@media (min-width: 1201px) {
  #navigation { gap: clamp(12px, 1.1vw, 22px); }
  .header-inner { gap: 18px; }
  .header-cta { padding: 12px 16px; gap: 12px; }
}
@media (min-width: 981px) and (max-width: 1200px) {
  .header-inner { height: 80px; }
  .header-cta { margin-left: auto; }
  #menu-toggle { display: block; background: transparent; border: 1px solid #bbc1b3; padding: 10px 14px; order: 3; }
  #navigation { display: none; position: absolute; top: 80px; left: 0; right: 0; background: #fffef9; padding: 20px 6%; max-height: calc(100dvh - 80px); overflow: auto; }
  #navigation.open { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  #navigation>a, #navigation .nav-group>button { display: block; width: 100%; text-align: left; padding: 12px 0; }
  #navigation .submenu { position: static; box-shadow: none; border-top: 0; background: #eeefe5; }
  .oil-section-nav { top: 80px; }
  .oil-section-nav>.container>a { display: none; }
}
@media (max-width: 980px) {
  #navigation, #navigation button { font-size: var(--text-base); }
  .heading-action { margin-top: 0; justify-content: flex-start; }
  .oil-section-nav>.container { overflow-x: auto; }
  .oil-section-nav .container>div { flex-shrink: 0; }
}
@media (max-width: 640px) {
  .hero-inner { min-height: 0; padding-bottom: 25px; }
  .hero h1 { font-size: clamp(2.25rem, 8.5vw, 3rem); }
  .hero-product-label { max-width: 155px; }
  .hero-bottom { flex-wrap: wrap; gap: 12px; }
  .hero .actions, .oil-hero .actions { gap: 14px; }
  .brand-strip { gap: 14px; }
  .oil-grade { font-size: clamp(3.5rem, 13vw, 4.5rem); }
  .oil-pack-stage figcaption { flex-wrap: wrap; }
  .oil-grade-explanation { grid-template-columns: 1fr; gap: 16px; }
  .oil-related-product { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .oil-more-heading { flex-wrap: wrap; }
  .oil-docs { grid-template-columns: 1fr; }
  .spec-table th, .spec-table td { overflow-wrap: anywhere; }
  .rabs-footer-baseline { letter-spacing: .03em; }
}
@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; }
  .pack img { height: 260px; }
  .product-info { padding: 22px; }
  .card-links { flex-direction: row; justify-content: space-between; }
  .card-links a { min-height: 44px; }
  .rabs-footer-top { grid-template-columns: 1fr; }
  .rabs-footer-company { border-left: 0; border-top: 1px solid #343239; padding-left: 0; }
  .rabs-footer-contact .footer-mail { font-size: var(--text-base); }
  .rabs-footer-contact .footer-phone { font-size: var(--text-xl); }
}
