/* ============================================
   House Sorellan — custom layout additions
   Chronicle timeline, countdown, and event cards.

   This file works alongside css/style.css,
   which contains the compiled Tailwind utilities,
   color tokens, and font variables.
   ============================================ */

:root {
  --gold: #c49a3c;
  --cream: #e8d9be;
  --ink: #14100c;
  --rust: #722f1a;
}

/* ============================================
   CHRONICLE TIMELINE
   ============================================ */

.chronicle-list {
  display: flex;
  flex-direction: column;
  gap: 5rem;
  width: 100%;
}

/*
   Mobile layout:
   Every Chronicle entry stacks vertically,
   with the image above the text.
*/
.chronicle-entry {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2rem;
  width: 100%;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(196, 154, 60, 0.1);
}

.chronicle-entry:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

/*
   Prevent the image and text columns from
   overflowing their Chronicle row.
*/
.chronicle-image,
.chronicle-text {
  min-width: 0;
  width: 100%;
}

/* Chronicle image frame */
.chronicle-image {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(196, 154, 60, 0.2);
  background-color: rgba(255, 255, 255, 0.02);
}

/* Chronicle image */
.chronicle-image img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center;
  filter: brightness(1.12) saturate(1.05);
  transition: transform 0.6s ease;
}

/* Chronicle image hover effect */
.chronicle-image:hover img {
  transform: scale(1.04);
}

/* Chronicle text column */
.chronicle-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/*
   Desktop and tablet layout:
   Image and text appear beside each other.
*/
@media (min-width: 768px) {
  .chronicle-entry {
    flex-direction: row;
    align-items: center;
    gap: 3.5rem;
  }

  /*
     Left rows:
     Image on the left and text on the right.
  */
  .chronicle-entry-left {
    flex-direction: row;
  }

  /*
     Right rows:
     Text on the left and image on the right.
  */
  .chronicle-entry-right {
    flex-direction: row-reverse;
  }

  .chronicle-image {
    flex: 0 0 42%;
    width: auto;
  }

  .chronicle-text {
    flex: 1 1 0;
    width: auto;
  }

  .chronicle-image img {
    height: 360px;
  }
}

/*
   Larger screens receive slightly taller
   Chronicle images.
*/
@media (min-width: 1100px) {
  .chronicle-image img {
    height: 390px;
  }
}

/* ============================================
   COUNTDOWN
   ============================================ */

.countdown {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 4.5rem;
}

.countdown-num {
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  color: var(--gold);
  line-height: 1;
}

.countdown-label {
  margin-top: 0.4rem;
  font-family: var(--font-mono, "Space Mono", monospace);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(232, 217, 190, 0.4);
}

/* ============================================
   EVENT CARDS
   ============================================ */

.event-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.event-card {
  display: flex;
  gap: 1.5rem;
  padding: 1.75rem;
  border: 1px solid rgba(196, 154, 60, 0.18);
  background: rgba(255, 255, 255, 0.03);
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease;
}

.event-card:hover {
  border-color: rgba(196, 154, 60, 0.5);
  background: rgba(196, 154, 60, 0.03);
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  border: 1px solid rgba(196, 154, 60, 0.3);
}

.event-day {
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
}

.event-month {
  margin-top: 0.25rem;
  font-family: var(--font-mono, "Space Mono", monospace);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(232, 217, 190, 0.5);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}