/* =====================================================
   T-REX AI Landing Page
   Design tokens per LP設計書.md
===================================================== */
:root {
  --c-bg: #0a0e16;
  --c-bg-alt: #0e1420;
  --c-navy: #1b3a5c;
  --c-primary: #2e9bff;
  --c-accent: #7fd4ff;
  --c-text: #e8eef5;
  --c-text-sub: #8fa3b8;
  --c-line: rgba(46, 155, 255, 0.18);
  --font-jp: "Noto Sans JP", sans-serif;
  --font-en: "Orbitron", "Noto Sans JP", sans-serif;
  --header-h: 64px;
  --radius: 14px;
  --shadow-glow: 0 0 24px rgba(46, 155, 255, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  font-family: var(--font-jp);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.85;
  font-size: 16px;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
em { font-style: normal; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 760px; }
.sp-only { display: none; }

/* ---------- Glow text ---------- */
.glow-text {
  color: var(--c-primary);
  text-shadow: 0 0 12px rgba(46, 155, 255, 0.8), 0 0 36px rgba(46, 155, 255, 0.4);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 700;
  border-radius: 999px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
  border: none;
  font-family: var(--font-jp);
}
.btn--primary {
  background: linear-gradient(135deg, #2e9bff 0%, #1670d8 100%);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(46, 155, 255, 0.55);
}
.btn--ghost {
  background: transparent;
  color: var(--c-text);
  border: 1px solid rgba(232, 238, 245, 0.35);
}
.btn--ghost:hover { border-color: var(--c-primary); color: var(--c-accent); }
.btn--lg { padding: 16px 40px; font-size: 17px; }
.btn--sm { padding: 8px 22px; font-size: 14px; }
.btn--block { display: block; width: 100%; }

/* =====================================================
   Header
===================================================== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.header.is-scrolled {
  background: rgba(10, 14, 22, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--c-line);
}
.header__inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.04em;
}
.header__logo-mark { color: var(--c-primary); display: grid; place-items: center; }
.header__logo-text em { color: var(--c-primary); font-family: var(--font-en); margin-left: 2px; }

.nav { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 500; }
.nav a:not(.btn) { position: relative; padding: 4px 0; color: var(--c-text); }
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--c-primary);
  transition: width 0.25s ease;
}
.nav a:not(.btn):hover::after { width: 100%; }

.nav-toggle { display: none; }

/* =====================================================
   Hero
===================================================== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 80px;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.hero__glow--1 {
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(46, 155, 255, 0.45), transparent 70%);
  top: -120px; right: -100px;
}
.hero__glow--2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(27, 58, 92, 0.8), transparent 70%);
  bottom: -80px; left: -120px;
}
.hero__circuit {
  position: absolute;
  left: 0; bottom: 0;
  width: min(50vw, 600px);
  opacity: 0.6;
}
.c-line {
  stroke: var(--c-primary);
  stroke-width: 1.5;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: drawLine 2.4s ease forwards 0.4s;
  opacity: 0.5;
}
.c-node {
  fill: var(--c-accent);
  filter: drop-shadow(0 0 6px rgba(127, 212, 255, 0.9));
  opacity: 0;
  animation: fadeIn 0.8s ease forwards 2.2s;
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }

.hero__inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero__eyebrow {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--c-accent);
  margin-bottom: 18px;
}
.hero__title {
  font-size: clamp(38px, 5.6vw, 64px);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}
.hero__sub {
  color: var(--c-text-sub);
  font-size: 17px;
  margin-bottom: 36px;
}
.hero__sub strong { color: var(--c-text); }
.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero__visual { position: relative; display: grid; place-items: center; }
.hero__visual::before {
  content: "";
  position: absolute;
  inset: -12%;
  background: radial-gradient(circle, rgba(46, 155, 255, 0.16), transparent 65%);
  pointer-events: none;
}
.hero__logo-img {
  position: relative;
  width: min(100%, 420px);
  filter: drop-shadow(0 0 28px rgba(46, 155, 255, 0.45)) drop-shadow(0 0 80px rgba(46, 155, 255, 0.25));
}
.hero__logo-fallback { display: none; text-align: center; }
.hero__visual.no-image .hero__logo-img { display: none; }
.hero__visual.no-image .hero__logo-fallback { display: block; }
.hero__logo-fallback-jp {
  display: block;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: 0.06em;
}
.hero__logo-fallback-jp em { color: var(--c-primary); font-family: var(--font-en); text-shadow: 0 0 18px rgba(46,155,255,0.8); }
.hero__logo-fallback-en {
  display: block;
  font-family: var(--font-en);
  font-size: 15px;
  letter-spacing: 0.5em;
  color: var(--c-accent);
  margin-top: 10px;
}

.hero__horizon {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(46, 155, 255, 0.8) 30%, rgba(127, 212, 255, 0.9) 50%, rgba(46, 155, 255, 0.8) 70%, transparent);
  box-shadow: 0 0 18px rgba(46, 155, 255, 0.6);
}

/* =====================================================
   Sections
===================================================== */
.section { padding: 96px 0; position: relative; }
.section--alt { background: var(--c-bg-alt); }
.section__eyebrow {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--c-primary);
  margin-bottom: 10px;
}
.section__title {
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 18px;
}
.section__lead { color: var(--c-text-sub); margin-bottom: 48px; }

/* ---------- Problem ---------- */
.section--problem { background: var(--c-bg-alt); }
.problem-list {
  max-width: 720px;
  margin: 40px 0;
  display: grid;
  gap: 14px;
}
.problem-list li {
  background: rgba(27, 58, 92, 0.25);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 18px 22px 18px 56px;
  position: relative;
}
.problem-list li::before {
  content: "✓";
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 0 10px rgba(46, 155, 255, 0.6);
}
.problem-bridge {
  font-size: clamp(20px, 2.8vw, 28px);
  font-weight: 900;
  text-align: center;
  margin-top: 56px;
}

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 24px; }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: linear-gradient(160deg, rgba(27, 58, 92, 0.35), rgba(14, 20, 32, 0.6));
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 155, 255, 0.5);
  box-shadow: 0 8px 32px rgba(46, 155, 255, 0.15);
}
.card__icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: rgba(46, 155, 255, 0.12);
  color: var(--c-accent);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.card__icon svg { width: 28px; height: 28px; }
.card__title { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.card__text { color: var(--c-text-sub); font-size: 14.5px; margin-bottom: 18px; }
.card__list { display: grid; gap: 8px; font-size: 14px; }
.card__list li { padding-left: 18px; position: relative; color: var(--c-text); }
.card__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.7em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c-primary);
  box-shadow: 0 0 6px rgba(46, 155, 255, 0.8);
}

/* ---------- Strength ---------- */
.strength {
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 32px 28px;
  background: rgba(10, 14, 22, 0.5);
  position: relative;
  overflow: hidden;
}
.strength__num {
  font-family: var(--font-en);
  font-size: 44px;
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(46, 155, 255, 0.55);
  line-height: 1;
  display: block;
  margin-bottom: 14px;
}
.strength__title { font-size: 19px; font-weight: 700; margin-bottom: 10px; color: var(--c-accent); }
.strength p { color: var(--c-text-sub); font-size: 14.5px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(90deg, rgba(27, 58, 92, 0.45), rgba(46, 155, 255, 0.16), rgba(27, 58, 92, 0.45));
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  padding: 56px 0;
}
.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band__text { font-size: 19px; font-weight: 700; }

/* ---------- Case ---------- */
.case {
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 30px 28px;
  background: linear-gradient(160deg, rgba(27, 58, 92, 0.25), rgba(14, 20, 32, 0.5));
}
.case__tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-accent);
  border: 1px solid rgba(127, 212, 255, 0.4);
  border-radius: 999px;
  padding: 3px 14px;
  margin-bottom: 14px;
}
.case__title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.case__detail { display: grid; grid-template-columns: 58px 1fr; gap: 8px 14px; font-size: 14px; }
.case__detail dt {
  color: var(--c-primary);
  font-weight: 700;
  text-align: center;
  background: rgba(46, 155, 255, 0.1);
  border-radius: 6px;
  height: fit-content;
  padding: 1px 0;
}
.case__detail dd { color: var(--c-text-sub); }

/* ---------- Flow ---------- */
.flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  counter-reset: step;
}
.flow__step {
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: rgba(10, 14, 22, 0.5);
  padding: 24px 18px;
  position: relative;
}
.flow__step:not(:last-child)::after {
  content: "▶";
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-primary);
  font-size: 11px;
  z-index: 1;
  text-shadow: 0 0 8px rgba(46, 155, 255, 0.8);
}
.flow__num {
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--c-accent);
  display: block;
  margin-bottom: 8px;
}
.flow__step h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.flow__step p { font-size: 13px; color: var(--c-text-sub); line-height: 1.7; }

/* ---------- Price ---------- */
.price-card {
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 36px 28px;
  background: rgba(10, 14, 22, 0.5);
  text-align: center;
  position: relative;
}
.price-card--featured {
  border-color: rgba(46, 155, 255, 0.6);
  background: linear-gradient(180deg, rgba(46, 155, 255, 0.1), rgba(10, 14, 22, 0.6));
  box-shadow: 0 0 32px rgba(46, 155, 255, 0.12);
}
.price-card__badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 18px;
  box-shadow: var(--shadow-glow);
}
.price-card__name { font-size: 18px; font-weight: 700; color: var(--c-accent); margin-bottom: 14px; }
.price-card__price { font-size: 15px; color: var(--c-text-sub); margin-bottom: 14px; }
.price-card__price span {
  font-family: var(--font-en);
  font-size: 30px;
  font-weight: 700;
  color: var(--c-text);
  margin-right: 2px;
}
.price-card__desc { font-size: 14px; color: var(--c-text-sub); margin-bottom: 20px; min-height: 3.4em; }
.price-card .card__list { text-align: left; }
.price-note { text-align: center; color: var(--c-text-sub); font-size: 13px; margin-top: 28px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 14px; }
.faq__item {
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: rgba(10, 14, 22, 0.5);
  overflow: hidden;
}
.faq__item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  padding: 20px 56px 20px 24px;
  position: relative;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::before {
  content: "Q";
  font-family: var(--font-en);
  color: var(--c-primary);
  margin-right: 12px;
  font-weight: 900;
}
.faq__item summary::after {
  content: "+";
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-primary);
  font-size: 22px;
  transition: transform 0.25s ease;
}
.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__item p {
  padding: 0 24px 22px 24px;
  color: var(--c-text-sub);
  font-size: 14.5px;
}

/* ---------- Company ---------- */
.company-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.company-table th, .company-table td {
  border-bottom: 1px solid var(--c-line);
  padding: 18px 12px;
  text-align: left;
  vertical-align: top;
}
.company-table th { width: 130px; color: var(--c-accent); font-weight: 700; white-space: nowrap; }

/* ---------- Contact ---------- */
.section--contact { overflow: hidden; }
.contact__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(46, 155, 255, 0.14), transparent),
    var(--c-bg-alt);
  pointer-events: none;
}
.section--contact .container { position: relative; }
.section--contact .section__title { text-align: center; }
.section--contact .section__eyebrow { text-align: center; }
.section--contact .section__lead { text-align: center; }

.contact-form {
  background: rgba(10, 14, 22, 0.7);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 40px 36px;
  display: grid;
  gap: 22px;
}
.form-row { display: grid; gap: 8px; }
.form-row label { font-weight: 700; font-size: 14px; }
.required {
  background: var(--c-primary);
  color: #fff;
  font-size: 11px;
  border-radius: 4px;
  padding: 1px 8px;
  margin-left: 8px;
  font-weight: 700;
}
.form-row input, .form-row textarea {
  background: rgba(27, 58, 92, 0.2);
  border: 1px solid var(--c-line);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--c-text);
  font-family: var(--font-jp);
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-row input::placeholder, .form-row textarea::placeholder { color: rgba(143, 163, 184, 0.55); }
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(46, 155, 255, 0.18);
}
.form-note { text-align: center; color: var(--c-accent); font-weight: 700; }
.form-note--error { color: #ff8a8a; }

/* ハニーポット:視覚的に隠す(display:noneはbotに無視されやすいため位置で隠す) */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--c-line);
  padding: 36px 0;
  background: #070a10;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__logo { font-weight: 900; font-size: 16px; }
.footer__logo em { color: var(--c-primary); font-family: var(--font-en); }
.footer__logo span {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--c-text-sub);
  margin-left: 10px;
}
.footer__copy { color: var(--c-text-sub); font-size: 12.5px; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .c-line, .c-node { animation: none; stroke-dashoffset: 0; opacity: 1; }
}

/* =====================================================
   Responsive
===================================================== */
@media (max-width: 960px) {
  .card-grid--3 { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; max-width: 480px; }
  .flow__step:not(:last-child)::after {
    content: "▼";
    right: auto;
    left: 50%;
    top: auto;
    bottom: -16px;
    transform: translateX(-50%);
  }
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__cta { justify-content: center; }
  .hero__visual { order: -1; }
  .hero__logo-img { width: min(70%, 340px); }
}

@media (max-width: 768px) {
  .sp-only { display: inline; }
  .section { padding: 72px 0; }
  .card-grid--2 { grid-template-columns: 1fr; }
  .contact-form { padding: 30px 22px; }

  /* mobile nav */
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(10, 14, 22, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 28px 24px 36px;
    gap: 20px;
    border-bottom: 1px solid var(--c-line);
    transform: translateY(-130%);
    transition: transform 0.3s ease;
    z-index: 99;
  }
  .nav.is-open { transform: translateY(0); }

  .nav-toggle {
    display: grid;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
  }
  .nav-toggle span {
    width: 24px; height: 2px;
    background: var(--c-text);
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
