@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/eb-garamond-400.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/eb-garamond-400-italic.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --paper: #EFE8D9;
  --paper-hi: #F6F1E6;
  --paper-lo: #E6DECD;
  --ink: #14110E;
  --muted: #6C6455;
  --thread: #7A1E27;
  --hair: rgba(20, 17, 14, .16);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  background: radial-gradient(120% 90% at 50% 40%, var(--paper-hi) 0%, var(--paper) 58%, var(--paper-lo) 100%);
}

/* Paper grain: subtle fixed noise layer, never intercepts events. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: multiply;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="220" height="220"><filter id="g"><feTurbulence type="fractalNoise" baseFrequency=".8" numOctaves="2" stitchTiles="stitch"/><feColorMatrix type="saturate" values="0"/></filter><rect width="100%" height="100%" filter="url(%23g)"/></svg>');
  background-size: 220px 220px;
}

/* ---- one-screen centred stack ------------------------------------------- */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  /* 88vw logo + 2×24px padding would exceed 100vw below 400px; the grid
     item's min-content size (364.8px at 360px wide) forced a wider track. */
  width: 100%;
  min-width: 0;
}

.mark {
  margin: 0;
  line-height: 0;
}
.logo {
  display: block;
  width: min(88vw, calc(62svh * .9736), 700px);
  height: auto;
}

.thread {
  display: block;
  width: 72px;
  height: 1px;
  margin-top: 22px;
  background: repeating-linear-gradient(90deg, var(--thread) 0 6px, transparent 6px 11px);
}

.status {
  margin: 22px 0 0;
  font-size: clamp(12px, .35vw + 11px, 16px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .5em;
  padding-left: .5em;
}

.descriptor {
  margin: 12px 0 0;
  font-size: clamp(15px, .5vw + 12px, 20px);
  font-style: italic;
  color: var(--muted);
}

.foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: clamp(26px, 4.5svh, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.place {
  margin: 0;
  text-align: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .32em;
  padding-left: .32em;
  color: var(--muted);
}
.contact {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding-left: .12em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
}
.contact:hover, .contact:focus-visible { border-color: var(--muted); }
@media (max-height: 620px) {
  .foot { position: static; margin-top: 36px; }
}

/* ---- stitched-label frame ------------------------------------------------ */
.frame {
  position: fixed;
  inset: clamp(12px, 2vw, 28px);
  border: 1px solid var(--hair);
  border-radius: 12px;
  pointer-events: none;
}

/* ---- logo shapes that take part in the intro ----------------------------- */
.stitch, .needle, .button, .rule, .ltr {
  transform-box: fill-box;
  transform-origin: center;
}

/* ---- motion: the mark is sewn -------------------------------------------- */
@keyframes pop    { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } }
@keyframes sew    { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes drop   { from { opacity: 0; transform: translateY(-28px); } to { opacity: 1; transform: none; } }
@keyframes draw   { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes emerge { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rise   { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade   { from { opacity: 0; } to { opacity: 1; } }

/* Background settles: the page eases from --paper-lo into the gradient. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: var(--paper-lo);
  animation: fade 500ms var(--ease) reverse both;
}

.button { animation: pop 450ms cubic-bezier(.3, 1.4, .5, 1) 300ms both; }
.stitch { animation: sew 420ms var(--ease) both; animation-delay: calc(650ms + var(--i) * 24ms); }
.needle { animation: drop 700ms var(--ease) 1900ms both; }
.rule   { animation: draw 600ms var(--ease) 2200ms both; }
.ltr    { animation: emerge 500ms var(--ease) both; animation-delay: calc(2400ms + var(--i) * 40ms); }

.status     { animation: rise 700ms var(--ease) 3200ms both; }
.thread     { animation: draw 600ms var(--ease) 3400ms both; }
.descriptor { animation: rise 700ms var(--ease) 3600ms both; }
.place, .contact { animation: fade 600ms var(--ease) 3900ms both; }
.contact { animation-delay: 4100ms; }

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