/* Beyond the Stars — site styles
   Typography-led layout on pure black. No frameworks. */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond.woff2") format("woff2");
  font-weight: 300 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-italic.woff2") format("woff2");
  font-weight: 300 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost.woff2") format("woff2");
  font-weight: 300 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000000;
  --white: #f3f2ef;
  --silver: #c4c3bf;      /* body text: 11.6:1 on black */
  --dim: #8f8d88;         /* secondary text: 6.3:1 on black */
  --metal: #aaa59b;       /* warm grey for labels */
  --hairline: rgba(214, 210, 200, 0.18);

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Jost", "Futura", "Avenir Next", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.5rem, 5vw, 4.5rem);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  background: var(--black);
  color: var(--silver);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--black);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.6s var(--ease);
}
a:hover { color: var(--white); }

:focus-visible {
  outline: 1px solid var(--silver);
  outline-offset: 6px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  padding: 0.5rem 1rem;
  background: var(--black);
  color: var(--white);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.skip:focus { top: 1rem; }

/* Small tracked capitals used for section labels */
.label {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--metal);
}

/* ------------------------------------------------------------------ header */

.masthead {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.1rem, 2.6vw, 2rem) var(--gutter);
  transition: background-color 1.2s var(--ease);
}
.masthead.is-scrolled { background-color: rgba(0, 0, 0, 0.82); }

.wordmark {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.7rem;
  line-height: 1;
  letter-spacing: 0.46em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
  z-index: 2;
}
/* the single star sitting just beyond the name */
.wordmark__star {
  width: 3px;
  height: 3px;
  margin: -0.45em 0 0 0.15em;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.55);
}

.nav ul { display: flex; gap: clamp(1.5rem, 3vw, 3rem); }
.nav a {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--dim);
}
.nav a:hover,
.nav a:focus-visible { color: var(--white); }

.menu-toggle { display: none; }

/* -------------------------------------------------------------------- sky */

.sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  /* dissolve top and bottom into the page, whatever the crop */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 78%, transparent 100%);
}
.sky picture,
.sky img {
  width: 100%;
  height: 100%;
}
.sky img {
  object-fit: cover;
  object-position: 50% 50%;
  transform-origin: 50% 55%;
}

/* ------------------------------------------------------------------- hero */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 7rem var(--gutter) 6rem;
  text-align: center;
}
.sky--hero img {
  opacity: 0;
  animation:
    sky-in 4.5s var(--ease) 0.2s forwards,
    sky-drift 140s ease-in-out 0.2s infinite alternate;
}

@keyframes sky-in { to { opacity: 1; } }
@keyframes sky-drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.07) translate3d(-0.8%, 0.4%, 0); }
}

.hero__content {
  position: relative;
  max-width: 76rem;
  text-shadow: 0 0 2.5rem #000, 0 0 0.8rem #000;
}
.hero__brand {
  font-weight: 400;
  font-size: clamp(0.7rem, 1vw, 0.8rem);
  letter-spacing: 0.62em;
  margin-right: -0.62em; /* optical centring of tracked capitals */
  text-transform: uppercase;
  color: var(--metal);
  opacity: 0;
  animation: rise 2.4s var(--ease) 0.8s forwards;
}
.hero__title {
  margin-top: clamp(1.6rem, 3.5vw, 2.6rem);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.7rem, 6.4vw, 6.2rem);
  line-height: 1.02;
  letter-spacing: -0.012em;
  color: var(--white);
  text-wrap: balance;
  opacity: 0;
  animation: rise 2.8s var(--ease) 1.4s forwards;
}
.hero__lede {
  margin-top: clamp(1.2rem, 2.4vw, 1.8rem);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.4;
  color: var(--silver);
  opacity: 0;
  animation: rise 2.8s var(--ease) 2.2s forwards;
}

@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 0.6rem, 0); }
  to   { opacity: 1; transform: none; }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(1.5rem, 4vh, 3rem);
  width: 1px;
  height: 4.5rem;
  background: var(--hairline);
  overflow: hidden;
  opacity: 0;
  animation: sky-in 2s var(--ease) 3.6s forwards;
}
.scroll-cue span {
  position: absolute;
  left: 0;
  top: -40%;
  width: 1px;
  height: 40%;
  background: var(--silver);
  animation: cue 3.8s var(--ease) 4s infinite;
}
@keyframes cue {
  0%   { top: -40%; opacity: 0; }
  30%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ----------------------------------------------------------------- vision */

.vision {
  position: relative;
  padding: clamp(8rem, 24vh, 16rem) var(--gutter) 0;
}
.vision > .label { text-align: center; margin-right: -0.42em; }
.vision__title {
  margin-top: 1.75rem;
  text-align: center;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.5rem, 5.6vw, 5rem);
  line-height: 1.08;
  color: var(--white);
}

.vision__passage {
  max-width: 72rem;
  margin: 0 auto;
  padding-top: clamp(6rem, 20vh, 13rem);
}
.vision__line {
  max-width: 26ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.5vw, 2.05rem);
  line-height: 1.38;
  color: var(--silver);
}
.vision__line + .vision__line { margin-top: clamp(6rem, 22vh, 13rem); }
.vision__line--left { margin-right: auto; margin-left: 4%; }
.vision__line--right { margin-left: auto; margin-right: 4%; }
.vision__line + .vision__line--follow { margin-top: 1.4rem; }

.vision__key {
  max-width: 22ch;
  margin: clamp(8rem, 26vh, 16rem) auto 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.85rem, 3.8vw, 3.2rem);
  line-height: 1.22;
  color: var(--white);
}

.vision__question {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 6rem 0;
  text-align: center;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 7.4vw, 7rem);
  line-height: 1.04;
  letter-spacing: -0.012em;
  color: var(--white);
  text-wrap: balance;
}

/* ---------------------------------------------------------------- mission */

.mission {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 8rem var(--gutter);
  text-align: center;
}
.mission > .label { margin-right: -0.42em; }

.mission__name {
  margin-top: clamp(2rem, 4vw, 3rem);
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(2.3rem, 7.6vw, 6.8rem);
  line-height: 1;
  letter-spacing: 0.34em;
  margin-right: -0.34em;
  text-transform: uppercase;
  color: var(--silver);
}
/* fine linear grain over a soft, slowly travelling sheen */
.mission__metal {
  background-image:
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.07) 0 1px, rgba(0, 0, 0, 0.07) 1px 2px, transparent 2px 3px),
    linear-gradient(100deg,
      #8d887e 0%, #b9b4a9 22%, #e9e6df 38%, #a8a397 52%, #cfcac0 68%, #8a857b 86%, #b3aea3 100%);
  background-size: 3px 100%, 220% 100%;
  background-position: 0 0, 0% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: sheen 22s ease-in-out infinite alternate;
}
@keyframes sheen {
  to { background-position: 0 0, 100% 0; }
}

.mission__rule {
  width: min(22rem, 60vw);
  height: 1px;
  margin: clamp(2.4rem, 5vw, 3.6rem) auto;
  background: linear-gradient(90deg, transparent, var(--metal) 50%, transparent);
  opacity: 0.55;
}

.mission__headline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.25;
  color: var(--white);
}
.mission__text {
  max-width: 34ch;
  margin-top: 1.6rem;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.8;
  color: var(--silver);
}
.mission__more {
  margin-top: clamp(3rem, 7vh, 4.5rem);
  margin-right: -0.42em;
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ------------------------------------------------------------ development */

.development {
  display: grid;
  grid: none / minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 7vw, 8rem);
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(8rem, 22vh, 14rem) var(--gutter);
}
.development__title {
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.3rem, 4.4vw, 3.9rem);
  line-height: 1.08;
  color: var(--white);
}
.development__body {
  padding-top: 2.6rem;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.85;
}
.development__body p + p { margin-top: 1.4rem; }

.facts {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--hairline);
}
.facts div {
  display: grid;
  grid: none / 9rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--hairline);
}
.facts dt {
  padding-top: 0.2rem;
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--metal);
}
.facts dd {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--silver);
}

/* ---------------------------------------------------------------- closing */

.closing {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 9rem var(--gutter) 7rem;
  text-align: center;
  overflow: hidden;
}
.sky--closing {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 38%, #000 66%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 38%, #000 66%, transparent 100%);
}
.sky--closing img {
  opacity: 0.62;
  transform: scale(-1.06, 1.06); /* mirrored: a different patch of the same sky */
}
.closing__content {
  position: relative;
  max-width: 54rem;
  text-shadow: 0 0 2.5rem #000, 0 0 0.8rem #000;
}
.closing__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 5.6vw, 5.1rem);
  line-height: 1.06;
  color: var(--white);
  text-wrap: balance;
}
.closing__lede {
  margin-top: 1.6rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--silver);
}
.contact { margin-top: clamp(5rem, 14vh, 8rem); }
.contact .label { margin-right: -0.42em; }
.contact__note {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--dim);
}
.contact__mail {
  display: inline-block;
  margin-top: 1.1rem;
  padding-bottom: 0.3rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  color: var(--white);
  background: linear-gradient(var(--metal), var(--metal)) 50% 100% / 100% 1px no-repeat;
  transition: background-size 0.8s var(--ease), color 0.6s var(--ease);
}
.contact__mail:hover,
.contact__mail:focus-visible { background-size: 40% 1px; }

/* ----------------------------------------------------------------- footer */

.footer {
  padding: 5rem var(--gutter) calc(3.5rem + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--dim);
}
.footer__brand {
  margin-bottom: 1rem;
  margin-right: -0.46em;
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.46em;
  text-transform: uppercase;
  color: var(--silver);
}
.footer__link {
  color: var(--silver);
  border-bottom: 1px solid var(--hairline);
}
.footer__legal { margin-top: 1.6rem; }
.footer__legal small { font-size: 0.75rem; }

/* ----------------------------------------------------------- scroll reveal
   Only hidden when JavaScript is running; content is always reachable. */

.js .reveal {
  opacity: 0;
  transform: translate3d(0, 1.1rem, 0);
  transition: opacity 2s var(--ease), transform 2.4s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ----------------------------------------------------------------- mobile */

@media (max-width: 760px) {
  .masthead { padding-top: calc(1.1rem + env(safe-area-inset-top)); }
  .wordmark { font-size: 0.64rem; letter-spacing: 0.38em; }
  /* Stays visible (and reachable) above the open menu overlay. */
  .js .wordmark { position: relative; z-index: 2; }

  /* Without JavaScript the three links stay visible in a compact row. */
  .nav ul { gap: 1.1rem; }
  .nav a { font-size: 0.6rem; letter-spacing: 0.2em; }
  html:not(.js) .masthead { flex-direction: column; gap: 0.9rem; }

  .js .menu-toggle {
    display: block;
    position: relative;
    z-index: 2;
    padding: 0.6rem 0 0.6rem 1rem;
    margin: -0.6rem 0;
    border: 0;
    background: none;
    font: 400 0.64rem/1 var(--sans);
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--silver);
    cursor: pointer;
  }
  .menu-toggle__close { display: none; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__close { display: inline; }

  .js .nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    background: var(--black);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s var(--ease), visibility 0s linear 0.9s;
  }
  .js .nav.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.9s var(--ease), visibility 0s;
  }
  .js .nav ul {
    flex-direction: column;
    align-items: center;
    gap: 2.6rem;
  }
  .js .nav a {
    font-family: var(--serif);
    font-weight: 300;
    font-size: 2.1rem;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--silver);
  }
  .menu-open { overflow: hidden; }

  .hero__brand { letter-spacing: 0.48em; margin-right: -0.48em; }

  .vision__line--left,
  .vision__line--right { margin-left: 0; margin-right: 0; }
  .vision__line--right { margin-left: auto; text-align: right; }

  .mission__name { letter-spacing: 0.22em; margin-right: -0.22em; }

  .development {
    grid: none / minmax(0, 1fr);
    gap: 0;
  }
  .facts div { grid: none / minmax(0, 1fr); gap: 0.3rem; }
}

/* ---------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .sky--hero img { animation: none; opacity: 1; transform: scale(1.02); }
  .mission__metal { animation: none; background-position: 0 0, 50% 0; }
  .scroll-cue span { display: none; }
  .js .reveal { opacity: 1; transform: none; }
  /* The menu overlay and its links appear at once (the universal rule above
     would otherwise give descendants a short "all" transition, delaying their
     inherited visibility), so focus can move into it immediately. */
  .js .nav,
  .js .nav * { transition: none !important; }
}

/* -------------------------------------------------------------------- 404 */

.lost {
  display: grid;
  place-content: center;
  gap: 2rem;
  min-height: 100vh;
  min-height: 100svh;
  padding: 4rem var(--gutter);
  text-align: center;
}
.lost .label { margin-right: -0.42em; }
.lost__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.1;
  color: var(--white);
}
