/* Cotra Studios — Coming Soon */
/* Palette: Void #050505 · Carbon #0D0D0F · Signal Red #FF0033 · Blood Red #8A0F1F · Bone #F2F2F0 · Ash #6B6B6E */

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

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

body {
  min-height: 100svh;
  background: #050505;
  color: #F2F2F0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  display: grid;
  grid-template-rows: 1fr auto;
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 48px 24px 72px;
  position: relative;
}

/* breathing red aura behind the hero — glow lives on the container, not the artwork */
.stage::before {
  content: '';
  position: absolute;
  top: 42%;
  left: 50%;
  width: min(720px, 90vw);
  height: min(720px, 90vw);
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(255, 0, 51, 0.17) 0%, rgba(138, 15, 31, 0.08) 40%, transparent 70%);
  animation: auraBreathe 5.5s ease-in-out infinite;
  pointer-events: none;
}

/* cinematic vignette — deepens the edges, focuses the center */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 42%,
              transparent 52%,
              rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
  z-index: 1;
}

/* giant spectral C-shard wandering the void — ~4% opacity, 75s orbit of the edges */
.drift {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
  animation: driftWander 75s ease-in-out infinite;
}

.drift img {
  width: 58vmin;
  height: auto;
  opacity: 0.045;
}

@keyframes driftWander {
  0%, 100% { transform: translate(-14vw, -12vh) rotate(-8deg); }
  20%      { transform: translate(62vw, -6vh)  rotate(3deg); }
  40%      { transform: translate(72vw, 48vh)  rotate(-4deg); }
  60%      { transform: translate(38vw, 62vh)  rotate(7deg); }
  80%      { transform: translate(-10vw, 40vh) rotate(-2deg); }
}

@keyframes auraBreathe {
  50% { opacity: 0.55; }
}

/* moving background FX layer: slow CRT roll band + occasional glitch streaks */
.scanfx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  overflow: hidden;
}

/* thin red/bone streak lines — invisible most of the loop, snap in briefly */
.scanfx::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background:
    linear-gradient(0deg, transparent 29.6%, rgba(255, 0, 51, 0.10) 29.6% 30%, transparent 30%),
    linear-gradient(0deg, transparent 61.8%, rgba(242, 242, 240, 0.07) 61.8% 62.1%, transparent 62.1%),
    linear-gradient(0deg, transparent 77.8%, rgba(255, 0, 51, 0.08) 77.8% 78%, transparent 78%);
  animation: streaks 7s steps(1, end) infinite;
}

@keyframes streaks {
  0%, 54%, 57%, 62%, 100% { opacity: 0; transform: none; }
  55% { opacity: 1; transform: translateY(-6px); }
  58% { opacity: 1; transform: translateY(10px) scaleY(1.6); }
  60% { opacity: 1; transform: translateY(-14px); }
}

/* ghost terminal — phases in on an 18s loop, types 5 lines, dies in a flicker */
.ghostterm {
  position: fixed;
  right: 28px;
  bottom: 104px;
  width: min(320px, 76vw);
  padding: 12px 14px 14px;
  background: rgba(10, 10, 12, 0.82);
  border: 1px solid rgba(255, 0, 51, 0.22);
  box-shadow: 0 0 24px rgba(255, 0, 51, 0.10),
              inset 0 0 18px rgba(0, 0, 0, 0.6);
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 10px;
  line-height: 1.9;
  color: rgba(242, 242, 240, 0.72);
  text-align: left;
  opacity: 0;
  pointer-events: none;
  z-index: 8;
  animation: ghostPhase 18s linear infinite;
}

@keyframes ghostPhase {
  0%, 53%    { opacity: 0; transform: translateY(8px); }
  54%        { opacity: 0.9; transform: translateY(0) skewX(-2deg); }
  55%        { opacity: 0.5; transform: translateY(0) skewX(0); }
  56%, 84%   { opacity: 0.9; transform: translateY(0); }
  85%        { opacity: 0; transform: translateX(2px); }
  86%        { opacity: 0.8; transform: translateX(-3px) skewX(3deg); }
  87%, 100%  { opacity: 0; transform: translateY(8px); }
}

.gt-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}

.gt-bar i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 0, 51, 0.55);
}
.gt-bar i:nth-child(2) { background: rgba(242, 242, 240, 0.3); }
.gt-bar i:nth-child(3) { background: rgba(242, 242, 240, 0.15); }

.gt-bar span {
  margin-left: 6px;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: #6B6B6E;
}

.gt-line { white-space: nowrap; }
.gt-line.warn { color: #FF0033; }
.gt-line.end  { color: rgba(107, 107, 110, 0.9); }

/* typewriter reveal — clip-path steps over the first 4% of the line's own 18s phase */
.gt-line span {
  display: inline-block;
  clip-path: inset(0 100% 0 0);
  animation: gtType 18s linear infinite;
}

@keyframes gtType {
  0%       { clip-path: inset(0 100% 0 0); animation-timing-function: steps(24); }
  4%, 100% { clip-path: inset(0 0 0 0); }
}

.gt-line:nth-of-type(1) span { animation-delay: 9.9s; }
.gt-line:nth-of-type(2) span { animation-delay: 10.7s; }
.gt-line:nth-of-type(3) span { animation-delay: 11.5s; }
.gt-line:nth-of-type(4) span { animation-delay: 12.6s; }
.gt-line:nth-of-type(5) span { animation-delay: 14.1s; }

.gt-line.end span::after {
  content: '▮';
  color: #FF0033;
  margin-left: 5px;
  animation: blink 1s steps(1) infinite;
}

@media (max-width: 559px) {
  .ghostterm {
    right: 14px;
    bottom: 116px;
    font-size: 9px;
  }
}

.hero { line-height: 0; position: relative; }

.hero img {
  width: clamp(512px, 55vw, 680px);
  height: auto;
}

/* trademark notice — superscript at the top-right of the lockup */
.tm {
  position: absolute;
  top: 9%;
  right: 3.5%;
  font-size: clamp(12px, 1.8vw, 18px);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #F2F2F0;
  opacity: 0.85;
  line-height: 1;
  pointer-events: none;
}

.tag {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.45em;
  text-indent: 0.45em; /* recenters letter-spaced text */
  color: #6B6B6E;
  text-transform: uppercase;
  position: relative;
  animation: tagGlitch 9s steps(1, end) infinite;
}

/* rare chromatic burst on COMING SOON — mostly idle, one ~0.5s stutter per loop */
@keyframes tagGlitch {
  0%, 90%, 96%, 100% {
    text-shadow: none;
    transform: none;
  }
  91% {
    text-shadow: 2px 0 rgba(255, 0, 51, 0.7), -2px 0 rgba(242, 242, 240, 0.35);
    transform: translateX(1px) skewX(-4deg);
    color: #8a8a8e;
  }
  93% {
    text-shadow: -3px 0 rgba(255, 0, 51, 0.55), 3px 0 rgba(242, 242, 240, 0.25);
    transform: translateX(-2px) skewX(3deg);
  }
  95% {
    text-shadow: 1px 0 rgba(255, 0, 51, 0.8);
    transform: translateX(1px);
  }
}

.cursor {
  color: #FF0033;
  animation: blink 1.1s steps(1) infinite;
  margin-left: 2px;
}

.hook {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-transform: uppercase;
  color: rgba(242, 242, 240, 0.8);
  text-align: center;
  position: relative;
  margin: -8px 0 -4px; /* binds the tag → hook → form into one unit */
}

.hook em {
  font-style: normal;
  color: #FF0033;
}

@keyframes blink {
  50% { opacity: 0; }
}

#notify {
  display: flex;
  gap: 0;
  width: min(440px, 100%);
  position: relative;
}

#notify input[type="email"] {
  flex: 1;
  min-width: 0;
  background: #0D0D0F;
  border: 1px solid #2a2a2e;
  border-right: none;
  color: #F2F2F0;
  font: inherit;
  font-size: 14px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#notify input[type="email"]::placeholder {
  color: #6B6B6E;
}

#notify input[type="email"]:focus {
  border-color: #FF0033;
  box-shadow: 0 0 0 1px #FF0033, 0 0 24px rgba(255, 0, 51, 0.18);
}

#notify button {
  background: #FF0033;
  border: 1px solid #FF0033;
  color: #F2F2F0;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.15em;
  padding: 14px 22px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#notify button:hover {
  background: #D90029;
  border-color: #D90029;
  box-shadow: 0 0 18px rgba(255, 0, 51, 0.35);
}

/* honeypot — invisible to humans, bots fill it */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

#form-status {
  min-height: 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-align: center;
  position: relative;
}

#form-status.ok { color: #F2F2F0; }
#form-status.err { color: #FF0033; }

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

footer {
  padding: 20px 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: #6B6B6E;
  text-align: center;
}

.blurb {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  color: #6B6B6E;
}

/* terminal-style rolling dots — fixed 3ch box so the centered line never shifts */
.blurb .dots {
  display: inline-block;
  width: 3ch;
  overflow: hidden;
  vertical-align: baseline;
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0;
  text-indent: 0;
}

.blurb .dots::before {
  content: '...';
  display: block;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  animation: rollDots 1.6s steps(1) infinite;
}

@keyframes rollDots {
  0%   { width: 0; }
  25%  { width: 1ch; }
  50%  { width: 2ch; }
  75%, 92% { width: 3ch; }
  100% { width: 0; }
}

/* idle state: faint red chromatic ghost; brief jitter pulses fire periodically */
.footmark {
  position: relative;
  line-height: 0;
  animation: footGlitch 7s steps(1, end) infinite;
  filter: brightness(0.92)
          drop-shadow(1px 0 rgba(255, 0, 51, 0.35))
          drop-shadow(-1px 0 rgba(242, 242, 240, 0.12));
}

.footmark img {
  width: 84px;
  height: auto;
  opacity: 0.85;
}

@keyframes footGlitch {
  0%, 90% {
    transform: none;
    filter: brightness(0.92)
            drop-shadow(1px 0 rgba(255, 0, 51, 0.35))
            drop-shadow(-1px 0 rgba(242, 242, 240, 0.12));
  }
  91% {
    transform: translateX(1.5px);
    filter: brightness(0.8)
            drop-shadow(3px 0 rgba(255, 0, 51, 0.65))
            drop-shadow(-3px 0 rgba(242, 242, 240, 0.28));
  }
  93% {
    transform: translateX(-1px) skewX(3deg);
    filter: brightness(0.95)
            drop-shadow(-2px 0 rgba(255, 0, 51, 0.5))
            drop-shadow(2px 0 rgba(242, 242, 240, 0.2));
  }
  95% {
    transform: translateX(2px);
    filter: brightness(0.85)
            drop-shadow(4px 0 rgba(255, 0, 51, 0.6))
            drop-shadow(-2px 0 rgba(242, 242, 240, 0.22));
  }
  97%, 100% {
    transform: none;
    filter: brightness(0.92)
            drop-shadow(1px 0 rgba(255, 0, 51, 0.35))
            drop-shadow(-1px 0 rgba(242, 242, 240, 0.12));
  }
}

.tm-foot {
  top: 2px;
  right: -10px;
  font-size: 10px;
  opacity: 0.75;
}

@media (max-width: 559px) {
  .hero img {
    width: clamp(260px, 75vw, 360px);
  }
  .hero .tm {
    font-size: 11px;
  }
  .stage::before {
    top: 38%;
  }
}

@media (max-width: 480px) {
  #notify {
    flex-direction: column;
    gap: 12px;
  }
  #notify input[type="email"] {
    border-right: 1px solid #2a2a2e;
  }
  #notify button {
    padding: 14px;
  }
}

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