/* ==========================================================================
   TDI — Thermal Developments International
   Single consolidated stylesheet: tokens, base, layout, components, pages.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  --color-primary: #3B5A7A;
  --color-primary-light: #4A6A8A;
  --color-primary-dark: #2A4A6A;

  --color-accent: #D8D8D8;
  --color-accent-light: #F5F5F5;
  --color-accent-dark: #AAAAAA;

  --color-background: #FFFFFF;
  --color-background-alt: #F8F9FA;

  --color-text: #333333;
  --color-text-light: #5C6670;
  --color-text-muted: #6B7280; /* 4.5:1 on white (WCAG AA) */

  --color-link: #3A6491;
  --color-link-hover: #2A4A6A;

  --color-success: #2E7D32;
  --color-error: #C62828;
  --color-gold: #F5B301;

  /* Spacing (8px scale) */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 4rem;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-xxl: 2rem;
  --fs-xxxl: 2.5rem;

  --lh-tight: 1.2;
  --lh-normal: 1.6;
  --lh-loose: 1.8;

  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;

  --container-width: 1200px;
  --header-offset: 6rem; /* sticky header + breathing room for anchor targets */
}

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-offset);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background-color: var(--color-background);
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Remove list styling only where a class implies bespoke presentation */
ul[class],
ol[class] {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: var(--lh-tight);
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
  overflow-wrap: break-word;
}

h1 { font-size: var(--fs-xxxl); }
h2 { font-size: var(--fs-xxl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p {
  margin-bottom: var(--space-sm);
  overflow-wrap: break-word;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-link-hover);
}

address {
  font-style: normal;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Readable focus ring on dark backgrounds */
.cta :focus-visible,
.hero :focus-visible,
.page-hero :focus-visible,
.site-footer :focus-visible,
.contact-info :focus-visible,
.website-link:focus-visible {
  outline-color: #fff;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  z-index: 200;
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--color-primary-dark);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

section {
  padding: var(--space-xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-subtitle {
  font-size: var(--fs-md);
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
  text-align: center;
}

/* --------------------------------------------------------------------------
   4. Announcement banner
   -------------------------------------------------------------------------- */
.anniversary-banner {
  background-color: var(--color-primary-dark);
  color: #fff;
  text-align: center;
  padding: var(--space-xs);
  font-weight: 500;
}

.anniversary-banner p {
  margin: 0;
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------------
   5. Header & navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-background);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal), background-color var(--transition-normal);
}

.site-header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
}

.logo a {
  display: inline-block;
}

.logo-img {
  height: 52px;
  width: auto;
  max-width: 55vw;
}

.tagline {
  font-size: var(--fs-xs);
  color: var(--color-text-light);
  margin: 0.25rem 0 0;
}

.nav-list {
  display: flex;
  gap: var(--space-md);
}

.nav-list a {
  display: block;
  padding: var(--space-xs) 0;
  color: var(--color-text);
  font-weight: 500;
  position: relative;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--color-primary);
}

.nav-list a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
}

.menu-toggle {
  display: none;
}

@media (max-width: 768px) {
  .logo-img {
    height: 44px;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
  }

  .menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--color-text);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md);
    background-color: var(--color-background);
    box-shadow: var(--shadow-md);
    transform: translateY(-0.5rem);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition-normal), opacity var(--transition-normal), visibility var(--transition-normal);
  }

  .nav-list.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: var(--fs-base);
  text-align: center;
  cursor: pointer;
  border: none;
  transition: background-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  color: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--color-background);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-small {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--fs-sm);
}

.btn-large {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--fs-lg);
}

/* --------------------------------------------------------------------------
   7. Shared components
   -------------------------------------------------------------------------- */
.alert {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.alert p {
  margin: 0;
}

.alert-info {
  background-color: rgba(59, 90, 122, 0.08);
  border-left: 4px solid var(--color-primary);
}

.card-title-link {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 2px;
}

.card-title-link:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

.card-title-link:focus-visible,
.card-media-link:focus-visible {
  outline: 3px solid var(--color-accent-dark);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.card-media-link {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.breadcrumb-nav {
  background-color: var(--color-background-alt);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-accent);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
  content: '/';
  margin: 0 var(--space-xs);
  color: var(--color-text-muted);
}

.breadcrumbs a {
  color: var(--color-text-light);
}

.breadcrumbs [aria-current="page"] {
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   8. Hero sections
   -------------------------------------------------------------------------- */
.hero {
  padding: var(--space-xxl) 0;
  background-color: var(--color-primary);
  color: #fff;
}

.hero h1 {
  font-size: var(--fs-xxxl);
  color: #fff;
  margin-bottom: var(--space-lg);
}

.hero-content {
  max-width: 600px;
}

@media (min-width: 769px) {
  .hero .container {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
  }

  .hero-content {
    flex: 2;
  }

  .hero-image {
    flex: 3;
    position: relative;
  }

  .hero-image img {
    border-radius: var(--radius-lg);
  }

  .hero-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    pointer-events: none;
  }
}

@media (max-width: 768px) {
  .hero-image {
    margin-top: var(--space-lg);
  }

  .hero-image img {
    border-radius: var(--radius-md);
  }
}

.page-hero {
  padding: var(--space-xl) 0;
  background-color: var(--color-primary);
  color: #fff;
  text-align: center;
}

.page-hero h1 {
  color: #fff;
  font-size: var(--fs-xxl);
  margin-bottom: var(--space-sm);
}

.page-hero p {
  font-size: var(--fs-md);
  max-width: 700px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   9. Feature cards (home, distributors, metrology)
   -------------------------------------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: var(--color-background);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 160px;
  margin: 0 auto var(--space-sm);
}

.feature-img {
  width: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
  max-height: 160px;
}

.feature-card h3 {
  margin-top: var(--space-xs);
  margin-bottom: var(--space-sm);
  font-size: var(--fs-md);
  line-height: 1.4;
}

.feature-card p {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   10. Product highlight (home)
   -------------------------------------------------------------------------- */
.product-highlight {
  background-color: var(--color-background-alt);
  padding: var(--space-xl) 0;
}

.product-highlight .container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  justify-content: center;
  align-items: center;
  max-width: 1100px;
}

.product-highlight .product-content,
.product-highlight .product-image {
  flex: 1 1 400px;
  min-width: 280px;
  max-width: 520px;
}

.product-highlight .product-image img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

@media (max-width: 880px) {
  .product-highlight .container {
    flex-direction: column;
    text-align: center;
  }

  .product-highlight .product-content,
  .product-highlight .product-image {
    max-width: 100%;
    width: 100%;
  }

  .product-highlight .product-image {
    order: -1;
  }

  .product-highlight .btn {
    margin-top: var(--space-md);
  }
}

/* --------------------------------------------------------------------------
   11. Testimonials
   -------------------------------------------------------------------------- */
.testimonials {
  padding: var(--space-xxl) 0;
  background: linear-gradient(135deg, var(--color-background-alt), var(--color-background));
  text-align: center;
}

.testimonials .section-title {
  margin-bottom: var(--space-xs);
}

.rating {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.rating .stars {
  font-size: var(--fs-xxl);
  line-height: 1;
  letter-spacing: 0.2rem;
  color: var(--color-gold);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.testimonial-list {
  display: grid;
  gap: var(--space-xl);
  max-width: 900px;
  margin: 0 auto;
}

.testimonial-card {
  background-color: var(--color-background);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-xl);
  border-left: 6px solid var(--color-primary);
  text-align: left;
}

.testimonial-card blockquote {
  font-size: var(--fs-lg);
  line-height: var(--lh-loose);
  font-style: italic;
  margin-bottom: var(--space-md);
}

.testimonial-card figcaption {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--color-primary-dark);
}

.testimonial-subtitle {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text-light);
}

@media (max-width: 768px) {
  .testimonial-card {
    padding: var(--space-lg);
  }
}

/* --------------------------------------------------------------------------
   12. Industries (home)
   -------------------------------------------------------------------------- */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
}

.industry-card {
  background-color: var(--color-primary);
  color: #fff;
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-normal);
}

.industry-card:hover {
  background-color: var(--color-primary-light);
}

.industry-card h3 {
  color: #fff;
  margin-bottom: var(--space-xs);
}

/* --------------------------------------------------------------------------
   13. Call to action
   -------------------------------------------------------------------------- */
.cta {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: #fff;
  text-align: center;
  padding: var(--space-xxl) 0;
}

.cta h2 {
  color: #fff;
  margin-bottom: var(--space-md);
}

.cta p {
  max-width: 700px;
  margin: 0 auto var(--space-xl);
  font-size: var(--fs-lg);
  line-height: var(--lh-loose);
  color: rgba(255, 255, 255, 0.9);
}

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-primary);
  color: #fff;
  padding: var(--space-xl) 0 var(--space-lg);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-section h3 {
  color: #fff;
  margin-bottom: var(--space-md);
}

.footer-section p,
.footer-section address p {
  margin-bottom: var(--space-xs);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-links a,
.site-footer address a {
  color: var(--color-accent);
}

.footer-links a:hover,
.site-footer address a:hover {
  color: #fff;
}

.copyright {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: var(--fs-sm);
  color: var(--color-accent);
}

.copyright a {
  color: inherit;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   15. Products page
   -------------------------------------------------------------------------- */
.product-categories {
  padding-bottom: var(--space-xl);
}

.category-nav {
  margin-bottom: var(--space-lg);
}

.category-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.category-link {
  display: block;
  padding: var(--space-xs) var(--space-md);
  background-color: var(--color-accent-light);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-weight: 500;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.category-link:hover,
.category-link.active {
  background-color: var(--color-primary);
  color: #fff;
}

.product-category {
  display: none;
}

.product-category.active {
  display: block;
}

.category-title {
  text-align: center;
  font-size: var(--fs-xl);
  margin-bottom: var(--space-lg);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.product-card {
  background-color: var(--color-background);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.product-card .product-image {
  height: 200px;
  background-color: var(--color-background-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-img {
  max-height: 100%;
  width: auto;
  transition: transform var(--transition-normal);
}

.product-card:hover .product-image .product-img {
  transform: scale(1.05);
}

.product-details {
  padding: var(--space-md);
}

.product-specs {
  margin: var(--space-sm) 0 var(--space-md);
  font-size: var(--fs-sm);
}

.product-specs li {
  margin-bottom: var(--space-xs);
  padding-left: var(--space-md);
  position: relative;
}

.product-specs li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}

.download-btn-wrapper {
  display: flex;
  justify-content: center;
  padding: var(--space-md);
}

/* --------------------------------------------------------------------------
   16. Downloads page
   -------------------------------------------------------------------------- */
.download-category-title {
  font-size: var(--fs-xl);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-accent);
}

.download-details h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-xs);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.download-card {
  display: flex;
  gap: var(--space-md);
  background-color: var(--color-background);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.download-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.download-icon {
  flex-shrink: 0;
  width: 48px;
}


.file-info {
  display: block;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: var(--space-xs) 0 var(--space-sm);
}

@media (max-width: 480px) {
  .download-card {
    flex-direction: column;
    align-items: center;
  }

  .download-details {
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   17. Contact page
   -------------------------------------------------------------------------- */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-xl);
}

.contact-info {
  background-color: var(--color-primary);
  color: #fff;
  padding: var(--space-lg);
  border-radius: var(--radius-md);
}

.contact-section h2 {
  font-size: var(--fs-xl);
}

.contact-info h2 {
  color: #fff;
  margin-bottom: var(--space-lg);
}

.info-group {
  margin-bottom: var(--space-lg);
}

.info-group h3 {
  font-size: var(--fs-lg);
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.info-group a {
  color: #fff;
  text-decoration: underline;
}

.info-group a:hover {
  color: var(--color-accent-light);
}

.contact-method {
  background-color: var(--color-background-alt);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.contact-method h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-xs);
}

.contact-method p:last-child {
  margin-bottom: 0;
}

.departments h2 {
  text-align: center;
  font-size: var(--fs-xl);
  margin-bottom: var(--space-lg);
}

.department-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
}

.department-card {
  background-color: var(--color-background);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.department-card h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-sm);
}

.department-card p {
  margin-bottom: var(--space-xs);
}

@media (max-width: 768px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   18. Distributors page
   -------------------------------------------------------------------------- */
.distributors-section {
  background-color: var(--color-background-alt);
}

.section-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-xl);
  background-color: var(--color-background);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.section-intro p {
  font-size: var(--fs-md);
  line-height: var(--lh-loose);
  color: var(--color-text-light);
  margin-bottom: 0;
}

.region-section {
  margin-bottom: var(--space-xl);
  background-color: var(--color-background);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.region-title {
  font-size: var(--fs-xxl);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 3px solid var(--color-primary);
  display: inline-block;
  font-weight: 700;
}

.distributor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--space-lg);
}

.distributor-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-background);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-accent);
  border-left: 6px solid var(--color-primary);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.distributor-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.distributor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-accent-light);
}

.distributor-header h3 {
  margin-bottom: 0;
  font-size: var(--fs-lg);
  line-height: var(--lh-tight);
}

.country-badge {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.distributor-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex-grow: 1;
}

.address-info {
  background-color: var(--color-background-alt);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-accent-dark);
  flex-grow: 1;
}

.address-info p {
  margin-bottom: var(--space-xs);
}

.address-info p:last-child {
  margin-bottom: 0;
}

.website-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.website-link:hover {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.website-link span {
  transition: transform var(--transition-fast);
}

.website-link:hover span {
  transform: translateX(3px);
}

@media (max-width: 768px) {
  .distributor-grid {
    grid-template-columns: 1fr;
  }

  .region-section {
    padding: var(--space-md);
  }

  .region-title {
    font-size: var(--fs-xl);
  }
}

.distributor-benefits {
  background: linear-gradient(135deg, var(--color-background-alt), var(--color-background));
  padding: var(--space-xxl) 0;
}

/* --------------------------------------------------------------------------
   19. Metrology page
   -------------------------------------------------------------------------- */
.metrology-hero {
  background-color: var(--color-primary-dark);
  padding: var(--space-xxl) 0;
}

.hero-subtitle {
  font-size: var(--fs-lg);
  color: rgba(255, 255, 255, 0.9);
  max-width: 800px;
  margin: var(--space-md) auto 0;
}

.metrology-intro {
  padding: var(--space-xxl) 0;
}

.intro-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.lead-paragraph {
  font-size: var(--fs-lg);
  line-height: var(--lh-loose);
  margin-bottom: var(--space-lg);
}

.intro-text p {
  font-size: var(--fs-md);
  line-height: var(--lh-loose);
  margin-bottom: var(--space-md);
}

.metrology-img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.metrology-applications {
  padding: var(--space-xxl) 0;
  background-color: var(--color-background-alt);
}

.application-grid {
  display: grid;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.application-card {
  background-color: var(--color-background);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--color-primary);
}

.featured-application {
  border-left: 6px solid var(--color-primary-dark);
}

.application-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-accent);
}

.application-header h3 {
  margin-bottom: 0;
}

.application-badge {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

.application-content p {
  line-height: var(--lh-loose);
}

.key-benefits,
.industry-examples {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background-color: var(--color-background-alt);
  border-radius: var(--radius-md);
}

.key-benefits h4,
.industry-examples h4 {
  margin-bottom: var(--space-sm);
}

.key-benefits li {
  padding: var(--space-xs) 0 var(--space-xs) var(--space-md);
  position: relative;
}

.key-benefits li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: bold;
}

.industry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.industry-tag {
  background-color: var(--color-primary);
  color: #fff;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  font-weight: 500;
}

.metrology-details {
  background-color: var(--color-background-alt);
  padding: var(--space-xxl) 0;
  border-top: 1px solid var(--color-accent);
}

.details-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(3, 1fr);
}

.details-text {
  line-height: var(--lh-normal);
}

.details-text ul {
  list-style: disc;
  margin: var(--space-xs) 0 var(--space-sm);
  padding-left: var(--space-md);
}

.details-text a {
  text-decoration: underline;
}

.subsection-heading {
  font-size: var(--fs-lg);
  margin-top: var(--space-md);
}

.metrology-testimonial {
  padding: var(--space-xl) 0;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  color: #fff;
  text-align: center;
}

.metrology-testimonial blockquote {
  font-size: var(--fs-lg);
  line-height: var(--lh-loose);
  font-style: italic;
  max-width: 800px;
  margin: 0 auto;
}

.metrology-cta {
  padding: var(--space-xxl) 0;
  background-color: var(--color-background-alt);
  text-align: center;
}

.cta-content h2 {
  max-width: 800px;
  margin: 0 auto var(--space-lg);
}

.cta-content p {
  font-size: var(--fs-lg);
  line-height: var(--lh-loose);
  max-width: 900px;
  margin: 0 auto var(--space-xl);
  color: var(--color-text-light);
}

.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.contact-options {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.contact-item a {
  font-weight: 500;
}

@media (max-width: 1024px) {
  .intro-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .intro-image {
    order: -1;
    max-width: 520px;
    margin: 0 auto;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .application-header {
    flex-direction: column;
  }

  .industry-tags {
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   20. Privacy & Terms pages
   -------------------------------------------------------------------------- */
.privacy-main,
.terms-main {
  max-width: 800px;
}

.privacy-main {
  margin: 0 auto;
}

.privacy-section,
.terms-section {
  margin-bottom: var(--space-xl);
}

.privacy-section ul,
.terms-section ul {
  list-style: disc;
  padding-left: var(--space-md);
  margin-bottom: var(--space-sm);
}

.privacy-section li,
.terms-section li {
  margin-bottom: 0.375rem;
}

.privacy-section h3,
.terms-section h3 {
  margin-top: var(--space-md);
}

.legal-basis-grid,
.rights-grid,
.prohibited-grid,
.privacy-section .contact-methods,
.terms-section .contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
  margin: var(--space-md) 0;
}

.legal-basis-card,
.right-card,
.prohibited-item,
.definition-item,
.authority-contact {
  background-color: var(--color-background-alt);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-primary);
}

.legal-basis-card h3,
.right-card h3,
.prohibited-item h3,
.definition-item h3 {
  font-size: var(--fs-md);
  margin-top: 0;
  margin-bottom: var(--space-xs);
}

.legal-basis-card p,
.right-card p,
.prohibited-item p,
.definition-item p {
  margin-bottom: 0;
  font-size: var(--fs-sm);
}

.definitions-list {
  display: grid;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

.privacy-section .contact-method,
.terms-section .contact-method {
  margin-bottom: 0;
}

.authority-contact {
  margin-top: var(--space-sm);
}

.terms-wrapper {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.terms-sidebar {
  position: sticky;
  top: var(--header-offset);
}

.terms-nav {
  background-color: var(--color-background-alt);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.terms-nav h2 {
  font-size: var(--fs-md);
  margin-bottom: var(--space-sm);
}

.terms-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: var(--fs-sm);
}

.terms-nav-list a {
  display: block;
  padding: 0.25rem 0;
  color: var(--color-text-light);
}

.terms-nav-list a:hover {
  color: var(--color-primary);
}

.acknowledgment {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background-color: var(--color-background-alt);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
}

@media (max-width: 900px) {
  .terms-wrapper {
    grid-template-columns: 1fr;
  }

  .terms-sidebar {
    position: static;
  }
}

/* --------------------------------------------------------------------------
   21. Technical articles
   -------------------------------------------------------------------------- */
.article .page-hero h1 {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-xl) 0;
}

.article-body h2 {
  font-size: var(--fs-xl);
  margin-top: var(--space-xl);
}

.article-body p,
.article-body li {
  line-height: var(--lh-loose);
}

.article-body ul {
  list-style: disc;
  padding-left: var(--space-md);
  margin-bottom: var(--space-md);
}

.article-body li {
  margin-bottom: var(--space-xs);
}

.formula {
  background-color: var(--color-background-alt);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-md) 0;
  font-size: var(--fs-md);
  overflow-x: auto;
}

.article-figure {
  margin: var(--space-lg) 0;
}

.article-figure img {
  width: 100%;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  background-color: #fff;
}

.article-figure figcaption {
  margin-top: var(--space-xs);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  line-height: var(--lh-normal);
}

.table-scroll {
  overflow-x: auto;
  margin: var(--space-md) 0;
}

.article-body table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.article-body th,
.article-body td {
  padding: var(--space-xs) var(--space-sm);
  text-align: left;
  border-bottom: 1px solid var(--color-accent);
  vertical-align: top;
}

.article-body th {
  background-color: var(--color-accent-light);
  font-weight: 600;
  color: var(--color-primary-dark);
}

/* --------------------------------------------------------------------------
   22. Tolerance calculator
   -------------------------------------------------------------------------- */
.calculator-wrapper {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--space-xl);
  align-items: start;
  padding: var(--space-xl) 0;
}

.calculator-wrapper > * {
  min-width: 0;
}

.calc-panel {
  background-color: var(--color-background-alt);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.calc-panel h2 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-md);
}

.calc-field {
  margin-bottom: var(--space-md);
}

.calc-field label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.calc-field input,
.calc-field select {
  width: 100%;
  padding: var(--space-sm);
  border: 1px solid var(--color-accent-dark);
  border-radius: var(--radius-sm);
  background-color: var(--color-background);
}

.calc-field input:focus,
.calc-field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(59, 90, 122, 0.2);
}

.calc-hint {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0.25rem 0 0;
}

.calc-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.calc-stat {
  background-color: var(--color-background-alt);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.calc-stat-value {
  display: block;
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--color-primary-dark);
  font-variant-numeric: tabular-nums;
}

.calc-stat-label {
  display: block;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.verdict {
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
}

.verdict p {
  margin: 0;
}

.verdict-pass {
  background-color: rgba(46, 125, 50, 0.08);
  border-left: 4px solid var(--color-success);
}

.verdict-fail {
  background-color: rgba(198, 40, 40, 0.08);
  border-left: 4px solid var(--color-error);
}

.calc-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

.calc-table th,
.calc-table td {
  padding: var(--space-xs) var(--space-sm);
  text-align: left;
  border-bottom: 1px solid var(--color-accent);
}

.calc-table th {
  background-color: var(--color-accent-light);
  font-weight: 600;
  color: var(--color-primary-dark);
}

.status-pass {
  color: var(--color-success);
  font-weight: 600;
}

.status-fail {
  color: var(--color-error);
  font-weight: 600;
}

.status-invalid,
.row-invalid td {
  color: var(--color-text-muted);
}

.calc-notes {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: var(--space-xl);
}

.calc-notes h2 {
  font-size: var(--fs-xl);
  margin-top: var(--space-lg);
}

.calc-notes ul {
  list-style: disc;
  padding-left: var(--space-md);
  margin-bottom: var(--space-sm);
}

.calc-notes li {
  margin-bottom: var(--space-xs);
}

@media (max-width: 900px) {
  .calculator-wrapper {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   23. Scroll-reveal animation
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   24. Print
   -------------------------------------------------------------------------- */
@media print {
  .anniversary-banner,
  .menu-toggle,
  .skip-link {
    display: none;
  }

  .feature-card,
  .distributor-card,
  .download-card,
  .product-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid var(--color-accent);
  }

  .product-category {
    display: block;
  }
}
