/* OSSURAYA — landing styles */

html { background: #000; }

body {
  margin: 0;
  background: #000;
  color: #EDE9DF;
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #3d3564; color: #fff; }

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

.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.ray-stage {
  position: absolute;
  left: 50%;
  top: 47%;
  width: min(100vmin, 1250px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
}

.ray-glow {
  position: absolute;
  inset: -12%;
  background: radial-gradient(closest-side, rgba(104, 110, 255, 0.13), rgba(140, 80, 220, 0.05) 55%, rgba(0, 0, 0, 0) 75%);
  animation: os-breathe 12s ease-in-out infinite;
  pointer-events: none;
}

.ray-float {
  position: relative;
  width: 100%;
  height: 100%;
  animation: os-float 10s ease-in-out infinite;
}

.ray-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
}

/* Slowly hue-cycled copies of the artwork, limited to the wings and tail.
   Layer 1 of the mask keeps only bright pixels (luminance of the artwork itself),
   layer 2 keeps only the region ellipse; the layers are intersected. */
.ray-hue {
  position: absolute;
  inset: 0;
  background: url('assets/ray.png') center / contain no-repeat;
  opacity: 0.9;
  mix-blend-mode: lighten;
  animation: os-hue 38s linear infinite;
  mask-mode: luminance, alpha;
  mask-size: contain, 100% 100%;
  mask-position: center, center;
  mask-repeat: no-repeat, no-repeat;
  mask-composite: intersect;
  pointer-events: none;
}

.ray-hue--left  { mask-image: url('assets/ray.png'), radial-gradient(ellipse 30% 34% at 23% 36%, black 62%, transparent 96%); }
.ray-hue--right { mask-image: url('assets/ray.png'), radial-gradient(ellipse 30% 34% at 77% 36%, black 62%, transparent 96%); }
.ray-hue--tail  { mask-image: url('assets/ray.png'), radial-gradient(ellipse 15% 25% at 55% 73%, black 55%, transparent 92%); }

/* Spectral gradient flowing diagonally across the bright filaments (skull held out). */
.ray-sheen {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  mix-blend-mode: color-dodge;
  overflow: hidden;
  mask-image: url('assets/ray.png'), radial-gradient(ellipse 17% 24% at 50% 36%, transparent 58%, black 90%);
  mask-mode: luminance, alpha;
  mask-size: contain, 100% 100%;
  mask-position: center, center;
  mask-repeat: no-repeat, no-repeat;
  mask-composite: intersect;
  pointer-events: none;
}

.ray-flow {
  position: absolute;
  top: -1060px;
  left: -1060px;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(135deg, #ff4fd8 0px, #6d4bff 240px, #00e0ff 480px, #4dffc2 720px, #ffe45e 960px, #ff9a5c 1200px, #ff4fd8 1440px);
  animation: os-flow 28.5s linear infinite;
  will-change: transform;
}

.hero-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 110px 24px 26px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 55%, rgba(0, 0, 0, 0) 100%);
}

.wordmark {
  margin: 0;
  font-weight: 500;
  font-size: clamp(26px, 4vw, 50px);
  line-height: 1;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  text-transform: uppercase;
  color: #F2EEE4;
  text-align: center;
}

.tagline {
  margin: 16px 0 0;
  font-size: clamp(11px, 1.2vw, 13px);
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  text-transform: uppercase;
  color: rgba(237, 233, 223, 0.55);
  text-align: center;
}

.legal {
  margin-top: 24px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  color: rgba(237, 233, 223, 0.3);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 13px 34px;
  background: transparent;
  border: 1px solid rgba(237, 233, 223, 0.32);
  color: #EDE9DF;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.4s ease, background-color 0.4s ease, opacity 0.3s ease;
}

.btn:hover {
  border-color: rgba(237, 233, 223, 0.75);
  background-color: rgba(237, 233, 223, 0.05);
}

.btn--cta {
  margin-top: 28px;
  padding: 14px 34px;
  font-size: 13px;
}

/* ---------- Modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: os-fade 0.3s ease both;
}

.modal-panel {
  position: relative;
  width: min(460px, 100%);
  background: #08080A;
  border: 1px solid rgba(237, 233, 223, 0.16);
  padding: clamp(26px, 4vw, 40px);
  box-sizing: border-box;
  animation: os-pop 0.45s cubic-bezier(0.16, 0.8, 0.26, 1) both;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: none;
  color: rgba(237, 233, 223, 0.5);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.3s ease;
}

.modal-close:hover { color: #F2EEE4; }

.modal-title {
  margin: 0;
  font-weight: 500;
  font-size: clamp(20px, 2.6vw, 26px);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  text-align: center;
}

.modal-sub {
  margin: 16px 0 0;
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(237, 233, 223, 0.6);
}

/* ---------- Form ---------- */

.form {
  margin-top: 28px;
  display: grid;
  gap: 20px;
}

.form[hidden] { display: none; }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.field { display: grid; gap: 8px; }

.field label {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(237, 233, 223, 0.5);
}

.field input,
.field textarea {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(237, 233, 223, 0.22);
  border-radius: 0;
  appearance: none;
  color: #EDE9DF;
  font-family: inherit;
  font-size: 18px;
  padding: 8px 2px;
  transition: border-color 0.3s ease;
}

.field textarea {
  resize: vertical;
  min-height: 44px;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus {
  border-bottom-color: rgba(237, 233, 223, 0.7);
  outline: none;
}

.field input::placeholder,
.field textarea::placeholder { color: rgba(237, 233, 223, 0.28); }

.field input:-webkit-autofill,
.field textarea:-webkit-autofill {
  -webkit-text-fill-color: #EDE9DF;
  -webkit-box-shadow: 0 0 0 1000px #08080A inset;
  caret-color: #EDE9DF;
  transition: background-color 999999s ease-out;
}

.form-actions {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.submit {
  width: 100%;
  padding: 14px 20px;
  border-color: rgba(237, 233, 223, 0.4);
  font-size: 13px;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
}

.submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.form-error {
  min-height: 16px;
  text-align: center;
  font-size: 14px;
  font-style: italic;
  color: #D98F8F;
}

.consent {
  margin: 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(237, 233, 223, 0.32);
}

/* ---------- Success ---------- */

.success { margin-top: 40px; text-align: center; }
.success[hidden] { display: none; }

.success-title {
  font-size: 20px;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-transform: uppercase;
}

.success p {
  margin: 16px 0 0;
  font-size: 16px;
  font-style: italic;
  line-height: 1.7;
  color: rgba(237, 233, 223, 0.6);
}

.success .btn { margin-top: 30px; }

/* ---------- Animation ---------- */

@keyframes os-hue {
  from { filter: hue-rotate(0deg) saturate(1.55); }
  to   { filter: hue-rotate(360deg) saturate(1.55); }
}

/* 1018.23px = one gradient period (1440px) projected on the 135° axis:
   translating by exactly one period makes the loop seamless. */
@keyframes os-flow {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(1018.23px, 1018.23px, 0); }
}

@keyframes os-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-1.1%); }
}

@keyframes os-breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.06); }
}

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

@keyframes os-pop {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .ray-glow, .ray-float, .ray-hue, .ray-flow,
  .modal-backdrop, .modal-panel { animation: none !important; }
}
