/* ============================================================
   Landing page — name + nav centered; they slide to the edges
   (matching every other page) when you navigate.
   ============================================================ */

:root {
  --bg: #000000;
  --fg: #ffffff;
  /* mix-blend-difference chrome source (bar, space overlays) */
  --ink: #ffffff;
  --font-sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --fs-body: clamp(15px, 1.9vw, 18px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none !important;  /* always the custom + — never pointer/text/others */
}

/* Custom cursor: a "+" that inverts against the page, rotating into an "×"
   over anything clickable. */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}
.cursor__inner {
  position: absolute;
  inset: 0;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cursor__inner::before,
.cursor__inner::after {
  content: "";
  position: absolute;
  background: #fff;
}
.cursor__inner::before { left: 50%; top: 0; width: 1.5px; height: 100%; transform: translateX(-50%); }
.cursor__inner::after  { top: 50%; left: 0; height: 1.5px; width: 100%; transform: translateY(-50%); }
.cursor.is-x .cursor__inner { transform: rotate(45deg); }

html,
body {
  height: 100%;
}

/* Theme colour on the root too, so safe-area / overscroll strips show the page
   colour rather than a black band. */
html { background: var(--bg); }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  letter-spacing: -0.015em;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  /* `clip` (not `hidden`): clips overflow WITHOUT making the root a scroll container.
     A non-scrollable `overflow: hidden` root makes iOS keep the fixed background out of
     the status-bar / toolbar safe areas (the black bands); `clip` lets it fill. */
  overflow: clip;
}

/* Cross-fading blurred backgrounds */
.bg {
  position: fixed;
  inset: -15vmax;                 /* oversize so the blur has no hard edges */
  z-index: 0;
  pointer-events: none;
}

.bg__layer {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(80px) saturate(1.15);    /* soft, even blur — a touch lighter than before */
  transform: scale(1.1);
  opacity: 0;
  transition: opacity 1.6s ease;
}

.bg__layer.is-visible {
  opacity: 0.6;
}

/* The GiuLLM cover is a wordmark, not a photo — blur it a lot less so "Ask GiuLLM"
   stays readable as a background. */
.bg__layer--soft { filter: blur(48px) saturate(1.15); }

.bar {
  position: fixed;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 1;                       /* above the blurred backgrounds */
  display: flex;
  align-items: center;
  justify-content: center;          /* centered cluster (landing) */
  gap: clamp(20px, 3vw, 48px);
  padding-inline: clamp(20px, 2.2vw, 36px);
  font-size: var(--fs-body);
  mix-blend-mode: difference;
}

/* Spread state — logo to the left edge, nav to the right (every other page) */
.bar.spread {
  justify-content: space-between;
}

.logo {
  color: var(--ink);   /* inside the mix-blend-difference bar */
  text-decoration: none;
  letter-spacing: -0.015em;
  font-weight: 400;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: clamp(20px, 3vw, 48px);
}

.nav__link {
  color: var(--ink);   /* inside the mix-blend-difference bar */
  text-decoration: none;
  font-weight: 400;
  white-space: nowrap;
}

::selection { background: var(--fg); color: var(--bg); }
::-moz-selection { background: var(--fg); color: var(--bg); }

/* ---- Mobile: a white splash intro ----------------------------------------
   The landing becomes a brief intro: white screen, the wordmark slides in from
   the left to the vertical centre (left-aligned), holds, blurs out — then
   landing.js sends you straight to the Index. No blurred photos, no menu. */
@media (max-width: 760px) {
  :root { --fs-body: clamp(17px, 4.8vw, 20px); }

  html, body { background: #fff; color: #000; }
  .bg  { display: none; }        /* no blurred project photos */
  .nav { display: none; }        /* no menu — the splash goes to the Index on its own */

  .bar {
    mix-blend-mode: normal;
    flex-direction: row;
    justify-content: flex-start;   /* left-aligned … */
    align-items: center;           /* … and vertically centred (bar is at top:50%) */
    padding-inline: clamp(22px, 7vw, 40px);
  }
  .logo {
    color: #000;
    font-size: clamp(28px, 9vw, 44px);
    transform: translateX(-115vw);            /* start off-screen to the left */
    will-change: transform, filter, opacity;
  }
  .bar.is-in .logo {
    transform: translateX(0);
    transition: transform 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .bar.is-blur .logo {
    filter: blur(16px);
    opacity: 0;
    transition: filter 500ms ease, opacity 500ms ease;
  }
}
