/*
Theme Name: CommsRail
Theme URI: https://commsrail.com
Author: Don't Panic Labs
Author URI: https://dontpaniclabs.com
Description: Marketing site for CommsRail — governed communication infrastructure. Custom classic theme built around the rail/control-room visual language.
Version: 0.1.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: Proprietary
Text Domain: commsrail
*/

/* CommsRail — design system v0.1
   Visual language: control room, signal rails, governed paths.
------------------------------------------------------------- */

:root {
  --ink:           #14161A;
  --steel:         #1B1E24;
  --steel-2:       #15171C;
  --rail:          #2A2E35;
  --rule:          #2A2E35;
  --paper:         #EAECEE;
  --paper-dim:     #A9B0B8;
  --text-dim:      #8A929C;
  --signal:        #38C09A;
  --signal-bright: #5FD3B0;
  --signal-deep:   #2A9A7C;
  --maxw:          1240px;

  --f-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-display: "Archivo", "IBM Plex Sans", system-ui, sans-serif;
}

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

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

a { color: var(--paper); text-decoration: none; }
a:hover { color: var(--signal-bright); }

.mono { font-family: var(--f-mono); letter-spacing: 0.04em; font-weight: 500; }

/* HEADER -------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav {
  display: flex; align-items: center; gap: 32px;
  padding-top: 18px; padding-bottom: 18px;
}
.brand { display: inline-flex; flex-direction: column; line-height: 1; }
.brand-mark {
  font-family: var(--f-sans);
  font-weight: 600; font-size: 22px; letter-spacing: -0.01em;
  color: var(--paper);
}
.brand-mark-i { position: relative; color: var(--paper); }
.brand-mark-i::after {
  content: "";
  position: absolute;
  top: -1px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px;
  background: var(--signal);
  box-shadow: 0 0 0 2px rgba(56,192,154,0.18);
}
.brand-byline {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  margin-top: 4px;
  text-transform: uppercase;
}
.primary-nav {
  display: flex; gap: 26px;
  margin-left: auto;
  font-size: 14px;
  color: var(--paper-dim);
}
.primary-nav a { color: var(--paper-dim); }
.primary-nav a:hover { color: var(--paper); }

.cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--rail);
  background: transparent;
  color: var(--paper);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.cta:hover { border-color: var(--signal); color: var(--signal-bright); }
.cta--amber {
  background: var(--signal);
  color: var(--ink);
  border-color: var(--signal);
  font-weight: 600;
}
.cta--amber:hover {
  background: var(--signal-bright);
  border-color: var(--signal-bright);
  color: var(--ink);
}
.cta--ghost { border-color: var(--rail); color: var(--paper-dim); }
.cta--lg { padding: 15px 28px; font-size: 14px; }

.dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--rail);
  border-radius: 0;
}
.dot--live {
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(56,192,154,0.55);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   rgba(56,192,154,0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(56,192,154,0); }
  100% { box-shadow: 0 0 0 0   rgba(56,192,154,0); }
}

/* HERO --------------------------------------------------- */
.hero {
  padding: 96px 0 64px;
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(54,67,86,0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54,67,86,0.18) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.hero .container { position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 7px 14px;
  border: 1px solid var(--rail);
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 28px;
}

.display {
  font-size: clamp(44px, 7vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 28px;
  max-width: 14ch;
}
.display-accent { color: var(--signal); }

.lede {
  font-size: 20px;
  line-height: 1.55;
  color: var(--paper-dim);
  max-width: 56ch;
  margin: 0 0 36px;
}
.lede--narrow { max-width: 64ch; margin-left: auto; margin-right: auto; }

.hero-ctas { display: flex; gap: 14px; margin-bottom: 64px; }

/* RAIL DIAGRAM ------------------------------------------- */
.rail {
  margin: 0;
  padding: 32px 8px 16px;
  background: var(--steel);
  border: 1px solid var(--rule);
}
.rail svg { width: 100%; height: auto; display: block; }
.gate-ring  { fill: var(--ink); stroke: var(--rail); stroke-width: 1.5; }
.gate-ring--end { stroke: var(--signal); }
.gate-square { fill: var(--ink); stroke: var(--signal); stroke-width: 1.5; }
.gate-dot   { fill: var(--paper-dim); }
.gate-dot--live { fill: var(--signal); filter: drop-shadow(0 0 6px rgba(56,192,154,0.6)); }
.telemetry {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px;
  color: var(--text-dim);
  padding: 10px 14px;
  margin-top: 6px;
  border-top: 1px solid var(--rule);
}

/* BANDS -------------------------------------------------- */
.band {
  padding: 96px 0;
  border-bottom: 1px solid var(--rule);
}
.band--inset { background: var(--steel); }
.band--accent {
  background: linear-gradient(180deg, var(--steel) 0%, var(--steel-2) 100%);
  border-top: 1px solid var(--rule);
}
.band--cta { padding: 120px 0; text-align: center; }

.section-eyebrow {
  font-size: 11px;
  color: var(--signal);
  margin: 0 0 18px;
  text-transform: uppercase;
}
.h-display {
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 24px;
  max-width: 22ch;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.split-left .h-display { max-width: 16ch; }
.split-right p { color: var(--paper-dim); margin: 0 0 18px; }
.emphasis {
  color: var(--paper) !important;
  font-size: 18px;
  border-left: 2px solid var(--signal);
  padding-left: 16px;
}

/* CARDS -------------------------------------------------- */
.grid { display: grid; gap: 24px; margin-top: 48px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--ink);
  border: 1px solid var(--rule);
  padding: 28px;
  position: relative;
  transition: border-color .2s ease;
}
.card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--rail);
  transition: background .2s ease;
}
.card:hover { border-color: var(--rail); }
.card:hover::before { background: var(--signal); }
.card-eye { color: var(--signal); font-size: 11px; margin: 0 0 10px; }
.card h3 { font-size: 19px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
.card p  { color: var(--paper-dim); margin: 0; font-size: 15px; }

/* HOW LIST ----------------------------------------------- */
.how {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.how li { background: var(--ink); padding: 36px 28px; position: relative; }
.how-num { display: block; color: var(--signal); font-size: 12px; margin-bottom: 18px; }
.how h3 { font-size: 20px; margin: 0 0 12px; letter-spacing: -0.01em; }
.how p  { color: var(--paper-dim); font-size: 15px; margin: 0; }

/* CONTROL LIST ------------------------------------------- */
.control-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
}
.control-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  background: var(--ink);
  font-size: 15px;
}
.control-list .mono { color: var(--signal); font-size: 14px; }

/* INTEGRATIONS ------------------------------------------- */
.integrations-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 56px;
}
.integrations-col ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 10px;
}
.integrations-col li {
  font-family: var(--f-mono);
  font-size: 14px;
  padding: 12px 16px;
  border: 1px solid var(--rule);
  color: var(--paper-dim);
}
.col-head {
  font-size: 11px;
  color: var(--signal);
  margin: 0 0 16px;
  text-transform: uppercase;
}

/* USE CASES ---------------------------------------------- */
.use-cases { margin-top: 56px; }
.usecase {
  display: flex; flex-direction: column;
  padding: 36px;
  background: var(--ink);
  border: 1px solid var(--rule);
  position: relative;
  min-height: 220px;
  transition: border-color .2s ease, transform .2s ease;
}
.usecase:hover { border-color: var(--signal); }
.usecase-eye { color: var(--signal); font-size: 11px; margin: 0 0 14px; }
.usecase h3  { font-size: 24px; line-height: 1.2; margin: 0; max-width: 22ch; font-weight: 600; }
.usecase-arrow {
  font-family: var(--f-mono);
  margin-top: auto;
  font-size: 24px;
  color: var(--signal);
  align-self: flex-end;
}

/* PAGE CONTENT (inner pages) ----------------------------- */
.page-hero {
  padding: 96px 0 48px;
  border-bottom: 1px solid var(--rule);
}
.page-hero .breadcrumb {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.page-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 20px;
  max-width: 18ch;
}
.page-hero .lede { margin-bottom: 0; }

.page-body {
  padding: 64px 0;
  font-size: 17px;
  line-height: 1.7;
}
.page-body .container { max-width: 820px; }
.page-body h2 { font-size: 28px; margin: 56px 0 16px; font-weight: 600; letter-spacing: -0.01em; }
.page-body h3 { font-size: 20px; margin: 36px 0 12px; font-weight: 600; }
.page-body p { color: var(--paper-dim); margin: 0 0 18px; }
.page-body ul { color: var(--paper-dim); padding-left: 20px; margin: 0 0 18px; }
.page-body li { margin-bottom: 8px; }

/* FOOTER ------------------------------------------------- */
.site-footer {
  background: var(--steel-2);
  padding: 72px 0 24px;
  border-top: 1px solid var(--rule);
}
.foot {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--rule);
}
.foot-byline { color: var(--paper-dim); margin: 10px 0 18px; font-size: 15px; max-width: 32ch; }
.foot-parent { font-size: 10px; color: var(--text-dim); letter-spacing: 0.18em; }
.foot-col { display: flex; flex-direction: column; gap: 10px; }
.foot-col a { color: var(--paper-dim); font-size: 14px; }
.foot-col a:hover { color: var(--paper); }
.foot-fine {
  display: flex; align-items: center; gap: 14px;
  padding-top: 24px;
  font-size: 11px;
  color: var(--text-dim);
}
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }
.center .h-display { max-width: 22ch; margin-left: auto; margin-right: auto; }

/* DEMO FORM ---------------------------------------------- */
.demo-form { display: grid; gap: 18px; margin-top: 40px; max-width: 640px; }
.demo-form label {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--signal);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.demo-form input,
.demo-form select,
.demo-form textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--rule);
  color: var(--paper);
  padding: 14px 16px;
  font-family: var(--f-sans);
  font-size: 16px;
}
.demo-form input:focus,
.demo-form select:focus,
.demo-form textarea:focus {
  outline: none;
  border-color: var(--signal);
}
.demo-form textarea { min-height: 120px; resize: vertical; }
.demo-form button { justify-self: start; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* RESPONSIVE --------------------------------------------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .how    { grid-template-columns: 1fr 1fr; }
  .integrations-grid { grid-template-columns: 1fr; }
  .foot   { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .primary-nav { display: none; }
  .nav { gap: 16px; }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .how, .control-list { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 32px; }
  .band { padding: 56px 0; }
}

/* PRICING (v2 — consumption model) ----------------------- */
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.plan {
  background: var(--ink);
  border: 1px solid var(--rule);
  padding: 32px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: border-color .2s ease;
}
.plan::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--rail);
  transition: background .2s ease;
}
.plan:hover { border-color: var(--rail); }
.plan:hover::before { background: var(--signal); }
.plan--feature { border-color: var(--signal); }
.plan--feature::before { background: var(--signal); }
.plan-eye { color: var(--signal); font-size: 11px; margin: 0 0 12px; }
.plan h3 { font-size: 22px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.01em; }
.price { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 8px; flex-wrap: wrap; }
.price-amount { font-size: 40px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.price-unit { font-family: var(--f-mono); font-size: 13px; color: var(--text-dim); }
.price-lead { font-size: 15px; color: var(--paper-dim); margin: 0 0 18px; }
.plan-list { list-style: none; padding: 0; margin: 4px 0 22px; color: var(--paper-dim); font-size: 14px; line-height: 1.7; }
.plan-list li { display: flex; gap: 10px; margin-bottom: 6px; }
.plan-list li::before { content: "\2014"; color: var(--signal); flex: none; }
.plan .cta { margin-top: auto; align-self: flex-start; }
.pricing-note {
  border: 1px solid var(--rule);
  border-left: 2px solid var(--signal);
  background: var(--steel);
  padding: 20px 24px;
  font-size: 15px;
  color: var(--paper);
  line-height: 1.6;
}
.pricing-note strong { color: var(--paper); }
.rate-tag { font-family: var(--f-mono); color: var(--signal-bright); font-size: 13px; }
.qual-note {
  font-size: 14px; color: var(--text-dim);
  border-top: 1px solid var(--rule);
  padding-top: 20px; margin-top: 36px; line-height: 1.6;
}
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .plan { padding: 24px; }
  .price-amount { font-size: 34px; }
}


/* --- Control Room alignment (inner pages match home) --- */
.brand { flex-direction: row; align-items: center; gap: 12px; }
.brand-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--signal); display: inline-block; }
.brand-byline { display: none; }
.brand-mark { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.01em; }
.display, .h-display, .page-hero h1 { font-family: var(--f-display); font-weight: 700; }
.card h3, .how h3, .usecase h3, .plan h3, .price-amount, .page-body h2 { font-family: var(--f-display); font-weight: 700; }

/* --- De-tell: remove monospace + live-pulse AI tells, align to home --- */
:root { --f-mono: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }

/* breadcrumb: quiet sans, not uppercase mono */
.breadcrumb { font-family: var(--f-sans); text-transform: none; letter-spacing: 0; color: var(--text-dim); font-size: 13px; }

/* eyebrows: match the home eyebrow (sans, uppercase, spaced, mint) */
.section-eyebrow, .card-eye, .col-head, .usecase-eye, .plan-eye {
  font-family: var(--f-sans); font-weight: 600; letter-spacing: 0.1em; font-size: 12px;
}

/* buttons: match home .cr-btn (sans, sentence case, rounded) */
.cta { font-family: var(--f-sans); text-transform: none; letter-spacing: 0; font-weight: 600; border-radius: 6px; }

/* no pulsing "live" dots anywhere on inner pages */
.dot--live { animation: none; box-shadow: none; }

/* governance control-list: mint check instead of mono box glyph */
.control-list .cl-check { color: var(--signal); font-weight: 700; flex: none; }

/* integrations chips + form labels + rates: plain sans */
.integrations-col li { font-family: var(--f-sans); letter-spacing: 0; }
.demo-form label { font-family: var(--f-sans); letter-spacing: 0.06em; }
.price-unit, .rate-tag, .foot-parent, .foot-fine, .usecase-arrow, .how-num { font-family: var(--f-sans); }
.how-num { color: var(--signal); font-weight: 700; }

/* calm rail caption (replaces the "LIVE RAIL" telemetry line) */
.rail-caption { font-family: var(--f-sans); color: var(--text-dim); font-size: 13px; padding: 14px 14px 2px; text-align: center; }
