/*
Theme Name: P54 Cipher
Theme URI: https://p54.ai
Author: Project 54
Author URI: https://projectfifty4.com
Description: Bespoke single-page theme for p54.ai — the "Cipher" classified-document landing page. Engineering quiet intelligence systems.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: p54-cipher
*/

/* ---- Base ---- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: #0a0a0b;
  color: #e9e9e6;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
::selection { background: #e9e9e6; color: #0a0a0b; }
a { color: inherit; }

/* ---- Keyframes ---- */
@keyframes p54blink { 0%,49%{opacity:1} 50%,100%{opacity:0} }

/* ---- Layout shell ---- */
.cipher { min-height: 100vh; position: relative; overflow: hidden; }
.scanlines {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 100% 4px;
  pointer-events: none; z-index: 1;
}
.wrap { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 0 40px; }

/* ---- Header ---- */
.head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px 0; border-bottom: 1px solid rgba(233,233,230,0.1);
  font-size: 12px; letter-spacing: 0.08em; color: #7b7b78;
}
.brand { display: inline-flex; align-items: center; color: #e9e9e6; text-decoration: none; }

/* ---- Chevron logo (❯ p54▮) ---- */
.p54-logo { display: inline-flex; align-items: center; gap: 0.28em; font-family: 'IBM Plex Mono', monospace; font-weight: 500; letter-spacing: 0.02em; line-height: 1; font-size: 22px; }
.p54-chevron { color: #6ee7a8; font-weight: 400; }
.p54-word { color: #e9e9e6; }
.p54-cursor { display: inline-block; width: 0.42em; height: 0.84em; background: #6ee7a8; margin-left: 0.06em; }
.p54-cursor.is-blinking { animation: p54blink 1.1s steps(1) infinite; }
.head-right { display: flex; align-items: center; gap: 28px; }
.status { display: flex; align-items: center; gap: 8px; }
.status .led { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #6ee7a8; animation: p54blink 1.4s steps(1) infinite; }

/* ---- Hero ---- */
.hero { padding: 128px 0 96px; }
.kicker { font-size: 12px; letter-spacing: 0.32em; color: #6ee7a8; margin-bottom: 40px; }
.hero h1 {
  font-family: 'IBM Plex Mono', monospace; font-weight: 500;
  font-size: clamp(34px, 6.2vw, 82px); line-height: 1.02; letter-spacing: -0.01em;
  margin: 0; color: #e9e9e6;
}
.hero h1 > span { display: block; }
.caret {
  display: inline-block; width: 0.5em; height: 0.84em; background: #6ee7a8;
  margin-left: 0.12em; transform: translateY(0.08em);
  animation: p54blink 1.1s steps(1) infinite;
}
.lede {
  max-width: 560px; margin: 48px 0 0;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 17px; line-height: 1.7;
  color: #9a9a96; font-weight: 300;
}

/* ---- Section label ---- */
.seclabel { display: flex; align-items: baseline; gap: 16px; font-size: 12px; letter-spacing: 0.18em; color: #7b7b78; }
.seclabel .idx { color: #6ee7a8; }
.seclabel .rule { flex: 1; height: 1px; background: rgba(233,233,230,0.1); }

/* ---- Active record table ---- */
.record { border: 1px solid rgba(233,233,230,0.12); }
.row { display: grid; grid-template-columns: 200px 1fr; border-bottom: 1px solid rgba(233,233,230,0.1); }
.row:last-child { border-bottom: none; }
.row .key { padding: 20px 24px; color: #7b7b78; font-size: 13px; letter-spacing: 0.12em; border-right: 1px solid rgba(233,233,230,0.1); }
.row .val { padding: 20px 24px; font-size: 14px; letter-spacing: 0.08em; color: #6ee7a8; cursor: default; white-space: nowrap; }
.hint { margin-top: 14px; font-size: 12px; color: #5a5a57; letter-spacing: 0.06em; }

/* ---- Principles ---- */
.principles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px; background: rgba(233,233,230,0.1); border: 1px solid rgba(233,233,230,0.1);
}
.principles .cell { background: #0a0a0b; padding: 32px 28px; }
.principles .num { color: #6ee7a8; font-size: 12px; margin-bottom: 16px; }
.principles .title { font-size: 16px; line-height: 1.45; color: #e9e9e6; }
.principles .body { font-family: 'IBM Plex Sans', sans-serif; font-size: 14px; line-height: 1.65; color: #8a8a86; font-weight: 300; margin: 12px 0 0; }

/* ---- CTA ---- */
.cta-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 40px; }
.cta-row h2 { font-weight: 500; font-size: clamp(26px, 3.8vw, 46px); letter-spacing: -0.01em; margin: 0; color: #e9e9e6; }
.cta-row .copy { font-family: 'IBM Plex Sans', sans-serif; font-size: 16px; line-height: 1.7; color: #9a9a96; font-weight: 300; max-width: 440px; margin: 24px 0 0; }
.cta {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 14px;
  background: #e9e9e6; color: #0a0a0b; text-decoration: none;
  font-weight: 500; font-size: 15px; letter-spacing: 0.04em; padding: 20px 30px;
  transition: background .2s;
}
.cta:hover { background: #6ee7a8; }
.cta .arrow { font-size: 18px; }

/* ---- Footer ---- */
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 28px 0; border-top: 1px solid rgba(233,233,230,0.1); font-size: 12px; letter-spacing: 0.08em; color: #5a5a57; }

/* ---- Section paddings ---- */
.s-record { padding: 8px 0 96px; }
.s-record .seclabel { margin-bottom: 28px; }
.s-principles { padding: 8px 0 110px; }
.s-principles .seclabel { margin-bottom: 44px; }
.s-cta { padding: 60px 0 140px; border-top: 1px solid rgba(233,233,230,0.1); }

/* ---- Responsive ---- */
@media (max-width: 720px) {
  .subsidiary { display: none; }
  .wrap { padding: 0 24px; }
  .hero { padding: 88px 0 72px; }
  .row { grid-template-columns: 130px 1fr; }
}

/* ---- Reduced motion: render final text immediately, no blink ---- */
@media (prefers-reduced-motion: reduce) {
  .status .led, .caret, .p54-cursor.is-blinking { animation: none; }
}
