/* ============================================
   Hyperstition For Animals — Essay Competition
   Dark cinematic theme
   ============================================ */

:root {
  --bg-deep: #0d0d0f;
  --bg-panel: #151518;
  --bg-card: #1c1c20;
  --bg-card-hover: #222228;
  --bg-input: #1a1a1f;
  --accent: #d4a44a;
  --accent-dim: #b08830;
  --accent-glow: rgba(212, 164, 74, 0.12);
  --accent-glow-strong: rgba(212, 164, 74, 0.25);
  --text: #e8e4dc;
  --text-secondary: #9e978b;
  --text-muted: #6b6560;
  --border: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(212, 164, 74, 0.2);
  --white: #ffffff;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 1120px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

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

a { color: var(--accent); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--white); }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 13, 15, 0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-img {
  height: 28px;
  width: 28px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7)) drop-shadow(0 0 2px rgba(255, 255, 255, 0.9));
  transition: opacity 0.2s var(--ease);
}

.nav-logo-text {
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.35;
  color: var(--white);
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-logo:hover .nav-logo-img { opacity: 0.8; }
.nav-logo:hover .nav-logo-text { color: var(--accent); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 40px;
  align-items: center;
}

.nav-links a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  transition: color 0.25s var(--ease);
}

.nav-links a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-secondary);
  transition: background 0.2s;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--bg-deep);
}

#starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 120px 24px 80px;
  max-width: 800px;
}

.hero-logo-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.2s forwards;
}

.hero-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
  margin-bottom: 0;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.7)) drop-shadow(0 0 3px rgba(255, 255, 255, 0.9));
}

.hero-logo-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--white);
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 0;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.4s forwards;
}

.hero-title-line { display: block; }

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

.hero-divider {
  width: 60px;
  height: 1px;
  background: var(--accent);
  margin: 32px auto;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.55s forwards;
}

.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.65s forwards;
}

.hero-prize-row {
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.75s forwards;
}

.hero-prize {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: center;
}

.prize-currency {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
  font-weight: 400;
}

.prize-amount {
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  margin-right: 16px;
}

.prize-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 300;
  text-align: left;
  line-height: 1.5;
}

.prize-label strong { color: var(--text); font-weight: 500; }

.hero-deadline {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  margin-bottom: 10px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.75s forwards;
}

.hero-deadline strong {
  color: var(--accent);
  font-weight: 600;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg-deep);
  background: var(--accent);
  padding: 16px 40px;
  border-radius: 2px;
  transition: background 0.3s var(--ease), transform 0.2s var(--ease);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.85s forwards;
}

.btn-hero:hover {
  background: var(--white);
  color: var(--bg-deep);
  transform: translateY(-1px);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 1.2s forwards;
}

.hero-scroll-hint span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ─── Section Shared ─── */
.section { padding: 100px 0; }
.section-dark { background: var(--bg-panel); }
.section-submit { background: var(--bg-deep); }

.section-header {
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.2;
}

.section-desc {
  margin-top: 12px;
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-secondary);
}

/* ─── About ─── */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 80px;
  align-items: start;
}

.about-lead {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 24px;
}

.about-main p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.85;
}

.about-aside {
  display: flex;
  flex-direction: column;
  gap: 32px;
  border-left: 1px solid var(--border);
  padding-left: 40px;
}

.stat-block {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1.1;
}

.stat-desc {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── Hyperstition Section ─── */
.section-hyperstition {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
}

.hyper-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: start;
}

.hyper-explainer p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.85;
  margin-bottom: 20px;
}

.hyper-heading {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 16px;
  margin-top: 40px;
}

.hyper-heading:first-child,
.hyper-explainer h3:first-child {
  margin-top: 0;
}

.hyper-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hyper-prompt-box {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 4px;
  padding: 32px;
}

.hyper-prompt-box h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 20px;
}

.hyper-prompt-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hyper-prompt-box li {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-left: 16px;
  border-left: 2px solid var(--accent-dim);
}

.hyper-prompt-box li strong {
  color: var(--text);
  font-weight: 500;
  display: block;
  margin-bottom: 2px;
}

.hyper-callout {
  background: var(--accent-glow);
  border-left: 3px solid var(--accent);
  padding: 24px 28px;
  border-radius: 0 4px 4px 0;
}

.hyper-callout p {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.75;
  margin: 0;
}

.hyper-callout em {
  color: var(--accent);
  font-style: italic;
}

@media (max-width: 768px) {
  .hyper-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ─── Highlight Band ─── */
.highlight-band {
  background: var(--bg-deep);
  padding: 80px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.highlight-text {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  font-style: italic;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

/* ─── Rules ─── */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.rule-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 36px 32px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.rule-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
}

.rule-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--accent);
  display: block;
  margin-bottom: 16px;
  line-height: 1;
}

.rule-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 10px;
}

.rule-card p {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ─── Form ─── */
.essay-form {
  max-width: 680px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-group {
  margin-bottom: 28px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 260px;
  line-height: 1.8;
}

.word-count {
  text-align: right;
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-top: 8px;
}

.word-count-sep { margin: 0 2px; }

.word-count.over-limit { color: #e74c3c; font-weight: 500; }

.form-checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.form-checkbox input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

.form-checkbox label {
  font-size: 0.85rem !important;
  font-weight: 300 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--text-muted) !important;
  cursor: pointer;
  line-height: 1.6;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg-deep);
  background: var(--accent);
  border: none;
  padding: 16px 40px;
  border-radius: 2px;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.3s var(--ease), transform 0.2s var(--ease);
}

.btn-submit svg { transition: transform 0.2s var(--ease); }
.btn-submit:hover svg { transform: translateX(3px); }

.btn-submit:hover {
  background: var(--white);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.form-message {
  margin-top: 24px;
  padding: 18px 24px;
  border-radius: 3px;
  font-size: 0.9rem;
  font-weight: 400;
}

.form-message.success {
  background: rgba(212, 164, 74, 0.1);
  color: var(--accent);
  border: 1px solid var(--border-accent);
}

.form-message.error {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.25);
}

/* ─── Footer ─── */
.footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  opacity: 0.7;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7)) drop-shadow(0 0 2px rgba(255, 255, 255, 0.9));
}

.footer-logo-text {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.35;
  color: var(--text-secondary);
  text-transform: uppercase;
  opacity: 0.7;
}

.footer-right p {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-muted);
}

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.8; }
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-links { display: none; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(13, 13, 15, 0.97);
    backdrop-filter: blur(20px);
    padding: 32px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }

  .nav-toggle { display: flex; }

  .hero-title { font-size: clamp(2.5rem, 10vw, 4rem); }

  .prize-amount { font-size: 3rem; }
  .prize-currency { font-size: 1.5rem; }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-aside {
    border-left: none;
    padding-left: 0;
    flex-direction: row;
    gap: 40px;
    flex-wrap: wrap;
  }

  .rules-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .section { padding: 72px 0; }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .hero-scroll-hint { display: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .hero-content { padding: 100px 16px 60px; }
  .prize-amount { font-size: 2.5rem; }
}
