:root {
  --bg: #0b0d14;
  --bg-alt: #10131d;
  --surface: #151926;
  --surface-2: #1b2031;
  --border: #262c40;
  --text: #e8eaf2;
  --muted: #9aa1b7;
  --dim: #6b7290;
  --php: #8b8fd6;
  --php-strong: #a9acf0;
  --danger: #ff5c5c;
  --danger-soft: rgba(255, 92, 92, 0.12);
  --warn: #f6c35b;
  --ok: #4fd18b;
  --radius: 14px;
  --font: 'Inter', 'Noto Sans JP', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.lang-ja { line-height: 1.8; }
a { color: var(--php-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
code { overflow-wrap: anywhere; font-family: var(--mono); font-size: 0.88em; background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 5px; color: var(--php-strong); }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.02em; }
.lang-ja h1, .lang-ja h2, .lang-ja h3 { letter-spacing: 0; line-height: 1.35; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.6rem; }
p { margin: 0 0 1rem; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding: 104px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.eyebrow { font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--php); margin-bottom: 1rem; display: flex; align-items: center; gap: 10px; }
.lang-ja .eyebrow { font-family: var(--font); letter-spacing: 0.06em; font-weight: 600; }
.eyebrow-danger { color: var(--danger); }
.lead { font-size: 1.12rem; color: var(--muted); }
.narrow { max-width: 780px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--php); color: #0b0d14; font-weight: 700; border: 0; cursor: pointer;
  padding: 12px 22px; border-radius: 10px; font-size: 0.98rem; font-family: inherit;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; background: var(--php-strong); transform: translateY(-1px); }
.btn-sm { padding: 8px 14px; font-size: 0.9rem; }
.btn-lg { padding: 15px 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 8px 30px rgba(255, 92, 92, 0.25); }
.btn-danger:hover { background: #ff7373; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface); }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* Alert bar */
.alert-bar {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(90deg, #3a0f14, #5a1219 50%, #3a0f14);
  color: #ffd9d9; padding: 10px 16px; font-size: 0.9rem; text-align: center;
}
.alert-bar:hover { text-decoration: none; }
.alert-bar:hover .alert-link { text-decoration: underline; }
.alert-tag { background: var(--danger); color: #fff; font-weight: 800; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 5px; }
.alert-link { font-weight: 700; color: #fff; white-space: nowrap; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(11, 13, 20, 0.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.12rem; font-family: var(--mono); }
.logo:hover { text-decoration: none; }
.logo b { color: var(--php-strong); }
.logo-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--php); color: #0b0d14; font-weight: 800; font-size: 0.95rem; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--muted); font-size: 0.93rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links .nav-hot { color: var(--danger); font-weight: 700; }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch { color: var(--muted); font-size: 0.9rem; border: 1px solid var(--border); padding: 6px 12px; border-radius: 8px; }
.lang-switch:hover { color: var(--text); text-decoration: none; background: var(--surface); }

/* Hero */
.hero { padding: 88px 0 72px; background: radial-gradient(900px 500px at 85% 10%, rgba(139, 143, 214, 0.16), transparent 60%), radial-gradient(700px 400px at 0% 100%, rgba(255, 92, 92, 0.07), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); font-weight: 800; margin-bottom: 1.4rem; }
.lang-ja .hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.hero h1 span { display: block; }
.hero h1 .accent { background: linear-gradient(90deg, var(--php-strong), #d4b6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 1.8rem; }

.terminal { background: #07080d; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; background: var(--surface); border-bottom: 1px solid var(--border); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3f55; }
.term-bar i:first-child { background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; font-family: var(--mono); font-size: 0.78rem; color: var(--dim); }
.terminal pre { margin: 0; padding: 20px 22px; font-family: var(--mono); font-size: 0.84rem; line-height: 1.75; color: #cfd3e6; white-space: pre-wrap; }
.c-dim { color: var(--dim); } .c-red { color: var(--danger); } .c-yel { color: var(--warn); } .c-grn { color: var(--ok); }
.cursor { display: inline-block; width: 8px; height: 1.05em; background: var(--php-strong); vertical-align: text-bottom; margin-left: 4px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 64px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.stat strong { display: block; font-size: 1.35rem; font-weight: 800; color: var(--text); }
.stat span { color: var(--muted); font-size: 0.92rem; }

/* Advisory */
.advisory { background: linear-gradient(180deg, rgba(255, 92, 92, 0.06), transparent 40%); border-top: 1px solid rgba(255, 92, 92, 0.25); }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 0 rgba(255, 92, 92, 0.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 92, 92, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 92, 92, 0); } }
.cve-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.6rem 0; }
.cve, .cvss { font-family: var(--mono); font-size: 0.85rem; padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(255, 92, 92, 0.4); color: #ffc2c2; background: var(--danger-soft); }
.cvss { background: var(--danger); color: #fff; border-color: var(--danger); font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 0 0 32px; }
.facts div { background: var(--surface); padding: 16px 18px; }
.facts dt { font-size: 0.78rem; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.lang-ja .facts dt { text-transform: none; letter-spacing: 0; }
.facts dd { margin: 0; font-weight: 600; font-size: 0.95rem; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 28px; }
.adv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.ver-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.ver-table td { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.ver-table td:last-child { text-align: right; }
.ver-table code.ok { color: var(--ok); background: rgba(79, 209, 139, 0.1); }
.ver-table tr.old td { color: var(--warn); border-bottom: 0; }
.ver-table tr.old td:last-child { font-size: 0.88rem; }
.note { color: var(--muted); font-size: 0.92rem; margin: 0; }
.note-warn { color: var(--warn); margin-top: 0.6rem; }

.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 0.7rem; color: #cfd3e6; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: 0.55em; width: 14px; height: 8px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg) translateY(-3px); }
.ticks.warn li::before { width: 8px; height: 8px; border: 0; background: var(--warn); border-radius: 50%; transform: none; top: 0.6em; left: 4px; }

.check { margin-bottom: 20px; }
.check-steps { margin: 0; padding-left: 1.2rem; }
.check-steps li { margin-bottom: 1.1rem; color: var(--muted); }
.check-steps li p { margin-bottom: 0.5rem; }
.check-steps pre { margin: 0; background: #07080d; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; overflow-x: auto; }
.check-steps pre code { background: none; padding: 0; color: #cfd3e6; overflow-wrap: normal; }

.offer { display: flex; align-items: center; justify-content: space-between; gap: 32px; background: linear-gradient(135deg, rgba(255, 92, 92, 0.14), rgba(139, 143, 214, 0.08)); border: 1px solid rgba(255, 92, 92, 0.35); border-radius: var(--radius); padding: 30px 32px; }
.offer h3 { font-size: 1.3rem; }

/* End-of-life */
.eol-steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.eol-steps li { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.eol-steps li:not(:last-child)::after { content: '→'; position: absolute; right: -17px; top: 50%; transform: translateY(-50%); color: var(--php); font-size: 1.2rem; z-index: 1; }
.eol-tag { position: absolute; top: 22px; right: 22px; font-size: 0.75rem; font-weight: 700; color: var(--php-strong); background: rgba(139, 143, 214, 0.14); border-radius: 999px; padding: 3px 10px; }
.eol-steps li:first-child .eol-tag { color: #ffc2c2; background: var(--danger-soft); }
.eol-steps p { color: var(--muted); margin: 0; }

/* Method */
.method-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch; margin-top: 36px; }
.method-plus { display: grid; place-items: center; font-size: 2rem; font-weight: 300; color: var(--dim); }
.method-badge { display: inline-block; font-family: var(--mono); font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; margin-bottom: 14px; }
.method-ai .method-badge { background: rgba(139, 143, 214, 0.16); color: var(--php-strong); }
.method-human .method-badge { background: rgba(79, 209, 139, 0.14); color: var(--ok); }
.method-human { border-color: rgba(79, 209, 139, 0.35); }

/* Services */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.svc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; transition: border-color .2s ease, transform .2s ease; }
.svc:hover { border-color: rgba(139, 143, 214, 0.5); transform: translateY(-2px); }
.svc-icon { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: rgba(139, 143, 214, 0.14); color: var(--php-strong); margin-bottom: 18px; }
.svc-icon svg { width: 22px; height: 22px; }
.svc p { color: var(--muted); margin: 0; font-size: 0.96rem; }

/* Versions */
.timeline { list-style: none; padding: 0; margin: 44px 0 20px; display: grid; grid-template-columns: repeat(13, 1fr); gap: 6px; }
.timeline li { text-align: center; padding: 16px 4px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.timeline li.eol { border-color: rgba(246, 195, 91, 0.35); }
.timeline li.active { border-color: rgba(79, 209, 139, 0.45); background: rgba(79, 209, 139, 0.07); }
.tl-v { display: block; font-family: var(--mono); font-weight: 700; font-size: 1.05rem; }
.tl-y { display: block; font-size: 0.75rem; color: var(--dim); }
.legend { display: flex; gap: 24px; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dot.eol { background: var(--warn); } .dot.active { background: var(--ok); }

/* Process */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.steps li { border-top: 2px solid var(--php); padding-top: 22px; }
.step-n { display: block; font-family: var(--mono); color: var(--php); font-weight: 700; margin-bottom: 10px; }
.steps p { color: var(--muted); margin: 0; font-size: 0.96rem; }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; }
.faq-wrap > *, .contact-grid > *, .hero-grid > *, .adv-grid > * { min-width: 0; }
.faq summary > * , .faq summary { overflow-wrap: anywhere; }
.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; overflow: hidden; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; width: 1em; text-align: center; color: var(--php); font-size: 1.4rem; line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* Contact */
.contact { background: radial-gradient(800px 400px at 15% 0%, rgba(139, 143, 214, 0.14), transparent 60%); }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.contact-grid > div > .card { margin-top: 1.6rem; }
.or-email { margin-top: 1.4rem; color: var(--muted); }

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field span { font-size: 0.88rem; font-weight: 600; color: #cfd3e6; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 0.97rem; color: var(--text);
  background: #0d1019; border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 140px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--php); box-shadow: 0 0 0 3px rgba(139, 143, 214, 0.2); }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; font-weight: 600; min-height: 1.2em; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--danger); }
.form-privacy { margin: 0; font-size: 0.82rem; color: var(--dim); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 48px 0 32px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.footer-inner p { color: var(--muted); margin: 12px 0 0; }
.footer-right { display: flex; gap: 22px; align-items: center; }
.footer-right a { color: var(--muted); }
.disclaimer { font-size: 0.82rem; color: var(--dim); max-width: 820px; }
.copy { font-size: 0.82rem; color: var(--dim); margin: 0; }

/* Responsive */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .timeline { grid-template-columns: repeat(7, 1fr); }
}
@media (max-width: 900px) {
  .section { padding: 76px 0; }
  .hero-grid, .adv-grid, .faq-wrap, .contact-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 40px; }
  .svc-grid, .eol-steps { grid-template-columns: 1fr 1fr; }
  .eol-steps li::after { display: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .method-plus { padding: 0; font-size: 1.6rem; }
  .offer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .alert-bar { font-size: 0.82rem; gap: 6px 10px; }
  .hero { padding: 56px 0 48px; }
  .stats, .svc-grid, .eol-steps, .steps, .field-row { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: repeat(4, 1fr); }
  .card, .svc, .eol-steps li { padding: 22px; }
  .offer { padding: 24px; }
  .nav-actions .btn { display: none; }
  .terminal pre { font-size: 0.75rem; padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* News */
.news-page { padding-top: 64px; }
.news-wrap { max-width: 820px; }
.news-h1 { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; margin-bottom: 1rem; }
.news-list { list-style: none; padding: 0; margin: 40px 0; border-top: 1px solid var(--border); }
.news-list li { border-bottom: 1px solid var(--border); padding: 28px 0; }
.news-list time, .news-date { display: block; font-family: var(--mono); font-size: 0.82rem; color: var(--dim); margin-bottom: 8px; }
.news-list h2 { font-size: 1.4rem; margin-bottom: 0.6rem; }
.news-list h2 a { color: var(--text); }
.news-list p { color: var(--muted); }
.news-more { font-weight: 600; font-size: 0.92rem; }
.news-empty { color: var(--muted); margin: 40px 0; }
.news-back { display: inline-block; margin-bottom: 28px; color: var(--muted); }
.news-cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 56px; }
.news-cta p { color: var(--muted); margin: 0; }
.prose { font-size: 1.05rem; line-height: 1.8; margin-top: 32px; color: #d6d9e8; }
.prose h2 { font-size: 1.5rem; margin: 2.2rem 0 1rem; }
.prose h3 { font-size: 1.2rem; margin: 1.8rem 0 0.8rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.2rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a { text-decoration: underline; }
.prose blockquote { margin: 0 0 1.2rem; padding: 4px 18px; border-left: 3px solid var(--php); color: var(--muted); }
.prose pre { background: #07080d; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; overflow-x: auto; margin: 0 0 1.2rem; }
.prose pre code { background: none; padding: 0; overflow-wrap: normal; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.prose img { max-width: 100%; border-radius: 10px; }
@media (max-width: 600px) { .news-cta { flex-direction: column; align-items: flex-start; } }
.field-hint { font-size: 0.8rem; color: var(--dim); }

/* About */
.about-head { max-width: 860px; }
.about-head .lead { max-width: 780px; }
.about-badges { display: flex; flex-direction: column; gap: 10px; padding-top: 36px; }
.badge-org { font-family: var(--mono); font-weight: 700; font-size: 1rem; padding: 12px 20px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--php-strong); text-align: center; white-space: nowrap; }
.about-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 40px 0 20px; }
.about-point { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 28px; }
.about-point p { color: var(--muted); margin: 0; }
.about-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.about-pair p { color: var(--muted); margin: 0; }
.about-confidential { border-color: rgba(79, 209, 139, 0.35); }
.about-confidential h3 { display: flex; align-items: center; gap: 10px; }
.about-confidential svg { width: 20px; height: 20px; color: var(--ok); flex: none; }
.about-promise { margin: 24px 0 0; padding: 18px 22px; border-left: 3px solid var(--php); background: var(--surface); border-radius: 0 10px 10px 0; font-weight: 600; }
@media (max-width: 900px) {
  .about-head { grid-template-columns: 1fr; gap: 0; }
  .about-badges { flex-direction: row; padding-top: 8px; }
  .about-grid, .about-pair { grid-template-columns: 1fr; }
}
