/* Great Estate — site styles
   Photo-led editorial layout: light grounds, large images, small type.
   Type: Gambetta (headings), Hanken Grotesk (text), Archivo condensed (wordmark). */

@font-face {
  font-family: "Gambetta";
  src: url(fonts/gambetta-400.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gambetta";
  src: url(fonts/gambetta-400-italic.woff2) format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Gambetta";
  src: url(fonts/gambetta-500.woff2) format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url(fonts/hanken-grotesk.woff2) format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
/* Subset containing only the letters of the wordmark. */
@font-face {
  font-family: "Archivo Wordmark";
  src: url(fonts/archivo-wordmark.woff2) format("woff2");
  font-weight: 700;
  font-display: block;
}

:root {
  /* Palette: change these to recolour the whole site. */
  --bg: #f1efe8;
  --bg-alt: #fcfbf8;
  --ink: #1e2321;
  --mute: #5f645f;
  --deep: #1f4038;
  --accent: #a4683a;
  --line: rgba(30, 35, 33, 0.14);

  --serif: "Gambetta", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 1.8vw, 28px);
  --gap: 6px;
  --header: 60px;
  --ease: cubic-bezier(0.7, 0, 0.2, 1);

  /* Scroll progress over the opening film, set by site.js:
     --p moves the wordmark from the film into the header (0 to 1),
     --solid turns the header from white-on-film to dark-on-light. */
  --p: 1;
  --solid: 1;
}
.js { --p: 0; --solid: 0; }

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

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

body {
  margin: 0;
  background: var(--bg-alt);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { display: block; max-width: 100%; }
img { height: auto; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 { font-weight: 400; margin: 0; }
p { margin: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 30;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  font-size: 14px;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: var(--header);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--gutter);
  font-size: 15px;
  color: color-mix(in srgb, var(--ink) calc(var(--solid) * 100%), #fff);
  background: color-mix(in srgb, var(--bg) calc(var(--solid) * 100%), transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--line) calc(var(--solid) * 100%), transparent);
}

.nav { display: flex; gap: clamp(20px, 3.4vw, 48px); }
.nav a, .header-right a { text-decoration: none; }
.nav a:hover, .header-right > a:hover { text-decoration: underline; }

.wordmark {
  font: 700 26px/1 "Archivo Wordmark", "Arial Narrow", sans-serif;
  font-stretch: 80%;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

/* Starts large in the middle of the film and settles into the header.
   --dx, --dy and --big are measured by site.js. */
.site-header .wordmark {
  transform-origin: 50% 50%;
  transform:
    translate(calc(var(--dx, 0px) * (1 - var(--p))), calc(var(--dy, 0px) * (1 - var(--p))))
    scale(calc(1 + (var(--big, 1) - 1) * (1 - var(--p))));
}

.header-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3.4vw, 48px);
}

.lang { display: flex; gap: 12px; font-size: 14px; }
.lang a { opacity: 0.66; text-decoration: none; }
.lang a:hover, .lang a[aria-current] { opacity: 1; }

/* ---------- Opening film ---------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  color: #fff;
  background: var(--deep);
}
.hero video,
.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(10, 16, 15, 0.42), rgba(10, 16, 15, 0) 26%),
    linear-gradient(to top, rgba(10, 16, 15, 0.5), rgba(10, 16, 15, 0) 45%);
}

.hero-content {
  position: absolute;
  z-index: 1;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(84px, 13vh, 132px);
  text-align: center;
}
.hero-kicker { font-size: 14px; }
.hero h1 {
  margin-top: 8px;
  font: 400 clamp(24px, 2.2vw, 32px)/1.2 var(--sans);
  letter-spacing: -0.01em;
}

.hero-bar {
  position: absolute;
  z-index: 1;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 18px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  font-size: 13px;
}
.hero-bar .scroll-cue { grid-column: 2; }
.hero-bar .film-toggle { grid-column: 3; justify-self: end; }

.scroll-cue { padding: 8px; line-height: 0; }
.scroll-cue svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.film-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font: 400 13px/1 var(--sans);
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
.film-toggle:hover { text-decoration: underline; }
.film-toggle svg { width: 10px; height: 10px; fill: currentColor; }
.film-toggle .icon-play { display: none; }
.film-toggle[aria-pressed="true"] .icon-play { display: block; }
.film-toggle[aria-pressed="true"] .icon-pause { display: none; }
.no-js .film-toggle { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .hero-content { animation: rise 1.2s var(--ease) 0.3s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px) var(--gutter);
  padding: clamp(80px, 12vh, 144px) var(--gutter);
  background: var(--bg);
}

.statement {
  font: 400 clamp(28px, 2.5vw, 40px)/1.2 var(--serif);
  letter-spacing: -0.005em;
  max-width: 24ch;
}

.about-text { display: grid; gap: 18px; align-content: start; font-size: 16px; max-width: 58ch; }

.rows {
  display: grid;
  grid-template-columns: clamp(96px, 8vw, 128px) minmax(0, 1fr);
  row-gap: 6px;
  margin: 0;
  font-size: 15px;
}
.about .rows { margin-top: 20px; }
.rows dt { font-size: 13px; padding-top: 1px; }
.rows dd { margin: 0; }

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 10vh, 120px) var(--gutter); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: clamp(28px, 3.4vw, 48px);
}
.section-head h2 {
  font: 400 clamp(30px, 2.6vw, 40px)/1.1 var(--serif);
  letter-spacing: -0.01em;
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.more:hover { text-decoration: underline; }
.more svg { width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.section-lede { max-width: 58ch; margin: -12px 0 clamp(28px, 3.4vw, 48px); font-size: 15px; }

/* Picture grids: images nearly touching, small captions beneath. */
.grid { display: grid; gap: clamp(36px, 4vw, 56px) var(--gap); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card { margin: 0; }
.card a { text-decoration: none; }
.card .pic { position: relative; overflow: hidden; background: var(--bg); aspect-ratio: 3 / 2; }
.card.tall .pic { aspect-ratio: 4 / 5; }
.card.wide .pic { aspect-ratio: 21 / 9; }
.card .pic img, .card .pic video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card a:hover .pic img { transform: scale(1.02); }
.card figcaption, .card .caption { padding-top: 14px; font-size: 14px; }
.card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 4px;
  font-size: 12px;
}
.card .title { font-size: 15px; }

.status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.1em;
}

.note { margin-top: 28px; font-size: 12px; color: var(--mute); }

/* Method: three picture cards. */
.method .card .caption { padding-top: 18px; }
.verb {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font: 400 clamp(26px, 2.2vw, 34px)/1.1 var(--serif);
  letter-spacing: -0.01em;
}
.verb .numeral { font: italic 400 15px/1 var(--serif); color: var(--mute); }
.method .card p { margin-top: 8px; max-width: 38ch; font-size: 15px; }
.method-result {
  margin-top: clamp(48px, 6vw, 80px);
  font: italic 400 clamp(20px, 1.7vw, 26px)/1.35 var(--serif);
  max-width: 44ch;
}

/* ---------- Partners ---------- */

.partners {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: var(--gutter);
  align-items: center;
  padding: clamp(48px, 8vh, 96px) var(--gutter);
  background: var(--bg);
}
.partners h2 { font: 400 14px/1.4 var(--sans); }

.logos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.logos a { display: block; opacity: 0.8; transition: opacity 0.2s; }
.logos a:hover { opacity: 1; }
.logos img { width: auto; max-width: 100%; }
/* Optical balancing: each wordmark has a different weight and proportion,
   so equal heights would not look equal. */
.logos .logo-kvanum img { height: 32px; }
.logos .logo-miele img { height: 20px; }
.logos .logo-gaggenau img { height: 18px; }
.logos .logo-smeg img { height: 26px; }

/* ---------- Contact: text left, photo right ---------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--bg);
}

.contact-body { padding: clamp(64px, 10vh, 120px) var(--gutter); }

.contact h2 {
  font: 400 clamp(30px, 2.6vw, 40px)/1.15 var(--serif);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.contact-lede { max-width: 42ch; font-size: 15px; }
.contact .rows { margin-top: 32px; }

.contact-form { margin-top: clamp(40px, 5vw, 64px); max-width: 560px; }

.field { display: grid; gap: 2px; margin-bottom: 22px; }
.field label { font-size: 13px; }
.field input,
.field textarea {
  width: 100%;
  padding: 8px 0 9px;
  font: 400 16px/1.4 var(--sans);
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: 0 1px 0 var(--accent);
}

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.button {
  padding: 14px 26px;
  font: 500 14px/1 var(--sans);
  color: var(--bg-alt);
  background: var(--ink);
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s;
}
.button:hover { background: var(--deep); }
.form-note { font-size: 13px; color: var(--mute); }

.contact-photo { position: relative; margin: 0; min-height: 100%; }
.contact-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--deep);
  color: var(--bg);
  padding: clamp(48px, 8vh, 88px) var(--gutter) 28px;
  font-size: 14px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-bottom: clamp(40px, 7vh, 80px);
}
.footer-top .wordmark { font-size: 30px; }
.footer-top a:not(.wordmark) { font-size: 16px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(241, 239, 232, 0.2);
  font-size: 13px;
  color: rgba(241, 239, 232, 0.75);
}
.site-footer :focus-visible { outline-color: var(--bg); }
.site-footer .lang a { color: rgba(241, 239, 232, 0.75); }
.site-footer .lang a[aria-current], .site-footer .lang a:hover { color: var(--bg); }
.footer-bottom > a { text-decoration: none; }
.footer-bottom > a:hover { color: var(--bg); text-decoration: underline; }
.credits { flex-basis: 100%; font-size: 12px; }
.credits a { text-decoration: none; }
.credits a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partners { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  :root { --header: 92px; }

  .site-header {
    grid-template-columns: 1fr auto;
    grid-template-areas: "mark right" "nav nav";
    align-content: center;
    row-gap: 12px;
  }
  .site-header .wordmark { grid-area: mark; justify-self: start; font-size: 22px; }
  .header-right { grid-area: right; }
  .nav { grid-area: nav; gap: 20px; font-size: 14px; }

  .about { grid-template-columns: minmax(0, 1fr); }
  .hero-bar { grid-template-columns: 1fr auto 1fr; }

  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .card .pic, .card.wide .pic { aspect-ratio: 4 / 3; }

  .contact { grid-template-columns: minmax(0, 1fr); }
  .contact-photo { min-height: 0; aspect-ratio: 4 / 3; order: -1; }

  .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card .pic img { transition: none; }
}

/* Stock photography comes from many cameras; a light desaturation keeps
   the Malmö pictures in one calm register beside the renders. */
.place .pic img,
.place .pic video,
.projects .pic img,
.contact-photo img { filter: saturate(0.86); }
