:root {
  --ys-bg: #f5f3ed;
  --ys-bg-light: #f5f3ed;
  --ys-surface: #fff;
  --ys-text: #173029;
  --ys-muted: #676d68;
  --ys-accent: #a78a57;
  --ys-accent-hover: #846b40;
  --ys-dark: #173029;
  --ys-dark-text: #f5f3ed;
  --ys-dark-muted: #b8c1bc;
  --ys-line: #cbc7bc;
  --ys-width: 1420px;
}

body {
  background: var(--ys-bg);
  color: #2b302c;
  font-family: Arial, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.ys-brand h2 {
  color: var(--ys-text);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -.035em;
  text-wrap: balance;
}

p { text-wrap: pretty; }
a { color: var(--ys-text); }
.ys-main { background: var(--ys-bg); }
.ys-container { width: min(calc(100% - 64px), var(--ys-width)); }

.ys-topbar {
  background: var(--ys-dark);
  color: var(--ys-dark-muted);
  border: 0;
  font-size: 11px;
  letter-spacing: .08em;
}

.ys-topbar__inner { min-height: 34px; }
.ys-topbar a { color: var(--ys-dark-muted); }
.ys-topbar a:hover { color: #fff; }

.ys-header {
  background: rgba(245, 243, 237, .97);
  border-color: var(--ys-line);
}

.ys-header__inner { min-height: 82px; }
.ys-brand { min-width: 270px; }
.ys-brand h2 { font-size: 26px; letter-spacing: .04em; text-transform: uppercase; }
.ys-brand p { color: var(--ys-muted); font-size: 9px; letter-spacing: .18em; }
.ys-nav .wp-block-navigation__container { gap: 34px; }
.ys-nav a { color: var(--ys-text); font-size: 13px; font-weight: 500; }
.ys-nav a:hover,
.ys-nav .current-menu-item > a { color: var(--ys-accent); }

.ys-header .wp-block-button__link,
.wp-element-button,
.ys-contact-form button {
  min-height: 48px;
  padding: 13px 24px;
  border: 1px solid var(--ys-accent);
  border-radius: 0;
  background: var(--ys-accent);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 400;
}

.ys-header .wp-block-button__link:hover,
.wp-element-button:hover,
.ys-contact-form button:hover {
  border-color: var(--ys-accent-hover);
  background: var(--ys-accent-hover);
}

.ys-eyebrow,
.ys-card__meta {
  color: var(--ys-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
}

.ys-page-hero,
.ys-page-section,
.ys-page-cta {
  padding-right: max(32px, calc((100vw - var(--ys-width)) / 2));
  padding-left: max(32px, calc((100vw - var(--ys-width)) / 2));
}

.ys-page-hero { padding-top: 72px; padding-bottom: 72px; background: var(--ys-bg); }
.ys-page-hero h1 { margin: 10px 0 20px; font-size: clamp(52px, 6vw, 92px); line-height: .9; }
.ys-page-lead { max-width: 760px; color: var(--ys-muted); font-size: 17px; line-height: 1.65; }
.ys-page-section { padding-top: 104px; padding-bottom: 112px; background: var(--ys-bg); border-top: 1px solid var(--ys-line); }
.ys-page-section:nth-of-type(even) { background: #ece9e1; }
.ys-page-section > h2 { margin-bottom: 38px; font-size: clamp(38px, 4.5vw, 62px); line-height: .95; }
.ys-page-grid { gap: 0; border-top: 1px solid var(--ys-line); border-bottom: 1px solid var(--ys-line); }
.ys-page-card { padding: 32px; border: 0; border-right: 1px solid var(--ys-line); border-radius: 0; background: transparent; }
.ys-page-card:last-child { border-right: 0; }
.ys-page-card h3 { font-size: 27px; }
.ys-page-card p { line-height: 1.65; }
.ys-page-image img { border-radius: 0; }

.ys-page-gallery { gap: 14px; }
.ys-page-gallery img { aspect-ratio: 4 / 3; border-radius: 0; }
.ys-page-gallery figcaption { color: var(--ys-muted); font-size: 12px; letter-spacing: .04em; }

.ys-specs table { border-color: var(--ys-line); background: rgba(255,255,255,.54); }
.ys-specs th,
.ys-specs td { padding: 16px 18px; border-color: var(--ys-line); }
.ys-specs th { background: transparent; font-family: Georgia, "Times New Roman", serif; font-weight: 400; }

.ys-page-cta {
  display: grid !important;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: end;
  padding-top: 80px;
  padding-bottom: 84px;
  background: var(--ys-dark);
}
.ys-page-cta h2 { margin: 8px 0 0; color: var(--ys-dark-text); font-size: clamp(38px, 5vw, 68px); }
.ys-page-cta p:not(.ys-eyebrow) { max-width: 700px; color: var(--ys-dark-muted); }
.ys-page-cta .wp-block-buttons { grid-column: 2; grid-row: 1 / 4; align-self: center; }

.ys-footer { padding: 42px 0; }
.ys-footer .ys-container { display: grid; grid-template-columns: .6fr 1fr auto; gap: 32px; align-items: end; }
.ys-footer h2 { margin: 0; font-size: 22px; letter-spacing: .04em; text-transform: uppercase; }
.ys-footer p { margin: 0; font-size: 12px; line-height: 1.6; }

/* Product catalog: many families, never a single-product sheet. */
.page-products .ys-products-page-hero {
  grid-template-areas: "eyebrow lead" "title lead" "jump jump";
  grid-template-columns: .85fr 1.15fr;
  padding-top: 70px;
  padding-bottom: 58px;
  column-gap: 90px;
}
.page-products .ys-products-page-hero h1 { font-size: clamp(64px, 8vw, 112px); }
.page-products .ys-products-capabilities { display: none !important; }
.page-products .ys-products-jump { display: flex !important; border-top: 1px solid var(--ys-line); border-bottom: 1px solid var(--ys-line); }
.page-products .ys-products-jump p { flex: 1; }
.page-products .ys-products-jump a { padding: 18px 20px; border: 0; border-right: 1px solid var(--ys-line); border-radius: 0; background: transparent; font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 400; }
.page-products .ys-products-category { padding-top: 86px; padding-bottom: 96px; }
.page-products .ys-products-category > h2 { font-size: clamp(46px, 5vw, 70px); }
.page-products .ys-products-category__lead { margin-bottom: 42px; }
.page-products .ys-products-category .ys-page-grid { align-items: stretch; gap: 14px; border: 0; }
.page-products .ys-product-card { display: flex; height: 100%; flex-direction: column; padding: 0 0 24px; border: 0; background: #fff; }
.page-products .ys-product-card > :not(figure) { margin-right: 20px; margin-left: 20px; }
.page-products .ys-product-card .ys-page-image { aspect-ratio: 4 / 3; padding: 0; overflow: hidden; background: #fff; }
.page-products .ys-product-card .ys-page-image a { display: block; height: 100%; }
.page-products .ys-product-card .ys-page-image img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; }
.page-products .ys-product-card h3 { min-height: 2.4em; margin-bottom: 10px; font-size: 25px; }
.page-products .ys-product-card p { font-size: 14px; }
.page-products .ys-product-card > p:not(.ys-card__meta) { min-height: 3.3em; }
.page-products .ys-product-card .wp-block-buttons { margin-top: auto; }
.page-products .ys-product-card .wp-block-button__link { min-height: 0; padding: 0; border: 0; background: transparent; color: var(--ys-text); font-family: Arial, sans-serif; font-size: 12px; font-weight: 700; }

/* Product detail: one product and its evidence. */
.page-product-detail .ys-page-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1.22fr) minmax(360px, .78fr);
  grid-template-areas: "image eyebrow" "image title" "image lead";
  gap: 0 64px;
  align-items: center;
  min-height: 650px;
}
.page-product-detail .ys-page-hero > .ys-eyebrow { grid-area: eyebrow; align-self: end; }
.page-product-detail .ys-page-hero > h1 { grid-area: title; margin: 8px 0 20px; font-size: clamp(54px, 6vw, 88px); }
.page-product-detail .ys-page-hero > .ys-page-lead { grid-area: lead; align-self: start; }
.page-product-detail .ys-page-hero > .ys-page-image { grid-area: image; width: 100%; max-width: none; margin: 0; background: #fff; }
.page-product-detail .ys-page-hero > .ys-page-image img { width: 100%; height: 560px; max-height: none; object-fit: contain; }
.page-product-detail .ys-page-section:first-of-type { background: #ece9e1; }
.page-product-detail .ys-page-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.page-product-detail .ys-page-gallery figure:first-child { grid-column: span 2; }
.page-product-detail .ys-page-gallery img { height: 280px; aspect-ratio: auto; object-fit: contain; background: #fff; }
.page-product-detail .ys-page-gallery figure:first-child img { height: 574px; }
.page-product-detail .ys-page-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.page-product-detail .ys-page-grid--2 .ys-page-card:nth-child(2n) { border-right: 0; }
.page-product-detail .ys-page-grid--2 .ys-page-card:nth-child(-n+2) { border-bottom: 1px solid var(--ys-line); }
.page-product-detail .ys-application-card { min-height: 420px; border: 0; border-radius: 0; }

/* OEM / ODM: sequential route and real production evidence. */
.page-custom-service .ys-compact-hero { grid-template-columns: 1.12fr .88fr; padding-top: 76px; padding-bottom: 76px; }
.page-custom-service .ys-compact-hero h1 { font-size: clamp(62px, 7vw, 102px); line-height: .86; }
.page-custom-service .ys-compact-facts { display: block; border: 0; border-top: 1px solid var(--ys-line); border-radius: 0; background: transparent; }
.page-custom-service .ys-compact-fact { min-height: 0; padding: 18px 0; border: 0; border-bottom: 1px solid var(--ys-line); }
.page-custom-service .ys-page-section:first-of-type .ys-page-gallery { grid-template-columns: 1.5fr .75fr .75fr; }
.page-custom-service .ys-page-section:first-of-type .ys-page-gallery figure:first-child { grid-row: span 2; }
.page-custom-service .ys-page-section:first-of-type .ys-page-gallery img { height: 100%; min-height: 260px; }
.page-custom-service .ys-page-grid--4 .ys-page-card { position: relative; padding-top: 72px; }
.page-custom-service .ys-page-grid--4 .ys-page-card::before { content: counter(oem-step, decimal-leading-zero); position: absolute; top: 22px; color: var(--ys-accent); font-family: Georgia, "Times New Roman", serif; font-size: 30px; }
.page-custom-service .ys-page-grid--4 { counter-reset: oem-step; }
.page-custom-service .ys-page-grid--4 .ys-page-card { counter-increment: oem-step; }

/* About: company facts are editorial evidence, not floating cards. */
.page-about .ys-about-intro { grid-template-columns: .9fr 1.1fr; }
.page-about .ys-about-intro h1 { font-size: clamp(58px, 7vw, 98px); line-height: .88; }
.page-about .ys-compact-facts { display: block; border: 0; border-top: 1px solid var(--ys-line); border-radius: 0; background: transparent; }
.page-about .ys-compact-fact { min-height: 0; padding: 17px 0; border: 0; border-bottom: 1px solid var(--ys-line); }
.page-about .ys-about-factory { background: var(--ys-dark) !important; }
.page-about .ys-about-factory .ys-page-gallery { grid-template-columns: 1.4fr .8fr .8fr; }
.page-about .ys-about-factory .ys-page-gallery figure:first-child { grid-row: span 2; }
.page-about .ys-about-factory .ys-page-gallery img { height: 100%; min-height: 330px; }

/* Knowledge: publication hierarchy, not a uniform blog-card wall. */
.page-knowledge .ys-page-hero { padding-bottom: 50px; border-bottom: 1px solid var(--ys-line); }
.page-knowledge .ys-page-hero h1 { font-size: clamp(70px, 9vw, 126px); }
.page-knowledge .ys-page-hero + .ys-page-section .ys-page-grid--3 { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: stretch; gap: 28px 20px; border: 0; }
.page-knowledge .ys-knowledge-card { display: flex; grid-column: span 3; height: 100%; flex-direction: column; padding: 0; border: 0; background: transparent; }
.page-knowledge .ys-knowledge-card:first-child { grid-column: span 6; grid-row: span 2; }
.page-knowledge .ys-knowledge-card:nth-child(6) { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr); column-gap: 38px; align-items: center; padding-top: 28px; border-top: 1px solid var(--ys-line); }
.page-knowledge .ys-knowledge-card:nth-child(6) .ys-page-image { grid-row: 1 / span 5; margin-bottom: 0; }
.page-knowledge .ys-knowledge-card > :not(figure) { margin-right: 0; margin-left: 0; }
.page-knowledge .ys-knowledge-card .ys-page-image { margin-bottom: 20px; }
.page-knowledge .ys-knowledge-card .ys-page-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.page-knowledge .ys-knowledge-card:first-child .ys-page-image img { aspect-ratio: 16 / 11; }
.page-knowledge .ys-knowledge-card h3 { font-size: 27px; }
.page-knowledge .ys-knowledge-card:first-child h3 { font-size: 42px; }
.page-knowledge .ys-knowledge-card .wp-block-buttons { margin-top: auto; padding-top: 12px; }
.page-knowledge .ys-knowledge-steps { gap: 0; border-top: 1px solid var(--ys-line); border-bottom: 1px solid var(--ys-line); }
.page-knowledge .ys-knowledge-step { border: 0; border-right: 1px solid var(--ys-line); border-radius: 0; background: transparent; }
.page-knowledge .ys-knowledge-step figure { aspect-ratio: 4 / 3; overflow: hidden; }
.page-knowledge .ys-knowledge-step figure img { width: 100%; height: 100%; object-fit: cover; }

/* Contact: compact procurement flow. */
.page-contact .ys-contact-intro { padding-bottom: 54px; }
.page-contact .ys-contact-intro h1 { font-size: clamp(60px, 7vw, 96px); line-height: .87; }
.page-contact .ys-compact-facts { display: block; border: 0; border-top: 1px solid var(--ys-line); border-radius: 0; background: transparent; }
.page-contact .ys-compact-fact { min-height: 0; padding: 15px 0; border: 0; border-bottom: 1px solid var(--ys-line); }
.page-contact .ys-contact-intro + .ys-page-section { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 64px; align-items: start; padding-top: 64px; padding-bottom: 72px; background: #ece9e1; }
.page-contact .ys-contact-form { gap: 18px 22px; max-width: none; margin: 0; }
.page-contact .ys-contact-form input,
.page-contact .ys-contact-form select,
.page-contact .ys-contact-form textarea { padding: 15px; border-radius: 0; background: rgba(255,255,255,.72); }
.page-contact .ys-contact-form label:nth-child(7),
.page-contact .ys-contact-form button,
.page-contact .ys-contact-form p { grid-column: 1 / -1; }
.page-contact .ys-contact-checklist { position: sticky; top: 110px; padding: 30px; border: 1px solid var(--ys-line); background: rgba(255,255,255,.55); }
.page-contact .ys-contact-checklist h2 { margin-bottom: 22px; font-size: clamp(30px, 3vw, 46px); line-height: 1; }
.page-contact .ys-contact-checklist ol { margin: 0; padding: 0; border-top: 1px solid var(--ys-line); list-style: none; }
.page-contact .ys-contact-checklist li { display: grid; grid-template-columns: 42px 1fr; padding: 13px 0; border: 0; border-bottom: 1px solid var(--ys-line); border-radius: 0; background: transparent; font-weight: 500; }
.page-contact .ys-contact-checklist li span { color: var(--ys-accent); font-family: Georgia, "Times New Roman", serif; }
.page-contact .ys-contact-checklist li::before { display: none; }
.page-contact .ys-contact-checklist .ys-page-note { margin: 22px 0 0; padding-left: 14px; border-left: 2px solid var(--ys-accent); color: var(--ys-muted); font-size: 14px; }

/* Articles and legal pages stay calm and readable. */
.page-article .ys-page-hero,
.page-document .ys-page-hero { padding-bottom: 48px; border-bottom: 1px solid var(--ys-line); }
.page-article .ys-page-prose,
.page-document .ys-page-prose { max-width: 900px; margin-inline: auto; font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.8; }

@media (max-width: 1050px) {
  .ys-container { width: min(calc(100% - 40px), var(--ys-width)); }
  .page-product-detail .ys-page-hero { grid-template-columns: 1fr; grid-template-areas: "eyebrow" "title" "lead" "image"; gap: 0; }
  .page-product-detail .ys-page-hero > .ys-page-image { margin-top: 38px; }
  .page-knowledge .ys-page-hero + .ys-page-section .ys-page-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-knowledge .ys-knowledge-card,
  .page-knowledge .ys-knowledge-card:first-child { grid-column: span 1; grid-row: auto; }
  .page-knowledge .ys-knowledge-card:first-child,
  .page-knowledge .ys-knowledge-card:nth-child(6) { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .ys-container { width: min(calc(100% - 28px), var(--ys-width)); }
  .ys-topbar { display: block; }
  .ys-topbar__inner { display: block !important; min-height: 0; padding: 7px 0; text-align: center; }
  .ys-topbar__inner > p:first-child { display: none; }
  .ys-language-switch { margin: 0; white-space: nowrap; }
  .ys-header__inner { min-height: 70px; padding: 14px 0; flex-wrap: wrap !important; }
  .ys-brand h2 { font-size: 18px; }
  .ys-nav { display: block !important; width: 100%; margin: 8px 0 0; order: 3; overflow-x: auto; }
  .ys-nav .wp-block-navigation__container { display: flex; width: max-content; min-width: 100%; gap: 22px; padding: 10px 0 2px; }
  .ys-nav a { font-size: 12px; }
  .ys-page-hero,
  .ys-page-section,
  .ys-page-cta { padding-right: 18px; padding-left: 18px; }
  .ys-page-hero { padding-top: 48px; padding-bottom: 52px; }
  .ys-page-hero h1 { font-size: clamp(44px, 15vw, 68px); }
  .ys-page-section { padding-top: 72px; padding-bottom: 78px; }
  .ys-page-grid { border-bottom: 0; }
  .ys-page-card { padding: 26px 0; border-right: 0; border-bottom: 1px solid var(--ys-line); }
  .ys-page-cta { display: block !important; }
  .ys-page-cta .wp-block-buttons { margin-top: 26px; }
  .ys-footer .ys-container { display: block; }
  .ys-footer p { margin-top: 16px; }
  .page-products .ys-products-page-hero { display: block !important; }
  .page-products .ys-products-jump { display: block !important; }
  .page-products .ys-products-jump a { border-right: 0; border-bottom: 1px solid var(--ys-line); }
  .page-products .ys-product-card h3,
  .page-products .ys-product-card > p:not(.ys-card__meta) { min-height: 0; }
  .page-product-detail .ys-page-hero > .ys-page-image img { height: auto; aspect-ratio: 4 / 3; }
  .page-product-detail .ys-page-gallery { grid-template-columns: 1fr; }
  .page-product-detail .ys-page-gallery figure:first-child { grid-column: auto; }
  .page-product-detail .ys-page-gallery figure:first-child img,
  .page-product-detail .ys-page-gallery img { height: auto; aspect-ratio: 4 / 3; }
  .page-custom-service .ys-page-section:first-of-type .ys-page-gallery,
  .page-about .ys-about-factory .ys-page-gallery,
  .page-knowledge .ys-page-hero + .ys-page-section .ys-page-grid--3 { grid-template-columns: 1fr; }
  .page-knowledge .ys-knowledge-card,
  .page-knowledge .ys-knowledge-card:first-child,
  .page-knowledge .ys-knowledge-card:nth-child(6) { display: flex; grid-column: 1; }
  .page-knowledge .ys-knowledge-card:nth-child(6) .ys-page-image { margin-bottom: 20px; }
  .page-custom-service .ys-compact-hero,
  .page-about .ys-about-intro,
  .page-contact .ys-contact-intro { grid-template-columns: 1fr; gap: 34px; }
  .page-contact .ys-contact-intro + .ys-page-section { grid-template-columns: 1fr; gap: 42px; }
  .page-contact .ys-contact-checklist { position: static; }
  .page-custom-service .ys-compact-hero h1,
  .page-about .ys-about-intro h1,
  .page-contact .ys-contact-intro h1 { font-size: clamp(44px, 14vw, 66px); }
  .page-knowledge .ys-knowledge-steps { grid-template-columns: 1fr; }
  .page-contact .ys-contact-form { display: block; }
  .page-contact .ys-contact-form label,
  .page-contact .ys-contact-form button,
  .page-contact .ys-contact-form p { margin-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
