/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Custom Properties ── */
:root {
  --bg: #FAFAF8;
  --text: #1A1A19;
  --text-secondary: #8A8A86;
  --accent: #C4A882;
  --font: 'Inter', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --text: #E8E8E6;
    --text-secondary: #6A6A66;
    --accent: #8A7A62;
  }
}

/* ── Selection ── */
::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ── Body ── */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* ── Grain Overlay ── */
.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  pointer-events: none;
  z-index: 10;
}

/* ── Title ── */
.title {
  font-weight: 900;
  font-size: clamp(2.5rem, 10vw, 10rem);
  letter-spacing: -0.03em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  white-space: nowrap;
  user-select: none;
}

/* Slash — fades in first */
.title-slash {
  color: var(--accent);
  opacity: 0;
  position: relative;
  z-index: 1;
  animation: fade-scale-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Labs — fades in with the slash */
.title-labs {
  opacity: 0;
  margin-left: 0.2em;
  animation: fade-in 1.2s ease 2.5s forwards;
}

/* Maver — slides in from the slash toward the left */
.title-maver {
  display: inline-block;
  clip-path: inset(0 0 0 100%);
  transform: translateX(100%);
  animation: slide-left 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1.6s forwards;
}

/* ck — slides in from the slash toward the right */
.title-ck {
  display: inline-block;
  clip-path: inset(0 100% 0 0);
  transform: translateX(-100%);
  animation: slide-right 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1.6s forwards;
}

/* ── Footer ── */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  text-align: center;
}

.email {
  font-size: clamp(0.75rem, 1.2vw, 1rem);
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  opacity: 0;
  animation: fade-in 1.2s ease 2.5s forwards;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.email:hover {
  color: var(--text);
  border-bottom-color: var(--text-secondary);
}

/* ── Keyframes ── */
@keyframes fade-scale-in {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-left {
  to {
    clip-path: inset(0 0 0 0);
    transform: translateX(0);
  }
}

@keyframes slide-right {
  to {
    clip-path: inset(0 0 0 0);
    transform: translateX(0);
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .title-slash,
  .title-maver,
  .title-ck,
  .title-labs,
  .email {
    animation: none;
    opacity: 1;
    transform: none;
    clip-path: none;
  }
}
