:root {
  --bg: #0a0a0b;
  --bg-2: #101012;
  --ink: #f4f1ea;
  --muted: #8a867e;
  --line: rgba(244, 241, 234, 0.12);
  --accent: #ff5c39;
  --accent-soft: rgba(255, 92, 57, 0.16);

  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
}

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

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow: hidden;
  position: relative;
}

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

/* ---------- Ambient layers ---------- */
.glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 42vmax;
  height: 42vmax;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    var(--accent-soft) 0%,
    rgba(255, 92, 57, 0.06) 35%,
    transparent 70%
  );
  filter: blur(30px);
  transform: translate3d(-50%, -50%, 0);
  left: 50%;
  top: 40%;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.6s ease;
  will-change: transform;
}

.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 3;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(6) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-6%, 4%); }
  40% { transform: translate(4%, -6%); }
  60% { transform: translate(-3%, 5%); }
  80% { transform: translate(5%, -2%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Layout ---------- */
.frame {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  padding: var(--pad);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(2rem, 6vh, 4rem);
}

.top,
.bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  opacity: 0;
  animation: fade-in 1s ease 0.2s forwards;
}

.top {
  font-size: 0.9rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: 0.02em;
  font-weight: 500;
}

.mark__glyph {
  color: var(--accent);
  font-size: 1.05rem;
  animation: spin 14s linear infinite;
  display: inline-block;
}

.clock {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

/* ---------- Hero ---------- */
.hero {
  align-self: center;
  max-width: min(100%, 60rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: clamp(1.25rem, 3vh, 2rem);
  opacity: 0;
  animation: fade-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2.4s ease-out infinite;
}

.headline {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(2.75rem, 11vw, 8.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.headline .line {
  display: block;
  overflow: hidden;
  /* room for descenders + the italic rotator's motion, so nothing clips */
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.headline .line > * {
  display: inline-block;
}

/* staggered reveal of each line */
.headline .line:nth-child(1) { animation: line-up 1s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both; }
.headline .line:nth-child(2) { animation: line-up 1s cubic-bezier(0.22, 1, 0.36, 1) 0.58s both; }
.headline .line:nth-child(3) { animation: line-up 1s cubic-bezier(0.22, 1, 0.36, 1) 0.71s both; }

/* ---------- Rotator ---------- */
.rotator {
  position: relative;
  display: inline-grid;
  vertical-align: bottom;
  color: var(--accent);
  font-style: italic;
}

.rotator__word {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(0.5em) rotate(2deg);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.rotator__word.is-active {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

.rotator__word.is-leaving {
  opacity: 0;
  transform: translateY(-0.5em) rotate(-2deg);
}

.lede {
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
  max-width: 42ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.6;
  opacity: 0;
  animation: fade-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.9s forwards;
}

/* ---------- Footer ---------- */
.bottom {
  font-size: 0.85rem;
  align-items: flex-end;
  animation-delay: 1s;
}

.contact {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: var(--ink);
}

.contact__label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.68rem;
  color: var(--muted);
}

.contact__value {
  position: relative;
  width: fit-content;
  font-size: 1rem;
}

.contact__value::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact:hover .contact__value {
  color: var(--accent);
}

.contact:hover .contact__value::after {
  transform: scaleX(1);
  background: var(--accent);
}

.copyright {
  color: var(--muted);
  text-align: right;
}

/* ---------- Animations ---------- */
@keyframes fade-in {
  to { opacity: 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes line-up {
  from { transform: translateY(110%); }
  to { transform: translateY(0); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-soft); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .copyright {
    text-align: left;
  }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .grain,
  .mark__glyph {
    animation: none;
  }
}
