/* Shared look for the project pages (gallery_*.html), the catalogues page (selection*.html) and 404.html.
   Same pattern as the shop and the legal pages: back link · centred title · BG/EN inside the bar; Playfair headings, Inter text.
   No Bootstrap, no main.css: these pages only load fonts.css + this file + their own page file. */
:root {
  --bg: #F5F2EC; --surface: #fff; --ink: #34322F;
  --muted: #66615B;       /* body grey, 5.4:1 on --bg */
  --gold: #86693A;        /* deep gold: gold text and buttons with white text (5.1:1) */
  --gold-light: #BDA171;  /* brand gold: lines and decoration only, never behind white text (2.5:1) */
  --line: rgba(0, 0, 0, .1);
  --ease: cubic-bezier(.2, .6, .2, 1);
  --header-h: 72px; --gutter: 20px; --wrap: 1240px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; line-height: 1.15; margin: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
main:focus { outline: none; }
.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 2000; padding: 10px 16px; background: var(--ink); color: #fff;
  font-weight: 600; font-size: .9rem; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.eyebrow { letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-size: .78rem; font-weight: 500; }

/* ── Header ─────────────────────────────────────────────────────────────────── */
.nav-header {
  position: sticky; top: 0; z-index: 1000; height: var(--header-h);
  background: rgba(245, 242, 236, .96); -webkit-backdrop-filter: saturate(140%) blur(8px); backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-content { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.back-link {
  justify-self: start; display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 1.1rem 0 .85rem;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .55);
  font-size: .92rem; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.back-link:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.back-link, .lang-switch a, .btn { -webkit-tap-highlight-color: transparent; }
.back-link:active, .lang-switch a:active { background: rgba(0, 0, 0, .08); }
.page-title { font-size: clamp(1.05rem, 2.6vw, 1.5rem); font-weight: 600; letter-spacing: .02em; white-space: nowrap; text-decoration: none; }
a.page-title { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
a.page-title:hover { color: var(--gold); }
.lang-switch { justify-self: end; display: flex; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .7); }
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 46px; min-height: 42px; padding: 0 .75rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); text-decoration: none;
}
.lang-switch a:first-child { border-radius: 999px 0 0 999px; }
.lang-switch a:last-child { border-radius: 0 999px 999px 0; }
.lang-switch a:hover { color: var(--ink); background: rgba(0, 0, 0, .04); }
.lang-switch a.active { background: var(--gold); color: #fff; }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 48px; padding: .8rem 1.9rem;
  border: 1px solid transparent; font-size: .8rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--gold); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .85rem; text-align: center;
  padding: 14px var(--gutter) 22px;
}
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 10px; margin-bottom: 2px; }
.legal-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: var(--ink); text-decoration: none; }
.legal-links a:hover { text-decoration: underline; text-decoration-color: var(--gold-light); text-underline-offset: 4px; }

/* ── 404 page ───────────────────────────────────────────────────────────────── */
.page-404 { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.page-404 .error-page { flex: 1 0 auto; width: 100%; }
.error-page { max-width: 640px; margin: 0 auto; padding: clamp(56px, 12vw, 128px) var(--gutter) clamp(56px, 10vw, 112px); text-align: center; }
.error-page h1 { font-size: clamp(2rem, 5vw, 3rem); margin: .7rem 0 1rem; }
.error-page .lead { color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 2rem 0 0; padding: 0; list-style: none; }
.error-en { margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; line-height: 1.9; }
.error-en a { display: inline-block; padding: 8px 4px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold-light); text-underline-offset: 4px; }
.error-en a:hover { color: var(--gold); }

/* ── Phone ──────────────────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
  :root { --header-h: 60px; --gutter: 16px; }
  .nav-content { gap: 8px; }
  .back-link { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
  .back-link span { display: none; }
  .page-title { font-size: .95rem; letter-spacing: .01em; }
  .lang-switch a { min-width: 44px; min-height: 44px; padding: 0 .55rem; font-size: .75rem; }
  .error-actions { flex-direction: column; max-width: 320px; margin-left: auto; margin-right: auto; }
  .error-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
