/* MERIDIYN — meridiyn.com
   Built from BRAND.md, July 2026. Near-black world, blue leads, the vertical LINE motif.
   Colors: bg #111114 · text #F1F1F1 · Meridiyn Blue #5768FF · ice #9EC1FF · perano #A9B1F9 · deep red #83202A (rare punctuation only) */

:root {
  --bg: #111114;
  --text: #F1F1F1;
  --blue: #5768FF;
  --ice: #9EC1FF;
  --perano: #A9B1F9;
  --red: #83202A;
  --dim: rgba(241, 241, 241, 0.55);
  --line: rgba(87, 104, 255, 0.35);
}

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

html { scroll-behavior: smooth; }

body {
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Film grain — the artwork's texture, sitewide (old-TV static, whisper level) */
body::after {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: 5;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
  opacity: 0.10;
  animation: grainshift 0.9s steps(4) infinite;
}

@keyframes grainshift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, 1.5%); }
  50%  { transform: translate(1.5%, -2%); }
  75%  { transform: translate(-1%, -1%); }
  100% { transform: translate(2%, 2%); }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
}

/* Generated texture — cracked earth, blue in the fractures. A background element:
   low opacity, blended into the dark, adds surface without changing the vibe. */
.texture-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("assets/texture-bg.jpg") center / cover no-repeat;
  opacity: 0.55; /* the texture itself is a whisper — near-black tonal wash, no detail */
  mask-image: radial-gradient(ellipse at 50% 35%, black 30%, rgba(0,0,0,0.4) 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 35%, black 30%, rgba(0,0,0,0.4) 70%, transparent 100%);
}
.listen-page .texture-bg { background-image: url("../assets/texture-bg.jpg"); }

/* THE LINE — the vertical meridian: a measuring instrument, not a decoration.
   1px stroke + faint degree ticks down its length, anchored to the page. */
body::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, transparent 0%, var(--line) 5%, var(--line) 97%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* The zenith notch — the peak marker at the meridian's top */
.zenith {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 7px;
  height: 7px;
  transform: translateX(-50%) rotate(45deg);
  border: 1px solid var(--blue);
  opacity: 0.75;
  box-shadow: 0 0 8px rgba(87, 104, 255, 0.5);
  pointer-events: none;
  z-index: 0;
}
.zenith.nadir {
  top: auto;
  bottom: 9px;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* Header */
header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 32px 0 8px;
}

/* Pre-save banner — lives at the top only during pre-save windows */
.presave {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 30px;
  padding: 16px 18px;
  border: 1px solid rgba(87, 104, 255, 0.35);
  border-radius: 12px;
  background: rgba(87, 104, 255, 0.06);
}
.presave.hidden { display: none; }
.presave-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--perano);
}
.presave-tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  animation: blink 1.9s ease-in-out infinite;
}
.presave-title {
  font-family: "Tanker", "Space Grotesk", sans-serif;
  font-size: 21px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 6px;
  line-height: 1.1;
}
.presave-sub {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 2px;
}
.presave .btn { flex-shrink: 0; }

.wordmark {
  display: block;
  position: relative;
}
/* the room light — a static pool of blue behind the logo; a gradient, not a filter,
   so it can never glitch. This is the backglow, bigger than the old drop-shadow. */
.wordmark::before {
  content: "";
  position: absolute;
  inset: -90% -32%;
  background: radial-gradient(ellipse at center,
    rgba(87, 104, 255, 0.26) 0%,
    rgba(87, 104, 255, 0.10) 42%,
    transparent 72%);
  pointer-events: none;
  z-index: -1;
}
.wordmark img {
  width: 218px; /* glow margin is baked into the asset — wider display keeps letterforms same size */
  display: block;
  opacity: 0.95;
  position: relative;
}

/* Ambient definition field — the "what is that?" layer */
/* Definition strips — fragments live ONLY in the empty bands between sections */
.field-strip {
  position: relative;
  height: 84px;
  margin: 12px -24px 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}
.field-strip span {
  position: absolute;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
  white-space: nowrap;
  animation: fadefloat 20s ease-in-out infinite alternate;
}
.field-strip .t-outline { -webkit-text-stroke-width: 0.6px; }

@keyframes fadefloat {
  0%   { transform: translateY(-14px); opacity: 0.01; }
  50%  { opacity: 0.11; }
  100% { transform: translateY(14px); opacity: 0.01; }
}

/* larger fragments run quieter so they never shout */
.field-strip span.big { animation-name: fadefloatdim; }
@keyframes fadefloatdim {
  0%   { transform: translateY(-14px); opacity: 0.01; }
  50%  { opacity: 0.06; }
  100% { transform: translateY(14px); opacity: 0.01; }
}

@media (prefers-reduced-motion: reduce) {
  .field-strip span { animation: none; }
}

/* ── INTRO — once per visit, ~1.4s: logo takes the stage, the line cuts the page open ── */
.intro { display: none; }

.with-intro .intro {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 4; /* below the grain (z5) so the stage is textured from frame one */
  background: var(--bg);
  pointer-events: none;
  animation:
    introStage 0.6s ease 1.5s forwards,   /* stage dissolves around the landed logo */
    introGone 0.01s linear 2.15s forwards; /* then the overlay leaves entirely */
}
/* the traveling unit: logo + its light pool move as ONE — the glow follows the flight */
.with-intro .intro-unit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(340px, 70vw);
  transform: translate(-50%, -50%);
  animation:
    introLogo 1.5s cubic-bezier(0.65, 0, 0.25, 1) forwards, /* fade in, hold, glide to header */
    introThump 0.5s cubic-bezier(0.3, 0, 0.4, 1) 1.5s,      /* landing pulse via scale — safe to animate */
    introLogoOut 0.3s ease 1.9s forwards;                    /* leaves only after the real logo is fully in */
}
.with-intro .intro-unit img {
  display: block;
  width: 100%;
  position: relative;
  /* glow is BAKED into the asset — no CSS filters, nothing for Safari to glitch on */
}
/* the light pool inside the unit — sized relative to the logo, so it shrinks
   in proportion during the glide and hands off to the header's own pool */
.with-intro .intro-halo {
  position: absolute;
  inset: -90% -32%;
  background: radial-gradient(ellipse at center,
    rgba(87, 104, 255, 0.26) 0%,
    rgba(87, 104, 255, 0.10) 42%,
    transparent 72%);
  pointer-events: none;
}

.with-intro .intro-line {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--blue), transparent);
  transform: scaleY(0);
  transform-origin: top;
  animation:
    introLine 0.65s cubic-bezier(0.7, 0, 0.3, 1) 1.0s forwards,
    introLineOut 0.35s ease 1.4s forwards; /* hands off to the page's own meridian before content shows */
  box-shadow: 0 0 14px rgba(87, 104, 255, 0.6);
}

.with-intro .wrap {
  opacity: 0;
  animation: introContent 0.7s ease 1.5s forwards;
}

@keyframes introLogo {
  0%   { opacity: 0; top: 50%; width: min(340px, 70vw); transform: translate(-50%, -50%) scale(1.06); }
  25%  { opacity: 1; top: 50%; transform: translate(-50%, -50%) scale(1); }
  55%  { opacity: 1; top: 50%; width: min(340px, 70vw); transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 1; top: 32px; width: 218px; transform: translate(-50%, 0) scale(1); } /* EXACTLY the header logo's position — the crossfade must be invisible */
}
@keyframes introThump {
  0%   { transform: translate(-50%, 0) scale(1); }
  40%  { transform: translate(-50%, 0) scale(1.06); }
  100% { transform: translate(-50%, 0) scale(1); }
}
@keyframes introLogoOut {
  to { opacity: 0; }
}
@keyframes introLineOut {
  to { opacity: 0; }
}
@keyframes introDef {
  0% { opacity: 0; }
  35% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes introLine {
  to { transform: scaleY(1); }
}
@keyframes introStage {
  to { background: rgba(17, 17, 20, 0); }
}
@keyframes introGone {
  to { opacity: 0; visibility: hidden; }
}
@keyframes introContent {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* only one logo is ever visible: the real one waits until the intro logo is nearly gone */
.with-intro header .wordmark img {
  opacity: 0;
  animation: introReal 0.25s ease 1.75s forwards; /* real logo arrives BEFORE the intro logo leaves — no dark valley */
}
@keyframes introReal {
  to { opacity: 0.95; }
}

@media (prefers-reduced-motion: reduce) {
  .with-intro .intro { display: none; }
  .with-intro .wrap { opacity: 1; animation: none; }
}

nav a {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s;
}
nav a:hover { color: var(--ice); }

/* Hero — the latest release */
.hero {
  padding: 48px 0 8px;
  text-align: center;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 11px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 24px;
}
.hero-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 1.9s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(131, 32, 42, 0.9); }
  50% { opacity: 0.25; box-shadow: 0 0 0 rgba(131, 32, 42, 0); }
}

.hero-cover {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(241, 241, 241, 0.16);
  box-shadow:
    0 0 60px rgba(87, 104, 255, 0.25),
    0 24px 48px rgba(0, 0, 0, 0.6);
  display: block;
  margin: 0 auto;
}

.hero-title {
  font-family: "Tanker", "Space Grotesk", "Inter", sans-serif;
  font-weight: 400;
  font-size: clamp(38px, 10vw, 52px);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 28px 0 6px;
  line-height: 1.05;
}

.hero-sub {
  color: var(--dim);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--blue);
  border-radius: 999px;
  padding: 13px 26px;
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
}
.btn:hover {
  background: var(--blue);
  box-shadow: 0 0 24px rgba(87, 104, 255, 0.5);
}
.btn.ghost { border-color: rgba(241, 241, 241, 0.25); }
.btn.ghost:hover {
  background: transparent;
  border-color: var(--ice);
  color: var(--ice);
  box-shadow: 0 0 18px rgba(158, 193, 255, 0.25);
}

/* The definition line — the only "bio" this site needs */
.definition {
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--dim);
  text-align: center;
}
.definition em { color: var(--perano); font-style: italic; }

/* Moving definition texture — the meridian line as type, drifting */
.texture {
  overflow: hidden;
  white-space: nowrap;
  padding: 26px 0 6px;
  margin: 0 -24px;
  opacity: 0.14;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.texture-track {
  display: inline-block;
  animation: drift 60s linear infinite;
  font-size: 30px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.texture.reverse .texture-track { animation-direction: reverse; animation-duration: 75s; }

.texture i {
  font-style: normal;
  color: var(--blue);
  padding: 0 18px;
}
.t-bold { font-family: "Space Grotesk", sans-serif; font-weight: 700; }
.t-outline {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px var(--perano);
}
.t-serif { font-family: Georgia, "Times New Roman", serif; font-style: italic; }
.t-light { font-family: "Inter", sans-serif; font-weight: 400; letter-spacing: 0.2em; }

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .texture-track { animation: none; }
}

/* Section headers */
.section {
  padding-top: 44px;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}

.section-title {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--perano);
}

/* Releases grid */
.releases {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.release {
  text-decoration: none;
  color: var(--text);
  display: block;
}

.release img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(241, 241, 241, 0.14);
  display: block;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
}
.release:hover img {
  transform: translateY(-3px);
  box-shadow: 0 0 32px rgba(87, 104, 255, 0.35);
}

.release-name {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 10px;
}

.release-kind {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 2px;
}

/* Socials */
.socials {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(241, 241, 241, 0.08);
}

.social {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 4px;
  border-bottom: 1px solid rgba(241, 241, 241, 0.08);
  text-decoration: none;
  color: var(--text);
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  transition: color 0.2s, padding-left 0.2s;
}
.social span { color: var(--dim); font-size: 11px; letter-spacing: 0.1em; }
.social:hover { color: var(--ice); padding-left: 12px; }
.s-left { display: flex; align-items: center; gap: 13px; color: inherit !important; font-size: inherit !important; letter-spacing: inherit !important; }
.s-icon { width: 17px; height: 17px; opacity: 0.85; flex-shrink: 0; }

/* Show More — reveals the deeper catalog with a premium slide-in */
.release.more { display: none; }
.releases.expanded .release.more {
  display: block;
  animation: cardIn 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.releases.expanded .release.more:nth-of-type(6) { animation-delay: 0.08s; }
.releases.expanded .release.more:nth-of-type(7) { animation-delay: 0.16s; }
.releases.expanded .release.more:nth-of-type(8) { animation-delay: 0.24s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.show-more {
  display: block;
  margin: 24px auto 0;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
  background: transparent;
  border: 1px solid rgba(241, 241, 241, 0.2);
  border-radius: 999px;
  padding: 11px 26px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.show-more:hover { color: var(--ice); border-color: var(--ice); }

/* Email capture — hidden until Laylo is wired (flip .email .hidden) */
.email.hidden { display: none; }

.email-form {
  display: flex;
  gap: 10px;
}

.email-form input {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(241, 241, 241, 0.2);
  border-radius: 999px;
  padding: 13px 20px;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 14px;
}
.email-form input:focus { outline: none; border-color: var(--blue); }

/* Footer — coordinates motif */
footer {
  margin-top: 96px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.coords {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--dim);
}

.foot-mark {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(241, 241, 241, 0.35);
}

/* About page */
.about-body {
  padding-top: 48px;
}
.about-body .logo-stamp {
  width: 130px;
  display: block;
  margin: 0 auto 40px;
  filter: invert(1) opacity(0.92);
}
.about-body p {
  color: rgba(241, 241, 241, 0.85);
  margin-bottom: 20px;
  font-size: 15.5px;
}
.about-body strong { color: var(--ice); font-weight: 600; }

/* Desktop adaptation — mobile is the design; desktop just breathes more */
@media (min-width: 720px) {
  .wrap { max-width: 560px; }
  .releases { gap: 22px; }
}
