/* ------------------------------
   TWILIGHT GLOOM STUDIOS — Global Dark Theme
   - Header lockup: title/tagline align left & right together
   - Burger shows up earlier (≤1024px) to avoid crowding
--------------------------------*/

@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500;700&family=Inter:wght@300;400;500;600&family=Special+Elite&display=swap");

/* ===== Theme tokens ===== */
:root {
  --bg: #000000;
  --fg: #ffffff;
  --muted: #cfcfcf;
  --accent: #852C2E;
  --maxw: 1100px;
  --gutter: clamp(16px, 3vw, 28px);
  --radius: 14px;
  --shadow: 0 4px 12px rgba(0, 0, 0, .35);
  --rule: color-mix(in oklab, var(--fg), transparent 88%);
}

/* ===== Base setup ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'EB Garamond', serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
main.wrap, header .wrap, footer .wrap { padding-inline: var(--gutter); }
.visually-hidden{position:absolute!important;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;width:1px;overflow:hidden;white-space:nowrap;}

/* --------------------------------
   HEADER
--------------------------------*/
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(140%) blur(6px);
  background: color-mix(in oklab, var(--bg), transparent 10%);
  border-bottom: 1px solid var(--rule);
}
.head {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}

/* Brand (title drives width; tagline matches via JS) */
.brand {
  text-decoration: none;
  color: inherit;
  display: inline-block;         /* lets us lock to the title width */
  text-align: left;
  line-height: 1.05;
  max-width: 100%;
}
.brand .title {
  font-family: 'Special Elite', cursive;
  /* Fluid scaling so width tracks viewport naturally */
  font-size: clamp(26px, 4.6vw, 44px);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1;
  white-space: nowrap;           /* single line; sets target width */
}
.brand .tag {
  margin-top: 4px;
  /* Slightly smaller base; JS will fine-tune */
  font-size: clamp(15px, 2.0vw, 24px);
  color: var(--muted);
  font-family: 'Special Elite', cursive;
  white-space: nowrap;           /* keep on one line */
  line-height: 1.05;
}

/* Nav (desktop/tablet inline by default) */
nav ul {
  list-style: none;
  display: flex;
  gap: clamp(12px, 2vw, 20px);
  align-items: baseline;
}
nav a {
  text-decoration: none;
  color: var(--fg);
  font-weight: 600;
  position: relative;
  font-size: 0.95rem;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: 2px;
}
nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
  opacity: .7;
}
nav a:hover { color: var(--accent); }
nav a:hover::after { transform: scaleX(1); }

/* --------------------------------
   HERO / SLIDESHOW
--------------------------------*/
.hero { padding: clamp(8px, 2.5vw, 20px) 0 clamp(10px, 2.5vw, 20px); }
.hero .image {
  position: relative;
  aspect-ratio: 21 / 9;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--rule);
  background: #0d0d0d;
  margin: 0 0 0.75rem 0;
  box-shadow: var(--shadow);
}
.hero .image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slideshow .slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  background: #000;
}
.slideshow .slide.active { opacity: 1; }
@media (min-height: 700px) { .hero .image { max-height: 65vh; } }

/* --------------------------------
   FOOTER
--------------------------------*/
footer {
  text-align: center;
  background: transparent;
  border-top: 1px solid var(--rule);
  padding: 40px 0 20px;
}

.home-thumbnail { text-align: center; margin: 40px 0; }
.home-thumbnail a {
  font-family: "Special Elite", cursive;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 2px;
  color: var(--fg);
  text-decoration: none;
  transition: color .25s ease;
}
.home-thumbnail a:hover { color: var(--accent); }

footer .hero_header {
  font-family: "EB Garamond", serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
  letter-spacing: 1px;
  margin: 0 0 12px 0;
}
footer .button a {
  font-family: "EB Garamond", serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
  text-decoration: none;
  transition: color .25s ease;
}
footer .button a:hover { color: var(--accent); }

.copyright {
  text-align: center;
  color: var(--fg);
  font-family: "EB Garamond", serif;
  font-size: 0.99rem;
  letter-spacing: 1px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
}

/* --------------------------------
   BURGER MENU: show earlier to avoid crowding
   We flip to burger at ≤1024px (was ≤640px)
--------------------------------*/
.nav-toggle {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}
.nav-burger { display: none; }

/* Switch to burger at mid widths and below */
@media (max-width: 1024px) {
  /* Use a tidy grid to keep brand left, burger right */
  .head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
  }

  /* Hide inline nav, show burger */
  header nav { display: none; }
  .nav-burger {
    display: inline-block;
    font-size: 1.4rem;
    line-height: 1;
    padding: 6px 10px;
    cursor: pointer;
    border: 1px solid var(--rule);
    border-radius: 8px;
    color: var(--fg);
    justify-self: end;
    z-index: 101;
  }
  .nav-burger:hover { color: var(--accent); }

  /* Ribbon menu panel (a bit wider on these mid widths) */
  #nav-toggle:checked ~ nav {
    display: block;
    position: absolute;
    top: calc(100% + 8px);
    right: var(--gutter);
    width: min(260px, 32vw);
    z-index: 200;
    background: rgba(0,0,0,.92);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 12px 12px;
    text-align: right;
    box-shadow: 0 10px 24px rgba(0,0,0,.45);
  }
  header nav ul {
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
  }
  header nav a { font-size: 1rem; padding: 4px 0; }
}

/* Keep previous small-phone rules; these inherit the burger mode cleanly */
@media (max-width: 640px) {
  .brand .title {
    font-size: min(24px, 6vw);
    letter-spacing: 0.03em;
    white-space: nowrap;
    line-height: 1;
  }
  .brand .tag {
    font-size: clamp(14px, 2.2vw, 20px);
    white-space: nowrap;
    line-height: 1.08;
  }

  /* Slightly narrower panel on very small screens */
  #nav-toggle:checked ~ nav {
    width: min(220px, 50vw);
  }

  /* Mobile hero: avoid crop */
  .hero .image {
    aspect-ratio: 21 / 9;
    width: 100%;
    height: auto;
    max-height: 55vh;
    overflow: hidden;
  }
  .slideshow .slide {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background: #000;
    opacity: 0 !important;
    transition: opacity 400ms ease-in-out !important;
    pointer-events: none;
  }
  .slideshow .slide.active {
    opacity: 1 !important;
    pointer-events: auto;
  }
}