/* ============================================================
   HTO Licensing — Design System
   css/style.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Variables ──────────────────────────────────────────── */
:root {
  --bg-primary:    #0a0a0a;
  --bg-secondary:  #111111;
  --bg-card:       #161616;
  --border:        #222222;
  --border-subtle: rgba(255, 255, 255, 0.06);

  /* Primary — Gold */
  --gold:          #D4A843;
  --gold-light:    #E8C96A;
  --gold-bright:   #F0D060;
  --gold-08:       rgba(212, 168, 67, 0.08);
  --gold-15:       rgba(212, 168, 67, 0.15);
  --gold-25:       rgba(212, 168, 67, 0.25);
  --gold-40:       rgba(212, 168, 67, 0.40);

  /* Accent palette */
  --copper:        #CD7F32;
  --cream:         #FFF3D1;
  --red-warm:      #E85D4A;
  --blue-steel:    #5B8FB9;
  --emerald:       #28B464;

  --text-primary:   #f0f0f0;
  --text-secondary: #aaaaaa;
  --text-muted:     #666666;

  --font-sans: 'Montserrat', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --radius:     8px;
  --radius-lg:  12px;
  --max-width:  960px;
  --nav-height: 64px;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ── Layout ────────────────────────────────────────────── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 28px; }
.page-body { padding-top: calc(var(--nav-height) + 48px); padding-bottom: 80px; }

/* ── Navigation (glassmorphism) ────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(212, 168, 67, 0.12);
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 28px;
  /* Shift green logo hue to gold: hue-rotate(-65deg) moves green→gold, saturate boosts, brightness adjusts */
  filter: hue-rotate(-65deg) saturate(1.6) brightness(1.1) drop-shadow(0 0 12px rgba(212, 168, 67, 0.2));
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-back {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 0.2s;
}
.nav-back:hover { color: var(--gold); }

.lang-toggle {
  display: flex;
  border: 1px solid rgba(212, 168, 67, 0.2);
  border-radius: 6px;
  overflow: hidden;
}
.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-btn.active {
  background: var(--gold);
  color: var(--bg-primary);
}

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  text-align: center;
  margin-bottom: 3rem;
  padding: 3rem;
  position: relative;
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.06), rgba(212, 168, 67, 0.02));
  border: 1.5px solid rgba(212, 168, 67, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 20px rgba(212, 168, 67, 0.08);
}

/* Gradient mesh aurora behind hero box */
.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 140%;
  height: 500px;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(212, 168, 67, 0.1) 0%, rgba(212, 168, 67, 0.04) 40%, transparent 70%),
              radial-gradient(ellipse 40% 30% at 30% 20%, rgba(232, 201, 106, 0.06) 0%, transparent 60%),
              radial-gradient(ellipse 40% 30% at 70% 20%, rgba(205, 127, 50, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.hero-title-gold {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-shadow: 0 0 40px rgba(212, 168, 67, 0.2);
  margin-bottom: 4px;
}

.hero-title-white {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Hero Stats ───────────────────────────────────────── */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 2.5rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stat {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(212, 168, 67, 0.12);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.hero-stat:hover {
  border-color: rgba(212, 168, 67, 0.25);
  box-shadow: 0 0 20px rgba(212, 168, 67, 0.08);
}

.hero-stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 6px;
  text-shadow: 0 0 20px rgba(212, 168, 67, 0.4);
}

.hero-stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ── Gradient Separator ───────────────────────────────── */
.gradient-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.3), transparent);
  margin: 2rem 0;
  border: none;
}

/* ── Part Headers ──────────────────────────────────────── */
.part-header {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 3rem 0 1.25rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, rgba(212, 168, 67, 0.3), transparent) 1;
}

.part-header:first-of-type { margin-top: 0; }

/* "Part X" number in gold */
.part-header .part-num {
  color: var(--gold-light);
  text-shadow: 0 0 16px rgba(212, 168, 67, 0.3);
}

.part-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(212, 168, 67, 0.3);
  box-shadow: 0 0 10px rgba(212, 168, 67, 0.1);
}

/* ── SOP Card Grid ─────────────────────────────────────── */
.sop-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 2rem;
}

.sop-card {
  background: rgba(22, 22, 22, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 168, 67, 0.1);
  border-radius: var(--radius-lg);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.sop-card:hover {
  border-color: var(--gold-40);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(212, 168, 67, 0.12), 0 0 25px rgba(212, 168, 67, 0.08);
}

.sop-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px 16px;
}

.sop-card-icon .icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(212, 168, 67, 0.08);
  border: 1px solid rgba(212, 168, 67, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(212, 168, 67, 0.12);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.sop-card:hover .icon-circle {
  box-shadow: 0 0 40px rgba(212, 168, 67, 0.25), 0 0 12px rgba(212, 168, 67, 0.15);
  border-color: var(--gold-25);
}

.sop-card-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--gold);
  stroke-width: 1.5;
  fill: none;
  filter: drop-shadow(0 0 8px rgba(212, 168, 67, 0.5));
}

.sop-card-body {
  padding: 0 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sop-card-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 0 24px rgba(212, 168, 67, 0.4);
}

.sop-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 8px;
}

.sop-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.sop-card-runtime {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 12px;
  font-weight: 500;
}

/* ── Coming Soon — gold glow, NOT flat gray ───────────── */
.sop-card.coming-soon {
  opacity: 0.65;
  pointer-events: none;
  border-color: rgba(212, 168, 67, 0.12);
}

.sop-card.coming-soon .icon-circle {
  background: rgba(212, 168, 67, 0.06);
  border-color: rgba(212, 168, 67, 0.15);
  box-shadow: 0 0 20px rgba(212, 168, 67, 0.08);
}

.sop-card.coming-soon svg {
  stroke: rgba(212, 168, 67, 0.6);
  filter: drop-shadow(0 0 6px rgba(212, 168, 67, 0.3));
}

.sop-card.coming-soon .sop-card-num {
  color: var(--gold-light);
  opacity: 0.7;
  text-shadow: 0 0 16px rgba(212, 168, 67, 0.25);
}

.sop-card .soon-badge {
  display: none;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  background: rgba(212, 168, 67, 0.06);
  border: 1px solid rgba(212, 168, 67, 0.2);
  padding: 3px 10px;
  border-radius: 4px;
  margin-top: 10px;
  width: fit-content;
}
.sop-card.coming-soon .soon-badge { display: inline-block; }

/* ── Accent Color Boxes (for future SOP content) ──────── */
.box-copper {
  background: rgba(205, 127, 50, 0.06);
  border-left: 3px solid var(--copper);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 1rem 0;
  color: var(--text-secondary);
}
.box-copper strong,
.box-copper .box-label { color: var(--copper); }

.box-cream {
  background: rgba(255, 243, 209, 0.05);
  border-left: 3px solid var(--cream);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 1rem 0;
  color: var(--cream);
}
.box-cream strong,
.box-cream .box-label { color: var(--cream); }

.box-red {
  background: rgba(232, 93, 74, 0.06);
  border-left: 3px solid var(--red-warm);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 1rem 0;
  color: var(--text-secondary);
}
.box-red strong,
.box-red .box-label { color: var(--red-warm); }

.box-blue {
  background: rgba(91, 143, 185, 0.06);
  border-left: 3px solid var(--blue-steel);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 1rem 0;
  color: var(--text-secondary);
}
.box-blue strong,
.box-blue .box-label { color: var(--blue-steel); }

.box-emerald {
  background: rgba(40, 180, 100, 0.06);
  border-left: 3px solid var(--emerald);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 1rem 0;
  color: var(--text-secondary);
}
.box-emerald strong,
.box-emerald .box-label { color: var(--emerald); }

.box-gold {
  background: var(--gold-08);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 1rem 0;
  color: var(--text-secondary);
}
.box-gold strong,
.box-gold .box-label { color: var(--gold); }

.box-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

/* ── Tables ────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.85rem;
}

th {
  background: var(--gold-08);
  color: var(--gold);
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--gold-25);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

tr:hover td {
  background: rgba(212, 168, 67, 0.03);
  border-color: rgba(212, 168, 67, 0.1);
}

/* ── Badges ────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge-gold {
  background: var(--gold-08);
  color: var(--gold);
  border: 1px solid var(--gold-15);
}

.badge-copper {
  background: rgba(205, 127, 50, 0.08);
  color: var(--copper);
  border: 1px solid rgba(205, 127, 50, 0.15);
}

.badge-red {
  background: rgba(232, 93, 74, 0.08);
  color: var(--red-warm);
  border: 1px solid rgba(232, 93, 74, 0.15);
}

.badge-blue {
  background: rgba(91, 143, 185, 0.08);
  color: var(--blue-steel);
  border: 1px solid rgba(91, 143, 185, 0.15);
}

.badge-emerald {
  background: rgba(40, 180, 100, 0.08);
  color: var(--emerald);
  border: 1px solid rgba(40, 180, 100, 0.15);
}

/* ── Footer ────────────────────────────────────────────── */
.footer {
  position: relative;
  padding: 24px 0;
  margin-top: 2rem;
}

/* Gradient separator above footer */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.25), transparent);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.footer-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s, text-shadow 0.2s;
}
.footer-link:hover {
  opacity: 0.8;
  text-shadow: 0 0 12px rgba(212, 168, 67, 0.3);
}

/* ── Scroll Animations ─────────────────────────────────── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for landing cards */
.sop-card-grid .sop-card:nth-child(1) { transition-delay: 0ms; }
.sop-card-grid .sop-card:nth-child(2) { transition-delay: 80ms; }
.sop-card-grid .sop-card:nth-child(3) { transition-delay: 160ms; }

.hero-stats .hero-stat:nth-child(1) { transition-delay: 0ms; }
.hero-stats .hero-stat:nth-child(2) { transition-delay: 80ms; }
.hero-stats .hero-stat:nth-child(3) { transition-delay: 160ms; }

/* ── Scroll Progress Bar ───────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  box-shadow: 0 0 10px rgba(212, 168, 67, 0.5);
  z-index: 9999;
  width: 0%;
  transition: width 0.05s linear;
}

/* ── Back to Top ───────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(22, 22, 22, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--gold-25);
  color: var(--gold);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 14px rgba(212, 168, 67, 0.15);
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { box-shadow: 0 0 28px rgba(212, 168, 67, 0.4); }

/* ── Animations ───────────────────────────────────────── */
@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes border-rotate {
  to { --border-angle: 360deg; }
}

@keyframes gold-glow-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(212, 168, 67, 0.15); }
  50%      { box-shadow: 0 0 20px rgba(212, 168, 67, 0.28); }
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 960px) {
  .sop-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .sop-card-grid { grid-template-columns: 1fr; }
  .hero { padding: 2rem 1.5rem; }
  .hero-title-gold { font-size: 2rem; }
  .hero-title-white { font-size: 1.6rem; }
  .hero-stats { grid-template-columns: 1fr; max-width: 280px; }
  .part-header { font-size: 1.25rem; }
  .container { padding: 0 20px; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}
