/* ==========================================================================
   HejjaCello — Héjja János hangszerkészítő
   Black & gold. No build step: edit this file directly.
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: "Bodoni Moda";
  src: url("../fonts/bodoni-moda-latin-opsz-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("../fonts/bodoni-moda-latin-ext-opsz-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-ext-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-ext-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-ext-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2");
  font-weight: 500; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-ext-500-italic.woff2") format("woff2");
  font-weight: 500; font-style: italic; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Mono";
  src: url("../fonts/dm-mono-latin-300-normal.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Mono";
  src: url("../fonts/dm-mono-latin-ext-300-normal.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Mono";
  src: url("../fonts/dm-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Mono";
  src: url("../fonts/dm-mono-latin-ext-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #0b0a08;
  --ink-2: #12100c;
  --ink-3: #1a1712;
  --gold: #c9a45c;
  --gold-hi: #e3c98f;
  --gold-lo: #8c7243;
  --line: rgba(201, 164, 92, 0.28);
  --line-soft: rgba(201, 164, 92, 0.14);
  --cream: #ece4d3;
  --muted: #a49b88;

  --display: "Bodoni Moda", "Didot", "Bodoni 72", "Bodoni MT", serif;
  --serif: "Cormorant Garamond", "EB Garamond", Garamond, "Times New Roman", serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(1rem, 5vw, 4rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-h: 5.5rem;

  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.125rem, 1.02rem + 0.35vw, 1.3rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--ink); }

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

/* Only the active language is shown. Without JS the page stays Hungarian. */
html[data-lang="hu"] [lang="en"],
html[data-lang="en"] [lang="hu"] { display: none !important; }

.wrap {
  width: min(100% - 2 * var(--gutter), 1280px);
  margin-inline: auto;
}

.section { padding-block: clamp(5.5rem, 12vw, 11rem); position: relative; }

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.8rem;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Type helpers ---------- */
.kicker {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 1.4rem;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.kicker::before {
  content: "";
  flex: none;
  width: 2.5rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

/* Bodoni Moda's optical size (opsz) sets the hairlines: the higher it is, the finer they get.
   Left to the browser it follows the font size, so big headings get hairlines far under a
   pixel wide (0.15px at 76px) that fade out on screen. These values keep them about 1px
   wide at desktop sizes; the thick strokes are the same at any opsz. */
.display {
  margin: 0 0 1.75rem;
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "opsz" 16;
  font-size: clamp(2rem, 1.2rem + 4vw, 4.75rem);
  line-height: 1.04;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: break-word;
  color: var(--cream);
}
/* Headings also shrink with the column they sit in, so long single words
   (NAGYTARCSA, HANGSZEREK) always fit on one line. 12.5cqi ≈ 1/8 of the column;
   the longest words are about 7.5 font-sizes wide. */
.about__card, .section-head > div:first-child, .workshop__text, .contact__main { container-type: inline-size; }
@supports (width: 1cqi) {
  .display { font-size: clamp(1.6rem, min(1.2rem + 4vw, 12.5cqi), 4.75rem); }
  .workshop__text .display { font-size: clamp(1.6rem, 12.5cqi, 4.75rem); }
}

.js .nav a, .timeline__year, .work__title, .contact__direct a, .viewer__nav, .viewer__title {
  font-variation-settings: "opsz" 11;
}

.display em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1em;
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
}

.lead {
  font-size: 1.3em;
  line-height: 1.45;
  font-style: italic;
  font-weight: 400;
  color: var(--gold-hi);
}

/* Hairline + label link (used for calls to action) */
.rule-link,
.more summary {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  cursor: pointer;
}
.rule-link .rule,
.more .rule {
  flex: none;
  width: clamp(3rem, 8vw, 6.5rem);
  height: 1px;
  background: currentColor;
  transition: width 0.6s var(--ease);
}
.rule-link:hover .rule,
.more summary:hover .rule { width: clamp(4.5rem, 11vw, 9rem); }
.rule-link:hover, .more summary:hover { color: var(--gold-hi); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.5s ease, border-color 0.5s ease;
}
.site-header.is-scrolled {
  background: rgba(11, 10, 8, 0.94);
  border-bottom-color: var(--line-soft);
}

.bar {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  min-height: var(--header-h);
  transition: min-height 0.5s ease;
}
.is-scrolled .bar { min-height: 4.25rem; }

.brand { flex: none; position: relative; z-index: 2; }
.brand img { height: clamp(30px, 2.6vw, 40px); width: auto; }

.nav { margin-left: auto; }
.nav ul {
  display: flex;
  gap: clamp(1.25rem, 2.6vw, 2.5rem);
  margin: 0; padding: 0;
  list-style: none;
}
.nav a {
  position: relative;
  display: block;
  padding: 0.4rem 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  transition: color 0.3s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.nav a:hover, .nav a[aria-current="true"] { color: var(--gold-hi); }
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); }

.lang-switch {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.lang-switch a {
  padding: 0.4rem 0.1rem;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.3s;
}
.lang-switch a:hover { color: var(--cream); }
.lang-switch a[aria-current="true"] {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.45em;
  text-decoration-thickness: 1px;
}

.menu-toggle {
  display: none;
  position: relative;
  z-index: 2;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border: 0;
  background: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream);
  cursor: pointer;
}
.menu-toggle__icon,
.menu-toggle__icon::before {
  display: block;
  width: 1.6rem;
  height: 1px;
  background: var(--gold);
  transition: transform 0.4s var(--ease);
}
.menu-toggle__icon { position: relative; transform: translateY(-3px); }
.menu-toggle__icon::before { content: ""; position: absolute; top: 6px; }
.menu-open .menu-toggle__icon { transform: translateY(0) rotate(45deg); }
.menu-open .menu-toggle__icon::before { top: 0; transform: rotate(-90deg); }

@media (max-width: 860px) {
  .js .menu-toggle { display: inline-flex; }
  .js .lang-switch { margin-left: auto; }
  .js .nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    background: var(--ink);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0s linear 0.45s;
  }
  .js .menu-open .nav {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s ease;
  }
  .js .nav ul { flex-direction: column; align-items: center; gap: 1.6rem; }
  .js .nav a {
    font-family: var(--display);
    font-size: clamp(1.9rem, 8vw, 2.6rem);
    letter-spacing: 0.04em;
  }
  html:not(.js) .bar { flex-wrap: wrap; padding-block: 1rem; }
  html:not(.js) .nav { order: 3; width: 100%; margin: 0; }
  html:not(.js) .nav ul { flex-wrap: wrap; gap: 0.5rem 1.25rem; }
}
html.menu-locked { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 2.5rem) 0 6rem;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: -3%;
  z-index: -2;
  background: url("../../images/site/hero-1200.jpg") center / cover no-repeat;
  animation: drift 40s ease-in-out infinite alternate;
}
@media (min-width: 1000px), (min-resolution: 2dppx) {
  .hero__bg { background-image: url("../../images/site/hero-2400.jpg"); }
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, var(--ink) 0%, rgba(11, 10, 8, 0) 28%),
    linear-gradient(100deg, rgba(11, 10, 8, 0.95) 0%, rgba(11, 10, 8, 0.78) 42%, rgba(11, 10, 8, 0.42) 72%, rgba(11, 10, 8, 0.7) 100%);
}
@keyframes drift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.06) translate3d(-1.2%, -1%, 0); }
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2.5rem, 6vw, 7rem);
  align-items: center;
}

/* The gold script logo (SVG, sharp at any size) is the headline: as wide as the text column, up to 680px. */
.hero__logo {
  display: block;
  width: min(100%, 680px);
  height: auto;
  margin: 0 0 1.25rem;
}
/* The name under it (the page's main heading). */
.hero__title {
  margin: 0 0 1.75rem;
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "opsz" 11;   /* see .display */
  font-size: clamp(1.5rem, 0.95rem + 2vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero__lede {
  max-width: 26ch;
  margin-bottom: 2.25rem;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.45rem, 1.1rem + 1.3vw, 2.2rem);
  line-height: 1.3;
  color: var(--gold-hi);
}

.hero__figure {
  position: relative;
  justify-self: end;
  width: min(100%, 410px);
}
.frame { position: relative; }
.frame::before {
  content: "";
  position: absolute;
  inset: -18px 18px 18px -18px;
  border: 1px solid var(--line);
  pointer-events: none;
}
.frame img {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.9);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}
.scroll-cue__line {
  width: 1px;
  height: 3rem;
  background: linear-gradient(var(--gold), transparent);
  transform-origin: top;
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue {
  0%   { transform: scaleY(0); opacity: 1; }
  60%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

@media (max-width: 860px) {
  .hero { padding-bottom: 7rem; }
  .hero__inner { grid-template-columns: 1fr; }
  /* One column: everything centred over the photo, gold rules on both sides. */
  .hero__text { text-align: center; }
  .hero__logo { margin-inline: auto; }
  .hero__lede { margin-inline: auto; }
  .hero .kicker { justify-content: center; }
  .hero .kicker::after,
  .hero .rule-link::after { content: ""; flex: none; height: 1px; background: currentColor; }
  .hero .kicker::after { width: 2.5rem; opacity: 0.7; }
  .hero .rule-link .rule,
  .hero .rule-link::after { width: 2rem; }
  /* The outline sits 18px left of the photo; the padding centres photo + outline together. */
  .hero__figure { justify-self: center; width: min(78%, 340px); margin-top: 1rem; padding-left: 18px; }
}
@media (max-height: 560px) and (min-width: 861px) {
  .scroll-cue { display: none; }
}

/* ---------- About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
}
.about__media {
  grid-column: 1 / span 6;
  grid-row: 1;
  position: relative;
  padding: 0 0 4.5rem 2.5rem;
}
.about__workshop {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 35% 50%;
  filter: grayscale(1) sepia(0.15) brightness(0.78) contrast(1.05);
}
.about__portrait {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(42%, 240px);
  padding: 8px;
  background: var(--ink);
  border: 1px solid var(--gold-lo);
}
.about__portrait img { width: 100%; aspect-ratio: 273 / 429; object-fit: cover; }

.about__card {
  grid-column: 6 / -1;
  grid-row: 1;
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 4.5vw, 4.5rem);
  background: var(--ink-2);
  border: 1px solid var(--line-soft);
  box-shadow: 0 40px 80px -50px rgba(0, 0, 0, 0.9);
}
.about__card p:last-child { margin-bottom: 0; }

.more { margin-top: 1.25rem; }
.more summary { list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more .more__close { display: none; }
.more[open] .more__open { display: none; }
.more[open] .more__close { display: inline; }
.more[open] summary { margin-bottom: 1.25rem; }
.more p { color: var(--cream); opacity: 0.9; }

.timeline {
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr));   /* --cols is set in index.php */
  gap: 0 1.5rem;
  margin-top: clamp(4.5rem, 9vw, 8rem);
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.timeline li {
  position: relative;
  padding-top: 1.75rem;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--muted);
}
.timeline li::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
}
/* More milestones than fit in one row: each gets its own line instead of the shared one. */
.timeline--rows { row-gap: 2.5rem; border-top: 0; }
.timeline--rows li { border-top: 1px solid var(--line); }
.timeline__year {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--display);
  font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.4rem);
  line-height: 1;
  color: var(--gold);
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .about__media, .about__card { grid-column: 1 / -1; }
  .about__media { grid-row: 1; padding: 0 0 3.5rem 1.5rem; }
  .about__workshop { aspect-ratio: 4 / 3; }
  .about__card { grid-row: 2; margin-top: 1.25rem; margin-inline: clamp(0rem, 4vw, 2rem); }
  .timeline { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; border-top: 0; }
  .timeline li { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .timeline { grid-template-columns: 1fr; }
}

/* ---------- Section heads ---------- */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  align-items: end;
  margin-bottom: clamp(3rem, 7vw, 6rem);
}
.section-head .display { margin-bottom: 0; }
.section-head__note p:last-child { margin-bottom: 0; }
.section-head__note {
  margin: 0;
  max-width: 34ch;
  justify-self: end;
  font-style: italic;
  font-weight: 400;
  font-size: 1.2em;
  line-height: 1.5;
  color: var(--muted);
}
@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; }
  .section-head__note { justify-self: start; }
}

/* ---------- Portfolio ---------- */
.works {
  background:
    radial-gradient(45% 900px at 82% 1100px, rgba(201, 164, 92, 0.06), transparent),
    var(--ink);
}
.works__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(3rem, 5vw, 5rem) clamp(1.25rem, 3vw, 3rem);
  margin: 0;
  padding: 0 0 6rem;
  list-style: none;
}
.work:nth-child(3n + 2) { margin-top: 6rem; margin-bottom: -6rem; }

@media (max-width: 1080px) and (min-width: 621px) {
  .works__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work:nth-child(3n + 2) { margin: 0; }
  .work:nth-child(2n) { margin-top: 5rem; margin-bottom: -5rem; }
}
@media (max-width: 620px) {
  .works__grid { grid-template-columns: 1fr; padding-bottom: 0; }
  .work:nth-child(n) { margin: 0; }
}

.work__link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.work__media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--ink-3);
}
.work__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.9);
  transition: transform 1.4s var(--ease), filter 0.8s ease;
}
.work__media::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(227, 201, 143, 0);
  transition: border-color 0.6s ease, inset 0.6s var(--ease);
}
.work__link:hover .work__media img,
.work__link:focus-visible .work__media img {
  transform: scale(1.045);
  filter: saturate(1) brightness(1);
}
.work__link:hover .work__media::after,
.work__link:focus-visible .work__media::after {
  inset: 18px;
  border-color: rgba(227, 201, 143, 0.6);
}

.work__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.2rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.work__count { color: var(--muted); }
.work__title {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.9rem);
  line-height: 1.12;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color 0.4s;
}
.work__link:hover .work__title { color: var(--gold-hi); }
.work__kind {
  display: block;
  margin-top: 0.35rem;
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
}

/* ---------- Workshop ---------- */
.workshop { background: var(--ink-2); }
.workshop__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
  align-items: start;
}
.workshop__text {
  grid-column: 1 / span 5;
  grid-row: 1;
  align-self: center;
  padding-right: clamp(0rem, 3vw, 3rem);
}
.workshop__text p { color: var(--cream); opacity: 0.92; }
.workshop__img img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: grayscale(1) sepia(0.2) brightness(0.85) contrast(1.05);
  transition: filter 0.8s ease;
}
.workshop__img:hover img { filter: grayscale(0.6) sepia(0.25) brightness(0.95) contrast(1.05); }
.workshop__img--1 { grid-column: 6 / -1; grid-row: 1; }
.workshop__img--2 { grid-column: 1 / span 4; grid-row: 2; margin-top: clamp(1rem, 4vw, 3.5rem); }
.workshop__img--3 { grid-column: 5 / span 4; grid-row: 2; }
.workshop__img--4 { grid-column: 9 / -1; grid-row: 2; margin-top: clamp(2rem, 7vw, 6rem); }
.workshop__img--2 img, .workshop__img--4 img { aspect-ratio: 4 / 5; }

@media (max-width: 860px) {
  .workshop__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workshop__text { grid-column: 1 / -1; padding: 0 0 1.5rem; }
  .workshop__img--1 { grid-column: 1 / -1; grid-row: 2; }
  .workshop__img--2 { grid-column: 1; grid-row: 3; margin-top: 0; }
  .workshop__img--3 { grid-column: 2; grid-row: 3; margin-top: 2.5rem; }
  .workshop__img--3 img { aspect-ratio: 4 / 5; }
  .workshop__img--4 { display: none; }
}

/* ---------- Contact ---------- */
.contact {
  background:
    radial-gradient(50% 70% at 12% 100%, rgba(201, 164, 92, 0.08), transparent),
    var(--ink);
  border-top: 1px solid var(--line-soft);
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 3rem clamp(2rem, 6vw, 7rem);
  align-items: end;
}
.contact__intro { max-width: 40ch; color: var(--muted); font-size: 1.1em; }
.contact__direct {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}
.contact__direct a {
  display: inline-block;
  padding: 0.2rem 0;
  font-family: var(--display);
  font-size: clamp(1.5rem, 0.9rem + 2.6vw, 3rem);
  line-height: 1.25;
  text-decoration: none;
  background: linear-gradient(var(--gold), var(--gold)) left bottom / 0 1px no-repeat;
  transition: background-size 0.6s var(--ease), color 0.3s;
  overflow-wrap: anywhere;
}
.contact__direct a:hover { color: var(--gold-hi); background-size: 100% 1px; }

.contact__list { margin: 0; }
.contact__list > div {
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}
.contact__list > div:last-child { border-bottom: 1px solid var(--line); }
.contact__list dt {
  margin-bottom: 0.5rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.contact__list dd { margin: 0; line-height: 1.45; }
.contact__list a {
  text-decoration: none;
  transition: color 0.3s;
}
.contact__list a:hover { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

@media (max-width: 860px) {
  .contact__grid { grid-template-columns: 1fr; }
}

/* ---------- Website credit (who made the site) ---------- */
.credit {
  padding-block: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line-soft);
  background: var(--ink-2);
}
/* Centred and stacked: small heading, name, text, link; the gold rules sit on both sides. */
.credit__inner {
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  text-align: center;
}
.credit .kicker { justify-content: center; margin-bottom: 0.9rem; }
.credit .kicker::after,
.credit .rule-link::after { content: ""; flex: none; height: 1px; background: currentColor; }
.credit .kicker::after { width: 2.5rem; opacity: 0.7; }
.credit .rule-link .rule,
.credit .rule-link::after { width: 2.5rem; transition: width 0.6s var(--ease); }
.credit .rule-link:hover .rule,
.credit .rule-link:hover::after { width: 4rem; }
.credit__name {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "opsz" 11;   /* see .display */
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--cream);
}
.credit__name em { font-family: var(--serif); font-style: italic; text-transform: none; color: var(--gold); }
.credit__body { max-width: 60ch; color: var(--muted); }
.credit__body p:last-of-type { margin-bottom: 0; }
.credit__body > * + .rule-link { margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 3rem 0;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}
.site-footer p { margin: 0; }
.site-footer__logo { height: 28px; width: auto; opacity: 0.85; }
.site-footer__top { text-decoration: none; color: var(--gold); }
.site-footer__top:hover { color: var(--gold-hi); }
/* Same breakpoint as the centred hero: logo, copyright and "back to top" stacked in the middle. */
@media (max-width: 860px) {
  .site-footer__inner { flex-direction: column; gap: 1rem; text-align: center; }
}

/* ---------- Viewer (instrument detail) ---------- */
.viewer {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 7, 6, 0.985);
  color: var(--cream);
  overflow: hidden;
}
.viewer::backdrop { background: rgba(0, 0, 0, 0.75); }
.viewer[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 28vw, 400px);
  animation: viewer-in 0.45s var(--ease);
}
@keyframes viewer-in { from { opacity: 0; } to { opacity: 1; } }
html.viewer-locked { overflow: hidden; }

.viewer__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: clamp(3.5rem, 6vh, 5rem) clamp(4.25rem, 6vw, 6rem);
}
.viewer__figure {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.viewer__figure img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 1);
  transition: opacity 0.35s ease;
}
.viewer__figure img.is-loading { opacity: 0; }

.viewer__nav {
  position: absolute;
  top: 50%;
  width: 3.25rem;
  height: 3.25rem;
  margin-top: -1.625rem;
  display: grid;
  place-items: center;
  padding: 0 0 0.2rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(11, 10, 8, 0.6);
  font-family: var(--display);
  font-size: 1.8rem;
  line-height: 1;
  color: var(--gold);
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, background-color 0.3s;
}
.viewer__nav:hover { border-color: var(--gold); color: var(--gold-hi); background: rgba(11, 10, 8, 0.9); }
.viewer__nav--prev { left: clamp(0.75rem, 1.5vw, 1.5rem); }
.viewer__nav--next { right: clamp(0.75rem, 1.5vw, 1.5rem); }
.viewer__nav[hidden] { display: none; }

.viewer__info {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 6rem clamp(1.75rem, 2.5vw, 2.75rem) 2.5rem;
  border-left: 1px solid var(--line-soft);
  background: var(--ink-2);
  overflow-y: auto;
}
.viewer__title {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.8rem, 1.3rem + 1.4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}
.viewer__kind { font-style: italic; font-weight: 400; color: var(--gold-hi); margin-bottom: 1.5rem; }
.viewer__text { color: var(--muted); }
.viewer__thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 1.5rem 0 0.75rem;
  padding: 0;
  list-style: none;
}
.viewer__thumbs:empty { display: none; }
.viewer__thumbs button {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s, border-color 0.3s;
}
.viewer__thumbs button:hover { opacity: 0.85; }
.viewer__thumbs button[aria-current="true"] { opacity: 1; border-color: var(--gold); }
.viewer__thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.viewer__count {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--muted);
}
.viewer__cta { margin-top: auto; padding-top: 2rem; align-self: flex-start; }

.viewer__close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.2rem;
  border: 0;
  background: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream);
  cursor: pointer;
}
.viewer__close:hover { color: var(--gold-hi); }
.viewer__close span[aria-hidden] { font-size: 1rem; color: var(--gold); }

@media (max-width: 820px) {
  .viewer[open] {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .viewer__stage { padding: 4rem 0.75rem 1rem; }
  .viewer__nav { top: auto; bottom: 1.25rem; margin-top: 0; width: 2.75rem; height: 2.75rem; }
  .viewer__info {
    max-height: 42vh;
    max-height: 42dvh;
    padding: 1.5rem 1rem 1.75rem;
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }
  .viewer__thumbs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .viewer__cta { padding-top: 1rem; }
  .viewer__close { top: 0.75rem; right: 1rem; }
}

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s ease, transform 1.1s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .scroll-cue, .viewer, .hero__bg { display: none !important; }
  body { background: #fff; color: #000; }
  .js .reveal { opacity: 1; transform: none; }
}
