/* ebers.io — shared styles for www / brendan / katie.
   Each page picks its palette with <html data-site="...">. */

:root {
  --bg: #f3ede3;
  --ink: #221c16;
  --muted: #7a6e60;
  --accent: #c4532d;
  --glow: rgb(233 180 143 / 0.55);
  --grain-blend: multiply;
  --grain-opacity: 0.09;
  color-scheme: light;
}
html[data-site="brendan"] {
  --bg: #e6ecef;
  --ink: #13212c;
  --muted: #5d6d79;
  --accent: #2e5e8e;
  --glow: rgb(169 195 217 / 0.6);
}
html[data-site="katie"] {
  --bg: #f5e6e3;
  --ink: #2b1719;
  --muted: #86656a;
  --accent: #b4415a;
  --glow: rgb(237 177 185 / 0.6);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1714;
    --ink: #f1e9dd;
    --muted: #a3968a;
    --accent: #e8835c;
    --glow: rgb(196 83 45 / 0.22);
    --grain-blend: soft-light;
    --grain-opacity: 0.14;
    color-scheme: dark;
  }
  html[data-site="brendan"] {
    --bg: #10171d;
    --ink: #e3eaef;
    --muted: #8796a2;
    --accent: #7faedc;
    --glow: rgb(46 94 142 / 0.28);
  }
  html[data-site="katie"] {
    --bg: #1c1315;
    --ink: #f4e4e6;
    --muted: #a88a8f;
    --accent: #e8899c;
    --glow: rgb(180 65 90 / 0.24);
  }
}

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

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  background:
    radial-gradient(ellipse 60% 55% at 92% 8%, var(--glow), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Paper grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

main {
  align-self: center;
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
  padding-block: 18vh 12vh;
}

.message {
  margin: 0;
  /* Room for descenders (y, g, p) inside the box, so the blur/transform
     layer used by the entrance animation never clips them. */
  padding-block: 0.08em 0.22em;
  font-weight: 340;
  font-size: clamp(4rem, 15vw, 12.5rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-variation-settings: "SOFT" 60, "WONK" 1;
  text-wrap: balance;
  white-space: pre-line;
  animation: rise 1.1s cubic-bezier(.2, .7, .1, 1) both;
}

.signature {
  margin: clamp(0.5rem, 1.2vw, 1rem) 0 0;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-style: italic;
  font-weight: 380;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  letter-spacing: -0.005em;
  color: var(--muted);
  font-variation-settings: "SOFT" 100;
  animation: rise 1.1s 0.25s cubic-bezier(.2, .7, .1, 1) both;
}
.signature::before {
  content: "";
  flex: none;
  width: clamp(2rem, 5vw, 3.5rem);
  height: 1.5px;
  background: var(--accent);
  transform-origin: left;
  animation: draw 0.9s 0.55s cubic-bezier(.6, 0, .2, 1) both;
}

footer {
  width: min(100% - 2.5rem, 68rem);
  margin: 0 auto;
  padding: 1.5rem 0 max(1.75rem, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  animation: fade 1s 0.8s both;
}
footer nav { display: flex; gap: 1.4rem; }
footer a {
  color: inherit;
  text-decoration: none;
  padding-bottom: 0.2em;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
footer a:hover,
footer a:focus-visible { color: var(--ink); border-color: var(--accent); outline: none; }
footer a[aria-current="page"] { color: var(--ink); border-color: var(--accent); }

::selection { background: var(--accent); color: var(--bg); }

@keyframes rise {
  from { opacity: 0; transform: translateY(0.35em); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
