/*
 * Base: reset, type, buttons, icons, pictures, and the shared frame (ribbon, header, mobile menu,
 * language switcher, footer, legal line). The sections of "Filo d'oro" are in components.css.
 * Ported from the approved drafts (drafts/prove/home.html, camera-family.html).
 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--imh-white);
	color: var(--imh-ink);
	font-family: var(--imh-font-body);
	font-weight: 300;
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--imh-accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--imh-font-display); font-weight: 400; line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: .01em; }
p { margin: 0; }
b, strong { font-weight: 500; }
.imh-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* CJK and Cyrillic: Marcellus has neither. Cyrillic falls back to the serif of the system; CJK uses system fonts, no letter-spacing on headings. */
:lang(ru) h1, :lang(ru) h2, :lang(ru) h3, :lang(ru) .imh-brand__name { font-family: "Marcellus", "Palatino Linotype", "Book Antiqua", Georgia, serif; }
:lang(zh) body, :lang(zh) h1, :lang(zh) h2, :lang(zh) h3 { font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", var(--imh-font-body); }
:lang(ja) body, :lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, "Noto Sans JP", var(--imh-font-body); word-break: auto-phrase; }
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3, :lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { letter-spacing: .02em; font-weight: 500; line-height: 1.3; }
:lang(zh) .imh-eyebrow, :lang(ja) .imh-eyebrow { letter-spacing: .12em; }

.imh-container { max-width: var(--imh-max); margin-inline: auto; padding-left: var(--imh-gutter); padding-right: var(--imh-gutter-r); }
.imh-section { position: relative; padding-block: var(--imh-section); }
.imh-eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--imh-gold-deep); }
.imh-lead { font-size: clamp(18px, 1.6vw, 20px); color: var(--imh-muted); max-width: 60ch; }
.imh-bg--warm { background: var(--imh-warm); }
.imh-bg--sand { background: var(--imh-sand); }

/* ---------- buttons, links, icons ---------- */
.imh-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 48px; padding: 0 26px;
	font: 500 13px/1 var(--imh-font-body); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; text-align: center;
	border: 1px solid transparent; cursor: pointer;
	transition: background-color .35s, color .35s, border-color .35s;
}
.imh-btn--accent { background: var(--imh-accent); color: var(--imh-on-accent); }
.imh-btn--accent:hover { background: var(--imh-accent-deep); }
.imh-btn--ghost { border-color: currentColor; background: transparent; }
.imh-btn--light { background: var(--imh-white); color: var(--imh-accent); }
.imh-btn--light:hover { background: var(--imh-warm); }
.imh-btn--big { min-height: 60px; padding: 0 40px; font-size: 14px; }
.imh-btn--block { width: 100%; min-height: 56px; }
.imh-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--imh-accent); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.imh-link::after { content: "→"; letter-spacing: 0; transition: transform .45s var(--imh-ease); }
.imh-link:hover::after { transform: translateX(4px); }
.imh-link--light { color: var(--imh-white); border-color: var(--imh-gold); }
.imh-icon { width: 26px; height: 26px; flex: none; stroke: var(--imh-gold); fill: none; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- pictures: protected from casual copying (no drag, no "Save image") ---------- */
.imh-pic { display: block; position: relative; overflow: hidden; -webkit-touch-callout: none; user-select: none; }
.imh-pic img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.imh-pic--missing { display: flex; align-items: center; justify-content: center; min-height: 200px; height: 100%; background: var(--imh-sand); color: var(--imh-muted); font-size: 13px; letter-spacing: .1em; }

.imh-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--imh-white); padding: 10px 16px; }
.imh-skip:focus { left: 8px; }

/* ---------- header: solid by default; transparent over an opening photo (body.imh-over) until it scrolls ---------- */
.imh-head { position: sticky; top: 0; z-index: 50; color: var(--imh-ink); background: var(--imh-white); transition: color .35s, background-color .35s; }
.imh-over .imh-head { position: fixed; left: 0; right: 0; background: transparent; color: var(--imh-white); }
.imh-ribbon { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 10px; background: var(--imh-warm); font-size: 12.5px; letter-spacing: .04em; padding: 7px var(--imh-gutter-r) 7px var(--imh-gutter); text-align: center; transition: background-color .35s; }
.imh-over .imh-ribbon { background: rgba(20, 18, 16, .38); }
.imh-ribbon strong { font-weight: 500; letter-spacing: .14em; text-transform: uppercase; font-size: 11px; }
.imh-ribbon a { color: inherit; }
.imh-nav { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; min-height: 84px; padding-left: max(32px, var(--imh-gutter)); padding-right: max(32px, var(--imh-gutter-r)); border-bottom: 1px solid var(--imh-line); transition: background-color .35s, border-color .35s; }
.imh-over .imh-nav { border-color: rgba(255, 255, 255, .22); }
.imh-over .imh-head.is-solid, .imh-over .imh-head:hover, .imh-over .imh-head:focus-within { color: var(--imh-ink); background: var(--imh-white); }
.imh-over .imh-head.is-solid .imh-ribbon, .imh-over .imh-head:hover .imh-ribbon, .imh-over .imh-head:focus-within .imh-ribbon { background: var(--imh-warm); }
.imh-over .imh-head.is-solid .imh-nav, .imh-over .imh-head:hover .imh-nav, .imh-over .imh-head:focus-within .imh-nav { border-color: var(--imh-line); }
.imh-nav__links { display: flex; flex-wrap: wrap; gap: 8px 26px; list-style: none; margin: 0; padding: 0; }
.imh-nav__links a { position: relative; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; padding-block: 6px; }
.imh-nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--imh-gold); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--imh-ease); }
.imh-nav__links a:hover::after, .imh-nav__links a:focus-visible::after, .imh-nav__links a[aria-current]::after { transform: scaleX(1); }
.imh-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.imh-brand__words { display: flex; flex-direction: column; align-items: center; text-align: center; }
.imh-brand__name { font-family: var(--imh-font-display); font-size: 25px; letter-spacing: .32em; margin-right: -.32em; line-height: 1; text-transform: uppercase; }
.imh-brand__sub { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; margin-top: 7px; opacity: .9; white-space: nowrap; }
.imh-monogram { width: 38px; height: 38px; flex: none; color: var(--imh-gold); }
.imh-over .imh-head:not(.is-solid):not(:hover):not(:focus-within) .imh-monogram { color: currentColor; }
.imh-monogram circle { fill: none; stroke: currentColor; stroke-width: 1; }
.imh-monogram text { font-family: var(--imh-font-display); font-size: 13px; fill: currentColor; letter-spacing: .06em; }
.imh-nav__actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.imh-head__short { display: none; }
.imh-menu-btn { display: none; background: none; border: 1px solid currentColor; color: inherit; min-height: 44px; padding: 0 14px; font: 500 12px/1 var(--imh-font-body); letter-spacing: .2em; text-transform: uppercase; cursor: pointer; }

/* language switcher: current code, list in a dropdown */
.imh-langs { position: relative; }
.imh-langs summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px; cursor: pointer; font-size: 12px; letter-spacing: .2em; }
.imh-langs summary::-webkit-details-marker { display: none; }
.imh-langs summary .imh-icon { width: 18px; height: 18px; stroke: currentColor; }
.imh-langs__list { position: absolute; right: 0; top: 100%; min-width: 200px; margin: 0; padding: 8px 0; list-style: none; background: var(--imh-white); color: var(--imh-ink); border: 1px solid var(--imh-line); box-shadow: 0 24px 50px -30px rgba(42, 38, 34, .5); }
.imh-langs__list a, .imh-menu__langs a, .imh-foot__langs a { display: flex; gap: 12px; align-items: baseline; text-decoration: none; }
.imh-langs__list a { padding: 8px 18px; font-size: 14px; }
.imh-langs__list a:hover { background: var(--imh-warm); }
.imh-langs__list b, .imh-menu__langs b { font-weight: 500; font-size: 11px; letter-spacing: .16em; min-width: 22px; color: var(--imh-gold-deep); }
.imh-langs__list [aria-current] span { font-weight: 500; }

/* mobile menu */
.imh-menu { display: none; }
.imh-menu__langs { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.imh-menu__langs a { padding: 8px 0; font-size: 14px; }
.imh-menu__langs [aria-current] span { font-weight: 500; }

/* ---------- footer ---------- */
.imh-foot { background: var(--imh-ink); color: #E9E2D6; padding-block: clamp(64px, 8vw, 100px) clamp(40px, 6vw, 72px); font-size: 14.5px; }
.imh-foot a { color: #E9E2D6; text-decoration: none; }
.imh-foot a:hover { color: var(--imh-white); text-decoration: underline; }
.imh-foot .imh-brand { color: var(--imh-white); justify-content: flex-start; }
.imh-foot .imh-brand__words { align-items: flex-start; text-align: left; }
.imh-foot .imh-brand__sub { color: #BEB5A7; }
.imh-foot .imh-monogram { color: var(--imh-gold); }
.imh-foot__addr { margin-top: 22px; line-height: 1.8; }
.imh-foot__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; }
.imh-foot__title { font-family: var(--imh-font-body); font-size: 11.5px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--imh-gold-soft); margin-bottom: 14px; }
.imh-foot__list, .imh-sisters-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.imh-foot__book { color: var(--imh-gold-soft) !important; }
.imh-sisters-list a[aria-current] { text-decoration: underline; }
.imh-civic { display: inline-block; min-width: 28px; margin-right: 10px; padding: 0 4px; text-align: center; border: 1px solid rgba(228, 214, 189, .6); color: var(--imh-gold-soft); font-size: 12px; }
.imh-foot__langs { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; letter-spacing: .14em; }
.imh-foot__langs span { display: none; }
.imh-foot__langs [aria-current] { color: var(--imh-gold-soft); }
.imh-legal { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(233, 226, 214, .18); font-size: 13px; color: #BEB5A7; line-height: 1.7; }
.imh-foot__links { margin-top: 12px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 18px; color: #BEB5A7; }

/* ---------- base sections ---------- */
.imh-pagehead { padding-bottom: clamp(32px, 5vw, 64px); }
.imh-pagehead__title { font-size: clamp(40px, 5vw, 68px); margin-top: 14px; max-width: 20ch; }
.imh-pagehead .imh-lead { margin-top: 20px; }
.imh-prose .imh-container { max-width: 800px; }
.imh-prose h2 { font-size: clamp(26px, 2.6vw, 36px); margin: 0 0 .6em; }
.imh-prose p + p { margin-top: 1em; }
.imh-soon { min-height: 62vh; display: flex; align-items: center; }
.imh-soon .imh-container { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.imh-soon__name { font-size: clamp(44px, 7vw, 96px); letter-spacing: .06em; }
.imh-soon__class { font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--imh-gold-deep); }
.imh-soon .imh-lead { margin-top: 18px; color: var(--imh-ink); }

/* ---------- a long menu (more than five pages): tighter, and the menu button takes over below 1600 px ---------- */
.imh-nav--many .imh-nav__links { gap: 6px 20px; }
.imh-nav--many .imh-nav__links a { font-size: 12.5px; letter-spacing: .15em; }
@media (min-width: 961px) and (max-width: 1599px) {
	.imh-nav--many .imh-nav__main { display: none; }
	.imh-nav--many .imh-brand { grid-column: 2; }
	.imh-nav--many .imh-nav__actions { grid-column: 3; }
	.imh-nav--many .imh-menu-btn { display: inline-flex; align-items: center; }
	.imh-nav--many .imh-menu { position: absolute; left: 0; right: 0; top: 100%; background: var(--imh-white); color: var(--imh-ink); border-bottom: 1px solid var(--imh-line); padding: 8px var(--imh-gutter-r) 22px var(--imh-gutter); max-height: calc(100svh - 110px); overflow-y: auto; }
	.imh-nav--many .imh-menu:not([hidden]) { display: block; }
	.imh-nav--many .imh-menu nav a { display: block; padding: 13px 0; border-bottom: 1px solid var(--imh-line); text-decoration: none; letter-spacing: .18em; text-transform: uppercase; font-size: 13px; }
	.imh-nav--many .imh-menu nav a[aria-current] { color: var(--imh-gold-deep); }
}

/* ---------- responsive frame ---------- */
@media (max-width: 1100px) {
	.imh-nav__links { gap: 8px 18px; }
	.imh-nav__links a { letter-spacing: .14em; }
	.imh-foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
	.imh-nav { grid-template-columns: minmax(0, 1fr) auto; min-height: 72px; }
	.imh-nav__main, .imh-langs, .imh-nav__spacer { display: none; }
	.imh-brand__words { align-items: flex-start; text-align: left; }
	.imh-menu-btn { display: inline-flex; align-items: center; }
	.imh-menu { position: absolute; left: 0; right: 0; top: 100%; background: var(--imh-white); color: var(--imh-ink); border-bottom: 1px solid var(--imh-line); padding: 8px var(--imh-gutter-r) 22px var(--imh-gutter); max-height: calc(100svh - 110px); overflow-y: auto; }
	.imh-menu:not([hidden]) { display: block; }
	.imh-menu nav a { display: block; padding: 13px 0; border-bottom: 1px solid var(--imh-line); text-decoration: none; letter-spacing: .18em; text-transform: uppercase; font-size: 13px; }
	.imh-menu nav a[aria-current] { color: var(--imh-gold-deep); }
}
@media (max-width: 640px) {
	body { font-size: 16px; }
	.imh-nav { gap: 10px; padding-left: var(--imh-gutter); padding-right: var(--imh-gutter-r); min-height: 64px; }
	.imh-monogram, .imh-brand__city, .imh-ribbon__text { display: none; }
	.imh-ribbon { font-size: 11.5px; }
	.imh-brand__name { font-size: 19px; letter-spacing: .24em; }
	.imh-brand__sub { font-size: 9.5px; letter-spacing: .18em; }
	.imh-nav__actions { gap: 8px; }
	.imh-head__long { display: none; }
	.imh-head__short { display: inline; }
	.imh-head__book { white-space: nowrap; font-size: 11.5px; letter-spacing: .1em; padding: 0 12px; min-height: 44px; }
	.imh-menu-btn { padding: 0 10px; letter-spacing: .12em; }
	.imh-foot__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
	.imh-brand__sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
