/* Auresius — placeholder */

:root {
  --cream: #f1e9da;
  --ivory: #f8f3e9;
  --ink: #4c3e2c;
  --ink-soft: #7b6748;
  --gold-dim: #a07d42;
  --serif: "Cormorant Garamond", "Cormorant", "EB Garamond", Garamond, "Times New Roman", serif;
  --ease-out: cubic-bezier(0.22, 0.61, 0.24, 1);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  /* Shown before the shader's first frame, and as the no-WebGL fallback. */
  background:
    radial-gradient(60% 50% at 50% 42%, var(--ivory) 0%, rgba(248, 243, 233, 0) 70%),
    radial-gradient(45% 35% at 82% 18%, rgba(214, 183, 120, 0.16) 0%, rgba(214, 183, 120, 0) 70%),
    radial-gradient(50% 40% at 12% 88%, rgba(196, 160, 96, 0.14) 0%, rgba(196, 160, 96, 0) 70%),
    var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ------------------------------------------------------------- atmosphere */

.fluid {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  animation: settle 2.4s ease-out both;
}

.no-webgl .fluid {
  display: none;
}

/* Fine paper tooth over everything, at full resolution. */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .33 0 0 0 0 .2 0 0 0 -.9 .62'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* ------------------------------------------------------------ composition */

.stage {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* More air below than above: the eye rests a little above true center. */
  padding:
    max(9vh, 3.5rem)
    max(6vw, 1.25rem)
    max(13vh, 4rem);
}

.signature {
  margin: 0;
  width: min(720px, 66vw);
  font: inherit;
  line-height: 0;
  /* Optical correction: the A's entry hook and the paraph pull the mass left. */
  transform: translateX(1.2%);
}

.signature canvas,
.signature img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2.209;
  filter:
    drop-shadow(0 0.5px 0.4px rgba(92, 62, 20, 0.28))
    drop-shadow(0 6px 14px rgba(120, 86, 34, 0.12));
}

.lede {
  margin: clamp(1.75rem, 5vh, 3.25rem) 0 0;
  max-width: 34ch;
  font-size: clamp(1.2rem, 1.02rem + 0.6vw, 1.62rem);
  line-height: 1.58;
  letter-spacing: 0.012em;
  font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
}

.whisper {
  margin: clamp(1.5rem, 4vh, 2.5rem) 0 0;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.52em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

/* letter-spacing trails the last glyph; pad the front so it centres. */
.whisper span {
  padding-left: 0.52em;
}

.whisper::before,
.whisper::after {
  content: "";
  width: clamp(1.75rem, 4vw, 2.75rem);
  height: 1px;
  background: linear-gradient(90deg, rgba(160, 125, 66, 0), rgba(160, 125, 66, 0.7));
}

.whisper::after {
  transform: scaleX(-1);
}

.colophon {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 0 1.25rem max(1.5rem, calc(env(safe-area-inset-bottom) + 0.9rem));
  font-size: 0.84rem;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
}

.colophon-mark {
  display: block;
  width: 1.9rem;
  height: 1.9rem;
  filter: drop-shadow(0 1px 1.5px rgba(92, 62, 20, 0.18));
}

.colophon p {
  margin: 0;
}

.colophon .sep {
  display: inline-block;
  margin: 0 0.55em;
  opacity: 0.45;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ----------------------------------------------------------- the reveal */

.js .lede,
.js .whisper,
.js .colophon {
  opacity: 0;
  transform: translateY(0.6rem);
  filter: blur(5px);
  transition:
    opacity 1.9s var(--ease-out),
    transform 2.2s var(--ease-out),
    filter 1.9s var(--ease-out);
}

.js .whisper { transition-delay: 0.55s; }
.js .colophon { transition-delay: 1.1s; }

.is-revealed .lede,
.is-revealed .whisper {
  opacity: 1;
  transform: none;
  filter: none;
}

.is-revealed .colophon {
  opacity: 0.85;
  transform: none;
  filter: none;
}

@keyframes settle {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ------------------------------------------------------------ responsive */

/* Portrait phones: the signature takes the width, the text tightens up. */
@media (max-width: 600px) {
  .stage {
    padding-top: max(8vh, 3rem);
    padding-bottom: max(12vh, 4rem);
  }

  .signature {
    width: 84vw;
    transform: translateX(1.5%);
  }

  .lede {
    max-width: 26ch;
    line-height: 1.55;
  }

  .colophon {
    font-size: 0.74rem;
    gap: 0.7rem;
  }

  .colophon-mark {
    width: 1.6rem;
    height: 1.6rem;
  }
}

/* Short landscape screens: keep everything on one view. */
@media (max-height: 520px) and (orientation: landscape) {
  .stage {
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
  }

  .signature {
    width: min(52vw, 74vh);
  }

  .lede {
    margin-top: 0.9rem;
    max-width: 48ch;
    font-size: 1.08rem;
    line-height: 1.5;
  }

  .whisper {
    margin-top: 0.8rem;
  }

  .colophon {
    padding-bottom: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .lede,
  .js .whisper,
  .js .colophon {
    transform: none;
    filter: none;
    transition: opacity 0.6s linear;
    transition-delay: 0s;
  }
}
