:root {
  --bg-color: #000;
  --text-color: #fff;
  --muted-text: rgba(255, 255, 255, 0.4);
  --border-color: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(0, 0, 0, 0.6);
  --font-sans: "Inter", sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
}

::selection {
  background-color: #fff;
  color: #000;
}

/* Background */
.global-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  filter: blur(1px) brightness(0.5);
  transition: background-image 1s ease-in-out;
  background-image: url("src/riverton-heights-u.png");
}

.global-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, black, transparent, black);
}

/* Typography Utilities */
.small-caps {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

@media (min-width: 768px) {
  .small-caps {
    font-size: 0.75rem;
  }
}

.tracking-widest {
  letter-spacing: 0.4em;
}

.text-muted {
  color: var(--muted-text);
}

.text-sm {
  font-size: 1rem;
}

@media (min-width: 768px) {
  .text-sm {
    font-size: 0.875rem;
  }
}

.title-luxury {
  font-size: 4rem;
  font-weight: 300;
  line-height: 1;
}

@media (min-width: 768px) {
  .title-luxury {
    font-size: 5rem;
  }
}

/* Progress Bar */
.progress-bar {
  position: fixed;
  top: 80px; /* Below navbar */
  left: 0;
  height: 2px;
  background-color: white;
  transform-origin: left;
  transform: scaleX(0);
  z-index: 100;
  width: 100%;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

@media (min-width: 1024px) {
  .navbar {
    padding: 0 3rem;
  }
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.menu-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}

.menu-icon .line {
  height: 1px;
  background-color: white;
  width: 100%;
  transition: width 0.3s;
}

.menu-icon .line.half {
  width: 66%;
}

.menu-btn:hover .line.half {
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: none;
}

@media (min-width: 768px) {
  .logo {
    display: block;
  }
}

.hidden-mobile {
  display: none;
}

@media (min-width: 1024px) {
  .hidden-mobile {
    display: block;
  }
}

.user-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: none;
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    border-color 0.3s,
    color 0.3s;
}

.user-btn:hover {
  border-color: white;
  color: white;
}

/* Feed Container */
.feed-container,
.reader-container {
  position: relative;
  z-index: 10;
  max-width: 72rem;
  margin: 0 auto;
  padding: 8rem 1rem 2rem 1rem;
}

@media (min-width: 768px) {
  .feed-container,
  .reader-container {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

.feed-header {
  margin-bottom: 6rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .feed-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.header-titles {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.header-desc {
  max-width: 20rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.icon-btn:hover {
  background-color: white;
  color: black;
}

.stories-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-color);
}

/* Story Card */
.story-card {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

@media (min-width: 768px) {
  .story-card {
    flex-direction: row;
    align-items: center;
  }
}

.story-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

@media (min-width: 768px) {
  .story-image-wrap {
    width: 50%;
  }
}

.story-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  filter: grayscale(100%);
  transition:
    transform 1s,
    filter 1s;
}

.story-card:hover .story-image {
  transform: scale(1.05);
  filter: grayscale(0%);
}

.story-image-border {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.story-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .story-content {
    width: 50%;
  }
}

.story-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.divider {
  flex: 1;
  height: 1px;
  background-color: var(--border-color);
}

.story-title {
  font-size: 2.25rem;
  font-weight: 300;
  line-height: 1;
  transition: all 0.5s;
}

@media (min-width: 768px) {
  .story-title {
    font-size: 3rem;
  }
}

.story-card:hover .story-title {
  font-style: italic;
  padding-left: 1rem;
}

.story-desc {
  font-size: 1rem;
  color: var(--muted-text);
  font-weight: 300;
  max-width: 24rem;
}

@media (min-width: 768px) {
  .story-desc {
    font-size: 0.875rem;
  }
}

.story-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
}

.pill-border {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

@media (min-width: 768px) {
  .pill-border {
    font-size: 0.875rem;
  }
}

.story-card:hover .pill-border {
  background-color: white;
  color: black;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Episodes List */
.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  width: 100%;
}

.episode-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s;
}

.episode-item:hover {
  padding-left: 1rem;
  padding-right: 1rem;
  background-color: rgba(255, 255, 255, 0.02);
}

.episode-title {
  font-size: 1.125rem;
  font-weight: 300;
  color: white;
  transition: all 0.3s;
}

.episode-item:hover .episode-title {
  font-style: italic;
}

.episode-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 9999px;
  padding: 0.25rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s;
}

.episode-item:hover .episode-btn {
  background-color: white;
  color: black;
}

/* Reader Container */
.hidden {
  display: none !important;
}

.close-btn {
  position: fixed;
  top: 7rem;
  left: 2rem;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

@media (min-width: 1024px) {
  .close-btn {
    left: 3rem;
  }
}

.close-btn .icon-btn {
  width: 40px;
  height: 40px;
}

.hidden-opacity {
  opacity: 0;
  transition: opacity 0.3s;
}

.close-btn:hover .hidden-opacity {
  opacity: 1;
}

.reader-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 6rem;
  padding-bottom: 12rem;
  max-width: 42rem;
  margin: 0 auto;
  gap: 3rem;
}

.reader-title {
  font-size: 3.75rem;
  font-weight: 300;
  line-height: 0.9;
  font-style: italic;
  letter-spacing: -0.05em;
}

@media (min-width: 768px) {
  .reader-title {
    font-size: 6rem;
  }
}

.divider-short {
  height: 1px;
  width: 6rem;
  background-color: rgba(255, 255, 255, 0.2);
}

.reader-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  max-width: 28rem;
}

@media (min-width: 768px) {
  .reader-desc {
    font-size: 0.875rem;
  }
}

/* Panels */
.panels-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel-item {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0; /* GSAP will handle */
}

.panel-img-wrap {
  position: relative;
  width: 100%;
  max-width: 32rem;
  margin-bottom: 3rem;
}

.panel-img {
  width: 100%;
  height: auto;
  opacity: 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-index {
  position: absolute;
  top: -1rem;
  right: -1rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: black;
  font-size: 12px;
  font-weight: 300;
}

@media (min-width: 768px) {
  .panel-index {
    font-size: 10px;
  }
}

.panel-text-wrap {
  max-width: 28rem;
  text-align: center;
}

.panel-text-wrap .divider-short {
  margin: 0 auto 2rem auto;
  width: 2rem;
}

.panel-text {
  font-size: 1.25rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

@media (min-width: 768px) {
  .panel-text {
    font-size: 1.5rem;
  }
}

/* Footer */
.reader-footer {
  padding: 12rem 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pill-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 9999px;
  padding: 0.75rem 3rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.pill-btn:hover {
  background-color: white;
  color: black;
}

/* Menu Overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.menu-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

.menu-link {
  background: none;
  border: none;
  color: white;
  font-size: 2.25rem;
  font-weight: 300;
  letter-spacing: -0.05em;
  cursor: pointer;
  transition: all 0.7s;
}

@media (min-width: 768px) {
  .menu-link {
    font-size: 3.75rem;
  }
}

.menu-link:hover {
  font-style: italic;
  padding-left: 3rem;
}

.mt-8 {
  margin-top: 2rem;
}

.rotate-90 {
  transform: rotate(90deg);
}

/* Global Footer */
.global-footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 2rem;
}
