/* ==========================================================================
   Tyrerun — coming soon
   Palette: deep slate (never pure black) + warm amber
   ========================================================================== */

:root {
  --bg:            #171b21;
  --bg-deep:       #12161b;
  --surface:       #1e242c;
  --surface-hi:    #262e38;
  --line:          rgba(255, 255, 255, .09);
  --line-strong:   rgba(255, 255, 255, .16);

  --text:          #e8ecf1;
  --text-soft:     #a3aeba;
  --text-faint:    #6c7885;

  --accent:        #e9a94d;
  --accent-soft:   #f6c986;
  --accent-glow:   rgba(233, 169, 77, .16);

  --font-display: "Sora", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(1.4rem, 4.5vw, 4.5rem);
  --radius: 14px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

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

/* --- Atmosphere ---------------------------------------------------------- */

.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(58vw 58vw at 78% 18%, var(--accent-glow), transparent 62%),
    radial-gradient(48vw 48vw at 6% 88%, rgba(90, 128, 170, .13), transparent 66%),
    linear-gradient(160deg, #1b212a 0%, var(--bg) 42%, var(--bg-deep) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .32;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* --- Shell --------------------------------------------------------------- */

.shell {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: clamp(1.5rem, 3.2vw, 2.4rem) var(--gutter) clamp(1.6rem, 3vw, 2.2rem);
  max-width: 1440px;
  margin-inline: auto;
}

/* --- Masthead ------------------------------------------------------------ */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--text);
}

.brand__mark {
  width: 30px;
  height: 30px;
  color: var(--accent);
  flex: none;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.22rem;
  letter-spacing: -.015em;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .42rem .95rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255, 255, 255, .035);
  color: var(--text-soft);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2.6s var(--ease) infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(233, 169, 77, .5); }
  70%  { box-shadow: 0 0 0 9px rgba(233, 169, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(233, 169, 77, 0); }
}

/* --- Stage --------------------------------------------------------------- */

.stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(2.5rem, 7vh, 5rem);
}

.copy { max-width: 34rem; }

.eyebrow {
  margin: 0 0 1.4rem;
  color: var(--accent);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 1.4rem;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.6rem, 6.4vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: -.035em;
}

h1 em {
  font-style: normal;
  font-weight: 600;
  background: linear-gradient(96deg, var(--accent-soft), var(--accent) 55%, #c9863a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 0 0 2.2rem;
  max-width: 30rem;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.15vw, 1.08rem);
}

/* --- Countdown ----------------------------------------------------------- */

.countdown {
  display: flex;
  gap: clamp(1.1rem, 3vw, 2.1rem);
  margin-bottom: 2.1rem;
}

.unit {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-width: 3.4rem;
}

.unit__num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.75rem, 3.1vw, 2.3rem);
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.unit__label {
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.unit + .unit { position: relative; }

.unit + .unit::before {
  content: "";
  position: absolute;
  left: calc(clamp(1.1rem, 3vw, 2.1rem) / -2);
  top: .15rem;
  height: 1.5rem;
  width: 1px;
  background: var(--line);
}

/* --- Marks --------------------------------------------------------------- */

.marks {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .84rem;
  color: var(--text-soft);
}

.marks li {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.marks li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .8;
  flex: none;
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  margin: 0;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.hero__ring {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 38% 30%, rgba(233, 169, 77, .1), transparent 58%);
  z-index: -1;
}

.hero__art {
  width: min(100%, 34rem);
  height: auto;
  filter: drop-shadow(0 38px 70px rgba(0, 0, 0, .55));
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform .7s var(--ease);
}

.hero__photo {
  width: min(100%, 34rem);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  filter: drop-shadow(0 38px 70px rgba(0, 0, 0, .55));
}

.hero__wheel {
  transform-origin: 300px 300px;
  animation: roll 46s linear infinite;
}

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

/* --- Footer -------------------------------------------------------------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .8rem 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: .84rem;
  color: var(--text-faint);
}

.contact {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
}

.contact a {
  color: var(--text-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}

.contact a:hover { color: var(--accent-soft); border-color: rgba(246, 201, 134, .45); }

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
}

.byline { margin: 0; }

.byline a {
  color: var(--text-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: color .25s var(--ease), border-color .25s var(--ease);
}

.byline a:hover { color: var(--accent); border-color: var(--accent); }

/* --- Entrance ------------------------------------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(14px);
}

body.is-ready .reveal {
  opacity: 1;
  transform: none;
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 980px) {
  .stage {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-block: 3rem 2rem;
  }

  .hero { order: -1; }
  .hero__art, .hero__photo { width: min(74%, 22rem); }
  .copy { max-width: none; }
}

@media (max-width: 600px) {
  .pill { font-size: .68rem; padding: .36rem .7rem; }
  .hero__art, .hero__photo { width: min(84%, 19rem); }
  .countdown { gap: 1.15rem; }
  .footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__art { transform: none; }
}
