/*
 * JM Studios LLC, site styles.
 * The design system lives in CLAUDE.md. Read it before editing this file.
 * No external requests: fonts are self-hosted in /assets/fonts (OFL 1.1).
 */

/* ------------------------------------------------------------------ */
/* Fonts                                                               */
/* ------------------------------------------------------------------ */

@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  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: "Fraunces";
  src: url("assets/fonts/fraunces-italic-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  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("assets/fonts/hanken-grotesk-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  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;
}

/* ------------------------------------------------------------------ */
/* Tokens                                                              */
/* ------------------------------------------------------------------ */

:root {
  /* Studio palette (the frame) */
  --paper: #f5f3ef;
  --paper-2: #ece9e3;
  --ink: #191817;
  --ink-2: #45423d;
  --muted: #6b675f;
  --rule: #d9d5cd;
  --rule-strong: #bdb8ae;
  --night: #191817;
  --night-ink: #f5f3ef;
  --night-muted: #a8a39a;

  /* Type */
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --step-6: clamp(2.6rem, 1.4rem + 5.4vw, 6.25rem);
  --step-5: clamp(2.25rem, 1.5rem + 3.4vw, 4.5rem);
  --step-4: clamp(1.85rem, 1.4rem + 2vw, 3rem);
  --step-3: clamp(1.35rem, 1.2rem + 0.6vw, 1.75rem);
  --step-2: clamp(1.15rem, 1.05rem + 0.45vw, 1.375rem);
  --step-1: 1.125rem;
  --step-0: 1.0625rem;
  --step--1: 0.9375rem;
  --step--2: 0.8125rem;

  /* Space (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* Layout */
  --wrap: 82rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-h: 4.5rem;

  /* Radii: deliberately unequal, see CLAUDE.md */
  --radius-0: 0;
  --radius-1: 3px;
  --radius-icon: 22.5%;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* App color worlds. Each app sets the same six variables. */
.app--pastsunday {
  --app-paper: #f8e9d6;
  --app-paper-2: #f1dabb;
  --app-ink: #2e2419;
  --app-ink-2: #5c4d3c;
  --app-accent: #d97706;
  --app-accent-ink: #8a4204;
  --app-icon: url("assets/pastsunday/icon.svg");
}

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  text-wrap: balance;
  font-optical-sizing: auto;
}

p,
li,
dd {
  text-wrap: pretty;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: currentColor;
  transition: text-decoration-thickness 0.15s var(--ease), text-decoration-color 0.15s var(--ease);
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: var(--radius-1);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-1);
}

.skip-link:focus {
  top: var(--space-3);
}

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

/* Wall label: small, factual caption in the gallery voice */
.label {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--step--2);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------------------------------------------ */
/* Buttons and links                                                   */
/* ------------------------------------------------------------------ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 3rem;
  padding: 0 var(--space-5);
  border-radius: var(--radius-1);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.button:hover {
  background: #33312e;
}

.button:active {
  transform: translateY(1px);
}

/* Text link with a CSS-drawn arrow (the font subset has no arrow glyph) */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 2.75rem;
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
}

.arrow-link span {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.arrow-link:hover span {
  text-decoration-thickness: 2px;
}

.arrow-link::after {
  content: "";
  width: 0.95em;
  height: 0.6em;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 19 12'%3E%3Cpath d='M0 6h17M12 1l5 5-5 5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 19 12'%3E%3Cpath d='M0 6h17M12 1l5 5-5 5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s var(--ease);
}

.arrow-link:hover::after {
  transform: translateX(3px);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 2.75rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  font-variation-settings: "opsz" 36;
}

.wordmark img {
  width: 1.75rem;
  height: 1.75rem;
}

.site-nav ul {
  display: flex;
  gap: var(--space-2);
  margin-right: calc(var(--space-3) * -1);
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 var(--space-3);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: var(--space-3);
  right: var(--space-3);
  bottom: 0.55rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.site-nav a[aria-current]:not([aria-current="false"]) {
  color: var(--ink);
}

.site-nav a[aria-current]:not([aria-current="false"])::after {
  height: 2px;
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
}

@media (max-width: 47.49rem) {
  .js .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 2.75rem;
    min-width: 2.75rem;
    margin-right: calc(var(--space-3) * -1);
    padding: 0 var(--space-3);
    border: 0;
    background: none;
    color: var(--ink);
    font: 500 var(--step--1) / 1 var(--sans);
    cursor: pointer;
  }

  .menu-toggle .bars {
    position: relative;
    width: 1.1rem;
    height: 0.6rem;
  }

  .menu-toggle .bars::before,
  .menu-toggle .bars::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.2s var(--ease), top 0.2s var(--ease);
  }

  .menu-toggle .bars::before {
    top: 0;
  }

  .menu-toggle .bars::after {
    top: calc(100% - 1.5px);
  }

  .menu-toggle[aria-expanded="true"] .bars::before {
    top: calc(50% - 0.75px);
    transform: rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .bars::after {
    top: calc(50% - 0.75px);
    transform: rotate(-45deg);
  }

  .js .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }

  .js .menu-toggle[aria-expanded="false"] + .site-nav {
    display: none;
  }

  .js .site-nav ul {
    flex-direction: column;
    gap: 0;
    margin-right: 0;
    padding: var(--space-2) var(--gutter) var(--space-5);
  }

  .js .site-nav li + li {
    border-top: 1px solid var(--rule);
  }

  .js .site-nav a {
    display: flex;
    min-height: 3.5rem;
    padding: 0;
    font-family: var(--serif);
    font-size: 1.5rem;
    color: var(--ink);
  }

  .js .site-nav a::after {
    left: 0;
    right: auto;
    width: 2rem;
    bottom: 0.7rem;
  }

  /* Without JS the nav stays inline and compact */
  .site-nav a {
    padding: 0 var(--space-2);
  }
}

/* ------------------------------------------------------------------ */
/* Phone frame (generic CSS device, no product imagery)                */
/* ------------------------------------------------------------------ */

.phone {
  position: relative;
  width: var(--phone-w, 15rem);
  padding: calc(var(--phone-w, 15rem) * 0.024);
  border-radius: 15% / 7%;
  background: var(--app-ink, var(--ink));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 2px 4px rgba(25, 24, 23, 0.08),
    0 24px 48px -24px rgba(25, 24, 23, 0.35);
}

.phone::before {
  /* side button, a small generic detail */
  content: "";
  position: absolute;
  right: -2px;
  top: 22%;
  width: 2px;
  height: 9%;
  border-radius: 0 2px 2px 0;
  background: var(--app-ink, var(--ink));
}

.screen {
  position: relative;
  aspect-ratio: 1290 / 2796;
  overflow: hidden;
  border-radius: 12% / 5.6%;
  background: var(--app-paper-2, var(--paper-2));
}

.screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Shown only when a screenshot file is missing (set by script.js) */
.screen.is-empty img {
  display: none;
}

.screen.is-empty {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9%;
  container-type: inline-size;
}

/* Until screenshots exist, each screen reads like the app's launch screen:
   the icon in full color with the screen's name beneath it. */
.screen.is-empty::after {
  content: "";
  order: -1;
  width: 28cqi;
  aspect-ratio: 1;
  border-radius: var(--radius-icon);
  background: var(--app-icon) center / cover no-repeat;
  box-shadow: 0 1px 2px rgba(46, 36, 25, 0.12), 0 8px 16px -10px rgba(46, 36, 25, 0.45);
}

.screen.is-empty::before {
  content: attr(data-screen);
  font-family: var(--serif);
  font-size: max(0.7rem, 9cqi);
  font-style: italic;
  line-height: 1;
  color: var(--app-ink-2);
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

.hero {
  padding-block: var(--space-8) var(--space-9);
}

.hero-grid {
  display: grid;
  gap: var(--space-7);
}

.hero-copy .label {
  margin-bottom: var(--space-5);
}

.hero h1 {
  font-size: var(--step-6);
  font-weight: 380;
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-variation-settings: "SOFT" 30, "WONK" 0;
  max-width: 13ch;
}

.hero h1 em {
  font-style: italic;
  font-weight: 360;
}

.hero .lede {
  max-width: 34rem;
  margin-top: var(--space-6);
  font-size: var(--step-2);
  line-height: 1.5;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--space-7);
}

/* The three hero phones: a symmetrical group, the middle phone in front */
.hero-visual {
  position: relative;
  margin: 0;
}

.hero-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
  padding: var(--space-6) var(--space-5);
  background: var(--app-paper);
  isolation: isolate;
}

.hero-stage .phone {
  --phone-w: 100%;
  width: 100%;
}

/* Side phones tuck behind the middle one by the same small amount: less
   than the screen's own side margin, so no title or text is covered. */
.hero-stage .phone:nth-child(1) {
  z-index: 1;
  transform: translateX(5%);
}

.hero-stage .phone:nth-child(2) {
  z-index: 2;
}

.hero-stage .phone:nth-child(3) {
  z-index: 1;
  transform: translateX(-5%);
}

.hero-visual figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--rule);
  font-size: var(--step--1);
  color: var(--muted);
}

.hero-visual figcaption strong {
  font-weight: 600;
  color: var(--ink);
}

@media (min-width: 60rem) {
  .hero {
    padding-block: var(--space-8) var(--space-10);
  }

  .hero-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: center;
    gap: var(--space-6);
  }

  .hero-copy {
    grid-column: 1 / span 6;
  }

  .hero-stage {
    padding: var(--space-7) var(--space-6);
  }

  .hero-visual {
    grid-column: 7 / span 6;
    margin-right: calc(var(--gutter) * -0.5);
  }
}

/* ------------------------------------------------------------------ */
/* Section heads                                                       */
/* ------------------------------------------------------------------ */

.section {
  padding-block: var(--space-8);
}

@media (min-width: 60rem) {
  .section {
    padding-block: var(--space-10);
  }
}

.section-head {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-7);
}

.section-head h2 {
  font-size: var(--step-4);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

@media (min-width: 60rem) {
  .section-head {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: baseline;
    gap: var(--space-6);
  }

  .section-head .label {
    grid-column: 1 / span 3;
  }

  .section-head h2 {
    grid-column: 4 / span 8;
  }
}

/* ------------------------------------------------------------------ */
/* Apps: one exhibit band per app                                      */
/* ------------------------------------------------------------------ */

.apps {
  padding-top: var(--space-8);
  border-top: 1px solid var(--rule);
}

@media (min-width: 60rem) {
  .apps {
    padding-top: var(--space-9);
  }
}

.exhibit {
  background: var(--app-paper);
  color: var(--app-ink);
  padding-block: var(--space-8) var(--space-8);
}

@media (min-width: 60rem) {
  .exhibit {
    padding-block: var(--space-9) var(--space-9);
  }
}

.exhibit .label {
  color: var(--app-ink-2);
}

.exhibit-grid {
  display: grid;
  gap: var(--space-7);
}

.exhibit-id {
  display: grid;
  align-content: start;
  gap: var(--space-5);
}

.exhibit-title {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.app-icon {
  width: clamp(4rem, 3rem + 3vw, 5.5rem);
  height: auto;
  aspect-ratio: 1;
  flex: none;
  border-radius: var(--radius-icon);
  box-shadow: 0 1px 2px rgba(46, 36, 25, 0.12), 0 10px 20px -12px rgba(46, 36, 25, 0.4);
}

.exhibit h3 {
  font-size: var(--step-5);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 50;
}

.pitch {
  font-family: var(--serif);
  font-size: var(--step-3);
  font-style: italic;
  font-weight: 380;
  line-height: 1.25;
  max-width: 22ch;
}

.exhibit-desc {
  max-width: 36rem;
  font-size: var(--step-1);
  color: var(--app-ink-2);
}

.features {
  border-top: 1px solid color-mix(in srgb, var(--app-ink) 22%, transparent);
}

.features li {
  display: grid;
  gap: var(--space-1);
  padding-block: var(--space-4);
  border-bottom: 1px solid color-mix(in srgb, var(--app-ink) 22%, transparent);
}

.features strong {
  font-weight: 650;
}

.features span {
  color: var(--app-ink-2);
}

.free-line {
  margin-top: var(--space-5);
  max-width: 34rem;
  color: var(--app-ink);
}

.availability {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-5);
}

.availability p {
  font-weight: 600;
}

.availability p::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.6rem;
  vertical-align: 0.1em;
  border-radius: 50%;
  background: var(--app-accent);
}

.exhibit .arrow-link {
  color: var(--app-accent-ink);
}

@media (min-width: 60rem) {
  .exhibit-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-6);
  }

  .exhibit-id {
    grid-column: 1 / span 6;
  }

  .exhibit-detail {
    grid-column: 8 / span 5;
    padding-top: var(--space-2);
  }
}

/* The row of screenshots */
.gallery {
  margin-top: var(--space-8);
}

.gallery-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(58vw, 13.5rem);
  gap: var(--space-5);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: var(--space-2) var(--gutter) var(--space-6);
  margin-inline: calc(var(--gutter) * -1);
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--app-ink) 30%, transparent) transparent;
}

.gallery-row:focus-visible {
  outline-offset: -2px;
}

.gallery-row figure {
  margin: 0;
  scroll-snap-align: start;
}

.gallery-row .phone {
  --phone-w: 100%;
}

.gallery-row figcaption {
  margin-top: var(--space-4);
  font-size: var(--step--1);
  line-height: 1.4;
  color: var(--app-ink-2);
}

.gallery-row figcaption strong {
  display: block;
  font-weight: 650;
  color: var(--app-ink);
}

@media (min-width: 60rem) {
  .gallery-row {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-6);
    overflow: visible;
    padding: 0;
    margin: 0;
  }

  /* hang every other phone a little lower, like a gallery wall */
  .gallery-row figure:nth-child(even) {
    margin-top: var(--space-7);
  }
}

.more-apps {
  padding-block: var(--space-6);
  border-bottom: 1px solid var(--rule);
}

.more-apps p {
  font-family: var(--serif);
  font-size: var(--step-2);
  font-style: italic;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ */
/* How we build: editorial numbered list                               */
/* ------------------------------------------------------------------ */

.about-grid {
  display: grid;
  gap: var(--space-7);
}

.about-intro h2 {
  margin-top: var(--space-4);
  font-size: var(--step-4);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.about-intro p:not(.label) {
  margin-top: var(--space-5);
  max-width: 34rem;
  color: var(--ink-2);
}

.principles {
  counter-reset: principle;
  border-top: 1px solid var(--ink);
}

.principles li {
  counter-increment: principle;
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: var(--space-2) var(--space-5);
  padding-block: var(--space-6);
  border-bottom: 1px solid var(--rule);
}

.principles li::before {
  content: counter(principle, decimal-leading-zero);
  grid-row: span 2;
  font-family: var(--serif);
  font-size: var(--step-5);
  font-weight: 300;
  line-height: 0.85;
  letter-spacing: -0.03em;
  font-variant-numeric: lining-nums;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  color: var(--muted);
}

.principles h3 {
  font-size: var(--step-3);
  font-weight: 450;
  line-height: 1.15;
}

.principles p {
  max-width: 34rem;
  color: var(--ink-2);
}

@media (min-width: 60rem) {
  .about-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-6);
  }

  .about-intro {
    grid-column: 1 / span 4;
    align-self: start;
    position: sticky;
    top: calc(var(--header-h) + var(--space-6));
  }

  .principles {
    grid-column: 6 / span 7;
  }

  .principles li {
    grid-template-columns: 8.5rem 1fr;
    padding-block: var(--space-7);
  }
}

/* ------------------------------------------------------------------ */
/* Contact                                                             */
/* ------------------------------------------------------------------ */

.contact {
  background: var(--night);
  color: var(--night-ink);
  padding-block: var(--space-8);
}

@media (min-width: 60rem) {
  .contact {
    padding-block: var(--space-10) var(--space-9);
  }
}

.contact .label {
  color: var(--night-muted);
}

.contact-grid {
  display: grid;
  gap: var(--space-6);
}

.contact h2 {
  margin-top: var(--space-4);
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2.125rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  max-width: 16ch;
}

.contact-email {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 0.9rem + 3.6vw, 4.25rem);
  font-weight: 350;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
  font-variation-settings: "SOFT" 50;
}

.contact-email:hover {
  text-decoration-thickness: 2px;
}

.contact-meta {
  display: grid;
  gap: var(--space-5);
  margin: var(--space-6) 0 0;
  padding-top: var(--space-5);
  border-top: 1px solid #3a3835;
}

.contact-meta dt {
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--night-muted);
}

.contact-meta dd {
  margin: var(--space-1) 0 0;
  font-size: var(--step-1);
}

.contact-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

@media (min-width: 60rem) {
  .contact-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .contact-head {
    grid-column: 1 / span 4;
  }

  .contact-body {
    grid-column: 5 / span 8;
    padding-top: var(--space-6);
  }

  .contact-meta {
    grid-template-columns: repeat(2, auto);
    justify-content: start;
    column-gap: var(--space-8);
  }
}

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

.site-footer {
  padding-block: var(--space-7) var(--space-6);
  font-size: var(--step--1);
  color: var(--ink-2);
}

.footer-grid {
  display: grid;
  gap: var(--space-5);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-5);
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a[aria-current="page"] {
  text-decoration: underline;
}

.footer-legal {
  padding-top: var(--space-5);
  border-top: 1px solid var(--rule);
  color: var(--muted);
}

@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .footer-legal {
    grid-column: 1 / -1;
  }
}

/* ------------------------------------------------------------------ */
/* Inner pages: privacy and 404                                        */
/* ------------------------------------------------------------------ */

.page {
  padding-block: var(--space-8) var(--space-9);
}

.page-grid {
  display: grid;
  gap: var(--space-7);
}

.page-head h1 {
  margin-top: var(--space-4);
  font-size: var(--step-5);
  line-height: 1;
  letter-spacing: -0.02em;
}

.page-meta {
  margin-top: var(--space-5);
  color: var(--muted);
  font-size: var(--step--1);
}

.summary {
  margin-top: var(--space-6);
  padding: var(--space-5);
  background: var(--paper-2);
  border-left: 3px solid var(--ink);
}

.summary p {
  font-size: var(--step-1);
}

.prose {
  max-width: 66ch;
}

.prose h2 {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--rule);
  font-size: var(--step-3);
  font-weight: 450;
  line-height: 1.2;
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose p,
.prose ul {
  margin-top: var(--space-4);
}

.prose ul {
  padding-left: 1.25rem;
  list-style: none;
}

.prose li {
  position: relative;
  margin-top: var(--space-2);
}

.prose li::before {
  content: "";
  position: absolute;
  left: -1.1rem;
  top: 0.8em;
  width: 0.5rem;
  height: 1px;
  background: var(--ink-2);
}

@media (min-width: 60rem) {
  .page {
    padding-block: var(--space-9) var(--space-10);
  }

  .page-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-6);
  }

  .page-head {
    grid-column: 1 / span 4;
    align-self: start;
    position: sticky;
    top: calc(var(--header-h) + var(--space-6));
  }

  .prose {
    grid-column: 6 / span 7;
  }
}

/* 404: an empty wall with its label */
.empty-wall {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}

.empty-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 22rem;
  width: 100%;
  justify-self: start;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  box-shadow: inset 0 0 0 0.9rem var(--paper-2), inset 0 0 0 calc(0.9rem + 1px) var(--rule-strong);
}


.not-found h1 {
  margin-top: var(--space-4);
  font-size: var(--step-5);
  line-height: 1;
  letter-spacing: -0.02em;
}

.not-found p:not(.label) {
  margin-top: var(--space-5);
  max-width: 34rem;
  font-size: var(--step-1);
  color: var(--ink-2);
}

@media (max-width: 59.99rem) {
  .empty-frame {
    max-width: 9rem;
  }
}

@media (min-width: 60rem) {
  .empty-wall {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-6);
  }

  .empty-wall .empty-frame {
    grid-column: 1 / span 4;
  }

  .empty-wall .not-found {
    grid-column: 6 / span 7;
  }
}

/* ------------------------------------------------------------------ */
/* Motion: subtle reveal, only when JS runs and motion is welcome      */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }

  .js .reveal.is-in {
    opacity: 1;
    transform: none;
  }

  .gallery-row .phone {
    transition: transform 0.35s var(--ease);
  }

  .gallery-row figure:hover .phone {
    transform: translateY(-4px);
  }
}

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

@media print {
  .site-header,
  .menu-toggle,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
  }
}
