/* Change --accent to recolour the page. Tested options: #FF5A36 #B9F25C #FFD23F #FF7AC6 */
:root {
  --accent: #FF5A36;
  --blue: #3D5BFF;
  --paper: #F2EFE6;
  --ground: #0B0B0D;
  --muted: #A9A69E;
  --line: #2C2C31;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
}

.page {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  background: var(--ground);
  color: var(--paper);
  font-family: Inter, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  /* Updated every frame by script.js */
  --mx: 50%;
  --my: 30%;
  --px: 0;
  --py: 0;
  --r: 240px;
}

a { color: var(--paper); }
a:hover { color: #fff; }

/* ---------- Background ---------- */

.dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(#2C2C31 1px, transparent 1.6px);
  background-size: 28px 28px;
  animation: drift 14s linear infinite;
}

.dots--lit {
  background-image: radial-gradient(var(--accent) 1.4px, transparent 2px);
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--mx) var(--my), #000 0%, transparent 100%);
  mask-image: radial-gradient(circle var(--r) at var(--mx) var(--my), #000 0%, transparent 100%);
}

.layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Each shape is a positioned wrapper that shifts with the pointer,
   holding an inner piece that runs its own animation. */
.shape {
  position: absolute;
  transform: translate(calc(var(--px) * var(--depth, 40px)), calc(var(--py) * var(--depth, 40px)));
}
.shape > * { display: block; }

.follower {
  position: absolute;
  left: var(--mx);
  top: var(--my);
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0.6;
}

.ring-dashed { width: 120px; height: 120px; border: 1px dashed #4A4A52; border-radius: 50%; animation: spin 40s linear infinite; }
.square-outline { width: 60px; height: 60px; border: 1px solid #4A4A52; animation: spin 26s linear infinite reverse; }
.dot { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); animation: pulse 3.2s ease-in-out infinite; }
.dot--slow { width: 10px; height: 10px; animation-duration: 4.4s; }

.shape--circle { right: -8%; top: -12%; width: clamp(240px, 44vw, 560px); }
.circle { width: 100%; aspect-ratio: 1 / 1; border-radius: 50%; background: var(--accent); animation: floaty 9s ease-in-out infinite alternate; }

.shape--bar { left: 12%; top: 6%; width: clamp(52px, 9vw, 116px); }
.bar { width: 100%; height: clamp(200px, 34vw, 420px); background: var(--blue); animation: sway 8s ease-in-out infinite alternate; }

.shape--half { left: 38%; top: 40%; width: clamp(160px, 26vw, 340px); }
.half { width: 100%; aspect-ratio: 2 / 1; border-radius: 999px 999px 0 0; background: var(--paper); animation: spin 44s linear infinite; }

.shape--stripes { left: 33%; top: -3%; width: clamp(140px, 22vw, 300px); }
.stripes { width: 100%; height: clamp(90px, 13vw, 170px); background-image: repeating-linear-gradient(90deg, var(--paper) 0 6px, transparent 6px 16px); animation: slide 5s linear infinite; }

.ring { width: clamp(70px, 10vw, 130px); aspect-ratio: 1 / 1; border: 2px solid var(--paper); border-radius: 50%; animation: floaty 12s ease-in-out infinite alternate-reverse; }

.shape--squiggle { right: 4%; top: 64%; width: clamp(160px, 26vw, 340px); }
.squiggle { width: 100%; animation: floaty 7s ease-in-out infinite alternate; }

/* ---------- Content ---------- */

.wrap {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.hero {
  position: relative;
  min-height: clamp(480px, 80vh, 780px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 8px;
  animation: rise 0.9s ease both;
}

.name {
  position: relative;
  margin: 0;
  color: #fff;
  mix-blend-mode: difference;
  font-family: 'Space Grotesk', Inter, system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(64px, 17vw, 210px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.name span { display: block; height: 0.95em; }

.place {
  position: relative;
  margin: 28px 0 0;
  color: #fff;
  mix-blend-mode: difference;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.lower {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 48px 72px;
  animation: rise 0.9s ease 0.25s both;
}

.tagline {
  flex: 2 1 300px;
  min-width: 0;
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-style: italic;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.25;
}

.contact {
  flex: 3 1 340px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact h2 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.2;
}

form { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; flex-wrap: wrap; gap: 24px; }
.field { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

input, textarea {
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #6B6B73;
  border-radius: 0;
  color: var(--paper);
  font: inherit;
  font-size: 18px;
  transition: border-color 0.2s ease;
}
input { height: 48px; }
textarea { padding: 10px 0; resize: vertical; }
input:focus, textarea:focus { border-bottom-color: var(--paper); outline: none; }
input:focus-visible, textarea:focus-visible { box-shadow: 0 2px 0 0 var(--paper); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.send {
  align-self: flex-start;
  height: 52px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ground);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.send:hover { transform: translateY(-2px); }
.send:active { transform: translateY(0); }
.send:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.send[disabled] { opacity: 0.6; cursor: default; transform: none; }

.status { margin: 0; min-height: 1.6em; font-size: 15px; color: var(--paper); }
.status.is-error { color: #FF9B85; }

footer {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  animation: rise 0.9s ease 0.5s both;
}
footer p { margin: 0; padding: 12px 0; font-size: 14px; color: var(--muted); }
footer a { padding: 12px 0; font-size: 14px; color: #D6D3CA; text-decoration: none; }
footer a:hover { color: #fff; }

/* ---------- Motion ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { background-position: 0 0; } to { background-position: 28px 56px; } }
@keyframes floaty { from { transform: translateY(-16px) rotate(-4deg); } to { transform: translateY(16px) rotate(6deg); } }
@keyframes sway { from { transform: rotate(8deg) translateY(-10px); } to { transform: rotate(16deg) translateY(14px); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.4); opacity: 0.2; } }
@keyframes slide { from { background-position: 0 0; } to { background-position: 64px 0; } }

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