/* Tony R. Roos — modern realism
   Palette taken from the harbour: fog, deep water, wet granite,
   and the red of a navigation mark, used only to mean "for sale". */

@import url("https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,500;0,600;1,400&family=Work+Sans:wght@400;500;600&display=swap");

:root {
  --fog:      #EDF0F1;   /* page */
  --paper:    #FFFFFF;   /* image mats */
  --deep:     #1B2A32;   /* ink */
  --granite:  #5C6E78;   /* secondary text */
  --tide:     #C9D2D6;   /* rules, frames */
  --mark:     #A8261D;   /* sjömärke red: for sale */

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans:  "Work Sans", "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0:  1.0625rem;
  --step-1:  1.3rem;
  --step-2:  1.7rem;
  --step-3:  2.4rem;
  --step-4:  clamp(2.6rem, 6vw, 4.6rem);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fog);
  color: var(--deep);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--deep); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */
.site-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem 2rem; flex-wrap: wrap;
  padding-top: 28px; padding-bottom: 28px;
}
.name {
  font-family: var(--serif); font-weight: 500;
  font-size: var(--step-1); letter-spacing: 0.01em;
  text-decoration: none;
}
.nav { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.nav a {
  text-decoration: none; font-size: var(--step--1); color: var(--granite);
  padding: 4px 0; border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--deep); }
.nav a[aria-current="page"] { color: var(--deep); border-bottom-color: var(--deep); }

/* ---------- hero: one painting, full bleed ---------- */
.hero { margin: 0 0 56px; }
.hero figure { margin: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); margin-top: 48px; }
.hero .frame {
  background: var(--deep);
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.hero .frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.actions .btn { background: var(--deep); box-shadow: inset 0 0 0 1px var(--deep); }
.actions .btn:hover { background: var(--granite); box-shadow: inset 0 0 0 1px var(--granite); }
.actions .btn.ghost { background: none; color: var(--deep); }
.clients { max-width: 58ch; margin: 20px 0 0; color: var(--granite); font-size: var(--step-0, 1rem); }
.actions .btn.ghost:hover { background: var(--deep); color: var(--paper); box-shadow: inset 0 0 0 1px var(--deep); }
.hero figcaption {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-top: 12px; font-size: var(--step--1); color: var(--granite);
}
.statement {
  max-width: 34ch;
  font-family: var(--serif); font-weight: 400;
  font-size: var(--step-4); line-height: 1.08;
  margin: 24px 0 0;
  letter-spacing: -0.01em;
}
.lede {
  max-width: 58ch; font-size: var(--step-1); line-height: 1.55;
  color: var(--granite); margin: 22px 0 0;
}

/* ---------- two doors from the front page ---------- */
.doors {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter);
  margin: 72px 0 96px;
}
.door { text-decoration: none; display: block; }
.door .frame { aspect-ratio: 4 / 3; background: var(--tide); overflow: hidden; }
.door .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.door:hover .frame img { transform: scale(1.02); }
.door h2 { font-family: var(--serif); font-weight: 500; font-size: var(--step-2); margin: 18px 0 6px; }
.door p { margin: 0; color: var(--granite); max-width: 44ch; }

/* ---------- page titles ---------- */
.page-title {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--step-3); line-height: 1.15;
  margin: 24px 0 12px; max-width: 24ch;
}
.page-intro { max-width: 60ch; color: var(--granite); margin: 0 0 40px; font-size: var(--step-1); line-height: 1.5; }

/* ---------- filters ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 32px; }
.filters button {
  font: inherit; font-size: var(--step--1);
  background: transparent; color: var(--granite);
  border: 1px solid var(--tide); border-radius: 999px;
  padding: 6px 14px; cursor: pointer;
}
.filters button:hover { color: var(--deep); border-color: var(--granite); }
.filters button[aria-pressed="true"] { background: var(--deep); border-color: var(--deep); color: var(--fog); }

/* ---------- the hang: works at their own proportions ---------- */
.hang {
  columns: 3 300px; column-gap: var(--gutter);
}
.work { break-inside: avoid; margin: 0 0 44px; }
.work .mat { display: block; background: var(--paper); padding: 14px; box-shadow: 0 1px 0 var(--tide); }
.work .mat img { width: 100%; }
.work .ph {
  aspect-ratio: 4 / 5;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #DDE3E6, #C9D2D6);
  color: var(--granite); font-size: var(--step--1); text-align: center; padding: 1rem;
}
.label { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding-top: 12px; }
.label .t { font-family: var(--serif); font-size: var(--step-1); line-height: 1.3; text-decoration: none; }
.label .t:hover { text-decoration: underline; }
.label .p { font-variant-numeric: tabular-nums; white-space: nowrap; align-self: end; }
.label .m { color: var(--granite); font-size: var(--step--1); grid-column: 1 / -1; }
.label .ask { grid-column: 1 / -1; margin-top: 6px; font-size: var(--step--1); }
.label .ask a { color: var(--mark); text-underline-offset: 3px; }
.for-sale .label .p { color: var(--mark); }
.sold .label .p { color: var(--granite); }

.empty { color: var(--granite); margin: 0 0 32px; }

/* ---------- one painting ---------- */
.back { font-size: var(--step--1); margin: 8px 0 24px; }
.back a { color: var(--granite); text-underline-offset: 3px; }
.back a::before { content: "\2190\00a0"; }
.piece { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--gutter); align-items: start; margin-bottom: 96px; }
.enlarge { display: block; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: var(--granite); cursor: zoom-in; text-align: left; }
.enlarge .mat { display: block; background: var(--paper); padding: 18px; box-shadow: 0 1px 0 var(--tide); }
.enlarge img { width: 100%; }
.enlarge .hint { display: block; margin-top: 10px; font-size: var(--step--1); text-decoration: underline; text-underline-offset: 3px; }
.facts .page-title { margin-top: 0; }
.facts .p { font-size: var(--step-1); margin: 0; }
.for-sale .facts .p { color: var(--mark); }
.facts .m { color: var(--granite); margin: 4px 0 28px; }
.btn { display: inline-block; background: var(--mark); color: var(--paper); padding: 12px 22px; text-decoration: none; }
.btn:hover { background: var(--deep); }
.fallback { font-size: var(--step--1); color: var(--granite); margin: 16px 0 0; overflow-wrap: anywhere; }
.copy {
  font: inherit; font-size: var(--step--1); color: inherit; cursor: pointer;
  background: none; border: 1px solid currentColor; border-radius: 999px;
  padding: 2px 12px; margin-left: 6px; white-space: nowrap;
}
dialog#zoom { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--deep); overflow: auto; }
dialog#zoom::backdrop { background: var(--deep); }
#zoom-img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
#zoom-img.full { width: 220%; max-width: none; height: auto; cursor: zoom-out; }
.close {
  position: fixed; top: 16px; right: 16px; z-index: 1; font: inherit; font-size: var(--step--1);
  min-height: 44px; padding: 0 18px; cursor: pointer;
  background: var(--fog); color: var(--deep); border: 0;
}

.archive-head { font-family: var(--serif); font-weight: 400; font-size: var(--step-2); margin: 64px 0 8px; }
.archive-note { color: var(--granite); margin: 0 0 32px; }

/* ---------- gestaltning: large, one at a time ---------- */
.commission {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--gutter); align-items: end;
  padding: 0 0 72px; margin: 0 0 72px;
  border-bottom: 1px solid var(--tide);
}
.commission:nth-of-type(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.commission:nth-of-type(even) .c-img { order: 2; }
.c-img .frame { aspect-ratio: 3 / 2; background: var(--tide); overflow: hidden; }
.c-img .frame img { width: 100%; height: 100%; object-fit: cover; }
.c-kind { font-size: var(--step--1); color: var(--granite); margin: 0 0 6px; }
.c-title { font-family: var(--serif); font-weight: 500; font-size: var(--step-2); line-height: 1.2; margin: 0 0 12px; }
.c-text { margin: 0; max-width: 40ch; }

.process {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter);
  margin: 24px 0 96px; padding: 0; list-style: none; counter-reset: step;
}
.process li { counter-increment: step; border-top: 1px solid var(--deep); padding-top: 14px; }
.process li::before { content: counter(step); font-family: var(--serif); font-size: var(--step-2); display: block; margin-bottom: 6px; }
.process h3 { font-size: var(--step-0); font-weight: 600; margin: 0 0 4px; }
.process p { margin: 0; color: var(--granite); font-size: var(--step--1); }

/* ---------- contact block, reused ---------- */
.contact {
  background: var(--deep); color: var(--fog);
  padding: 64px 0; margin: 0;
}
.contact h2 { font-family: var(--serif); font-weight: 400; font-size: var(--step-3); margin: 0 0 12px; max-width: 22ch; }
.contact p { max-width: 52ch; color: #B9C6CC; margin: 0 0 24px; }
.contact .lines { display: grid; gap: 6px; font-size: var(--step-1); }
.contact .lines a { color: var(--fog); text-underline-offset: 4px; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--gutter); margin: 24px 0 96px; }
.about .frame { aspect-ratio: 4 / 5; background: var(--tide); overflow: hidden; }
.about .frame img { width: 100%; height: 100%; object-fit: cover; }
.about .body { font-family: var(--serif); font-size: var(--step-1); line-height: 1.65; max-width: 60ch; }
.about .body p { margin: 0 0 1em; }
.cv { margin-top: 32px; font-family: var(--sans); font-size: var(--step-0); }
.cv h3 { font-size: var(--step-0); font-weight: 600; margin: 24px 0 8px; }
.cv ul { margin: 0; padding: 0; list-style: none; }
.cv li { padding: 6px 0; border-bottom: 1px solid var(--tide); }

/* ---------- footer ---------- */
.site-foot {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-top: 32px; padding-bottom: 40px; font-size: var(--step--1); color: var(--granite);
}
.site-foot a { color: var(--granite); }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .doors { grid-template-columns: 1fr; margin: 48px 0 64px; }
  .pair { grid-template-columns: 1fr; margin-top: 32px; }
  .hero .frame { aspect-ratio: 4 / 3; }
  .commission, .commission:nth-of-type(even) { grid-template-columns: 1fr; }
  .commission:nth-of-type(even) .c-img { order: 0; }
  .process { grid-template-columns: 1fr 1fr; }
  .about { grid-template-columns: 1fr; }
  .piece { grid-template-columns: 1fr; }
  .site-head { padding-bottom: 12px; }
  .nav { width: 100%; flex-wrap: nowrap; justify-content: space-between; gap: 4px; }
  .nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .filters button { min-height: 44px; }
  .label .ask a { display: inline-block; padding: 12px 0; }
  .copy { min-height: 36px; margin: 6px 0 0; }
}

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