:root {
  --paper: #F4F1EA;
  --ink: #111110;
  --pencil: #8A8780;
  --pink: #FF2A7A;
  --blue: #2B2FE0;
  --yellow: #F5C400;
  --margin: clamp(22px, 5vw, 72px);
  --cap: 0.7275em;
  --stop: 0.155em;
  --vx: 50vw;
  --vy: 45vh;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
::selection { background: var(--pink); color: var(--paper); }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }

body::before {
  content: "";
  position: fixed; inset: 0;
  background: radial-gradient(circle at var(--vx) var(--vy), rgba(244, 241, 234, 0.075) 0, rgba(244, 241, 234, 0.025) 22vmax, transparent 48vmax);
  opacity: var(--lit, 0);
  transition: opacity 1600ms ease;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed; inset: -50%;
  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='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .07;
  pointer-events: none;
  animation: grain 900ms steps(6) infinite;
  z-index: 3;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

.page {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 0 var(--margin) max(12px, env(safe-area-inset-bottom));
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mark {
  position: relative;
  margin: 0;
  font-size: clamp(52px, 10.5vw, 168px);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}
.slot { position: relative; display: inline-block; margin-right: 0.24em; }
.sq { display: inline-block; background: var(--pink); vertical-align: baseline; }
.mark .sq { width: var(--cap); height: var(--cap); opacity: 0; }

.mark .word {
  display: inline-block;
  padding-bottom: 0.2em;      
  margin-bottom: -0.2em;
  color: transparent;
  background: radial-gradient(circle at var(--lx, 0px) var(--ly, 0px), var(--paper) 0, var(--paper) var(--r1, 60px), var(--pencil) var(--r2, 420px));
  -webkit-background-clip: text;
  background-clip: text;
  clip-path: inset(0 100% 0 0);
}

.seek {
  position: absolute;
  left: 0; top: 0;
  width: var(--cap); height: var(--cap);
  border: max(2px, 0.02em) solid var(--blue);
  opacity: 0;
  pointer-events: none;
}

.line {
  margin: clamp(22px, 2.6vw, 38px) 0 0;
  font-size: clamp(17px, 1.7vw, 24px);
  letter-spacing: -0.01em;
  color: var(--pencil);
  opacity: 0;
}
.line .sq { width: var(--stop); height: var(--stop); }

.base {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  opacity: 0;
  font-size: 15px;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--pencil);
  cursor: pointer;
  transition: color 200ms;
  text-decoration: none;
}
.link-btn:hover { color: var(--paper); }

.links { padding-bottom: 12px; }

@media (max-width: 640px) {
  .links { padding-bottom: 0; }
}

/* ---------- Contact Modal ---------- */
dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  border: 1px solid rgba(244, 241, 234, 0.2);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(24px, 4vw, 40px);
}
dialog::backdrop { background: rgba(0, 0, 0, .8); backdrop-filter: blur(4px); }
dialog h2 { margin: 0 0 28px; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 300; letter-spacing: -0.02em; }

.field { margin-bottom: 24px; }
.text {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid rgba(244, 241, 234, 0.22);
  border-radius: 0;
  font: inherit;
  font-size: 16px;
  color: var(--paper);
  padding: 8px 0 12px;
  outline: none;
  transition: border-color 200ms;
  -webkit-appearance: none;
}
.text::placeholder { color: var(--pencil); opacity: 0.65; }
.text:focus { border-bottom-color: var(--pink); }
.text[aria-invalid="true"] { border-bottom-color: var(--yellow); }
textarea.text { resize: none; overflow: hidden; line-height: 1.4; min-height: 3.2em; }

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 32px;
}
.btn-cancel {
  background: none; border: 0; color: var(--pencil);
  font: inherit; font-size: 15px; cursor: pointer; transition: color 150ms;
}
.btn-cancel:hover { color: var(--paper); }

.btn-send {
  background: var(--paper); color: var(--ink); border: 0; padding: 12px 24px;
  font: inherit; font-size: 16px; font-weight: 500; cursor: pointer;
  transition: background-color 200ms, color 200ms, opacity 150ms, transform 100ms; position: relative;
}
.btn-send:active { transform: translateY(1px); }
.btn-send[disabled] { opacity: 0.7; cursor: default; }
.btn-send:hover { background-color: var(--pink); color: var(--paper); }

.btn-text { transition: opacity 150ms; }
.btn-send.is-sending .btn-text { opacity: 0; }

.spinner {
  position: absolute; top: 50%; left: 50%; width: 18px; height: 18px;
  margin-top: -9px; margin-left: -9px;
  border: 2px solid rgba(17, 17, 16, 0.2); border-top-color: var(--ink);
  border-radius: 50%; animation: spin 800ms linear infinite;
  opacity: 0; visibility: hidden; transition: opacity 150ms;
}
.btn-send.is-sending .spinner { opacity: 1; visibility: visible; }
.btn-send:hover .spinner { border-top-color: var(--paper); border-color: rgba(244, 241, 234, 0.3); }

@keyframes spin { to { transform: rotate(360deg); } }

.status-msg { margin-top: 16px; font-size: 14px; min-height: 1.5em; text-align: right; }
.status-msg span { background: linear-gradient(transparent 58%, var(--yellow) 58%); padding: 0 2px; color: var(--paper); }
.status-msg.success span { background: none; color: var(--paper); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }