/* ==========================================================================
   A rangements — design system
   Plain CSS, no build step. Edit the variables below to re-skin the whole site.
   Palette: earthy browns / greens / cream (film-photography, analogue warmth).
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------- */
:root {
  /* Earthy palette — drawn from the Sin Fear film photography:
     cream walls, warm wood, olive plant green, dusky clay shadow. */
  --cream:    #EDE4D3;
  --sand:     #D8C5A4;
  --ochre:    #BC9263;
  --gold:     #DCA851;  /* warm gold highlight */
  --copper:   #C47E4B;  /* lightened copper */
  --clay:     #8A6A4B;
  --mauve:    #7C5A52;  /* the dusky brown-mauve of the artwork shadow */
  --espresso: #2A2118;
  --olive:    #797B4F;
  --moss:     #515D3C;
  --sage:     #9DA882;

  /* Roles */
  --bg:         #271F16;
  --bg-soft:    #332A1E;
  --surface:    rgba(237, 228, 211, 0.045);
  --surface-hi: rgba(237, 228, 211, 0.09);
  --text:       var(--cream);
  --text-dim:   rgba(237, 228, 211, 0.62);
  --line:       rgba(237, 228, 211, 0.14);
  --accent:     var(--copper);
  --bg-green:   #112413;  /* deep forest green to pair with the brown */

  /* Gold-to-copper sheen — static, warm metallic run (no rainbow, no movement) */
  --iridescent: linear-gradient(100deg, var(--gold) 0%, var(--ochre) 45%, var(--copper) 100%);

  /* Type — swap --font-display in one place to re-font the site */
  --font-display: "EB Garamond", "Footlight MT", Georgia, serif;
  --font-body:    "EB Garamond", Georgia, serif;

  /* Layout */
  --maxw: 1200px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --header-h: 72px;
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: clamp(1.02rem, 0.55vw + 0.9rem, 1.18rem);
  letter-spacing: 0.005em;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }

/* ---- Film-grain overlay (sits above everything, ignores pointer) --------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---- Typography ---------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; letter-spacing: 0.01em; }
h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); }

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-family: var(--font-body);
}

.lead { font-size: clamp(1.15rem, 1.4vw, 1.4rem); color: var(--text-dim); max-width: 60ch; }

/* Warm sheen text (subtle, static — no shimmer animation) */
.iridescent {
  background: var(--iridescent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Layout helpers ------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4rem, 9vw, 8rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.stack > * + * { margin-top: 1.1rem; }
.center { text-align: center; }
main { min-height: 70vh; }

/* ---- Header / navigation ------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(34, 27, 20, 0.72);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  border-bottom-color: var(--line);
}
.site-header__inner {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.4rem; letter-spacing: 0.04em;
  white-space: nowrap;
}
.brand span { font-weight: 500; }
/* Header wordmark — copper and a touch larger */
.site-header .brand { font-size: 1.7rem; color: var(--copper); }

/* Desktop nav (right aligned) */
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.2rem); }
.nav a {
  position: relative;
  font-size: 0.95rem; letter-spacing: 0.02em;
  color: var(--text-dim);
  padding-block: 0.4rem;
  transition: color 0.3s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--accent);
  transition: width 0.35s var(--ease);
}
.nav a:hover, .nav a:focus-visible { color: var(--text); }
.nav a:hover::after, .nav a:focus-visible::after, .nav a[aria-current="page"]::after { width: 100%; }
.nav a[aria-current="page"] { color: var(--text); }

/* Hamburger (hidden on desktop) */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  padding: 0; position: relative; z-index: 120;
  color: var(--text);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 11px; right: 11px; height: 1.5px;
  background: currentColor; transition: transform 0.35s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle span { top: 50%; transform: translateY(-50%); }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
body.menu-open .nav-toggle span { background: transparent; }
body.menu-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
body.menu-open .nav-toggle span::after  { transform: translateY(-7px) rotate(-45deg); }

/* Mobile slide-in panel (from the RIGHT) */
/* z-index 90 keeps the scrim BELOW the fixed header's stacking context (z-index 100),
   so the slide-in nav inside the header stays above the scrim — tappable, not blurred. */
.nav-scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15, 12, 8, 0.5); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0.35s;
}
body.menu-open .nav-scrim { opacity: 1; visibility: visible; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  color: var(--text-dim);
  font-size: 0.85rem;
  /* gradual fade from the dark brown base down into a deep copper */
  background: linear-gradient(to bottom, #271f16 0%, #7a4d2b 100%);
}
.site-footer__inner {
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; flex-wrap: wrap; gap: 1.5rem 2rem; align-items: center; justify-content: space-between;
}
.site-footer a:hover { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.95rem; letter-spacing: 0.02em;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); background: var(--surface);
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); border-color: var(--copper); background: var(--surface-hi); }
.btn--ghost { background: transparent; }
.btn--solid { background: var(--ochre); border-color: var(--ochre); color: var(--espresso); }
.btn--solid:hover { background: var(--olive); border-color: var(--olive); color: var(--cream); }

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  text-align: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  /* Calm warm wash: brown settling into a deep copper at the base. */
  background:
    radial-gradient(110% 80% at 50% 20%, rgba(196,126,75,0.16), transparent 60%),
    linear-gradient(168deg, #2f261b 0%, #2a2016 50%, #6b4327 100%);
}
.hero__bg::before { /* slot for a future photographic background image */
  content: ""; position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.0; /* set an image + raise opacity when artwork is supplied */
  mix-blend-mode: overlay;
}
.hero__inner { padding-inline: var(--gutter); max-width: 980px; }
.hero__wordmark {
  font-size: clamp(3rem, 12vw, 9rem);
  /* Roomier line-height + padding so descenders (the 'g') aren't clipped by background-clip:text */
  line-height: 1.12; letter-spacing: 0.02em; margin-bottom: 0.3em;
  padding-bottom: 0.12em;
}
.hero__tagline { font-size: clamp(1.1rem, 2vw, 1.5rem); color: var(--text-dim); font-style: italic; }
.logo-slot { /* swap in the real logo here next week */
  display: inline-block; margin-bottom: 1.5rem; min-height: 1px;
}

.scroll-cue {
  position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%);
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-dim);
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
}
.scroll-cue::after { content: ""; width: 1px; height: 38px; background: var(--line); animation: cue 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0%,100% { transform: scaleY(0.3); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ---- Cards / grids ------------------------------------------------------- */
.grid { display: grid; gap: clamp(1rem, 2vw, 1.75rem); }
.grid--cards  { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--canvas { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* Stacked single-column list (links, contact cards) */
.stack-col { display: flex; flex-direction: column; gap: 1rem; max-width: 600px; }

.card {
  position: relative; display: block;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--copper); box-shadow: 0 18px 40px -24px rgba(0,0,0,0.85); }

/* Link row (streaming / social) — stacked vertically with brand icon */
.link-tile {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 1.3rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  /* same brown -> copper run as the footer banner, so the rows stand out */
  background: linear-gradient(100deg, #2a2016 0%, #7a4d2b 100%);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.link-tile:hover { transform: translateY(-2px); border-color: var(--copper); background: linear-gradient(100deg, #34281a 0%, #95612f 100%); box-shadow: 0 12px 26px -18px rgba(0,0,0,0.8); }
.link-tile__left { display: flex; align-items: center; gap: 1rem; }
.link-tile__icon { width: 22px; height: 22px; flex: none; color: var(--cream); opacity: 0.95; transition: opacity 0.3s var(--ease); }
.link-tile:hover .link-tile__icon { opacity: 1; }
.link-tile__name { font-size: 1.1rem; letter-spacing: 0.01em; color: var(--cream); }
.link-tile__arrow { color: var(--cream); opacity: 0.8; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.link-tile:hover .link-tile__arrow { transform: translate(3px, -3px); opacity: 1; }

/* Canvas video tile (vertical, Spotify-canvas style) */
.canvas-tile { aspect-ratio: 9 / 16; }
.canvas-tile__media {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  background: linear-gradient(160deg, var(--moss), var(--clay));
}
.canvas-tile__label {
  position: absolute; inset: auto 0 0 0; padding: 1rem;
  background: linear-gradient(to top, rgba(15,12,8,0.85), transparent);
  font-size: 0.95rem; letter-spacing: 0.02em;
}

/* Production showcase card */
.work-card__media { aspect-ratio: 4 / 3; background: linear-gradient(150deg, var(--clay), var(--moss)); position: relative; overflow: hidden; }
/* Drop an <img> inside .work-card__media and it fills the card (sits above the gradient/placeholder) */
.work-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.card:hover .work-card__media img { transform: scale(1.04); }
.work-card__media img { transition: transform 0.6s var(--ease); }
.work-card__media .ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(236,227,210,0.6); font-size: 0.95rem; letter-spacing: 0.04em; font-family: var(--font-display); }
.work-card__body { padding: 1.1rem 1.25rem 1.35rem; }
.work-card__role { color: var(--text-dim); font-size: 0.85rem; letter-spacing: 0.04em; }

/* Spotify embeds */
.embed-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.embed-grid iframe { width: 100%; border: 0; border-radius: 12px; }

/* Artwork-forward track card (cover dominates; click loads the live Spotify player) */
.track-card {
  /* translucent, on-brand card so the page shows through */
  background: rgba(196, 126, 75, 0.10);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.8rem 0.8rem 1rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: left;
}
.track-card__art {
  position: relative; display: block; width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0; border: 0; cursor: pointer; overflow: hidden;
  border-radius: 12px; background: rgba(0,0,0,0.18);
}
.track-card__art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s var(--ease), filter 0.4s var(--ease);
}
.track-card__art:hover img, .track-card__art:focus-visible img { transform: scale(1.04); filter: brightness(0.78); }
/* Play button — a copper disc with a cream triangle, fades up on hover */
.track-card__play {
  position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%) scale(0.9);
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--copper); display: grid; place-items: center;
  opacity: 0; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.7);
}
.track-card__play::before {
  content: ""; margin-left: 4px;
  border-style: solid; border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--cream);
}
.track-card__art:hover .track-card__play,
.track-card__art:focus-visible .track-card__play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.track-card__meta { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.85rem 0.35rem 0; }
.track-card__title { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.2; }
.track-card__artist { color: var(--text-dim); font-size: 0.9rem; letter-spacing: 0.02em; }
/* Live player swapped in on click */
.track-card__player { width: 100%; height: 352px; border: 0; border-radius: 12px; display: block; }

/* ---- About catchphrase --------------------------------------------------- */
.creed { text-align: center; padding-block: clamp(5rem, 14vw, 12rem); }
.creed p { font-family: var(--font-display); font-size: clamp(1.8rem, 5vw, 3.4rem); line-height: 1.35; }
.creed .line { display: block; opacity: 0; transform: translateY(14px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.creed .line.is-visible { opacity: 1; transform: none; }

/* ---- Software teaser ----------------------------------------------------- */
.teaser { min-height: 78vh; display: grid; place-items: center; text-align: center; }
.badge {
  display: inline-block; font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--sage); border: 1px solid var(--sage); border-radius: 100px; padding: 0.4rem 1rem; margin-bottom: 1.5rem;
}

/* ---- Section heading ----------------------------------------------------- */
.section-head { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head .eyebrow { display: block; margin-bottom: 0.9rem; }

/* ---- Scroll reveal ------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---- Page hero (interior pages) ------------------------------------------ */
.page-hero { padding-top: calc(var(--header-h) + clamp(3rem, 8vw, 6rem)); padding-bottom: clamp(1.5rem, 4vw, 3rem); }

/* ---- Centered pages (Music / Production / Contact) ----------------------- */
.page-centered .page-hero,
.page-centered .section-head { text-align: center; }
.page-centered .lead { margin-inline: auto; }
.page-centered .stack-col { margin-inline: auto; }
/* give the iridescent page titles room so descenders (the 'g') aren't clipped */
.page-hero h1 { line-height: 1.15; padding-bottom: 0.08em; }

/* Centre the item groups (featured tracks, canvases, selected work) instead of
   left-packing them — flex-wrap keeps them centred no matter how many there are. */
.page-centered .embed-grid,
.page-centered .grid--canvas,
.page-centered .grid--cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.page-centered .embed-grid > *  { flex: 0 1 340px; }
.page-centered .grid--canvas > * { flex: 0 1 220px; }
.page-centered .grid--cards > *  { flex: 0 1 300px; }

/* ==========================================================================
   Responsive — mobile menu opens from the RIGHT
   ========================================================================== */
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; top: 0; right: 0; z-index: 110;
    height: 100svh; width: min(78vw, 340px);
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 1.6rem;
    padding: var(--gutter);
    background: rgba(34, 28, 20, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
  }
  body.menu-open .nav { transform: translateX(0); }
  .nav a { font-size: 1.15rem; }
  .nav a::after { display: none; }
}

@media (min-width: 821px) {
  .nav-scrim { display: none; }
}

/* ---- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal, .creed .line { opacity: 1; transform: none; }
}
