/* ==================================================================
   LOPUD MANAGEMENT — style.css
   One white plaster room, lit from above; the name mounted on the
   wall. Her page keeps her own off-white ground (Perron guidelines).
   Sections: tokens · base · room · chrome · home · roster · celine
             · entrance · phone · reduced motion
   ================================================================== */

:root {
  --ink: #10203a;                 /* the house navy */
  --noir: #1a160f;                /* espresso — UI text at full strength */
  --noir-rgb: 26, 22, 15;         /* rgba(var(--noir-rgb), x) for UI tints */
  --brown: #292123;               /* Céline Dion identity brown (Perron) */
  --paper: #fdfdfc;               /* the wall */
  --paper-celine: #f3f4ec;        /* her ground */
  --hairline: rgba(16, 32, 58, 0.28);

  --font-display: "Italiana", "Georgia", serif;
  --font-ui: "Instrument Sans", "Helvetica Neue", sans-serif;
  --font-text: "Newsreader", "Georgia", serif;
}

/* ---- Base --------------------------------------------------------- */

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page-celine { background-color: var(--paper-celine); }

a:focus-visible {
  outline: 1px solid var(--hairline);
  outline-offset: 5px;
}

.page-roster a:focus-visible {
  outline-color: rgba(var(--noir-rgb), 0.3);
  outline-offset: 6px;
}

/* ---- The room ----------------------------------------------------- */

/* Shading: light from above, the side walls turning away, the floor
   meeting the wall. Neutral gray; the only warmth is in the sconces. */
.wall {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(70% 50% at 50% 0%, rgba(255, 252, 246, 0.6) 0%, rgba(255, 252, 246, 0.15) 45%, transparent 68%),
    linear-gradient(90deg, rgba(190, 190, 186, 0.62) 0%, rgba(214, 214, 211, 0.3) 8%, transparent 20%, transparent 80%, rgba(214, 214, 211, 0.3) 92%, rgba(190, 190, 186, 0.62) 100%),
    linear-gradient(0deg, rgba(184, 184, 180, 0.6) 0%, rgba(206, 206, 203, 0.26) 9%, transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, transparent 30%);
}

.page-celine .wall {
  background-image:
    radial-gradient(70% 50% at 50% 0%, rgba(255, 253, 248, 0.6) 0%, rgba(255, 253, 248, 0.15) 45%, transparent 68%),
    linear-gradient(90deg, rgba(186, 188, 178, 0.58) 0%, rgba(210, 212, 203, 0.28) 8%, transparent 20%, transparent 80%, rgba(210, 212, 203, 0.28) 92%, rgba(186, 188, 178, 0.58) 100%),
    linear-gradient(0deg, rgba(182, 184, 174, 0.55) 0%, rgba(204, 206, 197, 0.24) 9%, transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 252, 0.5) 0%, transparent 30%);
}

/* Plaster: the same noise rendered twice — a white sheen one pixel
   above each ridge, a neutral shade one pixel below. Relief, not tint. */
.wall-grain,
.wall-sheen {
  position: absolute;
  inset: 0;
  background-size: 360px 360px, 550px 550px;
}

.wall-grain {
  opacity: 0.42;
  mix-blend-mode: multiply;
  background-position: 0 1px, 0 1px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='720' height='720'><filter id='p' x='-5%25' y='-5%25' width='110%25' height='110%25'><feTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='4' seed='5' stitchTiles='stitch'/><feGaussianBlur stdDeviation='0.6'/><feColorMatrix type='matrix' values='0 0 0 0 0.44 0 0 0 0 0.44 0 0 0 0 0.43 0 0 0 0.055 0'/></filter><rect width='100%25' height='100%25' filter='url(%23p)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1100' height='1100'><filter id='t' x='-5%25' y='-5%25' width='110%25' height='110%25'><feTurbulence type='fractalNoise' baseFrequency='0.013 0.019' numOctaves='3' seed='9' stitchTiles='stitch'/><feGaussianBlur stdDeviation='1.4'/><feColorMatrix type='matrix' values='0 0 0 0 0.44 0 0 0 0 0.44 0 0 0 0 0.43 0 0 0 0.035 0'/></filter><rect width='100%25' height='100%25' filter='url(%23t)'/></svg>");
}

.page-celine .wall-grain {
  opacity: 0.3;
  background-size: 340px 340px, 540px 540px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='720' height='720'><filter id='p' x='-5%25' y='-5%25' width='110%25' height='110%25'><feTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='4' seed='17' stitchTiles='stitch'/><feGaussianBlur stdDeviation='0.6'/><feColorMatrix type='matrix' values='0 0 0 0 0.44 0 0 0 0 0.44 0 0 0 0 0.43 0 0 0 0.055 0'/></filter><rect width='100%25' height='100%25' filter='url(%23p)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1100' height='1100'><filter id='t' x='-5%25' y='-5%25' width='110%25' height='110%25'><feTurbulence type='fractalNoise' baseFrequency='0.013 0.019' numOctaves='3' seed='27' stitchTiles='stitch'/><feGaussianBlur stdDeviation='1.4'/><feColorMatrix type='matrix' values='0 0 0 0 0.44 0 0 0 0 0.44 0 0 0 0 0.43 0 0 0 0.035 0'/></filter><rect width='100%25' height='100%25' filter='url(%23t)'/></svg>");
}

.wall-sheen {
  opacity: 0.5;
  mix-blend-mode: screen;
  background-position: 0 -1px, 0 -1px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='720' height='720'><filter id='s' x='-5%25' y='-5%25' width='110%25' height='110%25'><feTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='4' seed='5' stitchTiles='stitch'/><feGaussianBlur stdDeviation='0.6'/><feColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23s)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1100' height='1100'><filter id='u' x='-5%25' y='-5%25' width='110%25' height='110%25'><feTurbulence type='fractalNoise' baseFrequency='0.013 0.019' numOctaves='3' seed='9' stitchTiles='stitch'/><feGaussianBlur stdDeviation='1.4'/><feColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23u)'/></svg>");
}

/* Sconces: two soft warm glows flanking the name, half off-canvas,
   breathing on a 60s cycle, out of phase. */
.sconce {
  position: absolute;
  top: 30%;
  width: 40vmax;
  height: 40vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 253, 249, 0.85) 0%, rgba(255, 253, 250, 0.32) 40%, transparent 68%);
  filter: blur(24px);
  pointer-events: none;
  will-change: opacity, transform;
}

.sconce::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(58% 80% at 50% 46%, rgba(255, 254, 251, 0.26) 0%, rgba(255, 254, 251, 0.1) 45%, transparent 72%);
}

.sconce-left  { left: -14vmax; }
.sconce-right { right: -14vmax; }

.sconce { animation: breathe 60s ease-in-out infinite; }
.sconce-right { animation-delay: -24s; }

@keyframes breathe {
  0%   { opacity: 0.25; transform: scale(0.92); }
  50%  { opacity: 1;    transform: scale(1.08); }
  100% { opacity: 0.25; transform: scale(0.92); }
}

/* ---- Chrome: header, nav, footer ---------------------------------- */

.site-top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2.2rem clamp(1.6rem, 5vw, 4rem) 0;
}

.page-home .site-top {
  justify-content: flex-end;
  align-items: stretch;
}

.site-nav {
  display: flex;
  gap: 2.6rem;
}

.brand-mark,
.site-nav a {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(var(--noir-rgb), 0.66);
  text-decoration: none;
  transition: color 0.4s ease;
}

.brand-mark:hover,
.brand-mark:focus-visible,
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--noir);
}

.page-celine .brand-mark:hover,
.page-celine .brand-mark:focus-visible,
.page-celine .site-nav a:hover,
.page-celine .site-nav a:focus-visible {
  color: var(--brown);
}

.site-nav a[aria-current="page"] {
  color: rgba(var(--noir-rgb), 0.32);
  pointer-events: none;
}

.foot {
  position: relative;
  z-index: 2;
  padding: 0 0 1.8rem;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(var(--noir-rgb), 0.28);
}

.hero {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ---- Home: the name mounted on the wall --------------------------- */

.mount-name {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.04;
  color: var(--ink);
}

/* Lifted off the wall: a graze of light on the top edge, a tight
   contact shadow behind, a soft drop below, ambient falloff. */
.mount-line1 {
  display: block;
  font-size: clamp(4rem, 12vw, 10.5rem);
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  text-transform: uppercase;
  text-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.55),
    0 2px 2px rgba(88, 88, 85, 0.32),
    0 7px 10px rgba(96, 96, 93, 0.22),
    0 18px 34px rgba(100, 100, 97, 0.16);
}

.mount-line2 {
  display: block;
  margin-top: 0.5em;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(1.05rem, 2.35vw, 1.55rem);
  letter-spacing: 0.94em;
  text-indent: 0.94em;
  text-transform: uppercase;
  color: rgba(var(--noir-rgb), 0.78);
  text-shadow:
    0 -0.5px 0 rgba(255, 255, 255, 0.5),
    0 2px 2px rgba(88, 88, 85, 0.3),
    0 6px 10px rgba(96, 96, 93, 0.2),
    0 14px 26px rgba(100, 100, 97, 0.14);
}

/* 404: one line in the nav's voice */
.lost-line {
  margin: clamp(2.2rem, 5vh, 3.4rem) 0 0;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(var(--noir-rgb), 0.42);
}

.lost-line a {
  color: rgba(var(--noir-rgb), 0.72);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--noir-rgb), 0.25);
  padding-bottom: 0.15em;
  transition: color 0.4s ease, border-color 0.4s ease;
}

.lost-line a:hover {
  color: var(--noir);
  border-color: rgba(var(--noir-rgb), 0.7);
}

/* ---- Roster: her mark is the door --------------------------------- */

.page-roster .hero { z-index: 30; }

.roster-door {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  text-decoration: none;
  transform: translateY(-4vh);
}

.roster-door:focus-visible { outline: none; }

.room-label {
  margin: 0 0 3rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  text-transform: uppercase;
  color: rgba(var(--noir-rgb), 0.45);
}

/* The official CÉLINE DION lockup — as-is, flat, never treated.
   One scale on both pages. */
.cd-logo {
  display: block;
  width: min(40vw, 520px);
  height: auto;
}

.door-lockup {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.85;
  transition: opacity 0.9s ease, transform 1.5s cubic-bezier(0.22, 0.7, 0.25, 1);
}

/* On approach: the mark lifts and the room whites out around it —
   only the label and her mark stay above the veil */
.roster-door:hover .door-lockup,
.roster-door:focus-visible .door-lockup {
  opacity: 1;
  transform: translateY(-4px) scale(1.025);
}

.whiteout {
  position: fixed;
  left: 50%;
  top: 45%;
  z-index: 5;
  width: 400vmax;
  height: 400vmax;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(253, 253, 252, 1) 0%,
    rgba(253, 253, 252, 0.97) 30%,
    rgba(253, 253, 252, 0.9) 52%,
    rgba(253, 253, 252, 0.75) 68%,
    rgba(253, 253, 252, 0.55) 82%,
    rgba(253, 253, 252, 0.35) 100%
  );
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.94);
  pointer-events: none;
  transition: opacity 1.6s cubic-bezier(0.4, 0.05, 0.2, 1), transform 2.4s cubic-bezier(0.25, 0.6, 0.2, 1);
}

.page-roster:has(.roster-door:hover) .whiteout,
.page-roster:has(.roster-door:focus-visible) .whiteout {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ---- Céline: her identity --------------------------------------- */

.cover {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(1rem, 3vh, 2.5rem);
}

.cd-logo-wrap { margin: 0; }

/* The portrait sits fully below the mark — nothing may cover it */
.cover-figure {
  position: relative;
  z-index: 2;
  margin: clamp(1.6rem, 3.5vh, 3rem) 0 0;
}

.cover-figure img:not(.autograph) {
  display: block;
  width: min(60vw, 400px);
  aspect-ratio: 4 / 5;
  height: auto;
  object-fit: cover;
  padding: 12px;
  background: #fbfaf6;
  box-shadow: 0 1px 1px rgba(41, 33, 35, 0.14), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.cover-figure img.missing { visibility: hidden; }

/* Her signature — traced from her hand — across the lower corner */
.autograph {
  position: absolute;
  right: -18%;
  bottom: -6%;
  width: min(35vw, 290px);
  z-index: 3;
  filter: drop-shadow(0 2px 2px rgba(41, 33, 35, 0.12));
}

.letter {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(4rem, 9vh, 6.5rem) 1.5rem 4.5rem;
  text-align: left;
}

/* The bio set like a book: raised initial, run-on paragraphs with
   an indent, old-style figures, no widows */
.bio {
  max-width: 34rem;
  margin: 0 auto;
  column-count: 1; /* not a no-op: multicol changes Chrome's line layout; keep */
}

.bio p {
  margin: 0;
  font-family: var(--font-text);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.6;
  color: #2f2a28;
  text-wrap: pretty;
  font-variant-numeric: oldstyle-nums;
  font-feature-settings: "onum" 1, "kern" 1;
}

.bio p + p { text-indent: 1.7em; }

.bio p:first-of-type::first-letter {
  font-family: var(--font-text);
  font-weight: 400;
  font-size: 2.35em;
  line-height: 0.8;
  vertical-align: baseline;
  color: var(--brown);
  margin-right: 0.04em;
}

.site-line {
  display: block;
  margin-top: 3rem;
  text-align: center;
  font-family: var(--font-text);
  font-style: italic;
  font-weight: 300;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: rgba(41, 33, 35, 0.55);
  text-decoration: none;
  transition: color 0.4s ease;
}

.site-line:hover,
.site-line:focus-visible {
  color: var(--brown);
}

/* ---- Entrance (with JS): the room, then what's in it -------------- */

@keyframes fade-in { to { opacity: 1; } }

.js .wall {
  opacity: 0;
  animation: fade-in 0.7s ease forwards;
}

.js .page-home .mount-name {
  opacity: 0;
  animation: fade-in 1.6s ease 0.7s forwards;
}

.js .page-home .site-nav,
.js .page-home .foot {
  opacity: 0;
  animation: fade-in 1.4s ease 1.6s forwards;
}

.js .lost-line {
  opacity: 0;
  animation: fade-in 0.7s ease 0.3s forwards;
}

.js .page-roster .room-label,
.js .page-roster .site-top,
.js .page-roster .foot,
.js .page-celine .site-top,
.js .page-celine .letter,
.js .page-celine .foot {
  opacity: 0;
  animation: fade-in 0.7s ease 0.3s forwards;
}

.js .cover-figure {
  opacity: 0;
  animation: fade-in 0.8s ease 0.15s forwards;
}

/* Then she signs: a wipe across the autograph */
.js .autograph {
  -webkit-mask-image: linear-gradient(100deg, #000 46%, transparent 56%);
  mask-image: linear-gradient(100deg, #000 46%, transparent 56%);
  -webkit-mask-size: 300% 100%;
  mask-size: 300% 100%;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;
  animation: sign-wipe 1.7s cubic-bezier(0.5, 0.1, 0.4, 0.95) 1s forwards;
}

@keyframes sign-wipe {
  to {
    -webkit-mask-position: 0% 0;
    mask-position: 0% 0;
  }
}

/* ---- Phone: close to the wall, lit from above ------------------- */

@media (max-width: 760px) {
  .wall {
    background-image:
      linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.6) 22%, transparent 42%),
      radial-gradient(60% 45% at 0% 100%, rgba(184, 184, 180, 0.55) 0%, rgba(206, 206, 203, 0.22) 45%, transparent 75%),
      radial-gradient(60% 45% at 100% 100%, rgba(184, 184, 180, 0.55) 0%, rgba(206, 206, 203, 0.22) 45%, transparent 75%),
      linear-gradient(0deg, rgba(184, 184, 180, 0.5) 0%, rgba(206, 206, 203, 0.2) 8%, transparent 20%);
  }

  .page-celine .wall {
    background-image:
      linear-gradient(180deg, rgba(255, 255, 252, 0.95) 0%, rgba(255, 255, 252, 0.6) 22%, transparent 42%),
      radial-gradient(60% 45% at 0% 100%, rgba(182, 184, 174, 0.5) 0%, rgba(204, 206, 197, 0.2) 45%, transparent 75%),
      radial-gradient(60% 45% at 100% 100%, rgba(182, 184, 174, 0.5) 0%, rgba(204, 206, 197, 0.2) 45%, transparent 75%),
      linear-gradient(0deg, rgba(182, 184, 174, 0.45) 0%, rgba(204, 206, 197, 0.18) 8%, transparent 20%);
  }

  .sconce {
    top: 8%;
    width: 70vmax;
    height: 70vmax;
    background: radial-gradient(circle, rgba(255, 253, 249, 0.85) 0%, rgba(255, 253, 250, 0.32) 40%, transparent 68%);
  }

  .sconce-left  { left: -35vmax; }
  .sconce-right { right: -35vmax; }

  /* One line, same as desktop: the type steps down so it fits */
  .site-nav { gap: 1.4rem; }

  .brand-mark,
  .site-nav a {
    white-space: nowrap;
    font-size: 0.64rem;
    letter-spacing: 0.18em;
  }

  .page-celine .cover { padding-top: clamp(2.2rem, 6vh, 3.4rem); }
}

/* ---- Reduced motion ---------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .js .wall,
  .js .page-home .mount-name,
  .js .page-home .site-nav,
  .js .page-home .foot,
  .js .page-roster .room-label,
  .js .page-roster .site-top,
  .js .page-roster .foot,
  .js .page-celine .site-top,
  .js .page-celine .letter,
  .js .page-celine .foot,
  .js .cover-figure {
    animation-duration: 0.4s;
    animation-delay: 0s;
  }

  .js .autograph {
    animation: none;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .sconce { animation: none; }

  .whiteout { transition: opacity 0.2s ease; }
}
