/* Nine in the Morning · Paris showroom. One sheet of paper, no script. */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #efe8dc;
  --ink: #1d1b19;
  --soft: #6a6259;
  --line: rgba(29, 27, 25, 0.22);
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --gutter: clamp(1.5rem, 6vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.45;
  font-optical-sizing: auto;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}

/* PAPER-START: matte paper as two static tiles, no blend modes, nothing fixed.
   Tooth: noise lit as a relief (diffuse only), split into warm shadow and white highlight.
   Formation: slow cloudiness, like uneven pulp. */
html {
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='t' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.05' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeDiffuseLighting surfaceScale='.5' diffuseConstant='1' lighting-color='%23fff' result='l'%3E%3CfeDistantLight azimuth='225' elevation='60'/%3E%3C/feDiffuseLighting%3E%3CfeColorMatrix in='l' values='0 0 0 0 .24 0 0 0 0 .19 0 0 0 0 .13 -.26 0 0 0 .225' result='s'/%3E%3CfeColorMatrix in='l' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .26 0 0 0 -.225' result='h'/%3E%3CfeMerge%3E%3CfeMergeNode in='s'/%3E%3CfeMergeNode in='h'/%3E%3C/feMerge%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23t)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='m' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.014' numOctaves='3' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36 0 0 0 0 .29 0 0 0 0 .2 0 0 0 .075 -.028'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  background-size: 240px 240px, 420px 420px;
}
/* PAPER-END */

h1, h2, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
em { font-style: italic; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
::selection { background: var(--ink); color: var(--paper); }

.label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--soft);
}

.sheet {
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  max-width: 38rem;
  min-height: 100svh;
  margin: 0 auto;
  padding: max(1.75rem, env(safe-area-inset-top)) var(--gutter) max(1.75rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: block; width: 9.5rem; height: auto; }
.head .label { white-space: nowrap; }
@media (max-width: 22rem) { .head .label { display: none; } }

main { margin-top: clamp(3.5rem, 13svh, 7rem); }

h1 {
  font-size: clamp(3.1rem, 14.5vw, 5.5rem);
  font-weight: 300;
  font-style: italic;
  line-height: 0.98;
  letter-spacing: -0.022em;
}
h1 .w { display: inline-block; }
h1 .nb { white-space: nowrap; }
.intro { margin-top: 1.6rem; max-width: 27rem; font-size: 1.15rem; line-height: 1.42; text-wrap: pretty; }
.intro p + p { margin-top: 0.9em; }

.facts { margin-top: clamp(2.5rem, 8svh, 4rem); }
.row {
  position: relative;
  display: grid;
  grid-template-columns: 4.75rem 1fr;
  align-items: baseline;
  gap: 0 1rem;
  padding: 1rem 0;
}
.row::before, .row:last-child::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--line);
  transform-origin: left;
}
.row:last-child::after { top: auto; bottom: 0; }
.row dd { font-size: 1.2rem; line-height: 1.3; }
.soft { display: block; margin-top: 0.15rem; font-size: 1rem; color: var(--soft); }

/* links: the text itself is the link, with a hairline that redraws on hover */
.u { display: inline-flex; align-items: center; gap: 0.5em; padding: 0.55rem 0; margin: -0.55rem 0; }
.u > span {
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 0.12em;
}
.go { width: 0.72em; height: 0.72em; margin-bottom: 0.16em; flex: none; fill: none; stroke: currentColor; stroke-width: 1; transition: transform 0.5s var(--ease); }
@media (hover: hover) {
  .u:hover > span { animation: redraw 0.7s var(--ease); }
  .u:hover .go { transform: translate(2px, -2px); }
}
@keyframes redraw {
  0% { background-size: 100% 1px; background-position: 100% 100%; }
  45% { background-size: 0 1px; background-position: 100% 100%; }
  46% { background-size: 0 1px; background-position: 0 100%; }
  100% { background-size: 100% 1px; background-position: 0 100%; }
}

.contact { margin-top: clamp(3rem, 10svh, 5rem); }
h2 { margin: 0; font-size: clamp(1.75rem, 7.5vw, 2.3rem); font-weight: 300; font-style: italic; line-height: 1.1; letter-spacing: -0.012em; }
.note { margin-top: 0.6rem; font-size: 1.15rem; line-height: 1.42; }

.people { margin-top: 2rem; display: grid; gap: 2rem; }
.people li { display: grid; justify-items: start; gap: 0.7rem; }
.mail { font-size: clamp(1.45rem, 6.4vw, 1.9rem); font-weight: 300; line-height: 1.15; letter-spacing: -0.01em; }
.mail > span { overflow-wrap: anywhere; }
.tel { font-size: 1.15rem; color: var(--soft); }
.tel > span { background-image: linear-gradient(var(--line), var(--line)); }

.foot {
  margin-top: auto;
  padding-top: clamp(4rem, 12svh, 6rem);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.bye { font-size: 1.35rem; font-style: italic; font-weight: 300; }
.foot a { padding: 0.6rem 0; white-space: nowrap; }

/* ---------- ink: text arrives soft and settles sharp, like ink taking to paper ---------- */

@keyframes ink {
  from { opacity: 0; filter: blur(7px); transform: translateY(0.18em); }
  60% { opacity: 1; }
  to { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes draw { from { transform: scaleX(0); } }

.rv, h1 .w {
  animation: ink 1.5s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 85ms + 120ms);
}
h1 .w { animation-duration: 1.9s; animation-delay: calc(var(--i, 0) * 130ms + 150ms); }
.row::before, .row:last-child::after {
  animation: draw 1.4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 85ms + 60ms);
}

/* scroll: the header stays put with nothing behind it, so the paper shows through untouched.
   The text layer itself fades out just below the header (mask driven by --cut, set by the
   small script in index.html), while each piece also goes soft as it leaves. */
.sheet { padding-top: 0; }
.head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: max(1.4rem, env(safe-area-inset-top)) 0 1.4rem;
}
.content { flex: 1; display: flex; flex-direction: column; }
.masked .content {
  --fade: 3.5rem;
  -webkit-mask-image: linear-gradient(transparent var(--cut, -999px), #000 calc(var(--cut, -999px) + var(--fade)));
  mask-image: linear-gradient(transparent var(--cut, -999px), #000 calc(var(--cut, -999px) + var(--fade)));
}

/* the same ink at both edges: each piece settles in as it enters at the bottom
   and goes soft again, over its own height, as it leaves under the header */
@keyframes out {
  40% { opacity: 1; }
  to { opacity: 0; filter: blur(7px); transform: translateY(-0.18em); }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .sheet { --top: 5.5rem; --leave: exit 25% exit 95%; }
    .intro { --leave: exit 40% exit 105%; }

    /* arrives on load, leaves on scroll */
    h1 .w, .intro {
      animation: ink 1.5s var(--ease) both, out linear forwards;
      animation-delay: calc(var(--i, 0) * 85ms + 120ms), 0s;
      animation-timeline: auto, view(var(--top) 0px);
      animation-range: normal, var(--leave);
    }
    h1 .w {
      animation-duration: 1.9s, auto;
      animation-delay: calc(var(--i, 0) * 130ms + 150ms), 0s;
    }
    .row {
      animation: out linear forwards;
      animation-timeline: view(var(--top) 0px);
      animation-range: var(--leave);
    }
    /* arrives on scroll, leaves on scroll */
    .sv {
      animation: ink linear both, out linear forwards;
      animation-timeline: view(), view(var(--top) 0px);
      animation-range: entry 5% entry 75%, var(--leave);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .rv, .sv, h1 .w, .row::before, .row:last-child::after, .u:hover > span { animation: none; }
}
