/* Ripley Scott — ripleyscott.com
   One typeface (Nunito, OFL) + the custom RIPLEY wordmark. Black, blush, nothing else:
   the photographs supply the colour. */

@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin-var.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --black: #000;
  --blush: #e8e1df;            /* sampled from the wordmark lettering */
  --mute:  #b8b0ae;            /* secondary text — 9.9:1 on black */
  --accent: #d8b8b0;           /* section headings + top EMAIL / INSTAGRAM links */
  --dim:   #8e8785;            /* the unseen half of the tagline — 6.0:1 on black */
  --rule:  rgba(232, 225, 223, .14);
  --gutter: clamp(20px, 5vw, 80px);
  --font: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--black); color: var(--blush); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font); font-weight: 400; font-size: 1rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid var(--blush); outline-offset: 6px; }
::selection { background: var(--blush); color: var(--black); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* tracked capitals — the voice of “WRITER & PHOTOGRAPHER” */
.label {
  font-weight: 800; font-size: .6875rem; line-height: 1.3;
  letter-spacing: .32em; text-transform: uppercase; color: var(--mute);
}

/* ---------- masthead ---------- */
.masthead {
  padding: calc(var(--gutter) * .9) var(--gutter) clamp(40px, 9vw, 96px);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 6vw, 56px);
}
.topline { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.topline > .label { min-width: 0; }
@media (max-width: 639px) { .topline > p.label { display: none; } .topline { justify-content: flex-start; } }
.topline .label { color: var(--mute); }
.quick { display: flex; gap: clamp(18px, 3vw, 36px); }
.quick a { color: var(--accent); }
.quick a:hover, .quick a:focus-visible { color: var(--blush); }

.wordmark { width: 100%; position: relative; }
.wordmark img { width: 100%; }
/* WRITER & PHOTOGRAPHER as crisp live text, laid over the wordmark in its own pixel grid */
.wordmark .wp { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.wordmark .wp text { font-family: var(--font); font-weight: 800; fill: var(--blush); }

.tagline {
  font-weight: 300; font-size: clamp(1.45rem, 4.4vw, 3.1rem);
  line-height: 1.16; letter-spacing: -.012em; max-width: 20em;
}
.tagline span { display: block; }
.tagline .unseen { color: var(--dim); }

/* ---------- portrait ---------- */
.portrait { margin: 0; }
.portrait img { width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .portrait img { animation: develop 1.6s cubic-bezier(.2,.6,.2,1) both; }
  @keyframes develop { from { opacity: 0; } to { opacity: 1; } }
}

/* ---------- editorial rows: label column + content column ---------- */
.row {
  padding: clamp(56px, 11vw, 140px) var(--gutter) 0;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px;
}
.row > .label { padding-top: .35em; color: var(--accent); }
.big {
  font-weight: 300; font-size: clamp(1.6rem, 5.2vw, 4.2rem);
  line-height: 1.08; letter-spacing: -.015em;
}
.meta { margin-top: 14px; color: var(--mute); font-size: 1rem; line-height: 1.6; }
.meta span { display: block; }

/* contact */
.contact a { display: inline-block; overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .5s cubic-bezier(.2,.6,.2,1); padding-bottom: .06em; }
.contact a:hover, .contact a:focus-visible { background-size: 100% 1px; }
.contact .handle { color: var(--dim); }
.contact .handle:hover, .contact .handle:focus-visible { color: var(--blush); }

/* ---------- selected photographs (rendered only when works exist) ---------- */
.works .plates { display: grid; gap: clamp(64px, 12vw, 160px); margin-top: clamp(24px, 4vw, 48px); }
.plate { margin: 0; display: grid; gap: 14px; }
.plate img { width: auto; max-width: 100%; max-height: 88svh; }  /* whole frame, never cropped */
.plate figcaption { display: flex; gap: 1.2em; align-items: baseline; }
.plate figcaption .n { color: var(--dim); font-variant-numeric: tabular-nums; }
.plate figcaption .t { color: var(--blush); font-size: .95rem; }
.plate figcaption .m { color: var(--mute); font-size: .95rem; }

/* ---------- footer ---------- */
.foot {
  margin-top: clamp(80px, 14vw, 180px);
  padding: 22px var(--gutter) calc(22px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  color: var(--dim); font-size: .8125rem;
}
.foot details summary { cursor: pointer; list-style: none; }
.foot details summary::-webkit-details-marker { display: none; }
.foot details[open] summary { color: var(--blush); }
.foot details p { max-width: 34em; margin-top: 10px; color: var(--mute); }

/* ---------- larger screens ---------- */
@media (min-width: 820px) {
  .masthead { min-height: 100svh; grid-template-rows: auto 1fr auto; align-content: stretch; }
  .masthead .wordmark { align-self: end; }
  .statement { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); }
  .statement .tagline { grid-column: 2; }

  .portrait { padding: 0 var(--gutter); }

  .row { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 0; }
  .row > .label { grid-column: 1; }
  .row > :not(.label) { grid-column: 2; }

  .plate:nth-child(even) { justify-items: end; }
  .plate:nth-child(even) figcaption { flex-direction: row-reverse; }
}
@media (min-width: 1600px) {
  .masthead, .row, .portrait, .foot { padding-left: calc((100vw - 1440px) / 2); padding-right: calc((100vw - 1440px) / 2); }
}

@media print {
  html, body { background: #fff; color: #000; }
}

/* ---------- writing (rendered only when entries exist) ---------- */
.pieces { list-style: none; display: grid; gap: clamp(22px, 3.4vw, 36px); }
.pieces li { display: grid; gap: 6px; }
.pieces a { display: inline; }
.pieces .t {
  font-weight: 300; font-size: clamp(1.2rem, 2.7vw, 2rem); line-height: 1.22; letter-spacing: -.01em;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .5s cubic-bezier(.2,.6,.2,1); padding-bottom: .06em;
}
.pieces a:hover .t, .pieces a:focus-visible .t { background-size: 100% 1px; }
.pieces .arrow { display: inline-block; width: .55em; height: .55em; vertical-align: .12em; fill: none; stroke: var(--dim); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.pieces a:hover .arrow, .pieces a:focus-visible .arrow { stroke: var(--blush); }
.pieces .m { color: var(--mute); font-size: 1rem; }

/* ---------- opening-weekend note (site.json → welcome_note) ---------- */
.note { padding-top: clamp(48px, 8vw, 104px); }
.note p, .contact .avail { font-weight: 300; font-size: clamp(1.05rem, 1.7vw, 1.35rem); line-height: 1.5; color: var(--mute); max-width: 30em; }
.contact .avail { margin-bottom: clamp(22px, 3.2vw, 40px); }

/* ---------- 404 ---------- */
.notfound { min-height: 80svh; align-content: center; }
