/* ==========================================================================
   CONSTANTS (Global CSS Variables)
   ========================================================================== */

:root {
 /* Glassmorphic Box Specs */
 --glass-bg: oklch(100% 0 0 / 0.06);
 --glass-border: oklch(100% 0 0 / 0.15);
 --glass-blur: 1.25rem;
 --glass-shadow: oklch(0% 0 0 / 0.4);
 --glass-inset-highlight: oklch(100% 0 0 / 0.2);
 /* Typography */
 --text-white: oklch(100% 0 0);
 --text-body: oklch(100% 0 0 / 0.75);
 --h1-gradient-end: oklch(88% 0 0);
}

h1, h2, h3, h4, h5, h6 { /* heading styles for a theatrical feel */
 margin: 0;
 padding: 0;
 font-family: "Architects Daughter", cursive;
 color: var(--text-white);
}

nav a, nav a:link, nav a:active, nav a:visited, nav a:hover { /* ensure all link states are styled consistently */
 font-family: 'Henny Penny', Courier, monospace;
 font-size: 1rem;
 text-decoration: none;
 color: var(--text-white);
}

article section {
 display: block;
 width: 100%;
}

 article section:not(:last-of-type)::after { /* horizontal bar between sections */
  content: "";
  display: flex;
  margin: 2rem auto;
  margin-left: 20%;
  margin-right: 20%;
  width: 60%;
  border: none;
  border-top: 1px solid var(--glass-border);
  /* Total height contribution = var(--section-divider-height) */
 }

article p { /* body text styling for readability and aesthetic consistency */
/* font-size: 1rem;*/
 margin: 0;
 color: var(--text-body);
 line-height: 1.5;
}

/* ==========================================================================
   GLASSMORPHIC REVEAL BOX DETAILS
   ========================================================================== */

article { /* the glass panel itself */
 background: var(--glass-bg);
 backdrop-filter: blur(var(--glass-blur));
 -webkit-backdrop-filter: blur(var(--glass-blur));
 border: 1px solid var(--glass-border);
 box-shadow: 0 0.25rem 2rem var(--glass-shadow), inset 0 0.0625rem 0 var(--glass-inset-highlight);
 container-type: inline-size;
 margin-top: 3vh;
}

@media (max-height: 40rem) { /* For vertically narrow screens, adjust content lower */
 main article {
  margin-top: 10vh;
 }
}

 article h1 { /* theatrical title treatment with dynamic scaling and gradient text */
/*  font-size: clamp(1rem, calc(78vw / 20), 1.5rem);*/
  margin-top: 1rem;
  margin-right: auto;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-white) 0%, var(--h1-gradient-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
 }

/*@container (min-width: 34rem) {*/ /* when the article is wide enough, allow the h1 to expand to its full size without clipping */
 /*article h1 {
  font-size: 2rem;
 }
}*/

/* ==========================================================================
   Article layout
   ========================================================================== */
article {
 overflow: visible; /* Allow pseudo-element image to bleed past the glass edge */
 container-type: inline-size; /* Safely monitors width changes only */
 container-name: article; /* Optional: Names the container */
}

 article section {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 0.5rem;
  grid-auto-rows: auto;
  container-type: inline-size; /* Safely monitors width changes only */
  container-name: article-section; /* Optional: Names the container */
 }

  article section > * {
   grid-column: 1;
  }

  article section::after {
   grid-column: 1 / -1;
   grid-row: auto;
  }

  article section:first-of-type::before { /* image for first section */
   grid-column: 2;
   grid-row: 1 / span 100; /* span multiple rows to let text wrap cleanly on the left */
   background: url("/images/platypus_concession.webp") no-repeat center / contain;
   content: "";
   display: block;
   aspect-ratio: 1;
   margin: 0.25rem;
   height: 100%;
   max-height: min(50vh, 50vw);
   min-height: 5rem;
  }

@container article (max-width: 25rem) {
 section {
  font-size: smaller;
 }

  article section:first-of-type::before {
   grid-column: 1;
  }
}