/* ==========================================================================
   KRingg.com — modern static rebuild
   A refresh that keeps the spirit of the original: dark slate panel,
   small-caps headings, the wordmark + portrait. Now responsive,
   semantic, and accessible. Zero build step.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------- */
:root {
  --panel:       #4f5f6f;   /* the original blue-grey */
  --panel-dark:  #3c4856;
  --panel-light: #61748a;
  --ink:         #1c2127;   /* body text on white */
  --ink-soft:    #56606c;
  --paper:       #ffffff;   /* content surface */
  --paper-2:     #f4f6f8;
  --muted:       #cfd6de;   /* light text on panel */
  --muted-soft:  #9aa7b5;
  --accent:      #2f6fb0;   /* modernized link blue */
  --accent-2:    #4080c4;
  --line:        #e2e6ea;
  --radius:      10px;
  --shadow:      0 10px 30px rgba(0, 0, 0, .25);
  --maxw:        1050px;
  --space-1:      10px;     /* base spacing unit; multiples (1x/2x/4x) used throughout */
  --space-2:     calc(var(--space-1) * 2);   /* 2x base */
  --space-4:     calc(var(--space-1) * 4);   /* 4x base */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, "Verdana", sans-serif;
}

/* On small screens, halve the larger spacings for a more compact layout. */
@media (max-width: 768px) {
  :root {
    --space-2: var(--space-1);            /* 2x -> 1x */
    --space-4: calc(var(--space-1) * 2);  /* 4x -> 2x */
  }
}

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Color shown in the overscroll/bounce area; a neutral mid-gray matching the
     gray background field. */
  background: #6b6b6b;
}
body, h1, h2, h3, p, ul, figure, table { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ---- Page shell ---------------------------------------------------------- */
body {
  font-family: var(--sans);
  line-height: 1.65;
  color: var(--ink);
  background: transparent;   /* blurred image is on body::before; html paints the bounce */
  min-height: 100vh;
  min-width: 400px;          /* hard floor; narrower viewports scroll horizontally */
}

/* Fixed, blurred abstract geometric background behind all content. A soft
   diamond lattice (two crossing sets of diagonal bands) in neutral grays
   (75% / 50%) over a ~#a2a2a2 field, matching the original bkgnd.jpg's neutral
   coloration, under a neutral darkening gradient like the original site used.
   Overscanned
   (inset: -50px) so the blur leaves no lighter rim at the viewport edges. */
body::before {
  content: "";
  position: fixed;
  inset: -50px;
  z-index: -1;
  background:
    linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .5)),
    repeating-linear-gradient( 45deg, rgba(75%, 75%, 75%, .2) 0 100px, rgba(50%, 50%, 50%, .2) 100px 200px),
    repeating-linear-gradient(-45deg, rgba(75%, 75%, 75%, .1) 0 100px, rgba(50%, 50%, 50%, .1) 100px 200px),
    #a2a2a2;
  filter: blur(25px);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--space-2);   /* gap from viewport edge to the card */
}

.card {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ---- Masthead ------------------------------------------------------------ */
.masthead {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding: var(--space-2);
  background: linear-gradient(180deg, var(--panel-light), var(--panel));
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.masthead__wordmark {
  width: min(350px, 70vw);
  /* Match the breadcrumb's drop shadow (same offset/color as its text-shadow) */
  filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, .4));
}
.masthead__portrait { display: none; }   /* shown only on mobile (sidebar portrait moves up here) */
.masthead__crumb {
  margin-left: auto;
  color: var(--muted);
  font-variant: small-caps;
  letter-spacing: .04em;
  font-size: .95rem;
  text-shadow: 1px 1px rgba(0, 0, 0, .4);
}

/* ---- Layout: nav + content ---------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: 225px 1fr;
  gap: 0;
}
@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
}

/* ---- Navigation ---------------------------------------------------------- */
.nav { padding: var(--space-2); }
.nav__portrait {
  width: 100%;                       /* fill the nav column so its side spacing matches the rest */
  border-radius: var(--radius);
  border: 2.5px solid rgba(255, 255, 255, .85);
  margin: 0 0 var(--space-2);
}
.nav__toggle { display: none; }

.nav a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: .03em;
  padding: var(--space-1);
  border-radius: var(--radius);
  border-left: 2.5px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a.sub { padding-left: calc(var(--space-1) * 2); font-size: .92em; color: var(--muted-soft); }   /* fixed indent (doesn't halve on mobile) */
.nav a[aria-current="page"] {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border-left-color: var(--accent-2);
}
.nav a:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2.5px solid var(--accent-2);
  outline-offset: 2px;
}

/* ---- Content surface ----------------------------------------------------- */
.content {
  background: var(--paper);
  margin: var(--space-2);
  margin-left: 0;
  margin-bottom: 0;          /* footer's padding owns the gap to the footer text */
  border-radius: var(--radius);
  padding: var(--space-2);
}
@media (max-width: 768px) {
  .content { margin-left: var(--space-2); margin-top: 0; }
}

.content h1 {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-variant: small-caps;
  letter-spacing: .01em;
  color: var(--panel-dark);
  margin: var(--space-2) 0;
}
.content h1:first-child { margin-top: 0; }
.content h2 {
  font-size: 1.02rem;
  color: var(--ink);
  margin: 1.5rem 0 .35rem;
  line-height: 1.45;
}
.content p { margin: 0 0 var(--space-2); text-align: justify; }
.content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(47, 111, 176, .35);
  transition: color .2s, border-color .2s;
}
.content a:hover { color: var(--panel-dark); border-bottom-color: currentColor; }
.content hr { border: 0; height: 1px; background: var(--line); margin: var(--space-2) 0; }
.content em { font-style: italic; }
.content > :last-child { margin-bottom: 0; }   /* don't add to the content's bottom padding */

.lead { font-size: 1.08rem; color: var(--ink-soft); }

/* Floated figures */
.figure-left, .figure-right { max-width: 150px; margin: .2rem 0 var(--space-2); }
.figure-left  { float: left;  margin-right: 1.25rem; }
.figure-right { float: right; margin-left: 1.25rem; }
.figure-left img, .figure-right img { border-radius: var(--radius); }
@media (max-width: 525px) {
  .figure-left, .figure-right { float: none; max-width: 50%; margin: 0 auto var(--space-2); }
}

/* ---- Cards / grids ------------------------------------------------------- */
.albums {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0;
}
.album {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2);
}
.album img { border-radius: var(--radius); margin-bottom: .75rem; }
.album dl { display: grid; grid-template-columns: auto 1fr; gap: .15rem .6rem; margin: 0; font-size: .92rem; }
.album dt { font-weight: 700; color: var(--ink-soft); font-variant: small-caps; }
.album dd { margin: 0; }

/* ---- Discography (composer) --------------------------------------------- */
.release { margin: 2rem 0; }
.release:first-child { margin-top: 0; }   /* no extra gap above the first album */
.release > h1:first-child { margin-top: 0; }
.release__head {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.release__cover {
  flex: 0 0 175px;
  width: 175px;
  max-width: 100%;
  border-radius: var(--radius);
  align-self: flex-start;
}
.release__intro { flex: 1 1 325px; min-width: 0; }
.release__intro > p:first-child { margin-top: 0; }
@media (max-width: 525px) {
  .release__cover { flex-basis: 150px; width: 150px; margin: 0 auto; }
}
.tracklist {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-2) 0;
  font-size: .94rem;
}
.tracklist th, .tracklist td {
  text-align: left;
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--line);
}
.tracklist th { font-variant: small-caps; color: var(--ink-soft); }
.tracklist td.num, .tracklist td.dl { text-align: center; white-space: nowrap; }
.stars { color: #e0a417; letter-spacing: 1px; }
.stores { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: var(--space-2) 0; }
.stores a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.stores a:hover { background: #fff; border-color: var(--accent); color: var(--accent); }
.stores img { width: 25px; height: 25px; }

/* ---- Embeds (video) ------------------------------------------------------ */
.embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: var(--space-2) 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Contact form -------------------------------------------------------- */
.form { display: grid; gap: var(--space-2); max-width: 550px; }
.form label { font-weight: 700; font-variant: small-caps; color: var(--ink-soft); display: block; margin-bottom: .3rem; }
.form input[type="text"],
.form input[type="email"],
.form textarea {
  width: 100%;
  font: inherit;
  padding: .6rem .7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
}
.form textarea { min-height: 150px; resize: vertical; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; }
.form legend { font-weight: 700; font-variant: small-caps; color: var(--ink-soft); padding: 0 .4rem; }
.form .choice { display: flex; gap: .5rem; align-items: center; margin: .35rem 0; }
.honeypot { position: absolute; left: -9999px; }
.btn {
  justify-self: start;
  font: inherit;
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: .03em;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  padding: .7rem 1.5rem;
  cursor: pointer;
  transition: background .2s;
}
.btn:hover { background: var(--panel-dark); }

/* ---- Error pages --------------------------------------------------------- */
.error { text-align: center; }
.error img { max-width: 325px; margin: 1.5rem auto; border-radius: var(--radius); }

/* ---- Footer -------------------------------------------------------------- */
.footer {
  text-align: center;
  color: var(--muted-soft);
  font-size: .85rem;
  padding: var(--space-2) var(--space-4);
}
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: #fff; }

/* ---- Mobile nav ---------------------------------------------------------- */
@media (max-width: 768px) {
  /* Portrait moves up beside the wordmark; the nav becomes a full-width menu button + popup. */
  .masthead { flex-wrap: nowrap; }   /* keep avatar + wordmark on one line */
  .masthead__crumb { display: none; }
  .masthead__wordmark { flex: 0 1 350px; min-width: 0; width: auto; }   /* hold 350px, shrink only when the row is tight */
  .masthead__portrait {
    display: block;
    width: 75px;
    height: 75px;
    object-fit: cover;
    flex: 0 0 auto;
    border-radius: var(--radius);
    border: 2.5px solid rgba(255, 255, 255, .85);
  }
  .nav__portrait { display: none; }
  .nav__menu { position: relative; }   /* full-width; anchors the popup */
  .nav__toggle {
    display: block;
    width: 100%;
    text-align: center;
    font: inherit;
    font-variant: small-caps;
    font-weight: 700;
    color: var(--muted);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius);
    padding: var(--space-1);          /* same height as a menu entry */
    cursor: pointer;
  }
  /* Links open as a rounded popup flush below the button, matching its width. */
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 0;
    overflow: hidden;          /* clip item highlights to the rounded corners */
    background: var(--panel-dark);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  /* When open, fuse the button and popup into one continuous shape. */
  .nav__links.open {
    display: block;
    border-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
  .nav__menu:has(.nav__links.open) .nav__toggle {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  .nav a { border-radius: 0; }   /* square item highlights; popup corners stay rounded via overflow */
}
