/* ------------------------------------------------------------
   Peter Brockhammer — Portfolio
   Warm paper / light sepia palette
------------------------------------------------------------ */
@font-face { font-family: "Jost"; src: url("../fonts/jost-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-garamond-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-garamond-latin-wght-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-wght-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  --paper: #f8f2e7;
  --paper-card: #fdf9f2;
  --mat: #f0e5d3;
  --ink: #4b4036;
  --text: #6f6357;
  --muted: #9a8d7e;
  --line: #e4d7c3;
  --accent: #c27b4a;
  --accent-soft: #e2a676;
  --sans: "Jost", "Futura", "Century Gothic", sans-serif;
  --serif: "Cormorant", "Garamond", Georgia, serif;
  --script: "Fraunces", Georgia, serif;
  --gutter: clamp(16px, 4vw, 44px);
  --content: 1000px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
/* faint paper grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .45 0 0 0 0 .32 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent-soft); color: #fff; }

/* ------------------------------------------------------------
   Start page — slideshow hero
------------------------------------------------------------ */
.is-landing { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.hero {
  position: relative;
  flex: 1;
  min-height: 520px;
  max-width: none;
  margin: 0 clamp(10px, 1.6vw, 22px) clamp(10px, 1.6vw, 22px);
  padding: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #3a2f25;
  isolation: isolate;
}
.hero__slides, .slide { position: absolute; inset: 0; margin: 0; }
.slide { opacity: 0; transition: opacity 1.4s ease; }
.slide.is-active { opacity: 1; z-index: 1; }
.slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: sepia(.16) saturate(.94);
  transform: scale(1.06);
}
@media (prefers-reduced-motion: no-preference) {
  .slide.is-active img { animation: drift 9s ease-out forwards; }
  @keyframes drift { from { transform: scale(1.1); } to { transform: scale(1.02); } }
}
.hero__shade {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(34, 24, 15, .78) 0%, rgba(34, 24, 15, .45) 34%, rgba(34, 24, 15, 0) 60%),
    linear-gradient(0deg, rgba(34, 24, 15, .6) 0%, rgba(34, 24, 15, 0) 34%);
}
.hero__text {
  position: absolute; z-index: 3;
  left: clamp(20px, 5vw, 72px);
  bottom: clamp(110px, 16vh, 170px);
  max-width: 560px;
  color: #fbf4e8;
}
.hero__role {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-soft);
}
.hero__name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -.01em;
  text-shadow: 0 2px 24px rgba(0,0,0,.25);
}
.hero__name em { font-family: var(--script); font-weight: 500; color: #f3c79f; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(22px, 3vw, 34px); }
.hero .btn--ghost { color: #fbf4e8; border-color: rgba(251, 244, 232, .7); }
.hero .btn--ghost:hover { background: #fbf4e8; color: var(--ink); border-color: #fbf4e8; }
.hero__controls {
  position: absolute; z-index: 3;
  left: clamp(20px, 5vw, 72px); right: clamp(20px, 5vw, 72px);
  bottom: clamp(22px, 4vh, 40px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 18px 28px;
  color: #fbf4e8;
}
.hero__caption { font-family: var(--serif); font-style: italic; font-size: 18px; transition: color .2s; }
.hero__caption small {
  display: block; font-family: var(--sans); font-style: normal;
  font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; opacity: .7;
}
.hero__caption:hover { color: #f3c79f; }
.hero__bars { display: flex; gap: 6px; padding-bottom: 12px; }
.hero__bar { width: 34px; height: 18px; padding: 8px 0; border: 0; background: none; cursor: pointer; }
.hero__bar span { display: block; height: 2px; background: rgba(251, 244, 232, .35); position: relative; overflow: hidden; }
.hero__bar span::after { content: ""; position: absolute; inset: 0; background: #fbf4e8; transform: scaleX(0); transform-origin: left; }
.hero__bar.is-done span::after { transform: scaleX(1); }
.hero__bar.is-active span::after { animation: fill var(--slide-ms, 6000ms) linear forwards; }
.hero.is-paused .hero__bar.is-active span::after { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }
.hero__arrows { display: flex; gap: 8px; }
.hero__arrow {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid rgba(251, 244, 232, .6);
  background: transparent; color: #fbf4e8; font-size: 18px; cursor: pointer;
  transition: background .2s, color .2s;
}
.hero__arrow:hover { background: #fbf4e8; color: var(--ink); }
@media (max-width: 700px) {
  .hero { min-height: 560px; }
  .hero__shade { background: linear-gradient(0deg, rgba(34, 24, 15, .78) 0%, rgba(34, 24, 15, .35) 50%, rgba(34, 24, 15, .05) 75%); }
  .hero__text { right: 20px; bottom: 120px; }
  .hero__controls { grid-template-columns: 1fr auto; }
  .hero__bars { display: none; }
}

/* ------------------------------------------------------------
   Social icons
------------------------------------------------------------ */
.social { display: flex; gap: 10px; justify-content: center; list-style: none; margin: 0; padding: 0; }
.social a {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--paper-card);
  color: var(--accent);
  transition: background .2s, color .2s, transform .2s;
}
.social a:hover { background: var(--accent); color: var(--paper-card); transform: translateY(-2px); }
.social svg { width: 17px; height: 17px; fill: currentColor; }
.social svg.stroke { fill: none; stroke: currentColor; stroke-width: 2; }
.social svg.stroke .dot { fill: currentColor; stroke: none; }
button.plate__mat { border: 0; width: 100%; font: inherit; }
.site-footer .social a { background: transparent; border: 1px solid var(--line); }
.site-footer .social a:hover { background: var(--accent); border-color: var(--accent); }

/* ------------------------------------------------------------
   Inner-page header
------------------------------------------------------------ */
.site-header {
  max-width: 1360px;
  margin: 0 auto clamp(20px, 3.5vw, 40px);
  padding: clamp(18px, 2.6vw, 28px) var(--gutter);
  display: flex;
  align-items: center;
  gap: 14px clamp(20px, 3vw, 40px);
  flex-wrap: wrap;
}
.is-landing .site-header { margin-bottom: 0; }
.brand { display: flex; align-items: baseline; gap: 4px 16px; flex-wrap: wrap; margin-right: auto; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-actions .social { gap: 4px; }
.header-actions .social a { width: 32px; height: 32px; background: transparent; color: var(--muted); }
.header-actions .social a:hover { background: transparent; color: var(--accent); }
.btn-hire {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 10px 22px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  transition: background .25s, color .25s;
}
.btn-hire:hover, .btn-hire[aria-current="page"] { background: var(--accent); color: var(--paper-card); }
.lang-switch { display: flex; align-items: center; font-size: 12px; letter-spacing: .12em; font-weight: 500; }
.lang-switch a { color: var(--muted); text-decoration: none; padding: 4px 6px; transition: color .2s; }
.lang-switch a + a { border-left: 1px solid var(--line); }
.lang-switch a:hover { color: var(--accent); }
.lang-switch a[aria-current="page"] { color: var(--ink); }
.desc-note { font-size: 13px; color: var(--muted); font-style: italic; margin-top: 10px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--accent); color: var(--paper-card); }
.btn--solid:hover { background: #a9653a; border-color: #a9653a; }
.btn--ghost { color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: var(--paper-card); }
.btn--lg { font-size: 15px; letter-spacing: .06em; text-transform: none; padding: 15px 30px; }
.brand__logo {
  font-family: var(--script);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(28px, 3.6vw, 36px);
  line-height: 1;
  color: var(--accent);
  letter-spacing: -.01em;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.brand__tagline { font-family: var(--serif); font-size: 18px; color: var(--muted); }
.site-nav { display: flex; gap: 6px clamp(14px, 2.4vw, 26px); flex-wrap: wrap; }
.site-nav a {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--ink); border-color: var(--accent-soft); }

@media (max-width: 1100px) { .brand__tagline { display: none; } }
@media (max-width: 1000px) {
  .site-header { justify-content: center; text-align: center; }
  .brand { margin: 0; width: 100%; justify-content: center; }
  .site-nav { justify-content: center; }
}
@media (max-width: 520px) {
  .header-actions .social { display: none; }
  .site-nav { gap: 6px 18px; }
}

/* ------------------------------------------------------------
   Layout
------------------------------------------------------------ */
main { max-width: calc(var(--content) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter) 40px; }
.intro {
  text-align: center;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--muted);
  margin: 0 0 clamp(28px, 5vw, 52px);
}
.intro a, .prose a { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color .2s; }
.intro a:hover, .prose a:hover { border-color: currentColor; }

/* Selected works stack (the "tasting menu") */
.stack { display: flex; flex-direction: column; gap: clamp(22px, 4vw, 40px); }
.plate { margin: 0; }
.plate a, .plate button { display: block; }
.plate__mat { background: var(--mat); padding: clamp(8px, 1.6vw, 16px); }
.plate img { width: 100%; }
.plate figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
}
.plate figcaption a { display: inline; transition: color .2s; }
.plate figcaption a:hover { color: var(--accent); }

/* Projects grid */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 44px) clamp(14px, 1.8vw, 18px);
  list-style: none; margin: 0; padding: 0;
}
.card a { display: block; }
.card__img { aspect-ratio: 1 / 1; overflow: hidden; background: var(--mat); position: relative; }
/* pale, misty sepia veil – fades away on hover to reveal the original colours */
.card__img::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--paper); opacity: .32;
  transition: opacity .5s ease;
}
.card a:hover .card__img::after, .card a:focus-visible .card__img::after { opacity: 0; }
.card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: sepia(.6) saturate(.6) contrast(.88) brightness(1.04);
  transform: scale(1.001);
  transition: filter .5s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
.card a:hover .card__img img, .card a:focus-visible .card__img img { filter: none; transform: scale(1.035); }
.card__title {
  margin: 16px 0 0;
  text-align: center;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(18px, 2.2vw, 23px);
  letter-spacing: .06em;
  color: #857a6e;
  transition: color .2s;
}
.card a:hover .card__title { color: var(--accent); }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

/* Project detail */
.project-head { text-align: center; max-width: 700px; margin: 0 auto clamp(30px, 5vw, 50px); }
.project-head h1 {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: .06em;
  color: var(--ink);
}
.project-meta {
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.prose { color: var(--text); }
.prose p { margin: 0 0 .9em; }
.project-head .prose { margin-top: 22px; text-align: left; }
.project-head .prose:has(> p:only-child) { text-align: center; }
.prose ul { margin: 0 0 .9em; padding-left: 1.1em; }
.prose li { margin: .15em 0; }
.prose li::marker { color: var(--accent-soft); }

.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin: clamp(40px, 6vw, 70px) 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--muted);
}
.pager a { transition: color .2s; }
.pager a:hover { color: var(--accent); }
.pager small { display: block; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.pager__next { text-align: right; }
.pager__all { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }

/* About */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.about__portrait { background: var(--mat); padding: clamp(8px, 1.4vw, 14px); position: sticky; top: 24px; }
.about__portrait img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 55% 22%; filter: sepia(.14) saturate(.95); }

/* Contact / hire me */
.contact__head { max-width: 760px; margin: 0 auto clamp(40px, 6vw, 70px); text-align: center; }
.contact__head h1 {
  margin: 10px 0 20px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 5.6vw, 64px);
  line-height: 1.05;
  color: var(--ink);
}
.contact__head h1 em { font-family: var(--script); color: var(--accent); font-weight: 500; }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.section-label {
  margin: 0 0 18px;
  text-align: center;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
}
.services {
  list-style: none; margin: 0 0 clamp(40px, 6vw, 64px); padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
.service { background: var(--paper-card); border: 1px solid var(--line); border-radius: 6px; padding: 24px 26px; }
.service h3 { margin: 0 0 6px; font-family: var(--sans); font-weight: 500; font-size: 18px; letter-spacing: .03em; color: var(--ink); }
.service p { margin: 0; font-size: 17.5px; line-height: 1.5; }
.clients { text-align: center; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--text); margin: 0; }
@media (max-width: 640px) { .services { grid-template-columns: 1fr; } }
.about h1 {
  margin: 0 0 6px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: .06em;
  color: var(--ink);
}
.about .project-meta { margin-bottom: 26px; }
.about h2 {
  margin: 34px 0 10px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tags li {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text);
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-card);
}
.contact-line { font-family: var(--sans); font-size: 16px; }
.contact-line a { color: var(--accent); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } .about__portrait { max-width: 420px; margin: 0 auto; } }

/* Legal */
.legal { max-width: 680px; margin: 0 auto; }
.legal h1 { font-family: var(--sans); font-weight: 400; letter-spacing: .06em; color: var(--ink); font-size: 32px; margin: 0 0 20px; }
.legal h2 { font-family: var(--sans); font-weight: 500; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 32px 0 8px; }
.todo { background: #f7e3c9; color: #8a4f22; padding: 0 .3em; border-radius: 3px; }

/* Footer */
.site-footer {
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
  text-align: center;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--muted);
}
.site-footer p { margin: 18px 0 0; }
.site-footer a:hover { color: var(--accent); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none;
  place-items: center;
  background: rgba(38, 30, 22, .92);
  padding: 4vh 4vw;
  cursor: zoom-out;
}
.lightbox.is-open { display: grid; }
.lightbox img { max-width: 100%; max-height: 92vh; width: auto; height: auto; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.lightbox button {
  position: absolute; top: 14px; right: 16px;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: rgba(253, 249, 242, .12);
  color: #fdf9f2; font-size: 26px; line-height: 1; cursor: pointer;
}
.lightbox .lb-prev, .lightbox .lb-next { top: 50%; transform: translateY(-50%); right: auto; }
.lightbox .lb-prev { left: 14px; }
.lightbox .lb-next { left: auto; right: 14px; }
.zoomable { cursor: zoom-in; }

/* Fade-in on load */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s ease; }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .hero__text { animation: rise 1.1s .2s both cubic-bezier(.2,.7,.2,1); }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
}

/* Legal links under the start page slideshow */
.landing-legal { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; padding: 14px 16px 18px;
  font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.landing-legal a { color: var(--muted); text-decoration: none; }
.landing-legal a:hover { color: var(--accent); }

/* Videos on project pages (muted loops, started by js/site.js when visible) */
.plate video, .clip video { display: block; width: 100%; height: auto; background: #e6e8ec; }
.clips { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 1.4vw, 14px);
  background: var(--mat); padding: clamp(8px, 1.6vw, 16px); }
.clip { margin: 0; }
.clip video { aspect-ratio: 1 / 1; object-fit: cover; }
.clip figcaption { text-align: center; font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); padding: 8px 0 2px; }
@media (max-width: 700px) { .clips { grid-template-columns: repeat(2, 1fr); } }
.media-heading { font-family: var(--serif, inherit); font-weight: 400; font-size: clamp(26px, 3vw, 36px); color: var(--ink);
  text-align: center; margin: clamp(30px, 5vw, 56px) 0 0; }
.media-heading:first-child { margin-top: 0; }
