/* =============================================
   Lesson 04 — RWA Tokenization Explainer
   Unique component styles

   NOTE: Original file used --gold/--teal/--red aliases.
   All references have been normalized to the shared palette:
     --gold      -> --blue
     --gold-light-> --blue-light
     --gold-dim  -> --blue-dim
     --teal      -> --white
     --teal-dim  -> --white-dim
     --red       -> --orange
   ============================================= */

/* HERO — eyebrow */
.eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero h1 em {
  font-style: italic;
  color: var(--blue);
}

/* HERO — grid background variant */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* PROBLEM CARDS */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 52px;
}

.problem-card {
  background: rgba(255,154,60,0.04);
  border: 1px solid rgba(255,154,60,0.2);
  border-radius: 12px;
  padding: 28px 24px;
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
}

.problem-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(255,154,60,0.1);
}

.problem-card .icon {
  font-size: 28px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
}

.problem-card h3 {
  font-family: 'Lora', serif;
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--orange);
}

.problem-card p {
  font-size: 0.9rem;
  color: var(--white-dim);
  margin: 0;
  max-width: 100%;
}

/* FLOW DIAGRAM */
.flow-section {
  background: var(--navy-mid);
  padding: 100px 0;
}

.flow-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.flow-diagram {
  margin-top: 60px;
  position: relative;
}

.flow-steps {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
}

.flow-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 0 12px;
}

.flow-step::after {
  content: '\2192';
  position: absolute;
  right: -16px;
  top: 50px;
  font-size: 1.4rem;
  color: var(--blue);
  opacity: 0.5;
  z-index: 2;
}

.flow-step:last-child::after { display: none; }

.flow-node {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 16px;
  position: relative;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.flow-node:hover { transform: scale(1.08); }

.flow-node.trad {
  background: rgba(255,154,60,0.12);
  border: 2px solid rgba(255,154,60,0.3);
}

.flow-node.process {
  background: var(--blue-dim);
  border: 2px solid rgba(3,136,166,0.4);
}

.flow-node.result {
  background: rgba(76,175,134,0.12);
  border: 2px solid rgba(76,175,134,0.35);
  box-shadow: 0 0 30px rgba(76,175,134,0.1);
}

.flow-step h4 {
  font-family: 'Lora', serif;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--white);
}

.flow-step p {
  font-size: 0.8rem;
  color: var(--white-dim);
  line-height: 1.5;
  max-width: 120px;
  margin: 0 auto;
}

.flow-step .step-num {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--blue);
  margin-bottom: 4px;
  text-transform: uppercase;
}

/* COMPARE TABLE */
.compare-table {
  width: 100%;
  border-collapse: collapse;
}

.compare-table th {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 16px 24px;
  text-align: left;
}

.compare-table th:first-child { color: var(--white-dim); }
.compare-table th.col-old { color: var(--orange); background: rgba(255,154,60,0.06); border-radius: 8px 8px 0 0; }
.compare-table th.col-new { color: var(--green); background: rgba(76,175,134,0.06); border-radius: 8px 8px 0 0; }

.compare-table td {
  padding: 16px 24px;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  vertical-align: top;
}

.compare-table td:nth-child(2) {
  background: rgba(255,154,60,0.04);
  color: rgba(245,242,235,0.65);
}

.compare-table td:nth-child(3) {
  background: rgba(76,175,134,0.04);
  color: rgba(245,242,235,0.85);
}

.compare-table td:first-child {
  font-weight: 500;
  color: var(--white-dim);
  font-size: 0.85rem;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.05em;
}

.tag-bad, .tag-good {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.tag-bad { background: rgba(255,154,60,0.15); color: #FF9A3C; }
.tag-good { background: rgba(76,175,134,0.15); color: #5ecc9e; }

/* BENEFIT CARDS */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 52px;
}

.benefit-card {
  background: var(--navy-light);
  border: 1px solid rgba(3,136,166,0.15);
  border-radius: 16px;
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.benefit-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--white));
}

.benefit-card:hover {
  transform: translateY(-6px);
  border-color: rgba(3,136,166,0.35);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.benefit-card .icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--blue-dim);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}

.benefit-card h3 {
  font-family: 'Lora', serif;
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.benefit-card p {
  font-size: 0.92rem;
  color: var(--white-dim);
  line-height: 1.7;
  max-width: 100%;
  margin: 0;
}

/* STAKEHOLDER TABS */
.stakeholder-tabs {
  margin-top: 52px;
}

.tab-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.tab-btn {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: 30px;
  border: 1px solid rgba(3,136,166,0.25);
  background: transparent;
  color: var(--white-dim);
  cursor: pointer;
  transition: all 0.25s;
}

.tab-btn.active {
  background: var(--blue-dim);
  border-color: var(--blue);
  color: var(--blue-light);
}

.tab-btn:hover:not(.active) {
  border-color: rgba(3,136,166,0.5);
  color: var(--white);
}

.tab-content {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  animation: fadeIn 0.4s ease;
}

.tab-content.active { display: grid; }

.stake-left {
  background: var(--navy-light);
  border-radius: 16px;
  padding: 36px;
  border: 1px solid rgba(255,255,255,0.06);
}

.stake-left h3 {
  font-family: 'Lora', serif;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.stake-left .role-tag {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--white);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: block;
}

.stake-left p {
  font-size: 0.95rem;
  color: var(--white-dim);
  line-height: 1.8;
  max-width: 100%;
  margin: 0;
}

.stake-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.win-item {
  background: rgba(76,175,134,0.07);
  border: 1px solid rgba(76,175,134,0.2);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.win-icon {
  flex-shrink: 0;
  margin-top: 3px;
  opacity: 0.9;
}

.win-item h4 {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.win-item p {
  font-size: 0.85rem;
  color: var(--white-dim);
  margin: 0;
  max-width: 100%;
}

/* LIFECYCLE VISUAL */
.lifecycle {
  margin-top: 60px;
  position: relative;
}

.lifecycle-ring {
  position: relative;
  width: 380px;
  height: 380px;
  margin: 0 auto;
}

.ring-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--blue-dim);
  border: 2px solid rgba(3,136,166,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
}

.ring-center .token-icon { font-size: 28px; }
.ring-center span {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--blue);
  text-transform: uppercase;
  margin-top: 4px;
}

.ring-orbit {
  position: absolute;
  top: 50%; left: 50%;
  width: 320px; height: 320px;
  margin: -160px 0 0 -160px;
  border-radius: 50%;
  border: 1px dashed rgba(3,136,166,0.2);
  animation: spinSlow 30s linear infinite;
}

.orbit-node {
  position: absolute;
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  font-size: 20px;
  background: var(--navy-light);
  border: 1px solid rgba(3,136,166,0.25);
  transform-origin: center;
  animation: counterSpin 30s linear infinite;
  cursor: default;
}

.orbit-node span {
  font-size: 8px;
  font-family: 'DM Mono', monospace;
  color: var(--blue);
  margin-top: 2px;
  letter-spacing: 0.05em;
  text-align: center;
  line-height: 1.2;
}

/* Position nodes around the circle */
.orbit-node:nth-child(1) { top: -36px; left: calc(50% - 36px); }
.orbit-node:nth-child(2) { top: calc(50% - 36px); right: -36px; }
.orbit-node:nth-child(3) { bottom: -36px; left: calc(50% - 36px); }
.orbit-node:nth-child(4) { top: calc(50% - 36px); left: -36px; }

.lifecycle-labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
}

.lifecycle-label {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.lc-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
  margin-top: 7px;
}

.lifecycle-label h4 {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.lifecycle-label p {
  font-size: 0.82rem;
  color: var(--white-dim);
  margin: 0;
  max-width: 100%;
}

/* NAV TAG (lesson 04 variant) */
.top-nav .nav-tag {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.25em;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes counterSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .flow-steps { flex-direction: column; align-items: flex-start; gap: 32px; }
  .flow-step::after { content: '\2193'; position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%); top: auto; right: auto; }
  .flow-step { flex-direction: row; text-align: left; width: 100%; }
  .flow-step p { max-width: 100%; }
  .tab-content.active { grid-template-columns: 1fr; }
  .lifecycle-labels { grid-template-columns: 1fr; }
  .compare-table { font-size: 0.82rem; }
  .compare-table td, .compare-table th { padding: 12px 16px; }
}

@media (max-width: 600px) {
  .lifecycle-ring { width: 280px; height: 280px; }
  .ring-orbit { width: 240px; height: 240px; margin: -120px 0 0 -120px; }
  .orbit-node { width: 56px; height: 56px; font-size: 16px; }
  .orbit-node:nth-child(1) { top: -28px; left: calc(50% - 28px); }
  .orbit-node:nth-child(2) { top: calc(50% - 28px); right: -28px; }
  .orbit-node:nth-child(3) { bottom: -28px; left: calc(50% - 28px); }
  .orbit-node:nth-child(4) { top: calc(50% - 28px); left: -28px; }
  .orbit-node span { font-size: 10px; }
  .ring-center { width: 90px; height: 90px; }
  .ring-center .token-icon { font-size: 22px; }
  .problem-grid { grid-template-columns: 1fr; }
  .flow-step p { max-width: 100%; }
}
