/* Art site. White, Space Grotesk, one rule colour. See DESIGN.md § The art site. */
:root {
  --ink: #111;
  --muted: #666;
  --rule: #e6e6e6;
  --soft: #f3f3f3;
  --bg: #fff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 16px; line-height: 1.5;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: #555; }
img, video { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.kicker { margin: 0; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---- header ---- */
.site-header {
  padding: 28px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.brand-logo { height: 40px; width: auto; }
.site-nav { display: flex; gap: 24px; font-size: 15px; }
.site-nav .current { font-weight: 700; }
.nav-handle { display: none; }
.menu-button { display: none; }

/* ---- landing ---- */
main.landing { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 24px; text-align: center; }
.landing-title { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.landing-pic { width: auto; height: auto; max-width: min(100%, 640px); max-height: 60vh; max-height: 60svh; aspect-ratio: 1 / 1; object-fit: contain; }
.enter {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 40px;
  border: 2px solid var(--ink); font-size: 15px; font-weight: 700; letter-spacing: 0.16em;
}
.enter:hover { background: var(--ink); color: #fff; }

/* ---- footer ---- */
.site-footer {
  max-width: 1240px; margin: 0 auto; padding: 24px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted);
}
.site-footer.footer-wide { max-width: none; margin: 0; padding: 24px 32px; border-top: 0; }

/* ---- inner pages ---- */
main.page { max-width: 1240px; margin: 0 auto; padding: 8px 24px 80px; display: flex; flex-direction: column; gap: 40px; }

/* ---- Projects: one markup, three layouts ---- */
main.projects { padding: 8px 32px 96px; }
.proj-photos { display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr)); gap: 10px; min-width: 0; }
.proj-photos img { width: 100%; height: var(--ph); object-fit: cover; background: var(--soft); }
.proj-no { display: none; }
.proj-sale { font-size: 13px; margin-top: 4px; }

/* Rows: 200 px title column, photos in one even grid */
.layout-rows .proj { display: flex; flex-wrap: wrap; gap: 12px 32px; padding: 24px 0; border-top: 1px solid var(--rule); }
.layout-rows .proj-head { flex: 0 0 200px; display: flex; flex-direction: column; gap: 6px; }
.layout-rows .proj-title { font-size: 18px; font-weight: 500; }
.layout-rows .proj-year { font-size: 14px; color: var(--muted); }
.layout-rows .proj-photos { flex: 1 1 520px; }

/* Big rows: 44 px titles, year at right, photos below */
.layout-big .proj-list { display: flex; flex-direction: column; gap: 72px; }
.layout-big .proj { display: flex; flex-direction: column; gap: 16px; }
.layout-big .proj-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.layout-big .proj-title { font-size: 44px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; margin-right: auto; }
.layout-big .proj-year { font-size: 15px; color: var(--muted); }
.layout-big .proj-sale { order: 3; flex-basis: 100%; margin: 0; }

/* Text index: numbered list, small photos at right */
.layout-index .proj {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr); gap: 16px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid #e3e3e3;
}
.layout-index .proj-head { display: grid; grid-template-columns: 56px minmax(0, 1fr) 110px; gap: 16px; align-items: center; }
.layout-index .proj-no { display: block; font-size: 13px; color: var(--muted); }
.layout-index .proj-title { font-size: 22px; font-weight: 500; }
.layout-index .proj-year { font-size: 13px; }
.layout-index .proj-sale { grid-column: 2 / 4; margin: 0; }

/* ---- one project ---- */
.back { font-size: 14px; color: var(--muted); align-self: flex-start; }
.project-top { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.project-media { flex: 3 1 520px; min-width: 0; }
.project-text { flex: 2 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.project-text h1 { margin: 0; font-size: 40px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; }
.project-date { font-size: 15px; color: var(--muted); }
.project-body p, .about-body p { margin: 0 0 1em; font-size: 17px; line-height: 1.6; }
.project-body p:last-child, .about-body p:last-child { margin-bottom: 0; }
.hero-photo img, .flip-box { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--soft); }
/* the img height attribute would otherwise win over aspect-ratio */
.hero-photo img { height: auto; }
.hero-empty { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; background: var(--soft); color: var(--muted); font-size: 13px; letter-spacing: 0.08em; }

.flip { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.flip-box { position: relative; overflow: hidden; }
.flip-img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; }
.flip-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.flip-toggle {
  min-height: 44px; padding: 0 18px; border: 1px solid var(--ink); background: #fff; color: var(--ink); font-size: 14px; cursor: pointer;
}

.sale { border-top: 1px solid var(--rule); padding-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.sale-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.sale-price { font-size: 22px; font-weight: 500; }
.sale-note { font-size: 13px; color: var(--muted); }
.buy, .contact-form button {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 0 28px;
  background: var(--ink); color: #fff; border: 0; border-radius: 0; font-size: 15px; font-weight: 500; cursor: pointer;
}
.buy:hover { color: #fff; background: #333; }

/* main image on the right (desktop); on a phone it is always on top */
@media (min-width: 721px) { .main-right .project-media { order: 2; } }

/* Finished, then Process: square-cropped grids, --cols across (2 on a phone) */
.pr-photos { display: flex; flex-direction: column; gap: 40px; }
.pr-section { display: flex; flex-direction: column; gap: 16px; }
.pr-process { border-top: 1px solid var(--rule); padding-top: 32px; }
.pr-finished + .pr-process { margin-top: -8px; }
.pr-head { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.pr-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 10px; align-items: start; }
.pr-grid .ph { display: block; }
.pr-grid img { width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; background: var(--soft); }
.pr-note { margin: 8px 0; max-width: 640px; font-size: 17px; line-height: 1.6; white-space: pre-line; }
/* an animation in the Process run: a square two cells by two, its Pause/Play bar laid over the foot */
.flip-inline { grid-column: span 2; grid-row: span 2; position: relative; aspect-ratio: 1 / 1; gap: 0; }
.flip-inline .flip-box { aspect-ratio: auto; height: 100%; }
.flip-inline .flip-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 6px 6px 12px; background: rgba(255, 255, 255, 0.9); color: #444; }
.video-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.video-list video { width: 100%; background: #000; }

/* lightbox */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: rgba(255, 255, 255, 0.97); }
.lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.lightbox::backdrop { background: rgba(255, 255, 255, 0.97); }
.lb-img { max-width: calc(100vw - 48px); max-height: calc(100vh - 110px); width: auto; height: auto; object-fit: contain; }
.lb-bar { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.lb-bar button { min-width: 48px; min-height: 48px; padding: 0 14px; border: 1px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; }
.lb-count { min-width: 72px; text-align: center; }

/* ---- store ---- */
main.store { gap: 56px; }
.desk-card { display: flex; flex-wrap: wrap; align-items: stretch; border: 1px solid var(--rule); }
.desk-card-img { flex: 1 1 420px; min-width: 0; height: 340px; object-fit: cover; }
.desk-card-text { flex: 1 1 360px; padding: 40px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.desk-card-title { font-size: 34px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.desk-card-text p { margin: 0; font-size: 16px; line-height: 1.6; color: #333; }
.desk-card-cta { font-size: 15px; font-weight: 500; }
.available { display: flex; flex-direction: column; gap: 20px; }
.available h2 { margin: 0; font-size: 22px; font-weight: 500; }
.available p { margin: 0; }
.available-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px 20px; }
.available-item { display: flex; flex-direction: column; gap: 10px; }
.available-item img { width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; background: var(--soft); }
.available-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 15px; }
.available-title { font-size: 16px; font-weight: 500; }
.ask-link {
  display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--ink); font-size: 15px; font-weight: 500;
}
.ask-link:hover { background: var(--ink); color: #fff; }

/* ---- about + contact ---- */
main.about-page { padding-top: 16px; gap: 80px; }
.about { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.about-photo { flex: 1 1 360px; min-width: 0; }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; }
.about-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.about-text h1 { margin: 0; font-size: 40px; font-weight: 500; letter-spacing: -0.02em; }
.about-text .kicker { letter-spacing: 0.12em; }
.about-body p { font-size: 18px; line-height: 1.65; }
.about a.insta, .contact-intro a { text-decoration: underline; text-underline-offset: 3px; }
.contact { display: flex; flex-wrap: wrap; gap: 48px; border-top: 1px solid var(--rule); padding-top: 48px; scroll-margin-top: 24px; }
.contact-intro { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.contact-intro h2 { margin: 0; font-size: 32px; font-weight: 500; letter-spacing: -0.02em; }
.contact-intro p { margin: 0; line-height: 1.6; color: #333; }
.contact-form { flex: 2 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.field-row { display: flex; flex-wrap: wrap; gap: 18px; }
.field-row label { flex: 1 1 220px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.contact-form input, .contact-form textarea { min-height: 44px; border: 1px solid #cfcfcf; border-radius: 0; padding: 0 12px; font-size: 16px; background: #fff; }
.contact-form textarea { padding: 12px; resize: vertical; }
.contact-form button { align-self: flex-start; width: auto; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; font-size: 15px; min-height: 1.5em; }

.thanks { margin: 0; font-size: 32px; font-weight: 500; letter-spacing: -0.02em; max-width: 24em; }

/* ---- phone ---- */
@media (max-width: 720px) {
  .site-header { height: 64px; padding: 0 12px 0 20px; flex-wrap: nowrap; border-bottom: 1px solid #eee; position: relative; }
  .brand-name { font-size: 14px; }
  .js .menu-button {
    display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    border: 0; background: transparent; color: var(--ink); cursor: pointer; padding: 0;
  }
  .menu-button .icon-close, .menu-button[aria-expanded="true"] .icon-open { display: none; }
  .menu-button[aria-expanded="true"] .icon-close { display: block; }
  /* without JS the links stay a plain row under the name */
  .no-js .site-header { height: auto; padding: 14px 20px; flex-wrap: wrap; }
  .js .site-nav { display: none; }
  .js .menu-open .site-nav {
    display: flex; flex-direction: column; gap: 4px; position: fixed; z-index: 20; top: 64px; left: 0; right: 0; bottom: 0;
    padding: 32px 20px; background: #fff; overflow-y: auto;
  }
  .menu-open .site-nav a { font-size: 36px; font-weight: 500; padding: 10px 0; border-bottom: 1px solid #eee; }
  .menu-open .site-nav .current { font-weight: 500; }
  .menu-open .nav-handle { display: block; margin-top: auto; font-size: 13px; color: var(--muted); }
  body.menu-locked { overflow: hidden; }

  main.projects { padding: 0 20px 64px; }
  main.page { padding: 8px 20px 64px; gap: 32px; }
  .site-footer, .site-footer.footer-wide { padding: 24px 20px; }

  /* every layout stacks: title row, then photos in 3 columns */
  .proj, .layout-rows .proj, .layout-big .proj, .layout-index .proj {
    display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 20px 0; border-top: 0; border-bottom: 1px solid #eee;
  }
  .layout-big .proj-list { gap: 0; }
  .proj-head, .layout-rows .proj-head, .layout-big .proj-head, .layout-index .proj-head {
    flex: none; display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px;
  }
  .proj-title, .layout-rows .proj-title, .layout-big .proj-title, .layout-index .proj-title { font-size: 17px; font-weight: 500; letter-spacing: 0; margin-right: auto; }
  .layout-index .proj-no { font-size: 13px; color: var(--muted); }
  .layout-index .proj-title { margin-right: auto; }
  .proj-year, .layout-rows .proj-year, .layout-big .proj-year, .layout-index .proj-year { font-size: 13px; color: var(--muted); }
  .proj-sale { flex-basis: 100%; margin: 0; }
  .proj-photos, .layout-rows .proj-photos { flex: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .proj-photos img { height: auto; aspect-ratio: 4 / 5; }
  .proj-photos img:nth-child(n + 4) { display: none; }

  .project-text h1, .about-text h1 { font-size: 32px; }
  .desk-card-img { height: 240px; flex-basis: 100%; }
  .desk-card-text { padding: 24px; }
  .desk-card-title { font-size: 28px; }
  .pr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .pr-photos { gap: 32px; }
  .contact-form button { width: 100%; }
}

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