/* ==========================================================================
   LE SSERAFIM — base.css
   Tokens, reset, shared chrome (header, menu, footer, circles), utilities.
   Design reference frame: 1440 × 950. Fluid values: px / 14.4 = vw.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --c-black: #000000;
  --c-panel: #161616;
  --c-white: #ffffff;
  --c-text: #d2d2d2;
  --c-muted: #8f8f8f;
  --c-dim: #6a6a6a;
  --c-line: rgba(255, 255, 255, 0.34);
  --c-ghost: rgba(255, 255, 255, 0.16);

  --font: "Cabin Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-italic: "Cabin", "Helvetica Neue", Arial, sans-serif; /* Cabin Condensed has no italics */

  --gutter: clamp(20px, 6.945vw, 100px);
  --header-h: clamp(64px, 5.6vw, 80px);
  --footer-h: 58px;

  --fs-display: clamp(40px, 5vw, 72px);
  --fs-title: clamp(30px, 3.34vw, 48px);
  --fs-sub: clamp(20px, 3.34vw, 48px);
  --fs-label: clamp(14px, 1.25vw, 18px);
  --fs-body: clamp(14px, 1.28vw, 18.5px);
  --fs-ghost: clamp(96px, 17vw, 250px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.18, 1);
  --dur: 0.9s;

  --vh: 1vh; /* set by JS to innerHeight / 100 for stable mobile units */
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--c-black);
  color-scheme: dark;
  scrollbar-color: rgba(255, 255, 255, 0.25) #000;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font);
  font-weight: 400;
  color: var(--c-white);
  background: var(--c-black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg { display: block; max-width: 100%; }

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

em,
i { font-family: var(--font-italic); }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--c-white);
  outline-offset: 4px;
}

[hidden] { display: none !important; }

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

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--c-white);
  color: var(--c-black);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Decorative circles ---------- */
.circles {
  position: fixed;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.circles circle {
  fill: none;
  stroke: #fff; /* per-circle opacity comes from the stroke-opacity attribute */
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: rotate(-90deg); /* draw from 12 o'clock */
}
.circles g { transition: transform 1.4s var(--ease-out); }

.circles circle {
  fill: none;
  stroke: #fff; /* per-circle opacity comes from the stroke-opacity attribute */
  stroke-width: 1;
  stroke-dasharray: none;  /* solid circle; the dash is only used while drawing */
  transform-box: fill-box;
  transform-origin: center;
  transform: rotate(-90deg); /* draw from 12 o'clock */
}
.circles g { transition: transform 1.4s var(--ease-out); }

/* First reveal on the home hero only (home.js adds .is-drawing once) */
.is-drawing .circles circle { animation: circle-draw 1.8s var(--ease-io) both; }
.is-drawing .circles g:nth-child(2) circle { animation-delay: 0.12s; }
.is-drawing .circles g:nth-child(3) circle { animation-delay: 0.24s; }
@keyframes circle-draw {
  0% { stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: 0; transform: rotate(-150deg) scale(0.92); }
  15% { opacity: 1; }
  99% { stroke-dasharray: 1 1; stroke-dashoffset: 0; }
  100% { stroke-dasharray: none; stroke-dashoffset: 0; opacity: 1; transform: rotate(-90deg) scale(1); }
}
/* Keep circles hidden behind the intro curtain until the draw starts */
html:not(.no-js) .home .circles circle { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
html.curtain-done .home .circles circle { stroke-dasharray: none; stroke-dashoffset: 0; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }

/* Hide on scroll down (core.js toggles .nav-hidden on <html>) */
/* Showing again: a little quicker, settles softly */
.site-header {
  transition:
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.7s ease,
    background 0.4s ease;
}
/* Hiding: slow, smooth slide up with a gentle fade */
.nav-hidden .site-header {
  transform: translate3d(0, -100%, 0);
  opacity: 0;
  transition:
    transform 1.2s cubic-bezier(0.65, 0, 0.35, 1),
    opacity 1s ease 0.15s;
}

.brand {
  display: block;
  width: clamp(80px, 7.1vw, 102px);
  transition: opacity 0.3s ease;
}
.brand:hover { opacity: 0.75; }
.brand img { width: 100%; height: auto; }

.burger {
  position: relative;
  width: 30px;
  height: 30px;
  margin-right: -2px;
}
.burger span {
  position: absolute;
  right: 0;
  height: 3px;
  width: 30px;
  background: var(--c-white);
  transition: transform 0.55s var(--ease-io), width 0.45s var(--ease-out), opacity 0.3s ease;
}
.burger span:nth-child(1) { top: 3px; }
.burger span:nth-child(2) { top: 13.5px; width: 20px; }
.burger span:nth-child(3) { top: 24px; }
.burger:hover span:nth-child(2) { width: 30px; }
.burger:hover span:nth-child(1),
.burger:hover span:nth-child(3) { width: 24px; }

/* burger → close */
.menu-open .burger span:nth-child(1) { width: 26px; transform: translate(-2px, 10.5px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { width: 0; opacity: 0; }
.menu-open .burger span:nth-child(3) { width: 26px; transform: translate(-2px, -10.5px) rotate(-45deg); }

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  background: var(--c-black);
  clip-path: inset(0 50% 0 50%);
  visibility: hidden;
  transition: clip-path 0.85s var(--ease-io), visibility 0s linear 0.85s;
}
.menu-open .menu {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path 0.85s var(--ease-io), visibility 0s;
}

.menu__list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(18px, 4.3vh, 62px);
  padding-top: var(--header-h);
}

.menu__item {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity 0.4s ease, transform 0.4s var(--ease-out);
}
.menu-open .menu__item {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 1s var(--ease-out);
  transition-delay: calc(0.35s + var(--i, 0) * 0.08s);
}

.menu__link {
  --ls: 0.02em;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  font-size: clamp(38px, 5vw, 72px);
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  text-align: center;
}
.menu__link::before,
.menu__link::after {
  content: "";
  height: 1px;
  background: var(--c-dim);
  transform: scaleX(0);
  transition: transform 0.8s var(--ease-io);
}
.menu__link::before { margin-right: clamp(20px, 3.75vw, 54px); transform-origin: left; }
.menu__link::after { margin-left: clamp(20px, 3.75vw, 54px); transform-origin: right; }
.menu__link.is-current::before,
.menu__link.is-current::after { transform: scaleX(1); }
.menu-open .menu__link.is-current::before,
.menu-open .menu__link.is-current::after { transition-delay: 0.7s; }

.menu__text {
  letter-spacing: var(--ls);
  margin-right: calc(var(--ls) * -1);
  transition: letter-spacing 0.6s var(--ease-out), margin 0.6s var(--ease-out), opacity 0.3s ease;
}
a.menu__link:hover .menu__text,
a.menu__link:focus-visible .menu__text {
  --ls: 0.2em;
}
.menu__list:hover a.menu__link:not(:hover) .menu__text { opacity: 0.55; }

.menu__link.is-disabled {
  cursor: not-allowed;
  color: var(--c-dim);
}
.menu__cell {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}
.menu__soon {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translate(18px, -50%);
  white-space: nowrap;
  padding: 5px 10px 4px;
  border: 1px solid var(--c-dim);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1;
  color: var(--c-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--footer-h);
  padding: 0 var(--gutter);
  border-top: 1px solid var(--c-line);
  background: rgba(0, 0, 0, 0.12);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.site-footer--fixed {
  position: fixed;
  left: 0; right: 0; bottom: 0;
}
.menu .site-footer { position: relative; }

.social {
  display: flex;
  gap: 26px;
  margin-left: 2px;
}
.social a {
  display: block;
  width: 18px;
  height: 18px;
  transition: transform 0.35s var(--ease-out), opacity 0.3s ease;
}
.social a:hover { transform: translateY(-3px); opacity: 0.7; }
.social img { width: 18px; height: 18px; object-fit: contain; }

.copyright {
  font-size: 14px;
  letter-spacing: 0.04em;
  color: #e4e4e4;
  text-align: right;
}

/* ---------- Shared components ---------- */
.arrow-back {
  display: inline-flex;
  align-items: center;
  width: 64px;
  height: 32px;
  color: var(--c-white);
}
.arrow-back svg {
  width: 64px;
  height: 30px;
  overflow: visible;
}
/* Hover: the head moves left and the shaft stretches with it, so they stay joined */
.arrow-back svg path {
  transform-box: fill-box;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.arrow-back .shaft { transform-origin: right center; }
.arrow-back:hover .shaft,
.arrow-back:focus-visible .shaft { transform: scaleX(1.105); }               /* 57px line + 6px */
.arrow-back:hover path:not(.shaft),
.arrow-back:focus-visible path:not(.shaft) { transform: translateX(-6px); }


.label {
  display: block;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.display {
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ghost-type {
  font-weight: 700;
  line-height: 0.74;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--c-ghost);
  pointer-events: none;
  user-select: none;
}

/* Banner used by About + Album detail */
.banner {
  position: relative;
  height: 31.9vh;
  height: calc(var(--vh) * 31.9);
  min-height: 190px;
  overflow: hidden;
  background: var(--c-black);
}
.banner__media {
  position: absolute;
  inset: -8% 0;
  background-size: cover;
  background-position: center 24%;
  will-change: transform;
}
.banner__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.35) 55%, rgba(0, 0, 0, 0.5) 100%);
}
.banner__ghost {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.02em;
  display: flex;
  justify-content: center;
  font-size: var(--fs-ghost);
  color: rgba(255, 255, 255, 0.2);
}
.banner__logo {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: calc(var(--vh) * 6.4);
  pointer-events: none;
}
.banner__logo img { width: clamp(170px, 22vw, 318px); height: auto; }

/* ---------- Reveal system (viewport-driven) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 56px, 0);
  filter: blur(14px);
  transition:
    opacity 1s ease,
    filter 1.1s ease,
    transform 1.3s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 1ms);
}
[data-reveal].is-in { opacity: 1; transform: none; filter: none; }

[data-reveal="mask"] {
  opacity: 1;
  transform: none;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.3s var(--ease-io);
  transition-delay: calc(var(--d, 0) * 1ms);
}
[data-reveal="mask"] img {
  transform: scale(1.22);
  transition: transform 1.8s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 1ms);
}
[data-reveal="mask"].is-in { clip-path: inset(0 0 0 0); }

[data-reveal="clip"] {
  opacity: 1;
  transform: translate3d(0, 40px, 0);
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.25s var(--ease-io), transform 1.4s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 1ms);
}
[data-reveal="clip"].is-in { clip-path: inset(-2px -2px -2px -2px); transform: none; }
[data-reveal="mask"].is-in img { transform: scale(1); }

.no-js [data-reveal] { opacity: 1; transform: none; clip-path: none; }

/* Intro for inner pages (discography, albums): a black curtain that lifts up
   and off the screen to reveal the page */
.page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  pointer-events: none;
  animation: page-curtain 1.2s cubic-bezier(0.77, 0, 0.18, 1) 0.15s both;
}
@keyframes page-curtain {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -100%, 0); visibility: hidden; }
}

/* Page entrance for inner pages */
.page-enter .banner__media { animation: banner-in 1.8s var(--ease-out) backwards; }
@keyframes banner-in {
  from { transform: scale(1.18); filter: brightness(0.3); }
  to { transform: scale(1); filter: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  :root { --footer-h: 52px; }
  .menu__soon { position: static; transform: none; margin-top: 10px; }
  .social { gap: 20px; }
  .copyright { font-size: 10.5px; }
  .banner { height: calc(var(--vh) * 24); min-height: 150px; }
}

@media (max-width: 420px) {
  .copyright { max-width: 55%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}
