/* Nicole Rak: black & white editorial brand.
   Used by index.html and letters.html. The older pages still use style.css. */

:root {
  --paper: #ffffff;
  --ink: 0 0 0; /* rgb triplet so we can do rgb(var(--ink) / .2) */
  --font-display: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --font-ui: "Inter", system-ui, -apple-system, sans-serif;
  --font-hand: "Caveat", "Segoe Script", cursive;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --container: 72rem;
  --gutter: 1.5rem;
  --radius: 1.25rem;
  --top-h: 4.1rem;
}

@media (min-width: 640px) {
  :root { --gutter: 2.5rem; }
}

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

html {
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-display);
  background: var(--paper);
  color: rgb(var(--ink));
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid rgb(var(--ink) / .6);
  outline-offset: 3px;
  border-radius: .4rem;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Atmosphere: film grain + a soft glow that follows the cursor ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: multiply;
  background-size: 190px 190px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='190' height='190' viewBox='0 0 190 190'%3E%3Cfilter id='n' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  .34 .34 .34 0 0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0 0 0 1 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='190' height='190' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* The grain belongs to the page, not the opening: it eases in once the portrait has arrived */
html.js .grain { animation: grainIn 1600ms var(--ease-soft) 2600ms both; }
@keyframes grainIn { from { opacity: 0; } to { opacity: .035; } }

.attention {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 600ms var(--ease-soft);
  background: radial-gradient(
    circle 280px at var(--ax, 50%) var(--ay, 50%),
    rgb(var(--ink) / .05) 0%,
    rgb(var(--ink) / .02) 45%,
    transparent 72%
  );
}
html.pointer .attention { opacity: 1; }

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

.top {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgb(var(--ink) / .1);
}
.top::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--paper);
  opacity: .72;
}
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--top-h);
}
.wordmark {
  font-style: italic;
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -.03em;
  white-space: nowrap;
}
.top-link {
  font-family: var(--font-ui);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgb(var(--ink) / .55);
  transition: color 200ms var(--ease-soft);
}
.top-link:hover { color: rgb(var(--ink)); }

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-top: calc(-1px - var(--top-h));
  padding-top: calc(1px + var(--top-h));
}

/* A pale backdrop that is already there when the page opens, so the portrait never arrives on bare white */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #ececea 0%, #f6f6f5 55%, #fff 100%);
}

/* A large soft disc behind her, the "stage" she steps onto */
.hero .disc {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(86vw, 62rem);
  aspect-ratio: 1 / 1;
  margin: calc(min(86vw, 62rem) / -2) 0 0 calc(min(86vw, 62rem) / -2);
  border-radius: 9999px;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #d9d9d6 0%, #e4e4e1 52%, rgba(236, 236, 234, 0) 71%);
  translate: 0 calc(var(--p, 0) * 6vh);
  scale: calc(1 + var(--p, 0) * .35);
}

/* The shadow-y glow sitting behind her (lighter than before) */
.hero .wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    34vw 40vh at 50% 47%,
    rgba(70, 70, 68, .36),
    rgba(70, 70, 68, .25) 42%,
    rgba(70, 70, 68, .1) 72%,
    rgba(70, 70, 68, 0) 100%
  );
  scale: calc(1 + var(--p, 0) * .5);
}
@media (max-width: 640px) {
  .hero .wash {
    background: radial-gradient(
      78vw 40vh at 50% 58%,
      rgba(70, 70, 68, .36),
      rgba(70, 70, 68, .25) 42%,
      rgba(70, 70, 68, .1) 72%,
      rgba(70, 70, 68, 0) 100%
    );
  }
}

/* Outer wrapper shifts slightly with the cursor and, as you scroll, drifts down and grows a little.
   (translate / scale are separate from transform, so they track the scroll directly.) */
.hero .subject-wrap {
  position: absolute;
  inset: 0;
  transform: translate3d(calc(var(--mx, 0) * -12px), calc(var(--my, 0) * -7px), 0);
  transition: transform 700ms var(--ease);
  translate: 0 calc(var(--p, 0) * 9vh);
  scale: calc(1 + var(--p, 0) * .1);
  transform-origin: 50% 100%;
  /* A soft gray shadow hugging the silhouette, so the space around the hair strands reads grayer */
  filter: drop-shadow(0 4px 26px rgba(60, 60, 58, .45));
}
.hero .subject {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transform: scale(.92);
  transform-origin: 50% 100%;
}

/* Fades the bottom of the portrait into the page so the name can sit on top */
.hero .scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgb(255 255 255 / .65) 0%,
    rgb(255 255 255 / .2) 20%,
    rgb(255 255 255 / 0) 42%,
    rgb(255 255 255 / .3) 64%,
    rgb(255 255 255 / .8) 84%,
    rgb(255 255 255 / 1) 100%
  );
}

.hero .content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 var(--gutter) clamp(2.5rem, 7vh, 5rem);
  /* the name lifts away and fades as you scroll past */
  translate: 0 calc(var(--p, 0) * -9vh);
  opacity: calc(1 - var(--p, 0) * 1.35);
}

.display {
  font-style: italic;
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1;
  font-size: clamp(54px, 14.5vw, 150px);
  white-space: nowrap;
  text-shadow: 0 2px 24px rgb(255 255 255 / .5);
}

/* Arrival: backdrop first, then the disc swells in, then she eases forward out of a soft focus */
html.js .hero::before      { animation: washIn 1200ms var(--ease-soft) both; }
html.js .hero .disc        { animation: discIn 2200ms var(--ease) 150ms both; }
html.js .hero .wash        { animation: washIn 2600ms var(--ease) 400ms both; }
html.js .hero .subject     { animation: resolveIn 2200ms var(--ease) 500ms both, drift 14s ease-in-out 2.7s infinite; }
html.js .hero .display     { animation: rise 1100ms var(--ease) 1500ms both; }

@keyframes washIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes discIn  { from { opacity: 0; transform: scale(.62); } to { opacity: 1; transform: none; } }
@keyframes rise    { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes resolveIn {
  0%   { opacity: 0; transform: scale(.86) translateY(26px); filter: blur(14px); }
  55%  { opacity: 1; filter: blur(3px); }
  100% { opacity: 1; transform: scale(.92) translateY(0); filter: blur(0); }
}
@keyframes drift {
  0%, 100% { transform: scale(.92) translateY(0); }
  50%      { transform: scale(.92) translateY(-9px); }
}

/* ---------- Sections ---------- */

.band { padding: 5rem 0 3rem; }
@media (min-width: 640px) {
  .band { padding: 7rem 0 4rem; }
}
.band.last { padding-bottom: 6rem; }

/* Section heading: a small number, a big italic title, and a rule that draws itself in */
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.sec-no {
  font-family: var(--font-ui);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .2em;
  color: rgb(var(--ink) / .4);
}
.sec-title {
  font-style: italic;
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1;
  font-size: clamp(34px, 6vw, 64px);
}
.sec-rule {
  flex: 1 1 0;
  align-self: center;
  height: 1px;
  background: rgb(var(--ink) / .14);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 900ms var(--ease) 200ms;
}
.sec-head.seen .sec-rule { transform: scaleX(1); }

/* Elsewhere: two tall, soft-filled tiles, the second sitting lower so they stagger */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 46rem;
  margin: 2.5rem auto 0;
  align-items: start;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 4 / 5;
  padding: clamp(1rem, 2.4vw, 1.7rem);
  border-radius: 2rem;
  overflow: hidden;
  background: rgb(var(--ink) / .045);
  transition: background 260ms var(--ease-soft), color 260ms var(--ease-soft), translate 360ms var(--ease);
}
.tile-icon, .tile-arrow {
  position: absolute;
  top: clamp(1rem, 2.4vw, 1.7rem);
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 9999px;
  transition: background 260ms var(--ease-soft), color 260ms var(--ease-soft), transform 360ms var(--ease);
}
.tile-icon  { left: clamp(1rem, 2.4vw, 1.7rem); background: var(--paper); }
.tile-arrow { right: clamp(1rem, 2.4vw, 1.7rem); background: rgb(var(--ink)); color: var(--paper); }
.tile-icon svg  { width: 20px; height: 20px; }
.tile-arrow svg { width: 17px; height: 17px; }
.tile .name {
  display: block;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1;
  font-size: clamp(22px, 4.4vw, 44px);
}
.tile .k {
  display: block;
  margin-top: .7rem;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .45;
  transition: opacity 260ms var(--ease-soft);
}
.tile:hover {
  translate: 0 -6px;
  background: rgb(var(--ink));
  color: var(--paper);
}
.tile:hover .tile-icon  { background: rgb(255 255 255 / .14); color: var(--paper); }
.tile:hover .tile-arrow { background: var(--paper); color: rgb(var(--ink)); transform: rotate(45deg); }
.tile:hover .k { opacity: .75; }

@media (max-width: 640px) {
  .tile .k { display: none; }
  .tile-icon, .tile-arrow { width: 2.3rem; height: 2.3rem; }
}

/* Letters: one dark panel with an outlined headline that slides sideways as you scroll */
.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.6rem;
  min-height: clamp(320px, 46vw, 500px);
  margin-top: 2.5rem;
  padding: clamp(1.4rem, 3.2vw, 2.8rem);
  border-radius: 2rem;
  overflow: hidden;
  background: rgb(var(--ink));
  color: var(--paper);
  isolation: isolate;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 70% at 85% 0%, rgb(255 255 255 / .12), transparent 70%),
    radial-gradient(50% 60% at 0% 100%, rgb(255 255 255 / .06), transparent 70%);
}
.panel-strip {
  position: absolute;
  top: clamp(1.4rem, 3vw, 2.4rem);
  left: 0;
  white-space: nowrap;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1;
  font-size: clamp(64px, 13vw, 170px);
  color: transparent;
  -webkit-text-stroke: 1px rgb(255 255 255 / .28);
  translate: calc(var(--sy, 0) * -.22px - 8%) 0;
  pointer-events: none;
  user-select: none;
}
.panel-by {
  display: block;
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1;
  color: rgb(255 255 255 / .8);
}
.panel-title {
  display: block;
  margin-top: .3rem;
  font-family: var(--font-ui);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: .98;
  font-size: clamp(34px, 7vw, 84px);
}
.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.panel-foot .k {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgb(255 255 255 / .55);
}
.panel-arrow {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  flex-shrink: 0;
  border-radius: 9999px;
  background: var(--paper);
  color: rgb(var(--ink));
  transition: transform 360ms var(--ease), background 260ms var(--ease-soft);
}
.panel-arrow svg { width: 20px; height: 20px; }
.panel:hover .panel-arrow { transform: translateX(6px) rotate(-45deg); }

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

.foot {
  border-top: 1px solid rgb(var(--ink) / .1);
  padding: 0 0 2rem;
  font-family: var(--font-ui);
  font-size: .72rem;
  color: rgb(var(--ink) / .5);
}
.inquiries {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
  padding: 3.5rem 0 3rem;
  text-align: center;
}
.inq-label {
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgb(var(--ink) / .4);
}
.inq-mail {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.1;
  font-size: clamp(24px, 5.2vw, 46px);
  color: rgb(var(--ink));
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 400ms var(--ease);
}
.inq-mail:hover { background-size: 100% 1px; }
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .8rem 1.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgb(var(--ink) / .08);
}
.foot a { transition: color 200ms var(--ease-soft); }
.foot a:hover { color: rgb(var(--ink)); }
.foot-links { display: flex; gap: 1.4rem; }

/* ---------- Letters page ---------- */

.letters { padding: 3.5rem 0 6rem; }
@media (min-width: 640px) {
  .letters { padding: 5rem 0 7rem; }
}
.letters .narrow {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
}

.archive-title {
  font-family: var(--font-ui);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  font-size: clamp(32px, 7.4vw, 60px);
}
.archive-by {
  margin-top: .5rem;
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1;
}

.archive-body {
  max-width: 38rem;
  margin: 3rem auto 0;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.85;
  color: rgb(var(--ink) / .78);
  text-wrap: pretty;
}
.archive-body strong {
  font-weight: 700;
  color: rgb(var(--ink));
}

/* Subscribe */
.subscribe {
  margin: 3.5rem auto 0;
  max-width: 26rem;
}
.subscribe .eyebrow {
  display: block;
  margin-bottom: .9rem;
  font-family: var(--font-ui);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgb(var(--ink) / .4);
}
.sub-field {
  display: flex;
  align-items: center;
  gap: .5rem;
  border-radius: 9999px;
  border: 1px solid rgb(var(--ink) / .22);
  background: rgb(var(--ink) / .03);
  padding: .4rem .4rem .4rem 1.2rem;
  transition: border-color 200ms var(--ease-soft), background 200ms var(--ease-soft);
}
.sub-field:focus-within {
  border-color: rgb(var(--ink) / .55);
  background: rgb(var(--ink) / .05);
}
.sub-field input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-display);
  font-size: 1rem;
}
.sub-field input::placeholder { color: rgb(var(--ink) / .4); }
.sub-field button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.6rem;
  width: 2.6rem;
  flex-shrink: 0;
  border: 0;
  border-radius: 9999px;
  background: rgb(var(--ink));
  color: var(--paper);
  cursor: pointer;
  transition: transform 200ms var(--ease-soft), opacity 200ms var(--ease-soft);
}
.sub-field button:hover  { transform: translateX(2px); }
.sub-field button:active { opacity: .85; }
.sub-field button svg { width: 18px; height: 18px; }
.sub-note {
  min-height: 1.4em;
  margin-top: .9rem;
  font-family: var(--font-ui);
  font-size: .72rem;
  color: rgb(var(--ink) / .55);
}

/* ---------- Scroll reveal ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
html.js .reveal.seen {
  opacity: 1;
  transform: none;
}

/* Cards fade in AND keep their hover transitions */
html.js .tile.reveal,
html.js .panel.reveal {
  transition:
    opacity 900ms var(--ease) calc(var(--i, 0) * 90ms),
    transform 900ms var(--ease) calc(var(--i, 0) * 90ms),
    background 260ms var(--ease-soft),
    color 260ms var(--ease-soft),
    translate 360ms var(--ease);
}

/* ---------- Small screens ---------- */

@media (max-width: 480px) {
  .tiles { gap: .7rem; }
  .tile { border-radius: 1.5rem; }
  .panel { border-radius: 1.5rem; }
}

/* ---------- Respect reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html.js .hero::before,
  html.js .hero .disc,
  html.js .hero .wash,
  html.js .hero .subject,
  html.js .hero .display,
  html.js .grain { animation: none; }
  html.js .grain { opacity: .035; }
  .panel-strip { translate: -8% 0; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .hero .subject-wrap { transition: none; transform: none; }
  .sec-rule { transform: scaleX(1); transition: none; }
}
