/* =========================================================================
   Jibusense — CRT terminal one-pager
   Aesthetic: pitch-black canvas with amber (#ffb000) phosphor glow,
   scanlines, film noise, flicker, typed boot sequence, scroll reveal.
   ========================================================================= */

:root {
  --bg: #050506;
  --card: #070707;
  --card-hover: #100d04;
  --amber: #ffb000;
  --green: #7cfc9b;
  --white: #fff;
  --gutter: 6vw;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --jp: "Noto Sans JP", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--amber);
  font-family: var(--mono);
}

::selection { background: var(--amber); color: var(--bg); }

a { color: inherit; text-decoration: none; }

/* ---- Keyframes -------------------------------------------------------- */
@keyframes jbBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes jbScan  { 0% { transform: translateY(0); } 100% { transform: translateY(4px); } }
@keyframes jbFlick {
  0%, 100% { opacity: .98; }
  7%  { opacity: .85; }
  9%  { opacity: .98; }
  42% { opacity: .92; }
  43% { opacity: 1; }
  88% { opacity: .88; }
}
@keyframes jbRise {
  0%   { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---- Page wrapper ----------------------------------------------------- */
.page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  animation: jbFlick 7s infinite;
}

/* ---- Full-screen overlay layers -------------------------------------- */
.noise {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .045;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 90;
}
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 91;
  background: repeating-linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, .32) 3px,
    rgba(0, 0, 0, .32) 4px
  );
  animation: jbScan .3s steps(2) infinite;
}
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 92;
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, rgba(255, 176, 0, .05), transparent 72%),
    radial-gradient(circle at 50% 50%, transparent 52%, rgba(0, 0, 0, .55) 100%);
}

/* ---- Header / nav ----------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(2px);
  background: rgba(5, 5, 6, .72);
  padding: 20px var(--gutter);
  border-bottom: 1px solid rgba(255, 176, 0, .18);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .24em;
}
.cursor-block {
  display: inline-block;
  width: 9px;
  height: 16px;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
  animation: jbBlink 1.1s steps(1) infinite;
}
.nav {
  display: flex;
  gap: 28px;
  font-size: 12px;
  letter-spacing: .12em;
  color: rgba(255, 176, 0, .62);
}
.back-link {
  font-size: 12px;
  letter-spacing: .12em;
  color: rgba(255, 176, 0, .62);
}

/* Hover: nav / link rows → white + amber glow */
.jblink:hover { color: var(--white) !important; text-shadow: 0 0 14px var(--amber) !important; }

/* ---- Content sections ------------------------------------------------- */
.section {
  position: relative;
  z-index: 10;
  padding: 64px var(--gutter);
  border-top: 1px solid rgba(255, 176, 0, .18);
}
.label {
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--amber);
  text-shadow: 0 0 10px rgba(255, 176, 0, .45);
}

.jbrise { opacity: 0; }
.jbrise.in { animation: jbRise .7s cubic-bezier(.2, .7, .2, 1) forwards; }

/* ---- Hero ------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 10;
  padding: 8vh var(--gutter) 10vh;
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.boot {
  font-size: 13px;
  line-height: 2;
  color: rgba(255, 176, 0, .8);
  text-shadow: 0 0 8px rgba(255, 176, 0, .4);
  min-height: 120px;
}
.boot__text { white-space: pre-wrap; }
.cursor-inline {
  display: inline-block;
  width: 9px;
  height: 15px;
  background: var(--amber);
  vertical-align: -2px;
  box-shadow: 0 0 10px var(--amber);
  animation: jbBlink 1s steps(1) infinite;
}
.hero__title {
  margin: 30px 0 0;
  font-size: clamp(64px, 13vw, 168px);
  line-height: .88;
  font-weight: 800;
  letter-spacing: -.02em;
  text-shadow: 0 0 26px rgba(255, 176, 0, .55), 0 0 2px rgba(255, 176, 0, .9);
}
.hero__tagline {
  margin: 26px 0 0;
  max-width: 560px;
  font-size: 14px;
  line-height: 1.95;
  color: var(--amber);
}
.hero__cta {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  font-size: 12px;
  letter-spacing: .15em;
}
.btn {
  border: 1px solid var(--amber);
  padding: 13px 24px;
  color: var(--amber);
  box-shadow: 0 0 18px rgba(255, 176, 0, .25);
}
.btn--ghost {
  border: 1px solid rgba(255, 176, 0, .28);
  color: rgba(255, 176, 0, .7);
  box-shadow: none;
}

/* ---- About ------------------------------------------------------------ */
.about {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
}
.about__body { max-width: 720px; }
.about__body p {
  margin: 0;
  font-size: 17px;
  line-height: 1.9;
  text-shadow: 0 0 10px rgba(255, 176, 0, .28);
}

/* ---- Products --------------------------------------------------------- */
.products__label { margin-bottom: 28px; }
.products__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255, 176, 0, .18);
  border: 1px solid rgba(255, 176, 0, .18);
}
.card {
  background: var(--card);
  padding: 30px;
  transition: background .2s;
}
.card:hover { background: var(--card-hover); }
.card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 20px;
  font-weight: 700;
}
.card__arrow {
  color: rgba(255, 176, 0, .45);
  transition: transform .25s ease, color .25s ease;
}
.card:hover .card__arrow { color: var(--white); transform: translateX(6px); }
.card__desc {
  margin: 12px 0 16px;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255, 176, 0, .8);
}
.card__meta {
  font-size: 10px;
  letter-spacing: .2em;
  color: rgba(255, 176, 0, .4);
}

/* ---- Links + Contact -------------------------------------------------- */
.links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.links__label, .contact__label { margin-bottom: 22px; }
.links__list { display: flex; flex-direction: column; }
.links__row {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 176, 0, .12);
  font-size: 15px;
}
.links__row:last-child { border-bottom: none; }
.links__row span { color: rgba(255, 176, 0, .4); }
.contact__mail {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  text-shadow: 0 0 16px rgba(255, 176, 0, .5);
  display: inline-block;
}
.contact__meta {
  margin-top: 18px;
  font-size: 13px;
  line-height: 2;
  color: rgba(255, 176, 0, .55);
}
.status-dot { color: var(--green); }

/* ---- Footer ----------------------------------------------------------- */
.footer {
  position: relative;
  z-index: 10;
  padding: 28px var(--gutter);
  border-top: 1px solid rgba(255, 176, 0, .18);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: .12em;
  color: rgba(255, 176, 0, .4);
}
.footer a { color: rgba(255, 176, 0, .55); }
/* .label defaults to 12px; keep footer entries at the footer's 11px */
.footer .label { font-size: 11px; }

/* ---- Legal page ------------------------------------------------------- */
.legal {
  position: relative;
  z-index: 10;
  max-width: 920px;
  margin: 0 auto;
  padding: 9vh var(--gutter) 12vh;
}
.legal__title {
  margin: 18px 0 4px;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.02em;
  text-shadow: 0 0 24px rgba(255, 176, 0, .5);
}
.legal__intro {
  margin: 20px 0 0;
  font-size: 13px;
  line-height: 1.9;
  color: rgba(255, 176, 0, .55);
  font-family: var(--jp);
}
.legal__dl {
  margin: 44px 0 0;
  border-top: 1px solid rgba(255, 176, 0, .18);
}
.legal__row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 22px 4px;
  border-bottom: 1px solid rgba(255, 176, 0, .14);
  align-items: baseline;
}
.legal__dt {
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--amber);
  font-family: var(--jp);
  font-weight: 500;
}
.legal__idx { color: rgba(255, 176, 0, .4); margin-right: 10px; }
.legal__dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  color: rgba(255, 176, 0, .72);
  font-family: var(--jp);
}
.legal__note {
  margin: 40px 0 0;
  font-size: 12px;
  line-height: 2;
  color: rgba(255, 176, 0, .45);
  font-family: var(--jp);
}
.legal__back {
  margin-top: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--amber);
  padding: 14px 26px;
  font-size: 12px;
  letter-spacing: .15em;
  color: var(--amber);
  box-shadow: 0 0 18px rgba(255, 176, 0, .25);
}

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 720px) {
  .nav { gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
  .about { grid-template-columns: 1fr; gap: 20px; }
  .products__grid { grid-template-columns: 1fr; }
  .links { grid-template-columns: 1fr; gap: 40px; }
  .legal__row { grid-template-columns: 1fr; gap: 6px; }
  .footer { flex-direction: column; gap: 10px; text-align: left; }
}

/* ---- Reduced motion --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .page { animation: none; }
  .scanlines { animation: none; }
  .noise { display: none; }
  .cursor-block, .cursor-inline { animation: none; }
  .jbrise { opacity: 1; }
  .jbrise.in { animation: none; }
  .card, .card__arrow { transition: none; }
}
