/* Bernardin auction — built on the Broadsheet design system (tokens + the
   components this page uses), retuned to the clean blue-and-white palette
   from the design handoff. No image or text effects. */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --color-bg: #ffffff;
  --color-surface: oklch(0.97 0.012 250);
  --color-text: oklch(0.24 0.05 258);
  --color-divider: oklch(0.24 0.05 258 / 0.14);
  --color-accent: oklch(0.42 0.12 258);
  --color-accent-100: oklch(0.95 0.02 250);
  --color-accent-400: oklch(0.52 0.12 255);
  --color-accent-600: oklch(0.36 0.11 259);
  --color-accent-700: oklch(0.32 0.1 260);
  --color-accent-800: oklch(0.27 0.085 260);
  --color-muted: color-mix(in srgb, var(--color-text) 70%, transparent);

  --font-heading: "Source Serif 4", system-ui, sans-serif;
  --font-heading-weight: 600;
  --font-body: "Source Serif 4", system-ui, sans-serif;

  --space-1: 5px;
  --space-2: 10px;
  --space-3: 15px;
  --space-4: 20px;
  --radius-md: 2px;

  --gutter: clamp(20px, 5vw, 72px);
}

/* — base — */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55; font-weight: 400;
  text-wrap: pretty;
}
h1, h2 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em;
}
p { margin: 0; }
a { color: var(--color-accent-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--color-accent-800); }
img { display: block; max-width: 100%; }
figure { margin: 0; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary, .btn-primary:hover { color: var(--color-bg); }
.btn-primary { background: var(--color-accent); }
.btn-primary:hover { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary, .btn-secondary:hover { color: var(--color-text); border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-accent); padding-inline: var(--space-1); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }
.btn-icon { width: 36px; height: 36px; padding: 0; }

/* — navigation — */
.nav {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 12px var(--space-4); padding: var(--space-3) var(--gutter);
}
.nav-links { display: contents; }
.nav-brand { display: flex; align-items: center; margin-right: auto; }
.nav-brand img { height: 110px; width: auto; mix-blend-mode: multiply; }
.nav a:not(.btn) { color: inherit; text-decoration: none; font-size: 14px; white-space: nowrap; }
.nav a:not(.btn):hover { color: var(--color-accent); }
.lang { display: flex; gap: 2px; }
.lang .btn {
  min-width: 36px; padding-inline: 8px; font-size: 13px; letter-spacing: 0.06em;
  font-weight: 400; color: color-mix(in srgb, var(--color-text) 60%, transparent);
}
.lang .btn[aria-pressed="true"] { font-weight: 600; color: var(--color-accent); }

/* — tables — */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: var(--space-2); border-bottom: 1px solid var(--color-divider);
}
.table td { padding: var(--space-2); border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent); }
@media (hover: hover) { .table tbody tr:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); } }
.num, .table .num { text-align: right; white-space: nowrap; font-feature-settings: 'tnum' 1; }
.strong { font-weight: 600; }

/* — layout — */
main { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  margin: 0 0 20px; font-size: 13px; line-height: 14px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--color-muted);
}

/* hero */
.hero { padding: 88px 0 56px; }
.hero h1 {
  font-size: clamp(42px, 6.4vw, 88px); line-height: 1.08; letter-spacing: -0.02em;
  margin: 0 0 0 -0.035em; max-width: 15ch;
}
.hero h1 span { display: block; }
.hero .lead { font-size: 19px; line-height: 30px; max-width: 56ch; margin-top: 36px; }
.hero .nonbinding { font-style: italic; font-size: 17px; line-height: 28px; margin-top: 8px; color: var(--color-muted); }
.actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: 32px; }

/* key facts */
.facts { padding: 56px 0 64px; }
.rule { border-top: 1px solid var(--color-divider); }
.rail {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px 28px;
  padding: 14px 0; font-size: 13px; line-height: 14px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--color-muted);
}
.fact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 14px 70px; padding: 14px 0 28px;
}
.fact { display: flex; align-items: baseline; gap: 8px; font-size: 15.5px; line-height: 28px; }
.fact .leader { flex: 1; min-width: 28px; align-self: flex-end; margin-bottom: 0.34em; border-bottom: 1px dotted var(--color-divider); }
.fact .value { font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 17px; white-space: nowrap; }
.fact .value.accent { color: var(--color-accent-700); }

/* countdown + calculator */
.split { display: flex; flex-wrap: wrap; gap: 56px 96px; padding: 28px 0 72px; align-items: flex-start; }
.countdown-col { flex: 1 1 380px; }
.countdown { display: flex; gap: 36px; flex-wrap: wrap; }
.countdown div { display: flex; flex-direction: column; gap: 14px; }
.countdown .n {
  font-family: var(--font-heading); font-size: 64px; font-weight: 400; line-height: 1;
  font-feature-settings: 'tnum' 1; color: var(--color-accent);
}
.countdown .l { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted); }
.dep-note { font-size: 15.5px; line-height: 28px; margin-top: 28px; max-width: 44ch; color: color-mix(in srgb, var(--color-text) 78%, transparent); }
.calc { flex: 1 1 420px; scroll-margin-top: 24px; }
.stepper { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stepper output {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 36px; line-height: 44px; letter-spacing: -0.01em; min-width: 9ch;
  font-feature-settings: 'tnum' 1;
}
.small-note { font-size: 13px; line-height: 20px; color: var(--color-muted); }
.stepper + .small-note { margin: 8px 0 24px; }
.calc .table + .small-note { margin-top: 14px; }

/* gallery */
.gallery { padding: 28px 0 96px; scroll-margin-top: 24px; }
.gallery .eyebrow { margin-bottom: 28px; }
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  grid-auto-flow: dense; gap: 20px;
}
.gallery-grid .feature { grid-column: span 2; grid-row: span 2; }
.gallery-grid .wide { grid-column: span 2; }

/* photo slot — shows the image once it loads, a quiet captioned placeholder until then */
/* sized wrappers; the photo inside fills them (3:2 only when the wrapper has no definite height) */
.ratio-16-8 { aspect-ratio: 16 / 8; }
.ratio-16-7 { aspect-ratio: 16 / 7; }
.ratio-4-3 { aspect-ratio: 4 / 3; }
.fill { height: 100%; min-height: 420px; }
.photo {
  display: block; position: relative; overflow: hidden; width: 100%; height: 100%; aspect-ratio: 3 / 2;
  background: rgba(127, 127, 127, 0.08); font: 13px/1.3 system-ui, -apple-system, sans-serif;
}
.photo::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border: 1.5px dashed currentColor; opacity: 0.35;
}
.photo .empty {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; padding: 12px; text-align: center; user-select: none;
}
.photo .empty svg { opacity: 0.45; }
.photo .cap { max-width: 90%; font-weight: 500; letter-spacing: 0.01em; opacity: 0.75; }
.gallery .photo .cap { display: none; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo.filled { background: none; }
.photo.filled::before, .photo.filled .empty { display: none; }
/* watermark: the Bernardin mark in white, small and faint, bottom-right of every photo */
.photo.filled::after, .watermark::after {
  content: ""; position: absolute; right: 3%; bottom: 3%; z-index: 1;
  width: clamp(56px, 14%, 120px); aspect-ratio: 3 / 2; pointer-events: none;
  background: url("assets/logo.png") center / contain no-repeat;
  filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  opacity: 0.55;
}

/* numbered articles */
.articles { display: flex; flex-direction: column; gap: 80px; padding: 40px 0 96px; }
.article { display: flex; flex-wrap: wrap; gap: 20px 56px; scroll-margin-top: 24px; }
.article .numeral { flex: 0 0 160px; font-family: var(--font-heading); font-size: 56px; line-height: 1; color: var(--color-accent); }
.article .body { flex: 1 1 440px; max-width: 66ch; font-size: 17px; line-height: 28px; }
.article h2 { font-size: 32px; line-height: 40px; margin: 0 0 20px; }
.article .body > * + *:not(h2) { margin-top: 20px; }
.article .body > h2 + * { margin-top: 0; }
.article .body > ol { margin-top: 12px; }
.article ol { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 10px; }
.article .parcels { max-width: 420px; }
.article .stack { display: flex; flex-direction: column; }
.article .body > .stack { margin-top: 24px; }
.iban-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.article .body > .iban-row { margin-top: 16px; }
.iban { font-family: var(--font-heading); font-size: 24px; line-height: 32px; letter-spacing: 0.02em; font-feature-settings: 'tnum' 1; }
.article .buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* contact + footer */
.contact { padding: 40px 0 72px; }
.contact h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; letter-spacing: -0.02em; margin: 0; max-width: 18ch; }
.contact-cols { display: flex; flex-wrap: wrap; gap: 40px 96px; margin-top: 36px; font-size: 17px; line-height: 28px; }
.contact-cols .eyebrow { margin: 0 0 6px; line-height: inherit; font-size: 13px; }
.contact-cols .stack { display: flex; flex-direction: column; }
.firm-logo { height: 40px; width: auto; margin: 6px 0 14px; }
footer {
  padding: 40px 0 56px; font-size: 13px; line-height: 22px; color: var(--color-muted);
  display: flex; flex-direction: column; gap: 6px;
}

/* — content protection (a deterrent only: anything shown in a browser can still be captured) — */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
img, .photo img { -webkit-user-drag: none; pointer-events: none; }

/* — scrollbar — */
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--color-accent) 55%, transparent) var(--color-bg); }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg); border-left: 1px solid var(--color-divider); }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--color-accent) 45%, transparent) padding-box;
  border: 3px solid transparent; border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--color-accent); }
::-webkit-scrollbar-corner { background: var(--color-bg); }

/* — gallery lightbox — */
.gallery .photo.filled { cursor: zoom-in; }
.gallery .photo.filled img { transition: transform 0.5s ease; }
@media (hover: hover) { .gallery .photo.filled:hover img { transform: scale(1.025); } }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: oklch(0.17 0.035 258); color: #fff;
  overscroll-behavior: contain; touch-action: pan-y pinch-zoom;
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; place-items: center; animation: lb-in 0.2s ease; }
@keyframes lb-in { from { opacity: 0; } }
.lb-stage {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: calc(56px + env(safe-area-inset-top, 0px)) 72px calc(24px + env(safe-area-inset-bottom, 0px));
  max-width: 100%; max-height: 100%;
}
.lb-frame { position: relative; display: flex; max-width: 100%; min-height: 0; }
.lb-frame::after { width: clamp(72px, 11%, 150px); }
.lb-stage img {
  max-width: 100%; max-height: calc(100dvh - 140px); width: auto; height: auto; object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.lb-stage figcaption {
  display: flex; gap: 16px; align-items: baseline; font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.75);
}
#lb-count { color: rgba(255, 255, 255, 0.45); font-feature-settings: 'tnum' 1; }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 50%; background: rgba(255, 255, 255, 0.04);
  color: #fff; cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.14); }
.lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { top: calc(14px + env(safe-area-inset-top, 0px)); right: 16px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-btn[hidden] { display: none; }
@media (max-width: 600px) {
  .lb-stage { padding-inline: 0; }
  .lb-prev, .lb-next { top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: none; }
  .lb-stage img { max-height: calc(100dvh - 190px); box-shadow: none; }
  .lb-stage figcaption { padding: 0 72px; text-align: center; flex-direction: column; align-items: center; gap: 4px; }
}

/* — touch: comfortable tap targets — */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn-icon { width: 44px; height: 44px; }
}

/* — phone — */
@media (max-width: 600px) {
  .nav { gap: 12px; padding-block: 12px 4px; }
  .nav-brand img { height: 60px; }
  .lang { margin-right: -6px; }
  .nav-links {
    order: 2; flex: 1 1 100%; display: flex; gap: 22px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin-inline: calc(var(--gutter) * -1); padding: 6px var(--gutter);
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { padding-block: 6px; }
  .nav > .btn-primary { order: 3; flex: 1 1 100%; }

  .hero { padding: 36px 0 40px; }
  .hero h1 { font-size: clamp(32px, 10vw, 42px); overflow-wrap: break-word; hyphens: auto; }
  .hero .lead { font-size: 17px; line-height: 28px; margin-top: 24px; }
  .actions { margin-top: 28px; }

  .facts { padding: 40px 0 48px; }
  .rail { flex-direction: column; gap: 10px; line-height: 18px; }
  .fact-grid { gap: 10px; }
  .fact { gap: 16px; font-size: 15px; line-height: 24px; }
  .fact .leader { display: none; }
  .fact > span:first-child { flex: 1; }
  .fact .value { font-size: 16px; text-align: right; }

  .split { gap: 48px; padding: 8px 0 56px; }
  .countdown-col, .calc { flex-basis: 100%; }
  .countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .countdown div { gap: 10px; }
  .countdown .n { font-size: clamp(38px, 12vw, 52px); }
  .countdown .l { font-size: 11px; letter-spacing: 0.06em; }
  .dep-note { font-size: 15px; line-height: 26px; margin-top: 24px; }
  .stepper { flex-wrap: nowrap; gap: 10px; }
  .stepper output {
    order: -1; flex: 1; min-width: 0; font-size: clamp(22px, 7vw, 30px); line-height: 1.2;
    white-space: nowrap;
  }
  .table td { padding-inline: 6px; }

  .gallery { padding: 16px 0 64px; }
  .gallery-grid { grid-template-columns: 1fr; gap: 12px; }
  .gallery-grid .feature, .gallery-grid .wide { grid-column: auto; grid-row: auto; }
  .gallery-grid .fill { height: auto; min-height: 0; aspect-ratio: 4 / 3; }
  .gallery-grid .ratio-16-7 { aspect-ratio: 16 / 9; }

  .articles { gap: 56px; padding: 24px 0 64px; }
  .article { gap: 12px; }
  .article .numeral { flex-basis: 100%; font-size: 40px; }
  .article .body { font-size: 16px; line-height: 26px; }
  .article h2 { font-size: 26px; line-height: 32px; }
  .article .body > * + *:not(h2) { margin-top: 16px; }
  .iban { font-size: 21px; }

  .contact { padding: 16px 0 48px; }
  .contact-cols { gap: 28px; margin-top: 28px; font-size: 16px; line-height: 26px; }
  footer { padding: 24px 0 40px; }
}

[hidden] { display: none !important; }
