/* Alformal: a tailoring house in ink, shirting white and brass. */
:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --alt: #f3f1ec;
  --mat: #f4f2ee;
  --ink: #15171d;
  --ink-2: #3b3f4a;
  --muted: #666a75;
  --line: #e4e0d8;
  --navy: #1a2336;
  --navy-2: #243049;
  --on-navy: #eef0f4;
  --on-navy-muted: #b6bccb;
  --brass: #86673a;
  --brass-light: #cfae78;
  --focus: #2a5bd7;
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1240px;
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; line-height: 1.05; }
h1 em, h2 em { font-style: italic; color: var(--brass); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; }
.skip:focus { left: 8px; }

.eyebrow { font-size: .74rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--brass); margin-bottom: 14px; }
.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 54ch; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 26px; border-radius: var(--radius); font-weight: 600; font-size: .92rem; letter-spacing: .04em; text-decoration: none; border: 1px solid var(--ink); transition: background .2s, color .2s; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--navy-2); border-color: var(--navy-2); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.link-arrow { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: .92rem; text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 6px; white-space: nowrap; }
.link-arrow::after { content: " \2192"; }

/* Notice + header */
.notice-bar { background: var(--navy); color: var(--on-navy-muted); font-size: .8rem; text-align: center; padding: 8px 20px; }
.notice-bar a { color: var(--on-navy); }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 250, 248, .96); backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 74px; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1; }
.brand-word { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; letter-spacing: .02em; }
.brand-tag { font-size: .62rem; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }
.site-nav > ul { display: flex; align-items: center; gap: 30px; list-style: none; }
.site-nav a { text-decoration: none; }
.nav-group { position: relative; }
.nav-heading, .nav-top { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; font-weight: 500; cursor: default; }
.nav-top { cursor: pointer; }
.nav-group > ul { list-style: none; position: absolute; top: 100%; left: -18px; min-width: 210px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(21, 23, 29, .09); padding: 10px 0; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; }
.nav-group:hover > ul, .nav-group:focus-within > ul { opacity: 1; visibility: visible; transform: none; }
.nav-group > ul a { display: block; padding: 9px 18px; font-size: .9rem; }
.nav-group > ul a:hover { background: var(--alt); }
.nav-heading::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: -4px 0 0 8px; }
.nav-toggle { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; background: none; border: 0; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 1.5px; background: currentColor; position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: fixed; inset: 0; top: 0; background: var(--bg); z-index: 60; padding: 90px 20px 40px; overflow-y: auto; }
  .nav-open .site-nav { display: block; }
  .nav-open .nav-toggle { position: fixed; top: 46px; right: 20px; z-index: 70; }
  .nav-open { overflow: hidden; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav > ul > li { border-bottom: 1px solid var(--line); padding: 14px 0; }
  .nav-group > ul { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 4px 0 0; background: none; min-width: 0; }
  .nav-group > ul a { padding: 10px 0; font-size: 1.05rem; }
  .nav-heading { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--brass); min-height: 0; }
  .nav-heading::after { display: none; }
  .nav-top { font-family: var(--serif); font-size: 1.5rem; }
}

/* Hero */
.hero { padding-block: 64px 72px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.8rem, 6.4vw, 5.1rem); margin-bottom: 22px; }
.hero h1 .eyebrow { display: block; font-family: var(--sans); line-height: 1.4; letter-spacing: .18em; }
.hero h1 .hero-title { display: block; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 14px; }
.mosaic-tile { position: relative; display: block; text-decoration: none; background: var(--mat); border-radius: var(--radius); overflow: hidden; }
.mosaic-img { display: block; aspect-ratio: 1 / 1; }
.mosaic-img img { width: 100%; height: 100%; object-fit: contain; padding: 18px; mix-blend-mode: multiply; transition: transform .5s; }
.mosaic-tile:hover img { transform: scale(1.03); }
.mosaic-label { position: absolute; left: 12px; bottom: 12px; background: var(--surface); padding: 7px 12px; font-size: .82rem; font-weight: 600; border-radius: var(--radius); }
.mosaic-label em { font-style: normal; font-weight: 400; color: var(--muted); }

/* Sections */
.section { padding-block: 80px; }
.section-tight { padding-block: 40px 80px; }
.section-alt { background: var(--alt); }
.section-head { margin-bottom: 36px; }
.section-head h2 { font-size: clamp(2rem, 3.8vw, 3rem); }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* Dress codes: a ruled list, not boxes */
.codes { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; counter-reset: code; }
.codes li { border-top: 2px solid var(--ink); padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.code-rank { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.codes h3 { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; }
.codes p { font-size: .95rem; color: var(--ink-2); }
.codes a { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: .9rem; text-decoration: none; border-bottom: 1px solid var(--brass); align-self: flex-start; }
.codes a::after { content: " \2192"; }

/* Category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
.cat-tile { text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.cat-img { display: block; aspect-ratio: 4 / 5; background: var(--mat); border-radius: var(--radius); overflow: hidden; margin-bottom: 8px; }
.cat-img img { width: 100%; height: 100%; object-fit: contain; padding: 20px; mix-blend-mode: multiply; transition: transform .5s; }
.cat-tile:hover img { transform: scale(1.04); }
.cat-name { font-family: var(--serif); font-size: 1.3rem; }
.cat-meta { font-size: .85rem; color: var(--muted); }

/* Product grid + cards */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 20px; }
.card { display: flex; flex-direction: column; background: transparent; }
.card-media { display: block; aspect-ratio: 4 / 5; background: var(--mat); border-radius: var(--radius); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 18px; mix-blend-mode: multiply; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; flex: 1; }
.card-brand { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.card-title { font-size: .98rem; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a { text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.card-cta { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brass); }

.rating { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--ink-2); }
.stars { position: relative; display: inline-block; width: 78px; height: 14px; background: linear-gradient(90deg, var(--brass) var(--pct), #d7d2c8 var(--pct)); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 78 14'%3E%3Cpath d='M7 0l2 4.6 5 .5-3.8 3.3 1.1 4.9L7 10.8 2.7 13.3l1.1-4.9L0 5.1l5-.5zM23 0l2 4.6 5 .5-3.8 3.3 1.1 4.9-4.3-2.5-4.3 2.5 1.1-4.9L16 5.1l5-.5zM39 0l2 4.6 5 .5-3.8 3.3 1.1 4.9-4.3-2.5-4.3 2.5 1.1-4.9L32 5.1l5-.5zM55 0l2 4.6 5 .5-3.8 3.3 1.1 4.9-4.3-2.5-4.3 2.5 1.1-4.9L48 5.1l5-.5zM71 0l2 4.6 5 .5-3.8 3.3 1.1 4.9-4.3-2.5-4.3 2.5 1.1-4.9L64 5.1l5-.5z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 78 14'%3E%3Cpath d='M7 0l2 4.6 5 .5-3.8 3.3 1.1 4.9L7 10.8 2.7 13.3l1.1-4.9L0 5.1l5-.5zM23 0l2 4.6 5 .5-3.8 3.3 1.1 4.9-4.3-2.5-4.3 2.5 1.1-4.9L16 5.1l5-.5zM39 0l2 4.6 5 .5-3.8 3.3 1.1 4.9-4.3-2.5-4.3 2.5 1.1-4.9L32 5.1l5-.5zM55 0l2 4.6 5 .5-3.8 3.3 1.1 4.9-4.3-2.5-4.3 2.5 1.1-4.9L48 5.1l5-.5zM71 0l2 4.6 5 .5-3.8 3.3 1.1 4.9-4.3-2.5-4.3 2.5 1.1-4.9L64 5.1l5-.5z'/%3E%3C/svg%3E") center / contain no-repeat; }
.rating-num { font-weight: 600; font-variant-numeric: tabular-nums; }
.rating-count { color: var(--muted); font-variant-numeric: tabular-nums; }

.price { display: inline-flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.price-now { font-weight: 600; font-size: 1.02rem; }
.price-was { color: var(--muted); font-size: .88rem; }

/* Fit band */
.band { background: var(--navy); color: var(--on-navy); padding-block: 84px; }
.band h2 em { color: var(--brass-light); }
.band .eyebrow { color: var(--brass-light); }
.band .lead { color: var(--on-navy-muted); margin-top: 18px; }
.band-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.band h2 { font-size: clamp(2rem, 3.8vw, 3rem); }
.fit-list { list-style: none; counter-reset: fit; display: grid; gap: 28px; }
.fit-list li { counter-increment: fit; display: grid; grid-template-columns: 52px 1fr; gap: 4px 16px; padding-top: 22px; border-top: 1px solid rgba(238, 240, 244, .18); }
.fit-list li::before { content: counter(fit, decimal-leading-zero); grid-row: span 2; font-family: var(--serif); font-size: 1.6rem; color: var(--brass-light); line-height: 1; }
.fit-list h3 { font-size: 1.05rem; font-weight: 600; }
.fit-list p { color: var(--on-navy-muted); font-size: .96rem; }

/* Guides */
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.guide-card { border-top: 1px solid var(--ink); padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.guide-card h2, .guide-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; line-height: 1.2; }
.guide-card a { text-decoration: none; }
.guide-card a:hover { color: var(--brass); }
.guide-card p { color: var(--ink-2); font-size: .95rem; }
.guide-date { font-size: .78rem; color: var(--muted); letter-spacing: .06em; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 56px; align-items: start; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 18px; padding: 20px 0; font-weight: 600; font-size: 1.02rem; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--serif); font-size: 1.5rem; line-height: 1; color: var(--brass); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 20px; color: var(--ink-2); max-width: 64ch; }

/* Page head, crumbs, chips */
.page-head { padding-block: 44px 34px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); margin: 10px 0 14px; }
.page-intro { color: var(--ink-2); max-width: 64ch; }
.page-intro p + p { margin-top: 10px; }
.result-count { margin-top: 18px; font-size: .85rem; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: .82rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; font-size: .86rem; text-decoration: none; background: var(--surface); }
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.empty { color: var(--muted); }
.pager, .nav-links { display: flex; justify-content: center; gap: 8px; margin-top: 48px; flex-wrap: wrap; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); text-decoration: none; font-variant-numeric: tabular-nums; }
.page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.screen-reader-text { position: absolute; left: -9999px; }

/* Product page */
.product { padding-block: 32px 72px; }
.product .crumbs { margin-bottom: 24px; }
.product-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: start; }
.gallery-main { background: var(--mat); border-radius: var(--radius); aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery-img { width: 100%; height: 100%; object-fit: contain; padding: 28px; mix-blend-mode: multiply; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; margin-top: 12px; }
.thumb { aspect-ratio: 1 / 1; background: var(--mat); border: 1px solid transparent; border-radius: var(--radius); padding: 6px; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.thumb.is-active { border-color: var(--ink); }
.buy-box { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 16px; }
.buy-brand { font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); font-weight: 600; }
.buy-title { font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 3.2vw, 2.6rem); line-height: 1.12; }
.buy-price { padding-block: 16px; border-block: 1px solid var(--line); }
.buy-price .price-now { font-size: 1.7rem; }
.price-note { margin-top: 6px; font-size: .8rem; color: var(--muted); }
.btn-buy { width: 100%; min-height: 56px; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.buy-note { font-size: .82rem; color: var(--muted); text-align: center; }
.buy-features h2 { font-family: var(--sans); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.buy-features ul { list-style: none; display: grid; gap: 9px; }
.buy-features li { position: relative; padding-left: 20px; font-size: .93rem; color: var(--ink-2); }
.buy-features li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 1.5px; background: var(--brass); }
.product-more { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 56px; margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--line); }
.product-more h2 { font-size: 1.9rem; margin-bottom: 18px; }
.full-title { margin-top: 20px; font-size: .86rem; color: var(--muted); }
.spec dl { margin: 0; }
.spec dl div { display: grid; grid-template-columns: 42% 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; }

/* Prose */
.prose { max-width: 70ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-top: 1.8em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.5em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose a { color: var(--ink); text-decoration-color: var(--brass); text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .94rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 600; }
.article-meta { color: var(--muted); font-size: .88rem; }
.page-404 { padding-block: 96px; text-align: left; }

/* Footer */
.site-footer { background: var(--ink); color: #d6d8de; padding-block: 64px 32px; }
.site-footer a { text-decoration: none; color: #d6d8de; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer-brand .brand-word { display: block; color: #fff; margin-bottom: 14px; }
.footer-brand p { color: #a4a8b3; font-size: .92rem; max-width: 36ch; }
.footer-heading { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--brass-light); margin-bottom: 14px; font-weight: 600; }
.site-footer ul { list-style: none; display: grid; gap: 4px; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 36px; font-size: .92rem; }
.footer-base { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .8rem; color: #8d919c; }
.footer-base p:first-child { max-width: 80ch; }

/* Responsive */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .codes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero-grid, .band-grid, .faq-grid, .product-grid, .product-more { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding-block: 40px 52px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-grid { grid-template-columns: 1fr; }
  .buy-box { position: static; }
  .section { padding-block: 60px; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .codes { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .card-media img, .cat-img img { padding: 12px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .gallery-img { padding: 16px; }
}
