/* Raefen Labs — coming soon */

@font-face {
  font-family: "Science Gothic";
  src: url("science-gothic.woff2") format("woff2-variations"),
       url("science-gothic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 200%;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000000;
  --bone: #f2f2f2;
  --muted: #8b8b8b;
  --red: #e11b23;
  --red-glow: rgba(225, 27, 35, 0.35);
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

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

html { height: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--bone);
  font-family: "Science Gothic", "Arial Narrow", Arial, sans-serif;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* faint scanlines over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.018) 0 1px,
    transparent 1px 3px
  );
  z-index: 5;
}

/* HUD corner brackets */
.frame i {
  position: fixed;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(242, 242, 242, 0.28);
  z-index: 4;
}
.frame i:nth-child(1) { top: var(--gutter); left: var(--gutter); border-right: 0; border-bottom: 0; }
.frame i:nth-child(2) { top: var(--gutter); right: var(--gutter); border-left: 0; border-bottom: 0; }
.frame i:nth-child(3) { bottom: var(--gutter); left: var(--gutter); border-right: 0; border-top: 0; }
.frame i:nth-child(4) { bottom: var(--gutter); right: var(--gutter); border-left: 0; border-top: 0; }


.eyebrow {
  position: absolute;
  top: calc(var(--gutter) + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0 calc(var(--gutter) + 34px);
  text-align: center;
  font-size: 0.68rem;
  font-weight: 500;
  font-stretch: 130%;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(242, 242, 242, 0.55);
  z-index: 3;
  opacity: 0;
  animation: rise 0.9s cubic-bezier(.2,.7,.2,1) 0.6s forwards;
}
.eyebrow .sep { color: var(--red); margin: 0 0.7em; }
.eyebrow .nw { white-space: nowrap; }

/* ---------- centre stage ---------- */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(92px, 12vh, 124px) var(--gutter) clamp(24px, 4vh, 48px);
  z-index: 2;
}

.mark-wrap {
  position: relative;
  width: clamp(110px, 16vh, 168px);
  margin-bottom: clamp(20px, 3.5vh, 36px);
}
.mark-wrap::before {
  content: "";
  position: absolute;
  inset: -45%;
  background: radial-gradient(closest-side, var(--red-glow), transparent 70%);
  filter: blur(10px);
  z-index: -1;
  animation: breathe 6s ease-in-out infinite;
}
.mark {
  display: block;
  width: 100%;
  height: auto;
}

.wordmark {
  margin: 0;
  font-size: clamp(2.1rem, 7.2vw, 5.4rem);
  line-height: 1;
  letter-spacing: 0.04em;
  font-stretch: 150%;
  white-space: nowrap;
}
.wordmark .w1 { font-weight: 600; }
.wordmark .w2 { font-weight: 300; color: rgba(242, 242, 242, 0.78); }

.tagline {
  margin: clamp(14px, 2.2vh, 22px) 0 0;
  font-size: clamp(0.72rem, 1.6vw, 0.95rem);
  font-weight: 400;
  font-stretch: 120%;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}
.tagline .sep { color: var(--red); margin: 0 0.6em; }
.tagline .nw { white-space: nowrap; }


.story {
  position: absolute;
  left: calc(var(--gutter) + 34px);
  bottom: calc(var(--gutter) + 34px);
  max-width: 330px;
  margin: 0;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 350;
  font-stretch: 100%;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: rgba(242, 242, 242, 0.62);
  border-left: 1px solid rgba(225, 27, 35, 0.6);
  padding-left: 16px;
  z-index: 3;
}
.story em {
  font-style: oblique 10deg;
  color: var(--bone);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  margin: clamp(28px, 5vh, 52px) 0 0;
  padding: 0.85em 1.6em;
  border: 1px solid rgba(225, 27, 35, 0.55);
  background: rgba(225, 27, 35, 0.06);
  font-size: clamp(0.78rem, 1.5vw, 0.95rem);
  font-weight: 600;
  font-stretch: 140%;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  /* optical balance for trailing letter-spacing */
  padding-right: calc(1.6em - 0.38em);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  animation: pulse 1.6s ease-in-out infinite;
}

.contact {
  margin-top: clamp(18px, 3vh, 28px);
  font-size: clamp(0.8rem, 1.4vw, 0.92rem);
  font-weight: 400;
  font-stretch: 110%;
  letter-spacing: 0.12em;
  color: var(--bone);
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 242, 242, 0.25);
  padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
}
.contact:hover,
.contact:focus-visible {
  color: #fff;
  border-color: var(--red);
  outline: none;
}

/* ---------- horizon artwork ---------- */
.horizon {
  position: relative;
  height: clamp(170px, 30vh, 300px);
  margin-top: auto;
  z-index: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 38%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 38%);
}
.horizon img {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 100%;
  width: auto;
  max-width: none;
}
.h-trace {
  mix-blend-mode: screen;
  opacity: 0;
  animation: trace 9s ease-in-out infinite;
}

/* ---------- footer ---------- */
.foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 calc(var(--gutter) + 34px) calc(var(--gutter) + 2px);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
  font-size: 0.68rem;
  font-weight: 400;
  font-stretch: 120%;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(242, 242, 242, 0.5);
  z-index: 3;
}

/* ---------- entrance ---------- */
.mark-wrap, .wordmark, .tagline, .status, .contact, .story {
  opacity: 0;
  animation: rise 0.9s cubic-bezier(.2,.7,.2,1) forwards;
}
.wordmark { animation-delay: 0.12s; }
.tagline  { animation-delay: 0.24s; }
.status   { animation-delay: 0.36s; }
.contact  { animation-delay: 0.48s; }
.story    { animation-delay: 0.9s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes breathe {
  0%, 100% { opacity: 0.7; transform: scale(0.96); }
  50%      { opacity: 1;   transform: scale(1.04); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}
@keyframes trace {
  0%, 100% { opacity: 0; }
  50%      { opacity: 0.85; }
}

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  .wordmark { display: flex; flex-direction: column; gap: 0.12em; letter-spacing: 0.08em; font-stretch: 150%; font-size: clamp(2rem, 12vw, 3rem); }
  .wordmark .w2 { font-size: 0.62em; letter-spacing: 0.22em; margin-right: -0.22em; }
  .mark-wrap { width: clamp(96px, 26vw, 124px); }
  .stage { padding-top: calc(var(--gutter) + 64px); }
  .tagline { letter-spacing: 0.2em; line-height: 2; }
  .tagline .sep { display: none; }
  .tagline .nw { display: block; }
  .status { letter-spacing: 0.28em; padding-right: calc(1.6em - 0.28em); }
  .story { font-size: 0.72rem; line-height: 1.75; }
  .eyebrow { font-size: 0.56rem; letter-spacing: 0.22em; padding: 0 calc(var(--gutter) + 26px); line-height: 1.9; }
  .eyebrow .sep { display: none; }
  .eyebrow .nw { display: block; }
  .foot { text-align: center; padding: 0 var(--gutter) calc(var(--gutter) + 30px); font-size: 0.6rem; color: rgba(242, 242, 242, 0.7); }
}


@media (max-width: 1100px), (max-height: 720px) {
  .story {
    left: auto;
    bottom: auto;
    max-width: 34em;
    margin-top: clamp(28px, 5vh, 44px);
    border-left: 0;
    padding: 18px 0 0;
    text-align: center;
    position: relative;
  }
  .story::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 40px;
    height: 1px;
    margin-left: -20px;
    background: var(--red);
  }
}

@media (max-height: 560px) and (min-width: 561px) {
  .horizon { height: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .mark-wrap, .wordmark, .tagline, .status, .contact, .story, .eyebrow { opacity: 1; }
}
