/* Alexander Main — site styles
   Rebuilt from the Squarespace site, October 2026.
   Fonts are self-hosted (no third-party requests). */

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-900.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --text: #000;
  --bg: #fff;
  --muted: #9a9a9a;
  --line: #dedede;

  --font: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-strong: "Public Sans", "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --max: 50rem;                                  /* text column width */
  --frame: clamp(50rem, 55.5556vw, 70rem);       /* page width: 800px on a MacBook, up to 1120px */
  --gutter: max(20px, 4vw);

  --p-size: 0.9rem;
  --p-lh: 1.625rem;
  --p-gap: 1.0625rem;
  --p-track: 0.013em;

  --h-size: 1.475rem;
  --h-track: -0.02em;

  --header-h: 5.0625rem;
}

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

/* Text, menu and spacing keep the original sizes on every screen (1rem = 16px).
   Only the frame grows on big screens: the slideshow, the stones grid and the
   portrait get larger (up to 1.4x at ~2000px wide), while text columns keep
   their original width so lines stay easy to read. */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--p-size);
  line-height: var(--p-lh);
  letter-spacing: var(--p-track);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

figure { margin: 0; }

a { color: inherit; }

p { margin: 0 0 var(--p-gap); }

h1, h2 { font-weight: 400; }

strong, b {
  font-family: var(--font-strong);
  font-weight: 900;
  letter-spacing: 0.03em;
}

.wrap {
  width: min(var(--frame), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  left: 8px; top: -60px;
  padding: 8px 14px;
  background: var(--text); color: var(--bg);
  text-decoration: none;
  z-index: 10;
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

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

.site-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-title {
  margin: 0;
  padding: 0.34375rem 0 0 0.3125rem;
  font-size: var(--h-size);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: var(--h-track);
  white-space: nowrap;
}
.site-title a { text-decoration: none; }

.site-nav ul {
  display: flex;
  gap: 0 1.78125rem;
  margin: 0 0.0625rem 0 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.375rem;
}

/* ---------- Main / footer ---------- */

main { display: block; }
main > :last-child,
.flow > :last-child,
.legal > :last-child { margin-bottom: 0; }
.page-home { padding-bottom: 0.125rem; }

.site-footer {
  padding: 3.03125rem 0 2.1875rem;
  text-align: center;
  font-size: 0.7625rem;
  line-height: 1.25rem;
  letter-spacing: 0.02em;
}
.site-footer p { margin: 0; }

/* ---------- Headings & text blocks ---------- */

.h2 {
  margin: 0;
  font-size: var(--h-size);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: var(--h-track);
}

.text-link,
.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.1875rem;
}
.text-link:hover,
.prose a:hover { opacity: .6; }

/* paragraph -> heading -> paragraph rhythm measured from the original */
.flow > * + .h2 { margin-top: 1.84375rem; }
.flow > .h2 + * { margin-top: 1.6875rem; }

/* ---------- Home: image reel ---------- */

.reel {
  --reel-h: min(calc(var(--frame) * 0.724375), 70.8vh, 100vw - 2 * var(--gutter));
  position: relative;
}
.reel__viewport {
  position: relative;
  height: var(--reel-h);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.reel__track {
  display: flex;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}
.reel__track.is-animating { transition: transform .75s cubic-bezier(.45, 0, .2, 1); }
.reel__slide { flex: 0 0 auto; height: 100%; }
.reel__slide img {
  height: 100%;
  width: auto;
  max-width: none;
  -webkit-user-drag: none;
}
.reel__slide:not(.is-current) { cursor: pointer; }

.reel__controls {
  display: flex;
  justify-content: space-between;
  margin: 0.5625rem -0.375rem 0;
}
.reel__btn {
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid transparent;
  background: none;
  color: var(--text);
  cursor: pointer;
}
.reel__btn:focus { outline: none; }
.reel__btn:focus-visible { outline: none; border-color: var(--text); }
.reel__btn svg { width: 1.375rem; height: 0.625rem; display: block; overflow: visible; }

.no-js .reel__viewport { overflow-x: auto; }

/* ---------- Bio ---------- */

.page-bio p,
.stones-intro,
.page-404 p { max-width: var(--max); }

.page-bio,
.page-about,
.page-stones,
.page-legal,
.page-404 { padding-top: 1px; }

/* ---------- About ---------- */

.about-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: min-content 1fr;
  column-gap: 0.6875rem;
  align-items: start;
}
.about-quote { grid-column: 1; grid-row: 1; }
.about-quote p { margin-bottom: 0; }
.about-figure { grid-column: 2; grid-row: 1 / span 2; }
.about-text { grid-column: 1; grid-row: 2; margin-top: 2.375rem; }
.about-top .flow > * + .h2 { margin-top: 2.375rem; }
.about-portrait {
  width: 100%;
  aspect-ratio: 394.5 / 567.5;
  object-fit: cover;
  object-position: 50% 50%;
  background: #2b2b2b;
}

.newsletter-form { margin-top: 2.59375rem; }
.newsletter-form .field {
  display: block;
  width: 18.875rem;
  max-width: 100%;
  height: 4.375rem;
  margin: 0;
  padding: 0 2.125rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--text);
  font: inherit;
  letter-spacing: var(--p-track);
  -webkit-appearance: none;
  appearance: none;
}
.newsletter-form .field::placeholder { color: var(--muted); opacity: 1; }
.newsletter-form .field:focus-visible { outline: 1px solid var(--text); outline-offset: -1px; }
.newsletter-form .btn {
  display: block;
  width: 7.53125rem;
  height: 4.25rem;
  margin-top: 2.125rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--text);
  color: var(--bg);
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
}
.newsletter-form .btn:hover { opacity: .85; }
.newsletter-form .btn[disabled] { opacity: .5; cursor: default; }
.newsletter-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 1rem 0 0; min-height: var(--p-lh); }
.form-status:empty { display: none; }

.about-more { margin-top: 3.40625rem; }
.about-more .h2--link + .h2--link { margin-top: 1.46875rem; }
.about-more > .h2--link:last-child { margin-bottom: -0.9375rem; }
.about-figure { margin-top: -0.0625rem; }
.h2--link a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25rem;
}
.h2--link a:hover { opacity: .6; }

/* ---------- Stones ---------- */

.stones-intro { letter-spacing: 0.01em; }
.stone { margin-top: 2.03125rem; }
.stone + .stone { margin-top: 2.25rem; }
.stone .h2 { margin: 0 0 1.9375rem; }
.page-stones { padding-bottom: 3.09375rem; }
.stone-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6875rem;
}
.stone-grid img {
  width: 100%;
  aspect-ratio: 259.5 / 299.5;
  object-fit: cover;
  background: #3a3a3c;
}

/* ---------- Legal pages ---------- */

/* left-aligned, same text width as the bio page */
.legal {
  max-width: var(--max);
  overflow-wrap: break-word;
  hyphens: manual;
}
.legal .gap-after { margin-bottom: calc(var(--p-gap) + var(--p-lh)); }
.legal .legal-h {
  margin: 0 0 var(--p-gap);
  font-family: var(--font-strong);
  font-size: var(--p-size);
  font-weight: 900;
  line-height: var(--p-lh);
  letter-spacing: 0.03em;
}
.legal a { word-break: break-all; }

/* ---------- 404 ---------- */

.page-404 { min-height: 45vh; }

/* ---------- Responsive ---------- */

@media (max-width: 767px) {
  :root { --h-size: 1.375rem; }
  .site-header { height: 4.5rem; }
  .site-title { padding-top: 0.25rem; padding-left: 0; }
  .about-top { grid-template-columns: 1fr; grid-template-rows: none; }
  .about-quote, .about-figure, .about-text { grid-column: 1; grid-row: auto; }
  .about-top .about-figure { margin: 1.625rem 0 0; }
  .about-portrait { aspect-ratio: 2 / 3; }
  .about-more { margin-top: 3.125rem; }
}

@media (max-width: 599px) {
  .stone-grid { grid-template-columns: 1fr; }
  .stone-grid img { aspect-ratio: 259.5 / 299.5; }
}

@media (max-width: 420px) {
  :root { --h-size: 1.25rem; }
  .site-nav ul { gap: 0 1.125rem; }
  .newsletter-form .field { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .reel__track.is-animating { transition-duration: .01s; }
}
