/* =============================================================================
   POSING GLOW — Stylesheet

   Table of contents
     1. Fonts
     2. Reset
     3. Custom properties (design tokens)
     4. Page (html, body)
     5. Header (sticky nav)
     6. Mobile menu (dropdown)
     7. Grid heading ("FREE DOWNLOADS ↓")
     8. Album grid + cards
     9. End-note (ABOUT)
    10. Bottom footer
    11. Responsive (≤ 600px)
   ============================================================================= */


/* 1. Fonts ──────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "BL";
  src: url("BL______.TTF") format("truetype");
  font-weight: normal;
  font-style: normal;
}


/* 2. Reset ──────────────────────────────────────────────────────────────────── */

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


/* 3. Custom properties ──────────────────────────────────────────────────────── */

:root {
  --ink: #ffffff;                     /* primary text / foreground colour */
  --bg:  #f5f5f5;                     /* legacy light bg (used in a few places) */

  --gutter: 16px;                     /* horizontal page gutter */

  /* Page gradient (top → middle → bottom) */
  --page-gradient: linear-gradient(to bottom, #000000, #737270, #000000);

  /* Default cover size for desktop. Overridden per-card by main.js. */
  --cover-size: min(60vw, calc(90vh - 250px));
}


/* 4. Page ───────────────────────────────────────────────────────────────────── */

html {
  background-color: #000000;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  position: relative;
  background: var(--page-gradient);
  color: var(--ink);
  font-family: "BL", serif;
  letter-spacing: 0;
  margin: 0;
  padding: 0 var(--gutter);
  min-height: 100vh;
}


/* 5. Header ─────────────────────────────────────────────────────────────────── */

header {
  position: sticky;
  top: 0;
  z-index: 110;                       /* above .mobile-menu (100) so toggle stays clickable */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 0 calc(-1 * var(--gutter));
  padding: 8px var(--gutter);
  background-color: transparent;
  transition: transform 0.25s ease;
}

header.header--hidden {
  transform: translateY(-100%);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
}

.header-left  { justify-self: start; }
.header-right { justify-self: end; }

.site-name {
  justify-self: center;
  font-family: "BL", serif;
  font-size: 31px;
  line-height: 1.0;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink);
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  font-family: "clarendon-text-pro", serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background-color: transparent;
}

.contact-btn:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}


/* 6. Mobile menu (hidden on desktop, shown in media query at the bottom) ────── */

.menu-toggle {
  display: none;                      /* shown only on ≤ 600px */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: "BL", serif;
  font-size: 26px;
  line-height: 1.0;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink);
}

.mobile-menu {
  display: none;                      /* opened by JS toggling `.open` */
}

/* Stacked POSING / GLOW logo for mobile landing frame */
.mobile-hero {
  display: none;                      /* shown only on ≤ 600px */
}

/* Landing-page tagline (centered in the first viewport) */
.tagline {
  position: absolute;
  top: 50vh;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0 var(--gutter);
  max-width: calc(100vw - 2 * var(--gutter));
  font-family: "clarendon-text-pro", serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-align: center;
  color: var(--ink);
}


/* 7. Grid heading "FREE DOWNLOADS ↓" ───────────────────────────────────────── */

/* Acts as a spacer that pushes the first album card to the bottom of the
   viewport. The text is hidden (`visibility: hidden`) but kept in the DOM so
   the element's height (padding-top + text line-height) is preserved.
   `82px` ≈ header (~47px) + text (~31px) + 4px tweak. */
.grid-heading {
  visibility: hidden;
  text-align: center;
  font-family: "clarendon-text-pro", serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--ink);
  padding: calc(100vh - 82px) 0 0;
}


/* 8. Album grid + cards ─────────────────────────────────────────────────────── */

#grid {
  position: relative;
  z-index: 1;
  margin: 0 calc(-1 * var(--gutter));
  padding: 16px 0 0;
}

#grid.view-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10vh 0;                        /* vertical space between cards */
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 90vh;                       /* each card fills 90% of the viewport */
}

/* Cover (linked album artwork). Width comes from --cover-size, which main.js
   recalculates per card so cover + caption ≈ 90vh on desktop. */
.card-cover {
  display: block;
  position: relative;
  width: var(--cover-size);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
}

.card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: var(--ink);
}

.card-cover-placeholder span {
  font-family: "BL", serif;
  font-size: 26px;
  line-height: 1.0;
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: center;
  color: var(--bg);
}

/* Card body sits below the cover and inherits the same horizontal extents */
.card-body {
  width: calc(60vw + 200px);
  margin: 16px 0 0 calc(20vw - 100px);
  color: var(--ink);
}

/* "Album Title by Artist Name" — centered */
.card-byline {
  font-family: "clarendon-text-pro", serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-align: center;
  margin: 0;
}

.card-title  { font-style: normal; font-weight: 400; color: var(--ink); }
.card-artist {                      font-weight: 400; color: var(--ink); }

/* Description paragraph (containing the Download link) */
.card-caption {
  font-family: "clarendon-text-pro", serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0.03em;
  margin: 0;
}

.card-download {
  display: inline;
  font-family: "clarendon-text-pro", serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  color: var(--ink);
  cursor: pointer;
}

.card-download:hover {
  text-decoration: none;
}


/* 9. End-note (ABOUT) ───────────────────────────────────────────────────────── */

.end-note {
  margin: 0 calc(-1 * var(--gutter));
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-heading {
  font-family: "clarendon-text-pro", serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-align: center;
  color: var(--ink);
}

.end-note p {
  width: calc(60vw + 200px);
  margin: 0 0 0 calc(20vw - 100px);
  font-family: "clarendon-text-pro", serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-align: left;
  color: var(--ink);
}


/* 10. Bottom footer ─────────────────────────────────────────────────────────── */

footer {
  position: relative;
  z-index: 1;
  margin: 0 calc(-1 * var(--gutter));
  padding: 0;
  background-color: transparent;
  color: var(--ink);
}

.footer-bottom {
  padding: 0;
}

.footer-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 8px var(--gutter);
}

.footer-nav .header-right { grid-column: 3; }


/* 11. Responsive (≤ 600px) ──────────────────────────────────────────────────── */

@media (max-width: 600px) {

  /* Hide desktop-only elements ─────────────────────────────────────────────── */
  .contact-btn,
  .site-name {
    display: none;
  }

  .footer-nav {                       /* links live in the dropdown on mobile */
    display: none;
  }

  /* Header becomes a single centered row containing only the MENU toggle ─── */
  header {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
  }

  /* Stacked logo: centered in the first viewport */
  .mobile-hero {
    display: block;
    position: absolute;
    top: 50vh;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: "BL", serif;
    font-size: 56px;
    line-height: 1.0;
    letter-spacing: 0;
    text-transform: uppercase;
    text-align: center;
    color: var(--ink);
  }

  /* Tagline: centered in the second viewport, one viewport below the logo */
  .tagline {
    top: 150vh;
  }

  /* Push the album grid past the landing viewport */
  .grid-heading {
    padding-top: calc(100vh - 82px);
  }

  /* Mobile menu panel ─────────────────────────────────────────────────────── */
  .mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 56px var(--gutter) 24px;
    background: rgba(0, 0, 0, 0.92);
  }

  .mobile-menu.open {
    display: flex;
  }

  .mobile-menu-link {
    font-family: "clarendon-text-pro", serif;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.03em;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
  }

  /* Cards: full-width covers, content fits viewport with 16px gutters ─────── */
  .card {
    height: auto;
    min-height: 90vh;
  }

  .card-cover {
    width: calc(100vw - 2 * var(--gutter));
  }

  .card-body {
    width: auto;
    margin: 16px var(--gutter) 0;
  }

  .end-note p {
    width: auto;
    margin: 0 var(--gutter);
  }

  #grid {
    padding: 0;
  }

  #grid.view-grid {
    gap: 10vh 0;
  }

  /* Unify all Clarendon text at 22px on mobile ────────────────────────────── */
  .grid-heading,
  .about-heading,
  .end-note p,
  .card-byline,
  .card-caption,
  .card-download,
  .mobile-menu-link {
    font-size: 22px;
  }
}
