/* ==========================================================================
   evakeiffenheim.com — one page, one invitation.

   Type system (two roles, never mixed):
     Literata (serif)  — everything that is read: prose, quotes, names.
     Inter (sans)      — everything that is scanned: labels, years, links,
                         form UI, captions.

   Layout system:
     One reading column (--col) for all text. On wide screens the section
     labels (kickers) sit in the left margin, like notes in a book.

   Palette (fixed, from the brief):
     Porcelain #FDFFFC · Jet Black #172622 · Muted Teal #77AE7F
     Slate Grey #6E8387 · Powder Petal #F0DDD1
   Derived ink shades for WCAG AA at small sizes:
     --teal-ink #4E7A57 · --slate-ink #5A6B6E · --mist #AFC3BD (on Jet)
   ========================================================================== */

@font-face {
  font-family: "Literata";
  src: url("assets/fonts/literata-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("assets/fonts/literata-400i.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("assets/fonts/literata-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --porcelain: #FDFFFC;
  --jet: #172622;
  --teal: #77AE7F;
  --teal-ink: #4E7A57;
  --slate: #6E8387;
  --slate-ink: #5A6B6E;
  --petal: #F0DDD1;
  --mist: #AFC3BD;

  --serif: "Literata", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --col: 42rem;                              /* the one reading column */
  --pad-x: clamp(1.25rem, 5vw, 2.5rem);
  --section-pad: clamp(5.5rem, 12vh, 9rem);
  --rule-color: rgba(23, 38, 34, 0.12);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--porcelain);
  color: var(--jet);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* A whisper of print grain — tactility without noise. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  opacity: 0.026;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
@media print {
  body::after { display: none; }
}

/* Motion runtime (motion.js adds html.motion): GSAP owns transforms,
   so the CSS reveal transition must stand down; Lenis owns scrolling. */
html.motion .reveal,
html.motion .reveal.in { opacity: 1; transform: none; transition: none; }
html.motion #voices {
  min-height: 100vh;
  min-height: 100svh;
  align-content: center;
}
/* Held invisible for the instant between first paint and the motion
   layer applying its initial animation states (see inline head script). */
html.pre-motion .hero .epigraph,
html.pre-motion .hero .wordmark,
html.pre-motion .hero .scroll-cue,
html.pre-motion .hero .hero-actions,
html.pre-motion #hero-lines { opacity: 0; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

::selection { background: rgba(119, 174, 127, 0.28); }

a {
  color: var(--teal-ink);
  text-decoration: underline;
  text-decoration-color: rgba(119, 174, 127, 0.6);
  text-underline-offset: 3px;
  transition: text-decoration-color 200ms ease-out;
}
a:hover { text-decoration-color: var(--teal-ink); }

:focus-visible {
  outline: 2px solid var(--teal-ink);
  outline-offset: 3px;
  border-radius: 1px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: 1rem;
  z-index: 10;
  background: var(--porcelain);
  color: var(--jet);
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  transform: translateY(-300%);
}
.skip-link:focus { transform: none; }

/* Layout — one column, kicker in the margin on wide screens ---------------- */

main > section, .band {
  padding-block: var(--section-pad);
}

.sec {
  display: grid;
  grid-template-columns: 1fr min(var(--col), calc(100% - 2 * var(--pad-x))) 1fr;
}
.sec > * { grid-column: 2; }

.kicker {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-ink);
  margin-bottom: 2.75rem;
}
.kicker .rule {
  display: inline-block;
  width: 26px;
  height: 1px;
  background: var(--teal);
  vertical-align: middle;
  margin-right: 0.8rem;
}

@media (min-width: 1150px) {
  .kicker {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    text-align: right;
    margin: 0.4rem 3rem 0 0;
    max-width: 11rem;
  }
  .kicker .rule { display: block; margin: 0 0 0.7rem auto; }
}

/* Prose ---------------------------------------------------------------------- */

.prose p + p { margin-top: 1.5em; }
.prose em { font-style: italic; }

/* Section 0 — hero ------------------------------------------------------------ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding-block: clamp(5rem, 12vh, 8rem) clamp(6rem, 14vh, 9rem);
}

.hero .lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 62% 46% at 50% 42%,
              rgba(253, 255, 252, 0.94) 0%,
              rgba(253, 255, 252, 0.6) 55%,
              rgba(253, 255, 252, 0) 78%);
  pointer-events: none;
}

.wordmark {
  position: absolute;
  top: clamp(1.25rem, 3.5vh, 2.25rem);
  left: var(--pad-x);
  font-family: var(--serif);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate-ink);
}

.epigraph {
  position: relative;
  max-width: 36rem;
  padding-inline: var(--pad-x);
  text-align: center;
}
.epigraph blockquote p {
  font-size: clamp(1.35rem, 1.1rem + 1.7vw, 2.15rem);
  line-height: 1.5;
  font-weight: 400;
  font-style: italic;
}
.epigraph figcaption {
  margin-top: 2rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--slate-ink);
}
.epigraph figcaption cite { font-style: italic; font-family: var(--serif); }

.hero-actions {
  margin-top: 2.75rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.ghost-btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--jet);
  text-decoration: none;
  border: 1px solid rgba(23, 38, 34, 0.3);
  border-radius: 999px;
  padding: 0.85rem 2rem;
  background-image: linear-gradient(105deg, var(--teal-ink), var(--teal-ink));
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition:
    background-size 550ms cubic-bezier(0.19, 1, 0.22, 1),
    color 350ms ease-out,
    border-color 350ms ease-out,
    transform 350ms cubic-bezier(0.19, 1, 0.22, 1);
}
.ghost-btn:hover {
  background-size: 100% 100%;
  color: var(--porcelain);
  border-color: var(--teal-ink);
  transform: translateY(-1px);
}

/* Ghost buttons on dark grounds. */
.orientation .ghost-btn,
.about .ghost-btn,
.cv-page .ghost-btn {
  color: var(--porcelain);
  border-color: rgba(253, 255, 252, 0.35);
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.75rem;
}

.bio-media { display: grid; gap: 1.25rem; justify-items: start; }
.bio-media .ghost-btn { justify-self: stretch; text-align: center; }

@media (max-height: 640px) {
  .hero .epigraph blockquote p { font-size: clamp(1.15rem, 1rem + 1.2vw, 1.5rem); }
}

.scroll-cue {
  position: absolute;
  bottom: clamp(1.5rem, 5vh, 3rem);
  left: 50%;
  transform: translateX(-50%);
  display: block;
  padding: 0.75rem;
}
.scroll-cue span {
  display: block;
  width: 1px;
  height: 56px;
  background: var(--teal);
  transform-origin: top;
  animation: cue-draw 5.5s ease-in-out infinite;
}
@keyframes cue-draw {
  0%   { transform: scaleY(0); opacity: 0; }
  12%  { opacity: 1; }
  55%  { transform: scaleY(1); opacity: 1; }
  88%  { opacity: 0; }
  100% { transform: scaleY(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue span { animation: none; }
}

/* Section 1 — orientation ------------------------------------------------------ */

.orientation {
  background: var(--jet);
  color: var(--porcelain);
  padding-top: clamp(6.5rem, 15vh, 10.5rem);
}
.orientation .prose p {
  font-size: 1.1875rem;
  line-height: 1.8;
}
.orientation a {
  color: var(--teal);
  text-decoration-color: rgba(119, 174, 127, 0.55);
}
.orientation a:hover { text-decoration-color: var(--teal); }
.orientation .kicker { color: var(--mist); }

/* Section 2 — samples of collaborative work ------------------------------------ */

.work-item + .work-item {
  margin-top: clamp(4rem, 8vh, 5.5rem);
  padding-top: clamp(4rem, 8vh, 5.5rem);
  border-top: 1px solid var(--rule-color);
}

.work-item h3 {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 1.1rem;
}

/* Body text mirrors the reading list's description style (.tl-why). */
.work-item > p:not(.more) {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--slate-ink);
}
.work-item > p + p:not(.more) { margin-top: 1.1em; }

/* One action language, sitewide: quiet uppercase micro-labels. */
.work-item .more {
  margin-top: 1.6rem;
  font-family: var(--sans);
}
.work-item .more a,
.tl-link {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--teal-ink);
  border-bottom: 1px solid rgba(119, 174, 127, 0.45);
  padding-bottom: 0.25rem;
  transition: border-color 250ms ease-out;
}
.work-item .more a:hover,
.tl-link:hover { border-bottom-color: var(--teal-ink); }
.work-item .more a span,
.tl-link span {
  display: inline-block;
  transition: transform 350ms cubic-bezier(0.19, 1, 0.22, 1);
}
.work-item .more a:hover span,
.tl-link:hover span { transform: translateX(4px); }
.work-item .more a + a { margin-left: 2rem; }

/* Section 3 — testimonials (quiet slider) --------------------------------------- */

.voices {
  background: var(--jet);
  color: var(--porcelain);
}
.voices .kicker { color: var(--mist); }
.voices .kicker .rule { background: var(--teal); }

.slides {
  display: grid;
  align-items: center;
}
.slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 700ms ease-out, visibility 0s linear 700ms;
}
.slide.current {
  opacity: 1;
  visibility: visible;
  transition: opacity 700ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .slide, .slide.current { transition: none; }
}
.slide p {
  font-size: clamp(1.25rem, 1.05rem + 1.1vw, 1.65rem);
  line-height: 1.55;
  max-width: 34ch;
}

.slide-dots {
  margin-top: 3rem;
  display: flex;
  gap: 0.9rem;
}
.slide-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid var(--mist);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.slide-dots button[aria-current="true"] { background: var(--teal); border-color: var(--teal); }

.slide-pause {
  margin-top: 1.25rem;
  padding: 0.25rem 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--mist);
  text-decoration: underline;
  text-decoration-color: rgba(119, 174, 127, 0.5);
  text-underline-offset: 3px;
}
.slide-pause:hover { color: var(--teal); }

/* Work we can build upon (interactive list) --------------------------------------- */

.tl-intro { margin-bottom: clamp(2.75rem, 6vh, 4rem); }

.timeline-list { list-style: none; }

.tl-entry {
  position: relative;
  padding: 0 0 0 clamp(1.5rem, 4vw, 2.25rem);
  border-left: 1px solid rgba(119, 174, 127, 0.45);
}
.tl-entry::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 1.05rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}
.tl-entry + .tl-entry { margin-top: 0.25rem; }
.tl-entry:last-child { border-left-color: transparent; }

.tl-head {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--serif);
  color: var(--jet);
  padding: 0.65rem 0;
}
.tl-year {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--slate-ink);
  display: block;
  margin-bottom: 0.15rem;
}
.tl-name {
  font-size: 1.0625rem;
  font-weight: 600;
}
.tl-work {
  font-size: 1.0625rem;
  font-weight: 400;
  font-style: italic;
  color: var(--slate-ink);
}
/* The +/− affordance and the collapse mechanics exist only when JS runs
   (html.js); without JS every panel is simply open and readable. When
   collapsed, visibility hides the content from keyboards and screen
   readers too — the delay lets the height transition finish first. */
html.js .tl-head { cursor: pointer; }
html.js .tl-head::after {
  content: "\00a0\00a0+";
  font-family: var(--sans);
  font-weight: 400;
  color: var(--teal-ink);
}
html.js .tl-head[aria-expanded="true"]::after { content: "\00a0\00a0−"; }

html.js .tl-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 320ms ease-out;
}
html.js .tl-panel > div {
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s linear 320ms;
}
html.js .tl-entry.open .tl-panel { grid-template-rows: 1fr; }
html.js .tl-entry.open .tl-panel > div {
  visibility: visible;
  transition: visibility 0s;
}
@media (prefers-reduced-motion: reduce) {
  html.js .tl-panel, html.js .tl-panel > div { transition: none; }
}

.tl-quote {
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.65;
  padding-top: 0.35rem;
  max-width: 56ch;
}
.tl-why {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--slate-ink);
  max-width: 56ch;
}
.tl-link { margin: 1rem 0 1.2rem; }

/* Motion runtime: injected line that draws itself as you scroll. */
.tl-line {
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(119, 174, 127, 0.45);
  transform-origin: top center;
}

@media (min-width: 700px) {
  .tl-year {
    position: absolute;
    left: calc(-1 * clamp(5rem, 10vw, 6rem));
    top: 0.85rem;
    width: 3.25rem;
    text-align: right;
    margin: 0;
  }
  .timeline-list { padding-left: clamp(5rem, 10vw, 6rem); }
}

/* Bio -------------------------------------------------------------------------------- */

.about {
  background: var(--jet);
  color: var(--porcelain);
}
.about .kicker { color: var(--mist); }

.bio {
  display: grid;
  grid-template-columns: minmax(150px, 190px) 1fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
}
.photo-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(253, 255, 252, 0.25);
}
.photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.photo-frame canvas.gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.bio-text p {
  font-size: 1rem;
  line-height: 1.8;
}
.bio-text p + p { margin-top: 1.1em; }

@media (max-width: 640px) {
  .bio { grid-template-columns: 1fr; }
  .photo { max-width: 190px; }
}

/* The invitation ---------------------------------------------------------------------- */

.echo-strip {
  display: grid;
  grid-template-columns: 1fr min(var(--col), calc(100% - 2 * var(--pad-x))) 1fr;
  padding-block: clamp(1.5rem, 4vh, 2.5rem) clamp(3.5rem, 8vh, 5.5rem);
}
.echo-strip > * { grid-column: 2; }

.lines-echo {
  display: block;
  width: 100%;
  height: 140px;
}


.invitation {
  font-size: clamp(1.2rem, 1.05rem + 0.85vw, 1.5rem);
  line-height: 1.55;
  max-width: 30ch;
}

form { margin-top: 3.25rem; max-width: 36rem; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.9rem clamp(1.5rem, 4vw, 2.5rem);
}
@media (max-width: 620px) {
  .field-row { grid-template-columns: 1fr; }
}

.field-row + .field,
.field + .field { margin-top: 1.9rem; }
.field-row .field + .field { margin-top: 0; }

.field {
  position: relative;
}
.field::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--teal-ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 450ms cubic-bezier(0.19, 1, 0.22, 1);
}
.field:focus-within::after { transform: scaleX(1); }

.field label {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--jet);
  margin-bottom: 0.65rem;
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--jet);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(23, 38, 34, 0.35);
  padding: 0.55rem 0.1rem;
  border-radius: 0;
}
.field textarea { resize: vertical; }
.field input::placeholder,
.field textarea::placeholder {
  color: var(--slate);
  opacity: 1;
}
.field input:focus-visible,
.field textarea:focus-visible { outline: none; }

.field-captcha { margin-top: 1.9rem; }

button[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 2.75rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--porcelain);
  background-color: var(--jet);
  background-image: linear-gradient(105deg, var(--teal-ink), var(--teal-ink));
  background-repeat: no-repeat;
  background-size: 0% 100%;
  border: none;
  border-radius: 999px;
  padding: 1rem 2.6rem;
  cursor: pointer;
  transition:
    background-size 550ms cubic-bezier(0.19, 1, 0.22, 1),
    transform 350ms cubic-bezier(0.19, 1, 0.22, 1);
}
button[type="submit"] .btn-arrow {
  display: inline-block;
  transition: transform 350ms cubic-bezier(0.19, 1, 0.22, 1);
}
button[type="submit"]:hover {
  background-size: 100% 100%;
  transform: translateY(-1px);
}
button[type="submit"]:hover .btn-arrow { transform: translateX(4px); }
button[type="submit"]:disabled { opacity: 0.55; cursor: default; transform: none; }

.form-thanks {
  margin-top: 3rem;
  font-size: 1.15rem;
}
.form-thanks:focus { outline: none; }
.form-error {
  margin-top: 3rem;
  font-family: var(--sans);
  font-size: 1rem;
}

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

footer {
  background: var(--jet);
  color: var(--porcelain);
  padding-block: clamp(4rem, 9vh, 6rem);
}
footer a {
  color: var(--porcelain);
  text-decoration-color: rgba(119, 174, 127, 0.65);
}
footer a:hover { color: var(--teal); text-decoration-color: var(--teal); }
footer .ps {
  font-size: 1.0625rem;
  max-width: 56ch;
}
footer .footer-meta {
  margin-top: 2.25rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--mist);
}
footer .footer-meta a { color: var(--mist); }
footer .footer-meta a:hover { color: var(--teal); }
footer .footer-meta span[aria-hidden] { margin-inline: 0.5rem; }

/* Scroll-entry reveal (added by JS only; without JS everything is visible) ------------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
