/* Rally Clone — CSS (Light theme, matching original Rally Interactive) */

:root {
  --accent: #F3A748;
  --bg: #ffffff;
  --text: #1b1b1b;
  --text-muted: rgba(27, 27, 27, 0.45);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: opacity 0.6s ease;
}
body.loading { opacity: 0; }

/* Canvas Ribbon */
#ribbon {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Logo */
#logo {
  position: fixed;
  top: 14px;
  left: calc(3.75% - 30px);
  z-index: 100;
}
#logo a {
  text-decoration: none;
  color: var(--text);
}
.logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* CTA */
#hire-us {
  position: fixed;
  top: 18px;
  right: 100px;
  z-index: 100;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 1px;
  opacity: 0.6;
  transition: opacity 0.25s;
}
#hire-us:hover { opacity: 1; }

/* Menu Button */
#menu-button {
  position: fixed;
  top: 14px;
  right: 40px;
  z-index: 110;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
}
#menu-button span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s cubic-bezier(0.25, 0, 0.35, 1),
              opacity 0.3s;
}
#menu-button.open span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
#menu-button.open span:nth-child(2) {
  opacity: 0;
}
#menu-button.open span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* Menu */
#menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 800px;
  height: 100vh;
  background: var(--bg);
  z-index: 105;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.25, 0, 0.35, 1);
  display: flex;
  align-items: center;
  padding: 0 80px;
}
#menu.open {
  transform: translateX(0);
}
#menu-items {
  list-style: none;
}
#menu-items li {
  margin-bottom: 24px;
}
#menu-items a {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--text);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.25s;
}
#menu-items a:hover { opacity: 1; }

#menu-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.15);
  z-index: 104;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
#menu-modal.open {
  opacity: 1;
  pointer-events: auto;
}

/* Main Wrapper */
#wrapper {
  position: relative;
  z-index: 1;
  height: 100vh;
  overflow: hidden;
}

/* Bullets (Left Column) */
#bullets {
  position: fixed;
  left: calc(18.77% - 200px);
  top: 0;
  width: 400px;
  list-style: none;
  z-index: 10;
  text-align: center;
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.bullet {
  height: 48px;
  margin: 48px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  overflow: hidden;
}
.bullet .letter {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  letter-spacing: 0.031em;
}
.bullet .name {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 12px;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s ease;
  white-space: nowrap;
}
.bullet:hover .name {
  opacity: 0.5;
  transform: translateX(0);
}
.bullet.active .letter {
  font-size: 72px;
  color: var(--text);
  line-height: 1;
  -webkit-font-smoothing: antialiased;
}
.bullet.active .name {
  opacity: 0.8;
  color: var(--text);
  transform: translateX(0);
  font-size: 14px;
}
.bullet.active {
  height: 96px;
}

/* Pages (Right Column) */
#pages {
  position: absolute;
  left: 33.78%;
  top: 0;
  width: 50%;
  list-style: none;
  will-change: transform;
}
.page {
  height: 100vh;
  display: flex;
  align-items: center;
}
.page-content {
  max-width: 520px;
}
.page h2 {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 8px;
  letter-spacing: 0.031em;
  -webkit-font-smoothing: antialiased;
}
.page h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.page p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: rgba(27, 27, 27, 0.65);
  margin-bottom: 32px;
  max-width: 440px;
}

/* Arrow */
.arrow {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.arrow .circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, background 0.3s;
  flex-shrink: 0;
}
.arrow:hover .circle {
  background: var(--accent);
}
.arrow .arrow-icon {
  position: relative;
  left: -36px;
  color: var(--text);
  transition: transform 0.25s ease;
}
.arrow:hover .arrow-icon {
  transform: translateX(4px);
}
.arrow .spine {
  height: 1px;
  background: var(--text-muted);
  width: 0;
  margin-left: -12px;
  transition: width 0.25s cubic-bezier(0.19, 1, 0.22, 1);
}
.arrow:hover .spine {
  width: 80px;
}

/* Selection color */
::selection {
  background: var(--accent);
  color: var(--bg);
}

/* Responsive */
@media (max-width: 1280px) {
  #bullets { left: 5%; width: 200px; }
  #pages { left: 30%; width: 60%; }
  .bullet.active .letter { font-size: 56px; }
  .page h2 { font-size: 52px; }
}
@media (max-width: 768px) {
  #bullets { display: none; }
  #pages { left: 8%; width: 84%; }
  #hire-us { display: none; }
  .page h2 { font-size: 40px; }
}

/* Page transition */
.page-content {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
