/* A. Thornton Studio — site styles. Colors come from the brand guide. */
:root {
  --surface: #F2EDE4;        /* linen */
  --surface-sunken: #E7E0D4;
  --ink: #2B211C;            /* walnut */
  --ink-muted: #655D55;
  --teak: #A5460F;           /* the one accent */
  --line: #D8CFC1;
  --oak: #D2B48C;
  --walnut-muted: #B3A89B;   /* ink-muted in the Walnut theme */
  --font-sans: "Jost", "Futura PT", Futura, system-ui, sans-serif;
  --gutter: 24px;
  --content-max: 1280px;
  --text-max: 760px;
}
@media (min-width: 768px) { :root { --gutter: 48px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: 17px; line-height: 28px; }
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
h1, p, dl, dd, hr { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--teak); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 16px; z-index: 10; }
.wrap { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter); }
.link { color: var(--teak); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
/* Small capitals label (tokens: eyebrow) and the short teak hairline. */
.eyebrow { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-muted); }
.rule { width: 48px; height: 0; border: 0; border-top: 1px solid var(--teak); }

/* Header: the only place the name appears as a logo. */
.header { max-width: var(--content-max); width: 100%; margin: 0 auto; padding: 28px var(--gutter); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 32px; }
/* The wordmark is brand/logos/wordmark-small.svg inlined as shapes (templates/partials.html), so it is
   exact and needs no font. Height is set so its capitals are 11.9px tall (13.3px on desktop). */
.wordmark { display: inline-block; color: var(--ink); text-decoration: none; line-height: 0; }
.wordmark-svg { display: block; height: 13.26px; width: auto; }
.nav { display: flex; gap: 28px; }
.nav a { text-decoration: none; font-size: 15px; padding: 8px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--teak); }
@media (min-width: 768px) { .header { padding-top: 40px; padding-bottom: 40px; } .wordmark-svg { height: 14.82px; } }

/* Intro line */
.intro { padding-top: clamp(40px, 8vw, 112px); padding-bottom: clamp(48px, 8vw, 112px); display: flex; flex-direction: column; gap: 28px; }
.intro h1 { max-width: 900px; font-size: clamp(30px, 5vw, 56px); line-height: 1.12; font-weight: 300; letter-spacing: -0.01em; }

/* Work grid */
.work { padding-bottom: clamp(64px, 10vw, 144px); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; grid-auto-flow: dense; }
.card { display: flex; flex-direction: column; text-decoration: none; }
.card-img { transition: opacity 0.2s ease; }
.card:hover .card-img { opacity: 0.88; }
.card-img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; background: var(--surface-sunken); }
.card-wide .card-img { aspect-ratio: 3 / 2; }
.card-img-empty { display: flex; align-items: center; justify-content: center; color: var(--ink-muted); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.credit { font-style: italic; color: var(--ink-muted); }
@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; }
  .card-wide { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 72px 48px; }
  /* A landscape photo takes two columns and matches the height of the square beside it. */
  .card-wide { grid-column: span 2; }
  .card-wide { position: relative; min-height: 240px; }
  .card-wide .card-img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
  /* The first piece opens the grid at 2×2, filling the height of the two squares beside it. */
  .card-feature { grid-column: span 2; grid-row: span 2; position: relative; }
  .card-feature .card-img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
}

/* Piece page */
.piece { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 8px; padding-bottom: clamp(56px, 8vw, 112px); }
.piece-media { display: flex; flex-direction: column; gap: 24px; }
.piece-cover { width: 100%; background: var(--surface-sunken); }
.piece-cover-empty { aspect-ratio: 4 / 5; }
.piece-info { display: flex; flex-direction: column; gap: 18px; }
.piece-info h1 { font-size: clamp(32px, 4.2vw, 48px); line-height: 1.08; font-weight: 300; letter-spacing: -0.01em; }
@media (min-width: 900px) {
  .piece { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 72px; }
  .piece-info { position: sticky; top: 40px; align-self: start; padding-top: 8px; }
}
.specs { border-top: 1px solid var(--line); margin: 8px 0; }
.specs > div { display: flex; justify-content: space-between; gap: 24px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--ink-muted); }
.specs dd { text-align: right; }
.next { padding-bottom: clamp(64px, 10vw, 144px); }
.next a { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; padding-top: 32px; border-top: 1px solid var(--line); text-decoration: none; }
.next-label { display: block; margin-bottom: 10px; }
.next-name { font-size: clamp(30px, 4.6vw, 56px); line-height: 1.05; font-weight: 300; letter-spacing: -0.01em; }
.next-img { width: clamp(120px, 22vw, 280px); aspect-ratio: 1 / 1; object-fit: cover; background: var(--surface-sunken); }
.next a:hover .next-name { color: var(--teak); }

/* Contact */
.contact { padding-bottom: clamp(64px, 10vw, 144px); }
.contact .specs { max-width: var(--text-max); margin: 0; }

/* Labs: the studio's shop tools, each a screenshot that links out to its own subdomain. */
.labs { padding-bottom: clamp(64px, 10vw, 144px); }
.labs-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; }
.tool { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.tool-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; border: 1px solid var(--line); background: var(--surface-sunken); margin-bottom: 14px; transition: opacity 0.2s ease; }
.tool:hover .tool-img { opacity: 0.88; }
.tool-name { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; font-weight: 300; letter-spacing: -0.01em; }
.tool:hover .tool-name { color: var(--teak); }
.tool-summary { max-width: 560px; color: var(--ink-muted); }
.labs-note { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); max-width: var(--text-max); font-size: 15px; color: var(--ink-muted); }
@media (min-width: 900px) { .labs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; } }

/* Footer: one quiet line on a full-width walnut band (the Walnut theme). */
.footer { background: var(--ink); color: var(--walnut-muted); }
.footer-inner { max-width: var(--content-max); margin: 0 auto; padding: 56px var(--gutter); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer a { text-decoration: none; }
.footer a[aria-current="page"] { color: var(--oak); }
.footer a:hover { color: var(--oak); text-decoration: underline; text-underline-offset: 3px; }
.footer :focus-visible { outline-color: var(--oak); }

@media (prefers-reduced-motion: reduce) { .card-img, .tool-img { transition: none; } }
