/* =========================================================
   RE:UN10N — shared stylesheet (light / white theme)
   palette: green + red accents on clean white
   ========================================================= */

:root{
  --bg:#ffffff;
  --panel:#ffffff;
  --panel-tint:#f7faf8;
  --ink:#0a0a0a;
  --ink-soft:#2b3a33;
  --muted:#5f7169;
  --green:#00a86b;
  --green-strong:#008f5a;
  --green-tint:rgba(0,168,107,0.06);
  --green-line:rgba(0,168,107,0.25);
  --green-line-strong:rgba(0,168,107,0.7);
  --red:#d62828;
  --red-tint:rgba(214,40,40,0.06);
  --red-line:rgba(214,40,40,0.35);
  --mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

*,*::before,*::after{box-sizing:border-box;}

html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;}

body{
  margin:0;
  min-height:100vh;
  font-family:var(--mono);
  font-size:16px;
  line-height:1.65;
  color:var(--ink);
  background-color:var(--bg);
  background-image:
    radial-gradient(900px 520px at 50% -12%, rgba(0,168,107,0.07), transparent 65%),
    radial-gradient(760px 460px at 88% 108%, rgba(214,40,40,0.035), transparent 62%);
  background-attachment:fixed;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}

/* subtle grid */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(0,168,107,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,168,107,0.06) 1px, transparent 1px);
  background-size:48px 48px;
  -webkit-mask-image:radial-gradient(circle at 50% 20%, #000 0%, transparent 80%);
  mask-image:radial-gradient(circle at 50% 20%, #000 0%, transparent 80%);
  opacity:0.9;
}

.wrap{
  position:relative;
  z-index:1;
  width:100%;
  max-width:1040px;
  margin:0 auto;
  padding:clamp(1.5rem,4vw,3rem) clamp(1rem,4vw,2rem) 3rem;
}

a{color:var(--green);}

a:focus-visible,
.card:focus-visible,
.btn:focus-visible{
  outline:2px solid var(--green);
  outline-offset:3px;
  border-radius:8px;
}

.sr-only{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
  border:0;
}

.green{color:var(--green);}
.red{color:var(--red);}

/* ============================ HERO ============================ */

.hero{
  text-align:center;
  padding:clamp(.5rem,3vw,1.5rem) 0 clamp(1.75rem,4vw,2.75rem);
}

.logo-plate{
  display:inline-block;
  padding:1.4rem 1.9rem;
  border-radius:18px;
  background:linear-gradient(180deg,#ffffff 0%,#f3faf6 100%);
  border:1px solid rgba(0,168,107,0.28);
  box-shadow:
    0 20px 60px rgba(0,168,107,0.12),
    0 4px 12px rgba(0,0,0,0.04);
}

.logo-plate img{
  display:block;
  width:min(300px,66vw);
  height:auto;
}

.hero-tag{
  margin:1.6rem 0 0;
  font-size:clamp(.85rem,2.4vw,1.02rem);
  color:var(--muted);
  letter-spacing:.02em;
  min-height:1.7em;
}

.prompt{color:var(--green);}

#typed{color:var(--ink);}

.caret{
  color:var(--green);
  animation:blink 1.1s steps(1) infinite;
}

@keyframes blink{50%{opacity:0;}}

/* ========================== TERMINAL ========================== */

.terminal{
  border:1px solid var(--green-line);
  border-radius:12px;
  background:var(--panel);
  box-shadow:
    0 1px 0 rgba(0,0,0,0.02),
    0 20px 50px rgba(0,168,107,0.08),
    0 4px 12px rgba(0,0,0,0.05);
  overflow:hidden;
  margin-bottom:clamp(2rem,5vw,2.75rem);
}

.term-bar{
  display:flex;
  align-items:center;
  gap:.45rem;
  padding:.7rem .9rem;
  background:#0a0a0a;
  border-bottom:1px solid #1a1a1a;
}

.dot{
  width:11px;height:11px;
  border-radius:50%;
  display:inline-block;
  flex:none;
}

.dot.r{background:var(--red);box-shadow:0 0 6px rgba(214,40,40,.6);}
.dot.g{background:var(--green);box-shadow:0 0 6px rgba(0,168,107,.6);}
.dot.d{background:#3a3a3a;}

.term-title{
  margin-left:auto;
  font-size:.72rem;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#8a8a8a;
}

.term-body{
  padding:1.5rem clamp(1rem,3vw,1.6rem);
  text-align:left;
  background:#ffffff;
}

.cmd{
  margin:0 0 .55rem;
  font-size:.85rem;
  color:var(--muted);
}

.cmd .prompt{margin-right:.35rem;}

.out{
  margin:0 0 1.5rem;
  max-width:74ch;
  font-size:clamp(.9rem,2.4vw,1rem);
  line-height:1.85;
  color:var(--ink-soft);
}

.out a{
  color:var(--green-strong);
  text-decoration:none;
  border-bottom:1px dashed rgba(0,168,107,0.55);
}

.out a:hover{
  color:var(--red);
  border-bottom-color:var(--red);
}

/* =========================== CARDS =========================== */

.links{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(258px,1fr));
  gap:.85rem;
}

.card{
  position:relative;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:.85rem;
  padding:.95rem 1.05rem;
  border:1px solid var(--green-line);
  border-radius:10px;
  background:#ffffff;
  color:var(--ink);
  font-weight:600;
  font-size:.95rem;
  text-decoration:none;
  overflow:hidden;
  transition:border-color .2s ease, transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.card .idx{
  font-size:.7rem;
  letter-spacing:.1em;
  color:var(--muted);
  transition:color .2s ease;
}

.card .title{line-height:1.4;}

.card .arrow{
  font-size:.85rem;
  color:var(--muted);
  transition:transform .2s ease, color .2s ease;
}

.card::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(120deg,transparent 30%,rgba(0,168,107,0.14) 50%,transparent 70%);
  transform:translateX(-120%);
  transition:transform .6s ease;
}

.card:hover,
.card:focus-visible{
  border-color:var(--green);
  transform:translateY(-3px);
  background:linear-gradient(180deg,rgba(0,168,107,0.06),rgba(0,168,107,0.01));
  box-shadow:0 12px 30px rgba(0,168,107,0.12);
  outline:none;
}

.card:hover::after{transform:translateX(120%);}
.card:hover .idx,
.card:hover .arrow{color:var(--green-strong);}
.card:hover .arrow{transform:translate(2px,-2px);}

/* red variant */
.card.alert{border-color:var(--red-line);}
.card.alert .idx{color:var(--red);}

.card.alert:hover,
.card.alert:focus-visible{
  border-color:var(--red);
  background:linear-gradient(180deg,rgba(214,40,40,0.07),rgba(214,40,40,0.01));
  box-shadow:0 12px 30px rgba(214,40,40,0.15);
}

.card.alert::after{
  background:linear-gradient(120deg,transparent 30%,rgba(214,40,40,0.14) 50%,transparent 70%);
}

.card.alert:hover .idx,
.card.alert:hover .arrow{color:var(--red);}

/* =========================== BADGES =========================== */

.badge{
  display:inline-block;
  font-size:.6rem;
  font-weight:600;
  letter-spacing:.14em;
  text-transform:uppercase;
  line-height:1.5;
  padding:.15rem .5rem;
  border-radius:999px;
  border:1px solid currentColor;
  vertical-align:middle;
  white-space:nowrap;
}

.badge.red{color:var(--red);background:var(--red-tint);border-color:rgba(214,40,40,0.4);}
.badge.green{color:var(--green-strong);background:var(--green-tint);border-color:rgba(0,168,107,0.4);}

/* =========================== TOPBAR =========================== */

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:clamp(1.5rem,4vw,2.5rem);
  font-size:.78rem;
}

.backlink{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  color:var(--muted);
  text-decoration:none;
  transition:color .2s ease;
}

.backlink:hover{color:var(--green-strong);}

/* ========================= PAGE HEAD ========================== */

.page-head{
  text-align:center;
  padding:clamp(.5rem,3vw,1.5rem) 0 clamp(2rem,5vw,3rem);
}

.page-head h1{
  margin:0 0 .7rem;
  font-size:clamp(1.55rem,5vw,2.5rem);
  line-height:1.2;
  letter-spacing:-.02em;
  color:var(--ink);
}

.page-head h1 .accent{color:var(--green-strong);}

.page-head p{
  margin:0;
  color:var(--muted);
  font-size:clamp(.85rem,2.3vw,.95rem);
}

.section-title{
  margin:0 0 .4rem;
  font-size:clamp(1.25rem,3.5vw,1.65rem);
  letter-spacing:-.01em;
  color:var(--ink);
}

.section-title .hash{color:var(--green-strong);}

.section-sub{
  margin:0 0 1.8rem;
  color:var(--muted);
  font-size:.85rem;
}

/* =========================== TIMELINE ========================= */

.timeline{
  position:relative;
  margin:0;
  padding:0 0 0 2.2rem;
  list-style:none;
}

.timeline::before{
  content:"";
  position:absolute;
  left:5px;
  top:6px;
  bottom:6px;
  width:2px;
  background:linear-gradient(180deg,var(--green),rgba(0,168,107,0.35) 55%,rgba(214,40,40,0.6));
  box-shadow:0 0 8px rgba(0,168,107,0.25);
}

.log{
  position:relative;
  margin:0 0 1rem;
}

.log::before{
  content:"";
  position:absolute;
  left:-2.2rem;
  top:1.25rem;
  width:12px;
  height:12px;
  transform:rotate(45deg);
  background:#ffffff;
  border:2px solid var(--green);
  box-shadow:0 0 10px rgba(0,168,107,0.4);
}

.log-card{
  border:1px solid var(--green-line);
  border-radius:12px;
  background:#ffffff;
  padding:1.15rem clamp(1rem,3vw,1.4rem);
  transition:border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.log-card:hover{
  border-color:var(--green);
  transform:translateY(-2px);
  box-shadow:0 16px 40px rgba(0,168,107,0.1), 0 4px 12px rgba(0,0,0,0.04);
}

.log-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}

.log h2{
  margin:0 0 .65rem;
  font-size:clamp(.98rem,2.6vw,1.1rem);
  line-height:1.45;
  color:var(--green-strong);
}

.log-num{
  flex:none;
  font-size:.75rem;
  color:#b7c7c0;
  letter-spacing:.08em;
  padding-top:.1rem;
}

.log p{
  margin:0 0 1rem;
  font-size:.92rem;
  line-height:1.75;
  color:var(--ink-soft);
}

.log p:last-child{margin-bottom:0;}

.log p a{
  color:var(--green-strong);
  text-decoration:none;
  border-bottom:1px dashed rgba(0,168,107,0.45);
}

.log p a:hover{
  color:var(--red);
  border-bottom-color:var(--red);
}

/* =========================== BUTTONS ========================== */

.btn{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  padding:.45rem .9rem;
  border-radius:8px;
  border:1px solid rgba(214,40,40,0.5);
  background:var(--red-tint);
  color:var(--red);
  font-family:inherit;
  font-size:.78rem;
  font-weight:600;
  letter-spacing:.02em;
  text-decoration:none;
  transition:background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.btn:hover,
.btn:focus-visible{
  background:var(--red);
  border-color:var(--red);
  color:#ffffff;
  transform:translateY(-2px);
  box-shadow:0 10px 22px rgba(214,40,40,0.25);
}

/* ============================ PANEL =========================== */

.panel{
  border:1px solid var(--green-line);
  border-radius:12px;
  background:#ffffff;
  padding:clamp(1.15rem,4vw,2rem);
  margin-bottom:1.25rem;
  box-shadow:0 4px 20px rgba(0,168,107,0.05);
}

.panel > :last-child{margin-bottom:0;}

.panel p{
  margin:0 0 1rem;
  color:var(--ink-soft);
  font-size:.93rem;
  line-height:1.8;
}

.panel p a{
  color:var(--green-strong);
  text-decoration:none;
  border-bottom:1px dashed rgba(0,168,107,0.45);
}

.panel p a:hover{
  color:var(--red);
  border-bottom-color:var(--red);
}

.callout{
  border-left:3px solid var(--red);
  background:var(--red-tint);
  border-radius:0 10px 10px 0;
  padding:1rem 1.2rem;
  margin:0 0 1.25rem;
}

.callout p{margin:0;color:#7a1f1f;font-size:.9rem;}
.callout strong{color:var(--red);}

/* ============================ FACTS =========================== */

.facts{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:.7rem;
  margin:0 0 1.5rem;
  padding:0;
  list-style:none;
}

.fact{
  border:1px solid var(--green-line);
  border-radius:10px;
  background:var(--panel-tint);
  padding:.85rem 1rem;
}

.fact .k{
  display:block;
  margin-bottom:.25rem;
  font-size:.62rem;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--muted);
}

.fact .v{
  display:block;
  font-size:.9rem;
  font-weight:600;
  color:var(--ink);
  line-height:1.4;
}

.fact .v.red{color:var(--red);}

/* =========================== POSTER =========================== */

.poster{
  display:block;
  width:100%;
  max-width:600px;
  height:auto;
  margin:0 auto;
  border-radius:12px;
  border:1px solid var(--green-line);
  box-shadow:0 20px 60px rgba(0,168,107,0.12), 0 6px 20px rgba(0,0,0,0.06);
}

/* ========================== SPONSORS ========================== */

.sponsors{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:1rem;
}

.sponsor{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:130px;
  padding:1.2rem;
  border-radius:12px;
  background:#ffffff;
  border:1px solid var(--green-line);
  box-shadow:0 4px 20px rgba(0,168,107,0.08);
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.sponsor:hover{
  transform:translateY(-6px);
  border-color:var(--green);
  box-shadow:0 16px 40px rgba(0,168,107,0.15);
}

.sponsor img{
  display:block;
  max-width:100%;
  max-height:80px;
  object-fit:contain;
}

/* ============================ FOOTER ========================== */

.site-foot{
  margin-top:clamp(3rem,8vw,4.5rem);
  padding-top:1.5rem;
  border-top:1px solid var(--green-line);
  text-align:center;
  font-size:.8rem;
  color:var(--muted);
}

.site-foot p{margin:0;}

.site-foot a{
  color:var(--green-strong);
  text-decoration:none;
}

.site-foot a:hover{color:var(--red);}

.foot-tag{
  margin-top:.45rem !important;
  font-size:.68rem;
  letter-spacing:.28em;
  text-transform:uppercase;
  color:#a4b4ad;
}

/* =========================== REVEAL =========================== */

.reveal{
  opacity:0;
  transform:translateY(14px);
  transition:opacity .5s ease, transform .5s ease;
}

.reveal.in{
  opacity:1;
  transform:none;
}

/* ========================== MOTION ============================ */

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
  }
  .reveal{opacity:1;transform:none;}
}

/* ========================= RESPONSIVE ========================= */

@media (max-width:560px){
  .links{grid-template-columns:1fr;}
  .timeline{padding-left:1.85rem;}
  .log::before{left:-1.85rem;top:1.1rem;}
  .log-head{flex-direction:row;}
  .term-title{display:none;}
}