/* FORMATION website, v2 (Oct 22, 2026). The look comes from MARKETING\BRAND_AND_CONTENT_SYSTEM.md section 6:
   paper tone, serif type, small spaced-out uppercase labels, negative space. Ryan's direction for v2: one or two hero
   photos used big, a separate scrolling gallery, no captions, the dusk dining room as a full-screen parting image. */
:root {
  /* Ryan, Oct 22: "a little too gray... more of a creamy white, more of a paper". Was #efece6. */
  --paper: #f5f0e6;
  --card: #faf6ee;
  --ink: #2a2925;
  --muted: #6f6a5f;
  --rule: #e2d9c8;
  --night: #161512;
  --serif: "EB Garamond", "Iowan Old Style", "Hoefler Text", "Palatino Linotype", Palatino, Georgia, serif;
  /* The small spaced-out labels: Jost, a Futura-style face, instead of the computer's default (Oct 22, "fancier"). */
  --sans: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 19px/1.55 var(--serif);
  -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; height: auto; }
a { color: inherit; }
::selection { background: #e6dbc7; color: var(--ink); }
/* Photos still served from Squarespace get the house grade in the browser until they're saved here (tools\make_images.ps1
   grades the rest). */
img[src*="squarespace-cdn"] { filter: saturate(.9) contrast(.95) brightness(1.01); }

.label {
  margin: 0 0 22px;
  font: 500 11px/1.2 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Header: clear over the first photo, solid paper after. */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gutter);
  background: rgba(245, 240, 230, 0.94);
  backdrop-filter: blur(8px);
  transition: background .4s ease, color .4s ease;
}
.top.over { background: transparent; backdrop-filter: none; color: #f4f1ea; }
.wordmark { --ls: .44em; font: 500 14px/1 var(--serif); letter-spacing: var(--ls); text-decoration: none; white-space: nowrap; }
/* Logo trial (Ryan, Oct 22: "try the double circle"): the two O's are stones that sit on the baseline. Each stone copies
   the word's letter spacing (--ls) as its right margin. Screen readers and search engines still get "FORMATION". */
.stone { display: inline-block; width: 1.02em; height: .86em; margin-right: var(--ls, .3em); vertical-align: baseline; fill: currentColor; overflow: visible; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.top nav { display: flex; gap: 30px; }
.top nav a {
  font: 500 11px/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase;
  text-decoration: none; opacity: .75;
  /* A hairline that draws in under the link on hover. */
  padding-bottom: 5px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .7s cubic-bezier(.2, .7, .2, 1), opacity .3s ease;
}
.top nav a:hover, .top nav a[aria-current] { opacity: 1; background-size: 100% 1px; }
.gallery-page .top { position: sticky; }

/* Hero: full screen, the photo settles in slowly. */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; background: var(--night); }
/* The opening photo fades in, then pulls back very slowly, like Ryan's signature reel (a slow zoom-out on a specimen). */
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 55%;
  animation: fade 2.4s ease both, pullback 18s cubic-bezier(.15, .55, .25, 1) both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pullback { from { transform: scale(1.14); } to { transform: scale(1); } }
.shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 55%, rgba(0,0,0,.42) 100%); }
.hero-words {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(48px, 9vh, 110px);
  color: #f4f1ea;
  animation: rise 1.6s .6s ease both;
}
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.hero-words h1 {
  --ls: .32em;
  margin: 0 0 14px;
  font: 400 clamp(40px, 8vw, 118px)/1 var(--serif);
  letter-spacing: var(--ls);
  margin-right: calc(-1 * var(--ls));
  white-space: nowrap;
}
/* Serif, upright (Ryan, Oct 22: not the sans, not so italic). The exact line is still being chosen. */
/* Ryan, Oct 22: "maybe I like the italics. Give me your best shot": italic, a little smaller and softer than the wordmark. */
.hero-words p { margin: 0; font: italic 400 clamp(18px, 1.6vw, 23px)/1.3 var(--serif); letter-spacing: .03em; opacity: .9; }
.hero-words .place { margin-top: 12px; font: 500 11px/1.2 var(--sans); letter-spacing: .26em; text-transform: uppercase; opacity: .7; }
.cue { position: absolute; right: var(--gutter); bottom: clamp(48px, 9vh, 110px); width: 1px; height: 64px; background: rgba(244,241,234,.35); overflow: hidden; }
.cue span { position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: #f4f1ea; animation: drip 2.4s ease-in-out infinite; }
@keyframes drip { to { top: 100%; } }

/* The studio: one screen (Ryan, Oct 22: "that second page could be better"; the old version spread the three
   services over three screens of scrolling, in _drafts\before_studio_redo_2026-10-22\). The whole photo on the left,
   never cropped (a big window used to cut the plant off); the services on the right, numbered, between fine lines. */
.studio {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center;
  column-gap: clamp(40px, 7vw, 128px);
  min-height: 100vh; min-height: 100svh;
  padding: 104px var(--gutter) 56px;
}
/* Height follows the window, but never so tall that the photo would need more than ~44% of the width (66vw tall at 2:3). */
.studio-photo img { width: auto; height: min(calc(100vh - 160px), 66vw); height: min(calc(100svh - 160px), 66vw); min-height: 420px; }
.studio-text { justify-self: center; width: 100%; max-width: 560px; }
.services { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.services li { padding: clamp(20px, 3.6vh, 36px) 0; border-top: 1px solid var(--rule); }
.studio-text h2 { margin: 0 0 8px; font: 400 clamp(26px, 2.6vw, 38px)/1.1 var(--serif); }
.studio-text li p { margin: 0; max-width: 34ch; font-size: 19px; line-height: 1.5; color: var(--muted); }

/* The retainer: a separate option, not a third service (Ryan, Oct 22), so it gets its own quiet moment below the
   studio, centered, with a short hairline over it. No box (Ryan: "that box looks very amateurish"). */
.retainer { padding: clamp(72px, 11vw, 160px) var(--gutter); text-align: center; }
.retainer::before { content: ""; display: block; width: 56px; height: 1px; margin: 0 auto clamp(28px, 4vw, 44px); background: var(--muted); opacity: .5; }
.retainer h2 { margin: 0 0 14px; font: 400 clamp(32px, 3.6vw, 52px)/1.1 var(--serif); }
.retainer p { margin: 0 auto; font-size: 21px; line-height: 1.5; color: var(--muted); text-wrap: balance; }

/* Gallery strip on the home page. */
.strip { padding: clamp(64px, 10vw, 140px) var(--gutter) clamp(40px, 6vw, 80px); border-top: 1px solid var(--rule); }
.strip-head { display: flex; align-items: baseline; justify-content: space-between; }
.more { font: 500 11px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.more:hover { color: var(--ink); }
.strip-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 28px); }
.strip-row img { aspect-ratio: 4 / 5; object-fit: cover; }

/* Inquire. */
.inquire { padding: clamp(64px, 10vw, 150px) var(--gutter); text-align: center; }
.inquire h2 { margin: 0 0 22px; font: 400 clamp(32px, 4vw, 56px)/1.1 var(--serif); }
.contact { margin: 0; font-size: 21px; line-height: 1.9; }
.contact a { text-decoration-color: var(--rule); text-underline-offset: 4px; }
.contact a:hover { text-decoration-color: var(--ink); }

/* The parting image: full screen, nothing on it. */
.parting { height: 100vh; height: 100svh; background: var(--night); overflow: hidden; }
.parting img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }

/* Quiet entrances (site.js): sections and photos fade up slowly as they come into view. The parting photo also
   settles, the way the opening one does. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 1.6s cubic-bezier(.2, .65, .25, 1), transform 1.6s cubic-bezier(.2, .65, .25, 1); }
.reveal.in { opacity: 1; transform: none; }
.parting.reveal { transform: none; }
.parting.reveal img { transform: scale(1.06); transition: transform 7s cubic-bezier(.2, .6, .2, 1); }
.parting.reveal.in img { transform: none; }

/* Footer. */
.bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 26px var(--gutter) 34px;
  font: 500 11px/1.4 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}
.home .bottom { background: var(--night); color: rgba(244,241,234,.6); }

/* Gallery page: columns of photos, no captions; click for full screen. */
.gallery { padding: 28px var(--gutter) 72px; }
.masonry { columns: 3 280px; column-gap: clamp(12px, 1.8vw, 24px); }
.masonry a { display: block; margin: 0 0 clamp(12px, 1.8vw, 24px); break-inside: avoid; cursor: zoom-in; }
.masonry img { transition: opacity .3s; }
.masonry a:hover img { opacity: .88; }
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(22, 21, 18, .96);
}
.lightbox[hidden] { display: none; }
.lightbox img { width: auto; max-width: 92vw; max-height: 90vh; object-fit: contain; }
.lightbox button {
  position: absolute; border: 0; background: none; color: #f4f1ea; cursor: pointer;
  font: 300 44px/1 var(--serif); padding: 16px; opacity: .7;
}
.lightbox button:hover { opacity: 1; }
.lb-close { top: 8px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* Phones. */
@media (max-width: 760px) {
  body { font-size: 18px; }
  .top nav { gap: 18px; }
  .wordmark { --ls: .32em; }
  .hero-words h1 { --ls: .2em; font-size: 9.6vw; }
  .studio { grid-template-columns: 1fr; row-gap: 40px; min-height: 0; padding: 54px 0 56px; }
  .studio-photo img { width: 100%; height: auto; min-height: 0; }
  .studio-text { padding: 0 var(--gutter); max-width: none; }
  .strip-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Three photos on two columns: the first goes full width, so none is left alone on a row. */
  .strip-row img:first-child { grid-column: 1 / -1; }
  .masonry { columns: 2 140px; }
  .lb-prev, .lb-next { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-img, .hero-words, .cue span { animation: none; }
  .reveal, .reveal img { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
