/* Layout: full-screen photo with the featured sets listed on it, an "All work" page for the rest.
   Black and white so the photos carry the colour; one cream accent; one simple typeface.
   Follows the visitor's light/dark setting. */
:root {
  --bg: #121212;
  --surface: #1c1c1c;
  --line: #2e2e2e;
  --fg: #ffffff;
  --muted: #9a9a9a;
  --accent: #e6d5ae;

  --display: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #ffffff; --surface: #f1f0ee; --line: #e3e1dd; --fg: #0a0a0a; --muted: #6b6965; --accent: #8a7142;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #ffffff; --surface: #f1f0ee; --line: #e3e1dd; --fg: #0a0a0a; --muted: #6b6965; --accent: #8a7142;
  color-scheme: light;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-weight: 400 700;
  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: "Hanken Grotesk";
  src: url("fonts/hanken-grotesk-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  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;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
code { font-weight: 600; color: var(--fg); }

.eyebrow, .label, .tag {
  font: 500 13px/1.2 var(--body);
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0;
}

/* Top bar */
.topbar {
  position: fixed;
  inset: env(safe-area-inset-top, 0px) 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
/* Over the full-screen photo the bar is see-through with white text; once you scroll past it, it turns solid. */
.topbar { transition: background-color 0.25s, border-color 0.25s; }
body.hero-visible .topbar { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.hero-visible .topbar, body.hero-visible .topbar .nav a, body.hero-visible .topbar .brand, body.hero-visible .topbar .theme-toggle { color: #fff; }
body.hero-visible .topbar .nav a:not(.lang-switch), body.hero-visible .topbar .brand { text-shadow: 0 1px 10px rgb(0 0 0 / 0.35); }
body.hero-visible .topbar .lang-switch span { color: rgb(255 255 255 / 0.7); }
:root:not([lang="et"]) body.hero-visible .topbar .lang-switch [lang="en"],
:root[lang="et"] body.hero-visible .topbar .lang-switch [lang="et"] { color: #fff; }
body.hero-visible .topbar .theme-toggle { border-color: rgb(255 255 255 / 0.45); }
.brand {
  font: 700 22px/1 var(--display);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); }
.theme-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: -8px 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  color: var(--fg);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--fg); }
.theme-toggle .icon { width: 18px; height: 18px; }
.theme-toggle span { display: grid; }
.theme-toggle .icon-moon { display: none; }
/* In dark mode show the sun (switch to light); in light mode show the moon. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: block; }
}
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.nav a {
  font: 500 14px/1 var(--body);
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s;
}
.nav a:hover { color: var(--fg); }
.brand { white-space: nowrap; }
.nav .lang-switch { font-weight: 600; color: var(--fg); letter-spacing: 0.04em; }
/* Language switch names both languages; the current one is bright, the other is the link target. */
.lang-switch { display: inline-flex; gap: 6px; }
.lang-switch span { color: var(--muted); }
.lang-switch span::before { content: ""; }
.lang-switch span + span::before { content: "/"; margin-right: 6px; opacity: 0.5; }
:root:not([lang="et"]) .lang-switch [lang="en"], :root[lang="et"] .lang-switch [lang="et"] { color: var(--fg); }
@media (max-width: 440px) {
  .nav { gap: 14px; }
  .nav a { font-size: 13.5px; }
  .nav a[href$="#about"] { display: none; }
}

/* Hero: one full-screen photo. The list of featured sets sits on it; pointing at a title swaps the photo. */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; background: #1a1a1a; color: #fff; overflow: hidden; }
.hero-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero-media img, .a-media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; transition: opacity 0.5s; }
.hero-media img.on, .a-media img.on { opacity: 1; }
.hero-media { position: absolute; inset: 0; }
/* Flat dim layer (same in both themes) so white text stays readable on any photo. */
.hero-media::after { content: ""; position: absolute; inset: 0; background: rgb(10 10 10 / 0.4); pointer-events: none; }
.hero-pick {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(20px, 5vh, 48px);
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.hero-list { list-style: none; margin: 0; padding: 0; }
.hero-list a {
  display: block;
  width: max-content;
  max-width: 100%;
  font: 600 clamp(20px, 2.7vw, 36px)/1.22 var(--display);
  letter-spacing: -0.015em;
  text-decoration: none;
  color: rgb(255 255 255 / 0.55);
  transition: color 0.2s;
}
.hero-list a:hover, .hero-list a.on, .hero-list a:focus-visible { color: #fff; }
.hero-all {
  display: inline-block;
  margin-top: 14px;
  font: 500 15px/1.4 var(--body);
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
.hero-all:hover { color: var(--accent); }
.hero-caption { margin: 0; text-align: right; font: 400 14px/1.5 var(--body); color: rgb(255 255 255 / 0.85); }
.hero-caption b { display: block; font-weight: 500; color: #fff; font-size: 15px; }
.hero-list .hero-open { display: none; }
/* A small arrow that tells you there's more below (About, booking, contact). */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(14px, 3vh, 32px);
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 2px;
  transform: translateX(-50%);
  color: #fff;
  font: 500 14px/1.2 var(--body);
  text-decoration: none;
  /* Soft dark halo so it reads on bright photos too. */
  text-shadow: 0 0 10px rgb(0 0 0 / 0.7), 0 1px 3px rgb(0 0 0 / 0.6);
}
.scroll-cue .icon { width: 34px; height: 34px; filter: drop-shadow(0 0 6px rgb(0 0 0 / 0.7)) drop-shadow(0 1px 2px rgb(0 0 0 / 0.6)); animation: cue 2.4s ease-in-out infinite; }
.scroll-cue:hover { color: var(--accent); }
@keyframes cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue .icon { animation: none; } }

/* Phones: the photo gets the top of the screen, uncovered. The list sits under it on the page background
   (readable on any photo). Tap a title to preview its photo, tap the arrow beside it to open the set. */
@media (max-width: 700px) {
  .hero { display: flex; flex-direction: column; background: var(--bg); color: var(--fg); }
  .hero-media { position: relative; inset: auto; flex: 0 0 46vh; flex-basis: 46svh; }
  .hero-media::after { background: rgb(10 10 10 / 0.22); }
  .hero-pick { position: static; flex: 1; display: block; padding: 8px var(--gutter) 0; }
  .hero-caption { display: none; }
  .hero-left { width: 100%; }
  .hero-list li { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
  .hero-list li:first-child { border-top: 0; }
  .hero-list li a:first-child { flex: 1; width: auto; padding: 11px 0; font-size: 20px; color: var(--muted); }
  .hero-list li a.on { color: var(--fg); }
  .hero-list .hero-open { display: grid; place-items: center; flex: none; width: 44px; height: 42px; color: var(--muted); font-size: 20px; text-decoration: none; }
  .hero-list li:has(a.on) .hero-open { color: var(--accent); }
  .hero-all { margin-top: 14px; color: var(--fg); }
  .scroll-cue { color: var(--muted); text-shadow: none; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .scroll-cue .icon { filter: none; }
}
@media (max-width: 700px) and (max-height: 720px) {
  .hero-media { flex-basis: 38vh; flex-basis: 38svh; }
  .hero-list li a:first-child { padding: 7px 0; font-size: 18px; }
  .hero-list .hero-open { height: 34px; }
}

.example-note {
  margin: 24px var(--gutter) 0;
  padding: 12px 16px;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 14px;
}

/* Sections */
.about, .services {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
  padding-block: clamp(48px, 8vw, 96px) 0;
}
.section-title {
  margin: 0;
  font: 700 clamp(28px, 4vw, 44px)/1.05 var(--display);
  letter-spacing: -0.02em;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

/* Filters */
.filters {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.filters button {
  border: 0;
  background: none;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
}
.filters button span { font-size: 12px; opacity: 0.7; }
.filters button[aria-selected="true"] { background: var(--fg); color: var(--bg); }

/* Photo frame + placeholder */
.frame { position: relative; background: var(--surface); }
.ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
  background:
    radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, var(--fg) 7%, transparent), transparent 60%),
    var(--surface);
  color: var(--muted);
}
.ph b { font: 500 13px/1.3 var(--body); color: var(--fg); opacity: 0.8; }
.ph small { font: 400 11px/1.3 var(--body); word-break: break-all; }

/* About */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.about-photo { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.about-text { min-width: 0; }
#about-body p { max-width: 52ch; margin: 16px 0 0; color: var(--muted); font-size: 17px; }
#about-body p:first-child { color: var(--fg); font-size: clamp(20px, 2.4vw, 26px); line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
@media (max-width: 720px) { .about { grid-template-columns: 1fr; } }

/* Services */
.service-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service {
  background: var(--bg);
  padding: clamp(20px, 3vw, 36px);
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}
.service h3 {
  margin: 0;
  font: 700 24px/1.15 var(--display);
  letter-spacing: -0.015em;
}
.service .lead { margin: 0; color: var(--muted); max-width: 40ch; }
.service .see {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: 15px; color: var(--muted); text-decoration: none;
}
.service .see:hover { color: var(--accent); }
.book-contact { margin-top: clamp(28px, 4vw, 44px); }
.book-lead { margin: 0 0 16px; color: var(--fg); font-size: clamp(18px, 2vw, 21px); font-weight: 600; letter-spacing: -0.01em; }

/* Contact */
.contact-lead { color: var(--muted); max-width: 60ch; margin: 16px 0 24px; }
.contact-rows { display: grid; border-top: 1px solid var(--line); }
.contact-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.contact-value {
  font: 700 clamp(18px, 3vw, 28px)/1.2 var(--display);
  text-decoration: none;
  overflow-wrap: anywhere;
  min-width: 0;
}
.contact-value:hover { color: var(--accent); }
.copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: none;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}
.copy:hover { border-color: var(--accent); }
@media (max-width: 520px) {
  .contact-row { grid-template-columns: 1fr auto; }
  .contact-row .label { grid-column: 1 / -1; }
}

.footer {
  max-width: var(--max);
  margin: clamp(48px, 8vw, 96px) auto 0;
  padding: 24px var(--gutter) 40px;
  /* Divider lines up with the content edges above it. */
  background: linear-gradient(var(--line), var(--line)) top center / calc(100% - 2 * var(--gutter)) 1px no-repeat;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px 32px;
  font: 400 13px/1.6 var(--body);
  color: var(--muted);
}

/* Gallery overlay */
.gallery {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow-y: auto;
  background: var(--bg);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.gallery-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
  padding-block: 20px 64px;
}
.g-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.g-tools { display: flex; align-items: center; gap: 16px; }
.g-top .theme-toggle { margin: 0; }
.g-nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); }
.g-top .lang-switch { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; text-decoration: none; color: var(--fg); }
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 8px 0;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
}
.back:hover { color: var(--fg); }
.g-head { display: grid; gap: 14px; margin: 24px 0 36px; }
.g-head .tag { color: var(--accent); }
.g-title {
  margin: 0;
  font: 700 clamp(36px, 6vw, 80px)/1 var(--display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.g-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  margin: 6px 0 0;
}
.g-meta div { display: grid; gap: 4px; }
.g-meta dt { font: 400 13px var(--body); color: var(--muted); }
.g-meta dd { margin: 0; font-weight: 500; }
.g-summary { margin: 0; max-width: 62ch; color: var(--muted); }

/* Justified rows: photos read left to right, in the same order as the viewer's arrows. */
.g-note { margin: -16px 0 28px; color: var(--muted); }
.g-note a { color: var(--accent); }
.g-findcar {
  margin-top: 40px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.g-findcar h3 { margin: 0; font: 700 24px/1.15 var(--display); letter-spacing: -0.015em; }
.g-findcar p { margin: 0; color: var(--muted); max-width: 55ch; }
.g-findcar-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 4px; }
.g-findcar-links a { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.g-findcar-links a:hover { text-decoration: underline; }
.g-photos { display: flex; flex-wrap: wrap; gap: 16px 12px; }
.g-photos::after { content: ""; flex-grow: 9999; }
.g-photo {
  margin: 0;
  min-width: 0;
  cursor: zoom-in;
  display: grid;
  align-content: start;
  gap: 6px;
}
.g-photo .frame img { width: 100%; height: auto; }
@media (max-width: 520px) { .g-photo { flex-basis: 100% !important; } }
.g-photo figcaption { font: 400 11px/1.4 var(--body); color: var(--muted); }

.g-next {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.g-next a { text-decoration: none; display: grid; gap: 4px; min-width: 0; }
.g-next a:last-child { text-align: right; margin-left: auto; }
.g-next strong { font: 700 18px/1.2 var(--display); }
.g-next a:hover strong { color: var(--accent); }

/* All work: list grouped by year on the left, photo of the pointed-at set on the right */
.archive {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--bg);
  display: grid;
  grid-template-columns: minmax(340px, 46%) 1fr;
}
.a-side { display: flex; flex-direction: column; min-height: 0; padding-top: env(safe-area-inset-top, 0px); }
.a-side .g-top { padding: 14px var(--gutter); }
.a-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 20px; padding: 8px var(--gutter) 12px; }
.a-title { margin: 0; font: 700 clamp(28px, 3.4vw, 44px)/1.05 var(--display); letter-spacing: -0.02em; }
.a-list { flex: 1; overflow-y: auto; padding: 0 var(--gutter) calc(48px + env(safe-area-inset-bottom, 0px)); scrollbar-width: thin; }
.a-year { margin: 28px 0 6px; font: 600 14px/1.2 var(--body); color: var(--accent); }
.a-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  font: 500 clamp(17px, 1.6vw, 22px)/1.3 var(--display);
  letter-spacing: -0.005em;
  color: var(--muted);
  transition: color 0.2s;
}
.a-row span { flex: none; font: 400 13px/1.3 var(--body); }
.a-row:hover, .a-row.on, .a-row:focus-visible { color: var(--fg); }
.a-row.on span { color: var(--accent); }
.a-media { position: relative; background: var(--surface); overflow: hidden; }
@media (max-width: 800px) {
  .archive { grid-template-columns: 1fr; grid-template-rows: 32vh 1fr; grid-template-rows: 32svh 1fr; }
  .a-media { order: -1; }
  .a-side { min-height: 0; }
}
/* Touch screens have nothing to point with, so the photo panel goes and a tap opens the set straight away. */
@media (hover: none) and (max-width: 800px) {
  .archive { grid-template-rows: 1fr; }
  .a-media { display: none; }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--bg);
  display: grid;
  grid-template-rows: 1fr auto;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.lb-stage {
  display: grid;
  place-items: center;
  padding: clamp(12px, 4vw, 48px) clamp(12px, 7vw, 96px);
  min-height: 0;
}
/* Fixed box + contain, so the small copy shown first and the full-size one that replaces it fill the same space. */
.lb-stage img { width: 100%; height: calc(100dvh - 140px); max-width: 100%; object-fit: contain; margin: 0 auto; }
.lb-stage .frame { width: min(100%, 1100px); background: none; }
.lb-stage .frame:has(.ph) { background: var(--surface); }
.lb-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px var(--gutter);
  font: 400 12px var(--body);
  color: var(--muted);
}
.lb-btn {
  position: absolute;
  border: 0;
  background: none;
  color: var(--fg);
  font-size: 30px;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.7;
}
.lb-btn:hover { opacity: 1; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lb-theme { position: absolute; right: 64px; top: calc(15px + env(safe-area-inset-top, 0px)); margin: 0; background: var(--bg); }
.lb-close { right: 4px; top: calc(4px + env(safe-area-inset-top, 0px)); font-size: 26px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

.label .icon { margin-right: 4px; }
.footer strong { display: block; color: var(--fg); font-weight: 600; margin-bottom: 2px; }
.footer p { margin: 0; }
