@font-face {
  font-family: "Barlow Condensed";
  src: url("/assets/barlow-condensed-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/assets/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f5f0;
  --surface: #fffdf8;
  --ink: #262225;
  --muted: #625960;
  --rule: #ded7d4;
  --berry: #792541;
  --berry-dark: #611a33;
  --rose: #f1e4e8;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 30px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--body); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, h4 { margin: 0; }
p { color: var(--muted); }
h2, .featured-title { font: 800 clamp(2.5rem, 4.2vw, 4rem)/.98 var(--display); letter-spacing: -.025em; }
svg { flex: none; width: 1.15em; height: 1.15em; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid #a73760; outline-offset: 4px; }
.wrap { width: min(100% - 80px, 1260px); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--rule); }
.header-inner { min-height: 74px; display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.035em; white-space: nowrap; }
.brand img { width: 37px; height: 37px; }
.brand b { color: var(--berry); }
.header-nav, .header-actions { display: flex; align-items: center; gap: clamp(14px, 3vw, 36px); }
.header-nav { font-size: .91rem; font-weight: 600; }
.header-nav a:hover, .footer-inner nav a:hover { color: var(--berry); text-decoration: underline; text-underline-offset: .23em; }
.header-actions { gap: 14px; }

.button {
  display: inline-flex; min-height: 49px; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 17px; border: 1px solid transparent; border-radius: 7px;
  font-weight: 700; font-size: .89rem; line-height: 1.25; text-align: center;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.button--primary { background: var(--berry); color: white; }
.button--primary:hover { background: var(--berry-dark); }
.button--outline { border-color: #cbbec3; background: transparent; color: var(--ink); }
.button--outline:hover { border-color: var(--berry); color: var(--berry); background: #fbf7f7; }
.button--light { background: #fff8f4; color: var(--berry-dark); }
.button--light:hover { background: #f2dfe7; }
.header-cta { min-height: 39px; padding: 8px 12px; }

details { position: relative; }
summary {
  display: flex; align-items: center; gap: 8px; list-style: none;
  cursor: pointer; user-select: none; font-size: .9rem; font-weight: 700;
}
summary::-webkit-details-marker { display: none; }
summary svg:last-child { transition: transform .15s ease; }
details[open] summary svg:last-child { transform: rotate(180deg); }
.language-menu summary { min-height: 40px; padding: 0 5px; }
.language-list, .category-list {
  position: absolute; z-index: 4; top: calc(100% + 9px); right: 0;
  margin: 0; padding: 5px; list-style: none;
  border: 1px solid var(--rule); border-radius: 9px; background: var(--surface);
  box-shadow: 0 8px 28px #3b182b20;
}
.language-list { width: 165px; }
.language-list a, .category-list a { display: flex; padding: 9px 11px; border-radius: 5px; font-size: .9rem; }
.language-list a:hover, .category-list a:hover, .language-list a[aria-current] { background: var(--rose); color: var(--berry-dark); }

.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; min-height: 526px; margin-top: 30px; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
.hero-content { min-width: 0; display: flex; align-items: flex-start; flex-direction: column; justify-content: center; padding: clamp(26px, 4.6vw, 72px); background: var(--surface); }
.hero h1 { font: 800 clamp(4.05rem, 7.4vw, 7.15rem)/.86 var(--display); letter-spacing: -.035em; }
.hero h1 span, .hero h1 em { display: block; }
.hero h1 em { margin-top: .045em; color: var(--berry); font-style: normal; }
.hero p { max-width: 38ch; margin-top: 25px; font-size: clamp(.97rem, 1.2vw, 1.09rem); line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.hero-media { position: relative; min-height: 100%; background: #232125; }
.hero-media img { width: 100%; height: 100%; position: absolute; object-fit: cover; object-position: center; }

.catalog { padding-block: 66px; }
.section-heading p { max-width: 62ch; margin-top: 12px; }
.catalog-heading { display: flex; justify-content: space-between; align-items: end; gap: 22px; padding-bottom: 23px; border-bottom: 1px solid var(--rule); }
.category-menu summary { min-height: 48px; padding: 11px 15px; border: 1px solid var(--rule); border-radius: 7px; background: var(--surface); }
.category-menu summary:hover, .category-menu[open] summary { border-color: var(--berry); color: var(--berry); }
.category-menu summary span { min-width: 128px; }
.category-list { width: min(315px, calc(100vw - 36px)); max-height: min(56vh, 432px); overflow-y: auto; overscroll-behavior: contain; }
.category-list a { justify-content: space-between; align-items: center; gap: 12px; }
.category-list svg { color: var(--berry); }
.featured-title { margin-block: 25px 15px; font-size: clamp(1.7rem, 3vw, 2.35rem); }
.featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.featured-card { display: flex; }
.featured-card a { display: flex; flex-direction: column; width: 100%; background: var(--surface); border: 1px solid var(--rule); border-radius: 11px; overflow: hidden; }
.featured-card a:hover { border-color: var(--berry); }
.featured-card img { width: 100%; aspect-ratio: 1.52; object-fit: cover; background: #252126; }
.card-content { display: flex; flex-direction: column; flex: 1; gap: 7px; padding: 19px; }
.card-content h4 { font: 800 1.8rem/1.03 var(--display); }
.card-content p { flex: 1; font-size: .92rem; }
.card-content span { display: flex; gap: 7px; align-items: center; margin-top: 7px; font-size: .85rem; font-weight: 700; color: var(--berry); }

.guide { padding-block: 43px 50px; border-top: 1px solid var(--rule); }
.fit-tool { margin-top: 23px; padding: clamp(19px, 3vw, 35px); border-radius: 12px; background: var(--rose); }
.fit-tool h2, .fit-tool h3 { font: 800 clamp(1.8rem, 3vw, 2.65rem)/1 var(--display); }
.fit-tool p { margin-top: 8px; }
.fit-tool__form { margin-top: 17px; }
.fit-tool__rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fit-tool__row { min-width: 0; margin: 0; padding: 10px 12px 12px; border: 1px solid #c9adb8; border-radius: 8px; }
.fit-tool__row legend { padding: 0 6px; font-size: .92rem; font-weight: 700; }
.fit-tool__fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(75px, .72fr) minmax(0, 1.7fr); gap: 7px; }
.fit-tool__field { display: grid; align-content: start; gap: 4px; font-size: .8rem; font-weight: 700; min-width: 0; }
.fit-tool :is(input, select) { display: block; width: 100%; min-width: 0; min-height: 42px; border: 1px solid #bd9eaa; border-radius: 5px; background: var(--surface); color: var(--ink); padding: 6px; font-size: .85rem; }
.fit-tool__actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 13px; }
.fit-tool__submit { display: inline-flex; align-items: center; padding: 8px 14px; min-height: 42px; border: 1px solid transparent; border-radius: 6px; background: var(--berry); color: white; font-weight: 700; cursor: pointer; }
.fit-tool__submit:hover { background: var(--berry-dark); }
.fit-tool__feedback { margin-top: 8px; }
.fit-tool__result { color: var(--berry-dark); font-weight: 700; }
.fit-tool__detail, .fit-tool__note { font-size: .85rem; }
.tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 24px; }
.tips article { padding: 17px 0 0; border-top: 1px solid var(--rule); }
.tips svg { width: 23px; height: 23px; color: var(--berry); }
.tips h3 { margin-top: 5px; font: 800 1.48rem/1.05 var(--display); }
.tips p { margin-top: 6px; font-size: .92rem; }

.final { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 58px; padding: clamp(23px, 4vw, 48px); border-radius: 12px; background: var(--berry); color: white; }
.final h2 { font-size: clamp(2.25rem, 4vw, 3.65rem); }
.final p { max-width: 54ch; margin-top: 10px; color: #f5e7ed; }
.final .button { flex: none; }

.site-footer { padding-block: 25px 33px; border-top: 1px solid var(--rule); }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.footer-inner p { margin-top: 8px; font-size: .82rem; }
.footer-inner nav { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 8px; font-size: .84rem; font-weight: 600; }
.footer-inner nav a { display: inline-flex; gap: 4px; align-items: center; }
.missing { padding-block: 15vh; }
.missing h1 { font: 800 4rem/.95 var(--display); margin-bottom: 20px; }

@media (max-width: 1050px) {
  .wrap { width: calc(100% - 52px); }
  .hero { min-height: 440px; }
  .hero-content { padding: clamp(24px, 4vw, 48px); }
  .hero h1 { font-size: clamp(3.75rem, 8vw, 6.2rem); }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { min-height: 64px; gap: 7px; }
  .header-nav, .header-cta { display: none; }
  .hero { grid-template-columns: 1fr; margin-top: 17px; }
  .hero-content { padding: 30px 23px 29px; }
  .hero h1 { font-size: clamp(3.65rem, 11vw, 5.65rem); }
  .hero p { margin-top: 17px; }
  .hero-actions { margin-top: 18px; }
  .hero-media { min-height: auto; aspect-ratio: 1.29; }
  .catalog { padding-block: 43px; }
  .catalog-heading { align-items: start; flex-direction: column; gap: 14px; }
  .category-list { left: 0; right: auto; }
  .featured-grid { grid-template-columns: 1fr; gap: 12px; }
  .featured-card a { display: grid; grid-template-columns: minmax(0, .87fr) minmax(0, 1fr); }
  .featured-card img { aspect-ratio: auto; height: 100%; min-height: 156px; }
  .card-content { padding: 14px; }
  .card-content h4 { font-size: 1.55rem; }
  .card-content p { font-size: .86rem; }
  .fit-tool__rows, .tips { grid-template-columns: 1fr; }
  .tips { gap: 14px; }
  .final, .footer-inner { align-items: flex-start; flex-direction: column; }
  .final { margin-bottom: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
