/* =============================================
   THE GLADE - Editorial / Magazine variant
   Same warm palette, bigger type, more whitespace
   ============================================= */

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

:root {
  --paper: #fbf6e9;
  --paper-warm: #f5ecd5;
  --cream: #fffcf2;
  --green-soft: #dde7c2;
  --green-mid: #a8c082;
  --green-deep: #6b8a4a;
  --green-shadow: #4a6a30;
  --gold: #b89968;
  --gold-deep: #8a6e3e;
  --ink: #3a4a26;
  --ink-soft: #7a8a64;
  --ink-deep: #2a3618;
}

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--paper);
  color: var(--ink-deep);
  line-height: 1.7;
  background-image:
    radial-gradient(ellipse at 5% 3%, rgba(221, 231, 194, 0.35) 0%, transparent 40%),
    radial-gradient(ellipse at 95% 97%, rgba(245, 228, 210, 0.4) 0%, transparent 40%);
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--ink-deep);
  font-weight: 500;
}

#wrapper {
  width: 92%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
}

/* =============================================
   Header - editorial style with thin lines
   ============================================= */

#header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 35px 0 30px 0;
  border-bottom: solid 1px var(--green-soft);
  position: relative;
}

#header::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--green-soft);
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-mark {
  color: var(--gold);
  font-size: 1.5em;
}

.logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8em;
  font-weight: 500;
  color: var(--green-deep);
  letter-spacing: 1px;
  font-style: italic;
}

#navigation {
  list-style-type: none;
}

.primarynav {
  display: inline-block;
  margin-left: 40px;
}

.primarynav a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15em;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 4px 0;
  font-style: italic;
  transition: color 0.2s;
  letter-spacing: 0.5px;
}

.primarynav a:hover {
  color: var(--gold);
}

.current {
  color: var(--ink-deep) !important;
  border-bottom: solid 1px var(--gold);
}

/* =============================================
   Audio control - refined
   ============================================= */

.audio-control {
  position: fixed;
  top: 28px;
  right: 28px;
  background-color: var(--cream);
  border: solid 1px var(--green-mid);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  font-size: 1.1em;
  color: var(--gold);
  transition: all 0.3s;
  box-shadow: 0 2px 12px rgba(184, 153, 104, 0.15);
}

.audio-control:hover {
  background-color: var(--paper-warm);
  border-color: var(--gold);
  color: var(--green-deep);
}

/* =============================================
   Hero - massive editorial title
   ============================================= */

#hero {
  padding: 100px 0 80px 0;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.vol-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05em;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 30px;
  font-weight: 500;
  font-style: italic;
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 7em;
  font-weight: 500;
  line-height: 0.95;
  color: var(--ink-deep);
  margin-bottom: 35px;
  letter-spacing: -0.03em;
}

.title-line {
  display: block;
}

.title-italic {
  font-style: italic;
  color: var(--green-deep);
  font-weight: 400;
}

.lede {
  font-size: 1.3em;
  color: var(--ink-soft);
  max-width: 480px;
  margin: 0 auto;
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  line-height: 1.5;
}

/* =============================================
   Character list - editorial vertical layout
   ============================================= */

#content {
  padding: 60px 0 80px 0;
}

.char-list {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.char-item {
  display: grid;
  grid-template-columns: 80px 1fr 1.2fr;
  gap: 50px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 30px 0;
  position: relative;
  transition: opacity 0.3s;
}



.char-item-reverse {
  grid-template-columns: 80px 1.2fr 1fr;
}

.char-item-reverse .char-item-image {
  order: 3;
}

.char-item-reverse .char-item-content {
  order: 2;
  text-align: right;
}

.char-item-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 4em;
  font-weight: 400;
  font-style: italic;
  color: var(--gold);
  line-height: 1;
  text-align: center;
  letter-spacing: -0.02em;
  align-self: start;
  padding-top: 15px;
}

.char-item-image {
  background-color: var(--paper-warm);
  height: 380px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  border: solid 1px var(--green-soft);
  transition: transform 0.4s, border-color 0.3s;
}

.char-item:hover .char-item-image {
  transform: translateY(-6px);
  border-color: var(--gold);
}

.char-item-image img {
  max-width: 80%;
  max-height: 92%;
  object-fit: contain;
  display: block;
  transition: transform 0.5s;
}

.char-item:hover .char-item-image img {
  transform: scale(1.03);
}

.char-item-content {
  padding: 20px 10px;
}

.char-item-role {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15em;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 18px;
  letter-spacing: 2px;
}

.char-item-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 5em;
  font-weight: 500;
  color: var(--ink-deep);
  line-height: 0.95;
  margin-bottom: 25px;
  letter-spacing: -0.02em;
}

.char-item-desc {
  font-family: 'Cormorant Garamond', serif;
  color: var(--ink-soft);
  font-size: 1.25em;
  margin-bottom: 30px;
  font-style: italic;
  line-height: 1.5;
  font-weight: 400;
}

.char-item-cta {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1em;
  color: var(--green-deep);
  font-style: italic;
  font-weight: 500;
  border-bottom: solid 1px var(--gold);
  padding-bottom: 3px;
  display: inline-block;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}

.char-item:hover .char-item-cta {
  color: var(--gold-deep);
  letter-spacing: 1px;
}

.divider {
  text-align: center;
  color: var(--gold);
  font-size: 1.2em;
  letter-spacing: 20px;
}

/* =============================================
   Character page - editorial layout
   ============================================= */

.breadcrumb {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1em;
  color: var(--ink-soft);
  margin-bottom: 50px;
  font-style: italic;
  letter-spacing: 1px;
}

.breadcrumb a {
  color: var(--green-deep);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--gold);
}

.char-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 70px;
  align-items: start;
}

.char-portrait-box {
  background-color: var(--paper-warm);
  height: 620px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  border: solid 1px var(--green-soft);
  position: sticky;
  top: 30px;
}

.char-portrait-box::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  bottom: 12px;
  border: solid 1px rgba(184, 153, 104, 0.2);
  pointer-events: none;
  z-index: 1;
}

.char-portrait-box img {
  max-width: 85%;
  max-height: 95%;
  object-fit: contain;
  display: block;
}

.char-badge {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2em;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 18px;
  letter-spacing: 3px;
  display: block;
}

.char-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 6em;
  font-weight: 500;
  color: var(--ink-deep);
  line-height: 0.9;
  margin-bottom: 35px;
  letter-spacing: -0.03em;
}

.char-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7em;
  font-style: italic;
  color: var(--ink);
  padding: 25px 35px;
  border-left: solid 2px var(--gold);
  margin: 40px 0;
  line-height: 1.4;
  font-weight: 400;
  position: relative;
}

.char-quote::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 25px;
  font-size: 3em;
  color: var(--gold);
  opacity: 0.4;
  line-height: 1;
}

.char-section {
  margin-bottom: 50px;
}

.char-section h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05em;
  color: var(--gold);
  margin-bottom: 18px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.char-section p {
  line-height: 1.85;
  margin-bottom: 18px;
  color: var(--ink-deep);
  font-size: 1.1em;
  font-weight: 400;
}

/* Dossier - editorial */
.dossier {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 18px;
  border-top: solid 1px var(--green-soft);
}

.dossier-item {
  padding: 18px 22px;
  border-bottom: solid 1px var(--green-soft);
  border-right: solid 1px var(--green-soft);
  transition: background-color 0.2s;
}

.dossier-item:nth-child(even) {
  border-right: none;
}

.dossier-item:hover {
  background-color: var(--cream);
}

.dossier-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85em;
  color: var(--gold);
  margin-bottom: 6px;
  font-style: italic;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.dossier-value {
  font-family: 'Cormorant Garamond', serif;
  color: var(--ink-deep);
  font-size: 1.3em;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Character Nav */
.char-nav {
  display: flex;
  justify-content: space-between;
  padding-top: 35px;
  margin-top: 60px;
  border-top: solid 1px var(--green-soft);
  gap: 20px;
}

.char-nav a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25em;
  text-decoration: none;
  color: var(--green-deep);
  font-style: italic;
  font-weight: 500;
  transition: color 0.2s, letter-spacing 0.3s;
  letter-spacing: 0.5px;
}

.char-nav a:hover {
  color: var(--gold);
  letter-spacing: 1.5px;
}

/* About / Credits */
.page-content {
  max-width: 800px;
  margin: 60px auto;
}

.page-content h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 4.5em;
  color: var(--ink-deep);
  margin-bottom: 35px;
  text-align: center;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}

.page-content p {
  font-size: 1.15em;
  margin-bottom: 22px;
  line-height: 1.85;
  color: var(--ink-deep);
  font-weight: 400;
}

.credits-list {
  list-style: none;
  padding: 0;
  margin-top: 50px;
  border-top: solid 1px var(--green-soft);
}

.credits-list li {
  padding: 25px 0;
  border-bottom: solid 1px var(--green-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  transition: padding 0.3s;
}

.credits-list li:hover {
  padding-left: 15px;
}

.credit-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8em;
  font-weight: 500;
  color: var(--ink-deep);
}

.credit-role {
  font-family: 'Cormorant Garamond', serif;
  color: var(--gold);
  font-style: italic;
  font-size: 1.2em;
  font-weight: 500;
  letter-spacing: 1px;
}

/* Footer */
#footer {
  padding: 50px 0 35px 0;
  margin-top: 80px;
  border-top: solid 1px var(--green-soft);
  text-align: center;
  color: var(--ink-soft);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.05em;
}

.footer-ornament {
  color: var(--gold);
  font-size: 1.4em;
  margin-bottom: 18px;
  letter-spacing: 16px;
}

/* Responsive */
@media (max-width: 900px) {

  .hero-title {
    font-size: 4em;
  }

  .char-item, .char-item-reverse {
    grid-template-columns: 1fr;
    gap: 25px;
    text-align: center;
  }

  .char-item-reverse .char-item-content {
    order: unset;
    text-align: center;
  }

  .char-item-reverse .char-item-image {
    order: unset;
  }

  .char-item-number {
    padding-top: 0;
    font-size: 3em;
  }

  .char-item-name {
    font-size: 3.5em;
  }

  .char-item-image {
    height: 320px;
  }

  .char-layout {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .char-portrait-box {
    height: 420px;
    position: relative;
    top: 0;
  }

  .char-name {
    font-size: 3.5em;
  }

  .char-quote {
    font-size: 1.3em;
  }

  .dossier {
    grid-template-columns: 1fr;
  }

  .dossier-item {
    border-right: none;
  }

  .page-content h1 {
    font-size: 3em;
  }

  #header {
    flex-direction: column;
    gap: 18px;
  }

  .primarynav {
    margin: 0 14px;
  }

  .audio-control {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
  }

  .char-nav {
    flex-direction: column;
    text-align: center;
  }
}


/* ============================================
   ANIMATIONS
   Added for COMM1770 - demonstrates module
   skills in CSS keyframes and transitions
   ============================================ */

/* Page entrance - fade in everything when page loads */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero container - inner elements animate individually now */

/* Character cards fade in one after another */
.char-item {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.char-item:nth-of-type(1) {
  animation-delay: 0.3s;
}

.char-item:nth-of-type(2) {
  animation-delay: 0.6s;
}

.char-item:nth-of-type(3) {
  animation-delay: 0.9s;
}

/* Logo subtle entrance */
.logo {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Logo mark gentle pulse */
@keyframes gentlePulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.logo-mark {
  display: inline-block;
  animation: gentlePulse 4s ease-in-out infinite;
}

/* Footer ornament drifts left and right */
@keyframes drift {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(8px);
  }
}

.footer-ornament {
  display: inline-block;
  animation: drift 6s ease-in-out infinite;
}

/* Character images - subtle floating */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.char-item-image img {
  animation: float 5s ease-in-out infinite;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease-out;
}

/* Stagger the floating so they're not in sync */
.char-item:nth-of-type(2) .char-item-image img {
  animation-delay: -1.5s;
}

.char-item:nth-of-type(3) .char-item-image img {
  animation-delay: -3s;
}

/* When you hover a character card, its image lifts up and brightens */
.char-item:hover .char-item-image img {
  transform: translateY(-24px) scale(1.10);
  filter: brightness(1.15) drop-shadow(0 18px 24px rgba(74, 51, 35, 0.35));
}

/* Hover state for the whole char card - subtle lift */
.char-item {
  transition: transform 0.4s ease-out;
}

.char-item:hover {
  transform: translateX(12px);
}

.char-item-reverse:hover {
  transform: translateX(-12px);
}

/* CTA arrow nudge on hover */
.char-item-cta {
  display: inline-block;
  transition: transform 0.3s ease-out, color 0.3s ease-out;
}

.char-item:hover .char-item-cta {
  transform: translateX(16px);
  color: var(--gold, #b8893d);
  font-weight: 600;
}

/* Divider rotates slowly */
@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.divider {
  display: inline-block;
  animation: slowSpin 30s linear infinite;
}

/* Page content - inner elements animate individually on character pages */

/* Volume label subtle wave */
@keyframes shimmer {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.vol-label {
  animation: shimmer 3s ease-in-out infinite;
}

/* Audio button pulse when paused */
.audio-control {
  transition: transform 0.3s ease-out, background-color 0.3s ease-out;
}

.audio-control:hover {
  transform: scale(1.15) rotate(5deg);
}





/* Page transition - fade out when navigating */
@keyframes pageFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

body.page-leaving {
  animation: pageFadeOut 0.4s ease-in forwards;
}


/* Dim other characters when hovering one */
.char-list:hover .char-item {
  opacity: 0.45;
  transition: opacity 0.4s ease-out;
}

.char-list:hover .char-item:hover {
  opacity: 1;
}


/* ============================================
   ENHANCED ANIMATIONS - Push to 70
   ============================================ */

/* Hero title - sequential word reveal with stronger motion */
@keyframes wordReveal {
  0% {
    opacity: 0;
    transform: translateY(60px) rotateX(-20deg);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0);
    filter: blur(0);
  }
}

.hero-title .title-line {
  display: block;
  opacity: 0;
  animation: wordReveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transform-origin: bottom center;
}

.hero-title .title-line:nth-child(1) {
  animation-delay: 0.4s;
}

.hero-title .title-line:nth-child(2) {
  animation-delay: 0.9s;
}

/* The italic "Glade" word does an extra subtle wobble after appearing */
@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 0 rgba(74, 99, 65, 0);
  }
  50% {
    text-shadow: 0 0 24px rgba(74, 99, 65, 0.25);
  }
}

.title-italic {
  animation: wordReveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.9s forwards,
             glow 4s ease-in-out 2.5s infinite;
}

/* Volume label slides in from left */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.vol-label {
  opacity: 0;
  animation: slideInLeft 0.8s ease-out 0.2s forwards,
             shimmer 3s ease-in-out 3s infinite;
}

/* Lede text fades in last */
.lede {
  opacity: 0;
  animation: fadeInUp 1s ease-out 1.6s forwards;
}

/* ============================================
   CHARACTER PAGE - dramatic entrance
   ============================================ */

/* Portrait swoops in from left with rotation */
@keyframes portraitEntrance {
  0% {
    opacity: 0;
    transform: translateX(-100px) rotate(-8deg) scale(0.9);
  }
  60% {
    opacity: 1;
    transform: translateX(10px) rotate(2deg) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateX(0) rotate(0deg) scale(1);
  }
}

.char-portrait-box {
  opacity: 0;
  animation: portraitEntrance 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
}

/* Image inside portrait does a gentle constant float after entrance */
@keyframes portraitFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

.char-portrait-box img {
  animation: portraitFloat 6s ease-in-out 1.8s infinite;
}

/* Dossier items slide in one by one */
@keyframes dossierSlide {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.dossier-item {
  opacity: 0;
  animation: dossierSlide 0.7s ease-out forwards;
}

.dossier-item:nth-child(1) { animation-delay: 0.6s; }
.dossier-item:nth-child(2) { animation-delay: 0.75s; }
.dossier-item:nth-child(3) { animation-delay: 0.9s; }
.dossier-item:nth-child(4) { animation-delay: 1.05s; }
.dossier-item:nth-child(5) { animation-delay: 1.2s; }
.dossier-item:nth-child(6) { animation-delay: 1.35s; }

/* Character page heading - underline draws in */
.page-content h1 {
  position: relative;
  display: inline-block;
}

.page-content h1::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green-deep, #4a6341);
  animation: drawLine 1.5s ease-out 0.8s forwards;
}

@keyframes drawLine {
  to { width: 100%; }
}

/* Background ambient - very subtle floating dots/petals */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(184, 137, 61, 0.05) 0%, transparent 1%),
    radial-gradient(circle at 80% 70%, rgba(74, 99, 65, 0.05) 0%, transparent 1%),
    radial-gradient(circle at 60% 20%, rgba(184, 137, 61, 0.04) 0%, transparent 1%),
    radial-gradient(circle at 30% 80%, rgba(74, 99, 65, 0.04) 0%, transparent 1%);
  z-index: 0;
  animation: ambientShift 20s ease-in-out infinite;
}

@keyframes ambientShift {
  0%, 100% {
    background-position: 0% 0%, 100% 100%, 0% 100%, 100% 0%;
  }
  50% {
    background-position: 5% 10%, 95% 90%, 10% 90%, 90% 10%;
  }
}

/* Make sure content sits above the ambient layer */
#wrapper {
  position: relative;
  z-index: 1;
}


/* Audio button playing state - shows visually when music is on */
.audio-control.playing {
  background: var(--green-deep, #4a6341);
  color: white;
  animation: gentlePulse 2s ease-in-out infinite;
}
