/* YANZI Dental Instruments — site styles */

:root {
  --navy: #0b1f4d;
  --navy-2: #13306f;
  --gold: #b8914a;
  --gold-2: #d7b775;
  --gold-dark: #8f6d2f;
  --blue: #1f6fe0;
  --ink: #1a2233;
  --muted: #5a6376;
  --line: #e2e8f1;
  --soft: #f4f7fb;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(11, 31, 77, 0.10);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--navy-2);
}

h1,
h2,
h3,
h4 {
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

code {
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 0.92em;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--navy);
}

:focus-visible {
  outline: 3px solid var(--gold-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 12px;
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 60ch;
}

.section {
  padding: 72px 0;
}

.section-soft {
  background: var(--soft);
}

.section-head {
  max-width: 720px;
  margin-bottom: 36px;
}

.section-head p {
  color: var(--muted);
  margin: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  line-height: 1.2;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy-2);
}

.btn-gold {
  background: var(--gold);
  color: #fff;
}

.btn-gold:hover {
  background: var(--gold-dark);
}

.btn-outline {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}

.btn-outline:hover {
  background: var(--navy);
  color: #fff;
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.9rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.brand img {
  height: 26px;
  width: auto;
}

.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);
  border-left: 1px solid var(--line);
  padding-left: 12px;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-color: var(--gold);
}

.site-nav .btn {
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
  position: relative;
  padding: 0;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  content: "";
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle span {
  top: 21px;
}

.nav-toggle span::before {
  top: -7px;
  left: 0;
  right: 0;
}

.nav-toggle span::after {
  top: 7px;
  left: 0;
  right: 0;
}

.nav-open .nav-toggle span {
  background: transparent;
}

.nav-open .nav-toggle span::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-open .nav-toggle span::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  padding: 64px 0 72px;
  background:
    radial-gradient(900px 420px at 88% -10%, #e4edfb 0%, rgba(228, 237, 251, 0) 60%),
    linear-gradient(180deg, #f5f8fd 0%, #ffffff 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-tagline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin: 22px 0 28px;
  font-size: 0.92rem;
  color: var(--navy);
  font-weight: 600;
}

.hero-tagline span + span::before {
  content: "\00B7";
  color: var(--gold);
  margin: 0 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-media img {
  height: min(68vh, 620px);
  width: auto;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.stat {
  padding: 28px 20px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  display: block;
  font-size: 1.6rem;
  color: var(--navy);
  font-weight: 700;
  line-height: 1.2;
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Cards and grids */
.grid {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.card p {
  color: var(--muted);
  margin: 0;
}

.card h3 {
  margin-top: 14px;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.card-link:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: #cfd9ea;
}

.card-link .more {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
  color: var(--navy-2);
}

.icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #eef3fb;
  display: grid;
  place-items: center;
  color: var(--navy);
}

.icon-badge svg.bur-mini {
  width: 26px;
  height: 52px;
  color: var(--navy);
}

.icon-badge svg.ico {
  width: 24px;
  height: 24px;
  color: var(--navy);
}

.bur-mini {
  width: 26px;
  height: 52px;
  color: var(--navy);
}

/* Grit strip */
.grit-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.grit {
  padding: 24px 22px;
  border-right: 1px solid var(--line);
}

.grit:last-child {
  border-right: 0;
}

.grit i {
  display: block;
  height: 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.grit h3 {
  font-size: 1.05rem;
  margin: 0;
}

.grit p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.grit-ef i {
  background: linear-gradient(90deg, #fff6b0, #f2c500);
}

.grit-f i {
  background: linear-gradient(90deg, #ff9d96, #e53935);
}

.grit-std i {
  background: linear-gradient(90deg, #9cc8ff, #1f6fe0);
}

.grit-c i {
  background: linear-gradient(90deg, #a8e8b1, #2e9e3e);
}

/* Callouts */
.callout {
  border-left: 4px solid var(--gold);
  background: #fbf7ee;
  padding: 22px 26px;
  border-radius: 10px;
}

.callout h3 {
  margin-top: 0;
}

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

.callout.warn {
  border-color: #c62828;
  background: #fdf3f3;
}

/* CTA band */
.cta {
  background: var(--navy);
  color: #fff;
  border-radius: 20px;
  padding: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cta h2 {
  color: #fff;
  margin: 0 0 8px;
}

.cta p {
  color: #c9d4ea;
  margin: 0;
  max-width: 56ch;
}

.cta .btn-outline {
  border-color: #fff;
  color: #fff;
}

.cta .btn-outline:hover {
  background: #fff;
  color: var(--navy);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Inner page hero */
.page-hero {
  padding: 56px 0 40px;
  background: linear-gradient(180deg, #f5f8fd 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}

.page-hero p {
  color: var(--muted);
  max-width: 64ch;
  margin: 0;
  font-size: 1.08rem;
}

/* Product range */
.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 36px;
}

.jump a {
  font-size: 0.88rem;
  border: 1px solid var(--line);
  padding: 7px 13px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--navy);
  background: #fff;
}

.jump a:hover {
  border-color: var(--gold);
}

.cat-list {
  display: grid;
  gap: 20px;
}

.cat {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  scroll-margin-top: 96px;
}

.cat .bur {
  width: 84px;
  height: 168px;
  color: var(--navy);
  align-self: start;
}

.cat-codes {
  font-weight: 700;
  color: var(--gold-dark);
  letter-spacing: 0.04em;
  margin: 0 0 4px;
  font-size: 0.92rem;
}

.cat h3 {
  margin-bottom: 8px;
}

.cat-desc {
  color: var(--muted);
  margin: 0 0 16px;
}

.specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.spec {
  background: var(--soft);
  border-radius: 10px;
  padding: 12px 14px;
}

.spec dt {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.spec dd {
  margin: 2px 0 0;
  font-weight: 700;
  color: var(--navy);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  background: #fff;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot-std {
  background: #1f6fe0;
}

.dot-c {
  background: #2e9e3e;
}

.dot-f {
  background: #e53935;
}

.dot-ef {
  background: #f2c500;
}

.examples {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
}

.examples code {
  margin-right: 4px;
}

.legend-note {
  margin-top: 32px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 480px;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--soft);
  color: var(--navy);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.swatch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.swatch i {
  width: 34px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

/* About / split layouts */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.split p {
  color: var(--muted);
}

.swallow-card {
  background: var(--soft);
  border-radius: 24px;
  padding: 48px 32px;
  display: grid;
  place-items: center;
  min-height: 320px;
}

.swallow-card img {
  width: min(300px, 80%);
  height: auto;
  mix-blend-mode: multiply;
}

.values {
  counter-reset: value;
}

.value {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.value:last-child {
  border-bottom: 1px solid var(--line);
}

.value-num {
  font-weight: 700;
  color: var(--gold-dark);
  font-size: 0.95rem;
  min-width: 28px;
}

.value h3 {
  margin: 0 0 4px;
  font-size: 1.08rem;
}

.value p {
  margin: 0;
  color: var(--muted);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-item {
  display: flex;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.contact-item .icon-badge {
  flex: 0 0 52px;
}

.contact-item h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.contact-item p {
  margin: 0;
  color: var(--muted);
  word-break: break-word;
}

.contact-item a {
  word-break: break-word;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: #c9d4ea;
  padding: 56px 0 24px;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-logo {
  height: 30px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 16px;
}

.footer-tag {
  color: #9fb0d1;
  margin: 0 0 12px;
  font-size: 0.92rem;
}

.site-footer h4 {
  color: #fff;
  margin: 0 0 14px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 8px;
}

.site-footer a {
  color: #e6ecf8;
  text-decoration: none;
  word-break: break-word;
}

.site-footer a:hover {
  color: var(--gold-2);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 40px;
  padding-top: 20px;
  font-size: 0.85rem;
  color: #9fb0d1;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Responsive */
@media (max-width: 1000px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .brand-sub {
    display: none;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 16px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a:not(.btn) {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
  }

  .site-nav .btn {
    margin-top: 14px;
  }

  .hero-grid,
  .split,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 40px;
  }

  .hero-media img {
    height: auto;
    width: min(240px, 62%);
  }

  .hero-media {
    margin-top: 8px;
  }

  .split {
    gap: 32px;
  }

  .grit-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grit:nth-child(2) {
    border-right: 0;
  }

  .grit:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .cta {
    padding: 32px 24px;
  }

  .specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cat {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
  }

  .cat .bur {
    width: 64px;
    height: 128px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15.5px;
  }

  .container {
    width: calc(100% - 32px);
  }

  .section {
    padding: 52px 0;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

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

  .stat {
    padding: 20px 14px;
  }

  .stat strong {
    font-size: 1.3rem;
  }

  .grit-strip {
    grid-template-columns: 1fr;
  }

  .grit {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .grit:last-child {
    border-bottom: 0;
  }

  .grit:nth-child(2) {
    border-right: 0;
  }

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

  .hero-actions .btn,
  .cta-actions .btn {
    width: 100%;
  }

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

  table {
    min-width: 0;
  }

  td.num {
    white-space: normal;
  }

  th,
  td {
    padding: 12px 12px;
  }

  .cta h2 {
    font-size: 1.5rem;
  }

  .hero-tagline {
    flex-direction: column;
    gap: 4px;
  }

  .hero-tagline span + span::before {
    content: none;
  }
}

/* Phone tables: stack each row as label/value pairs */
@media (max-width: 640px) {
  .stack-table {
    min-width: 0;
  }

  .stack-table thead {
    display: none;
  }

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

  .stack-table tr {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
  }

  .stack-table tr:last-child {
    border-bottom: 0;
  }

  .stack-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 5px 0;
    border: 0;
    text-align: right;
    white-space: normal;
  }

  .stack-table td::before {
    font-weight: 600;
    color: var(--muted);
    text-align: left;
  }

  .stack-speed td:nth-child(1)::before { content: "Code"; }
  .stack-speed td:nth-child(2)::before { content: "Head diameter"; }
  .stack-speed td:nth-child(3)::before { content: "Recommended (rpm)"; }
  .stack-speed td:nth-child(4)::before { content: "Maximum (rpm)"; }

  .stack-grit td:nth-child(1)::before { content: "Shank colour"; }
  .stack-grit td:nth-child(2)::before { content: "Grit grade"; }
  .stack-grit td:nth-child(3)::before { content: "Suffix"; }
  .stack-grit td:nth-child(4)::before { content: "Grit size"; }
  .stack-grit td:nth-child(5)::before { content: "In this range"; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* ==========================================================
   Motion: subtle, and off for visitors who prefer reduced motion
   ========================================================== */

:root {
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 24px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Header: soft shadow once the page has scrolled */
.site-header {
  transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 6px 22px rgba(11, 31, 77, 0.08);
}

/* Reading progress line at the top of the page */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 60;
  pointer-events: none;
}

/* Buttons: sheen sweep and a small lift, pointer devices only */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  z-index: -1;
  transition: none;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn {
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.25s var(--ease-out), box-shadow 0.25s;
  }

  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(11, 31, 77, 0.16);
  }

  .btn:hover::after {
    left: 130%;
    transition: left 0.7s var(--ease-out);
  }

  .card-link {
    transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
  }

  .card-link:hover .icon-badge {
    background: #e2ebf9;
  }

  .cat {
    transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
  }

  .cat:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: #cfd9ea;
  }

  .contact-item {
    transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
  }

  .contact-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: #cfd9ea;
  }
}

.btn:active {
  transform: scale(0.98);
}

/* Entrance and ambient motion (only when motion is allowed) */
@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow,
  .page-hero .eyebrow {
    animation: rise 0.7s var(--ease-out) 0.05s both;
  }

  .hero h1,
  .page-hero h1 {
    animation: rise 0.8s var(--ease-out) 0.15s both;
  }

  .hero .lead,
  .page-hero p {
    animation: rise 0.8s var(--ease-out) 0.25s both;
  }

  .hero-tagline {
    animation: rise 0.8s var(--ease-out) 0.35s both;
  }

  .hero-actions {
    animation: rise 0.8s var(--ease-out) 0.45s both;
  }

  .hero-media img {
    animation: hero-in 1.1s var(--ease-out) 0.1s both;
  }

  .swallow-card img {
    animation: float 7s ease-in-out infinite;
  }

  .grit i {
    transform-origin: left center;
  }

  /* Scroll reveals. main.js adds .is-in and --d (stagger delay). */
  .motion [data-reveal] {
    opacity: 0;
  }

  .motion [data-reveal].is-in {
    animation: rise 0.8s var(--ease-out) both;
    animation-delay: var(--d, 0ms);
  }

  .motion .grit.is-in i {
    animation: grow 0.9s var(--ease-out) backwards;
    animation-delay: calc(var(--d, 0ms) + 250ms);
  }
}

/* ==========================================================
   Language switch and header tools
   ========================================================== */

.header-right {
  display: flex;
  align-items: center;
  gap: 26px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  flex: 0 0 auto;
}

.lang-switch a {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  color: var(--navy);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.lang-switch a:hover {
  background: var(--soft);
}

.lang-switch a.is-active {
  background: var(--navy);
  color: #fff;
}

/* Narrower desktops: keep the nav, language switch and button on one line */
@media (min-width: 901px) and (max-width: 1100px) {
  .header-right {
    gap: 20px;
  }

  .site-nav {
    gap: 20px;
  }

  .brand-sub {
    display: none;
  }
}

@media (max-width: 400px) {
  .brand img {
    height: 22px;
  }

  .lang-switch a {
    padding: 5px 9px;
  }

  .header-tools {
    gap: 8px;
  }
}

/* ==========================================================
   Chinese pages: Chinese system fonts and spacing
   ========================================================== */

html:lang(zh-CN) body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  line-height: 1.85;
}

html:lang(zh-CN) h1,
html:lang(zh-CN) h2,
html:lang(zh-CN) h3,
html:lang(zh-CN) h4 {
  letter-spacing: 0;
  line-height: 1.35;
}

html:lang(zh-CN) .eyebrow {
  letter-spacing: 0.06em;
}

html:lang(zh-CN) .brand-sub {
  letter-spacing: 0.08em;
}

/* Phone tables: Chinese labels for the stacked rows */
@media (max-width: 640px) {
  html:lang(zh-CN) .stack-speed td:nth-child(1)::before { content: "代码"; }
  html:lang(zh-CN) .stack-speed td:nth-child(2)::before { content: "头部直径"; }
  html:lang(zh-CN) .stack-speed td:nth-child(3)::before { content: "推荐转速（rpm）"; }
  html:lang(zh-CN) .stack-speed td:nth-child(4)::before { content: "最高转速（rpm）"; }

  html:lang(zh-CN) .stack-grit td:nth-child(1)::before { content: "柄部颜色"; }
  html:lang(zh-CN) .stack-grit td:nth-child(2)::before { content: "粒度等级"; }
  html:lang(zh-CN) .stack-grit td:nth-child(3)::before { content: "后缀"; }
  html:lang(zh-CN) .stack-grit td:nth-child(4)::before { content: "粒度尺寸"; }
  html:lang(zh-CN) .stack-grit td:nth-child(5)::before { content: "本目录范围"; }
}
