/* ==========================================================================
   Landing page (index.html)
   A full-screen painting with the artist's name. The round menu button
   (top left) washes the painting out, recolours the name and reveals the menu.
   ========================================================================== */

@font-face { font-family: "Montserrat"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../fonts/montserrat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2"); }

:root {
  --intro-ink: #111;         /* name, menu icon and links when the menu is open */
  --intro-text: #1f1f1f;
  --intro-wash: rgba(250, 250, 249, 0.62);   /* raise towards 1 for a whiter overlay */
  --intro-speed: 0.6s;
  --intro-font: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

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

html, body { height: 100%; }

body.intro {
  margin: 0;
  overflow: hidden;
  background: #2a2a2a;
  font-family: var(--intro-font);
  -webkit-font-smoothing: antialiased;
}

/* ---------- painting + wash ---------- */

.intro-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;          /* keeps the painting's proportions, crops to fill */
  object-position: 50% 45%;   /* which part stays in view when cropped */
}

.intro-wash {
  position: fixed;
  inset: 0;
  background: var(--intro-wash);
  opacity: 0;
  transition: opacity var(--intro-speed) ease;
  pointer-events: none;
}
.menu-open .intro-wash { opacity: 1; }

/* ---------- centre: name + menu ---------- */

.intro-centre {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}

.intro-name {
  margin: 0;
  color: #fff;
  font-weight: 600;
  font-size: clamp(2.1rem, 6.2vw, 5rem);
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.35);
  transition: color var(--intro-speed) ease, text-shadow var(--intro-speed) ease;
}
.menu-open .intro-name {
  color: var(--intro-ink);
  text-shadow: none;
}

.intro-nav {
  margin-top: 2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--intro-speed) ease, transform var(--intro-speed) ease,
              visibility 0s linear var(--intro-speed);
}
.menu-open .intro-nav {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity var(--intro-speed) ease 0.1s, transform var(--intro-speed) ease 0.1s,
              visibility 0s;
}

.intro-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.intro-nav a {
  color: var(--intro-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.9);  /* keeps links readable over the painting */
  text-transform: uppercase;
  transition: color 0.2s, text-shadow 0.2s;
}
.intro-nav a:hover,
.intro-nav a:focus-visible {
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.55);  /* dark halo so white text stays readable */
}

@media (max-width: 520px) {
  .intro-nav ul { flex-direction: column; gap: 1.1rem; }
  .intro-nav a { font-size: 0.9rem; }
}

/* ---------- social icons (bottom) ---------- */

.intro-social {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 2.25rem;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--intro-speed) ease, visibility 0s linear var(--intro-speed);
}
.menu-open .intro-social {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--intro-speed) ease 0.15s, visibility 0s;
}
.intro-social a { color: var(--intro-ink); display: block; padding: 0.25rem; }
.intro-social a:hover,
.intro-social a:focus-visible { color: #fff; }
.intro-social a:hover svg,
.intro-social a:focus-visible svg { filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.55)); }
.intro-social svg { filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9)); }
.intro-social svg { width: 18px; height: 18px; display: block; }

/* ---------- menu button (top left) ---------- */

.menu-button {
  position: fixed;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 5;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.35));   /* visible on light or dark paint */
  transition: filter var(--intro-speed) ease;
}
.menu-button:focus-visible { outline: 2px solid var(--intro-ink); outline-offset: 2px; }

.menu-button span {
  position: absolute;
  left: 12px;
  width: 32px;
  height: 2.5px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.35s ease, opacity 0.25s ease, background var(--intro-speed) ease;
}
.menu-button span:nth-child(1) { top: 17px; }
.menu-button span:nth-child(2) { top: 27px; }
.menu-button span:nth-child(3) { top: 37px; }

.menu-open .menu-button { filter: none; }
.menu-open .menu-button span { background: var(--intro-ink); }
.menu-open .menu-button span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.menu-open .menu-button span:nth-child(2) { opacity: 0; }
.menu-open .menu-button span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

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

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
