/* ================================================================
   IRONCHILD-WEBSITE — visual language.

   2026-08-21, sixth pass: reverted from the literal-mockup adoption
   (internal Core-panel sidebar + numeric telemetry) back to the
   restrained, honest composition — the architect's own explicit
   instruction after seeing the mockup rendered. The Real Core lives in
   its own full-width section (see css/real-dashboard.css) with
   qualitative states, not numbers; Core Modules stays an icon-first
   system view with no per-category color-coding or counts; Use Cases
   and Story stay unboxed. The only genuinely new element this pass is
   a single "Subscribe" action in the header bar, which the previous
   honest version did not have (its header was plain text nav links
   only) — wired to the same real #pricing/sign-up flow as every other
   CTA on the page, nothing new on the auth/Stripe side.

   Icon language stays Font Awesome throughout — the one real icon
   library, used consistently, never mixed with another family.
================================================================ */

:root {
  --bg: #0a0c11;
  --bg-alt: #0d1016;
  --panel: #10131a;
  --panel-raised: #151923;
  --border: #232936;
  --border-soft: #1a1f29;
  --text: #f2f4f7;
  --text-dim: #9aa2b6;
  --text-faint: #5f6779;
  --accent: #6f93ff;
  --accent-dim: #2a3a63;
  --accent-soft: rgba(111, 147, 255, 0.12);
  --success: #35d07f;
  --radius: 10px;
  --max-width: 1120px;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
/* Confirmed root cause of the auth block "visual enredo" (2026-08-22):
   [hidden] and .auth-form both have specificity 0-1-0. .auth-form sets
   display:flex, which - at equal specificity - beats the browser's own
   [hidden]{display:none} default per normal cascade rules (author styles
   win ties over UA styles). Result: #signupForm's `hidden` attribute was
   silently ignored, so the Sign In form and the Create Account form
   (Email/Password twice, Full Name, Confirm Password, both submit
   buttons) rendered stacked on top of each other on every page load -
   not a spacing/container problem, an actual double-visible-state bug.
   This single rule makes `hidden` unconditionally win everywhere on the
   site, present and future, regardless of any class's own display value. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

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

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(10, 12, 17, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-soft); }
.header-row { display: flex; align-items: center; gap: 32px; height: 68px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: 0.02em; font-size: 1rem; }
.brand-mark { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 1.6; stroke-linejoin: round; flex-shrink: 0; }
.brand-mark-inline { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
.site-nav { display: flex; gap: 28px; flex: 1; }
.site-nav a { color: var(--text-dim); text-decoration: none; font-size: 0.88rem; }
.site-nav a:hover { color: var(--text); }
/* 2026-08-22 architectural decision: exactly two public actions in the
   header - Create Account (primary) and Sign In (quiet text link) -
   nothing else. */
.header-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.header-signin { color: var(--text-dim); text-decoration: none; font-size: 0.88rem; font-weight: 600; }
.header-signin:hover { color: var(--text); }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 1.5px; background: var(--text); display: block; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 11px 22px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 0.9rem; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--accent); color: #05070a; }
.btn-primary:hover { background: #86a4ff; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--text-faint); }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent-dim); padding: 8px 18px; font-size: 0.85rem; }
.btn-outline:hover { background: var(--accent-soft); }
.btn-block { display: block; width: 100%; text-align: center; }
.link-btn { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 0.9rem; padding: 0; }
.link-btn:hover { color: var(--text); }

/* ---------- Hero: text only ---------- */
.hero { padding: 76px 0 48px; text-align: center; }
.hero-eyebrow { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.16em; font-weight: 700; color: var(--accent); margin: 0 0 16px; display: flex; align-items: center; justify-content: center; }
.hero h1 { font-size: clamp(2.2rem, 4vw, 3.1rem); line-height: 1.15; margin: 0 0 14px; letter-spacing: 0.01em; }
.hero-tagline { color: var(--text-dim); font-size: 1.05rem; max-width: 480px; margin: 0 auto; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- Real Core section ---------- */
.real-core-section { padding: 24px 0 72px; }
.rc-label { text-align: center; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; color: var(--text-faint); margin: 0 0 20px; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { font-size: 1.5rem; margin: 0 0 36px; text-align: center; letter-spacing: 0.14em; color: var(--text-faint); font-family: var(--mono); }

/* ---------- Core Modules: icon-first system view, no numbers, no per-category color ---------- */
.module-group { max-width: 900px; margin: 0 auto 28px; }
.module-group:last-child { margin-bottom: 0; }
.module-group-label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; color: var(--text-faint); margin-bottom: 12px; }
.core-modules-sub { text-align: center; color: var(--text-faint); font-size: 0.85rem; margin: -16px 0 32px; }
.tech-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tech-chip { display: flex; align-items: center; gap: 9px; background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 9px 16px 9px 12px; font-size: 0.84rem; color: var(--text); }
.tech-chip i { color: var(--accent); font-size: 0.85rem; width: 16px; text-align: center; }
.tech-chip-state { font-style: normal; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.03em; color: var(--text-faint); padding-left: 4px; border-left: 1px solid var(--border); margin-left: 2px; }
.tech-chip-state-active { color: var(--success); }

/* ---------- Story: three words ---------- */
.concept-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; max-width: 900px; margin: 0 auto; text-align: center; }
@media (max-width: 720px) { .concept-row { grid-template-columns: 1fr; gap: 28px; } }
.concept i { font-size: 1.3rem; color: var(--accent); width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--accent-dim); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.concept h3 { font-size: 0.95rem; letter-spacing: 0.1em; margin: 0 0 8px; }
.concept p { margin: 0; color: var(--text-dim); font-size: 0.88rem; }

/* ---------- What we know / don't claim ---------- */
.knows-grid { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; gap: 28px; align-items: center; text-align: center; }
@media (max-width: 560px) { .knows-grid { grid-template-columns: 1fr; gap: 20px; } }
.knows-col h3 { font-size: 0.75rem; letter-spacing: 0.1em; color: var(--accent); margin: 0 0 8px; }
.knows-col-not h3 { color: var(--text-faint); }
.knows-col p { margin: 0; font-size: 0.92rem; color: var(--text-dim); }
.knows-divider { width: 1px; height: 32px; background: var(--border-soft); justify-self: center; }
@media (max-width: 560px) { .knows-divider { display: none; } }
.no-score-conclusion { text-align: center; font-size: 1.2rem; font-weight: 600; margin: 24px 0 0; color: var(--accent); }

/* ---------- Use cases: unboxed, plain ---------- */
.usecase-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; max-width: 1000px; margin: 0 auto; }
@media (max-width: 720px) { .usecase-row { grid-template-columns: 1fr; } }
.usecase h3 { margin: 0 0 8px; font-size: 0.9rem; letter-spacing: 0.02em; color: var(--text); }
.usecase p { margin: 0; color: var(--text-dim); font-size: 0.88rem; }

/* ---------- Pricing ---------- */
.pricing-card { max-width: 440px; margin: 0 auto; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; text-align: center; }
.pricing-head h3 { margin: 0 0 4px; font-size: 0.85rem; letter-spacing: 0.08em; color: var(--text-faint); text-transform: uppercase; }
.price { margin: 8px 0 4px; }
.price-amount { font-size: 2.6rem; font-weight: 700; }
.price-period { color: var(--text-dim); font-size: 1rem; }
.pricing-trial { color: var(--accent); font-size: 0.85rem; font-weight: 600; margin: 2px 0 0; }
.pricing-desc { color: var(--text-dim); font-size: 0.9rem; margin: 6px 0 20px; }
.pricing-features { list-style: none; padding: 0; margin: 0 0 24px; text-align: left; }
.pricing-features li { padding: 8px 0 8px 24px; border-bottom: 1px solid var(--border-soft); font-size: 0.92rem; position: relative; }
.pricing-features li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.pricing-features li:last-child { border-bottom: none; }
.pricing-note { margin-top: 14px; font-size: 0.8rem; color: var(--text-dim); }

/* Account gate - the single decision surface for Sign In/Create
   Account, directly under the feature list. Given its own visible
   boxed boundary (distinct background + border) so it reads as one
   clear, self-contained control. */
#authGate { margin-top: 20px; text-align: left; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.auth-tabs { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.auth-tab { flex: 1; background: transparent; border: none; border-right: 1px solid var(--border); color: var(--text-dim); padding: 10px 0; font-size: 0.88rem; font-weight: 600; cursor: pointer; text-align: center; }
.auth-tab:last-child { border-right: none; }
.auth-tab.active { background: var(--accent); color: #05070a; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.form-field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.form-field label { font-size: 0.8rem; color: var(--text-dim); }
.form-field input, .form-field textarea, .form-field select { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; color: var(--text); font-size: 0.9rem; font-family: inherit; width: 100%; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { outline: none; border-color: var(--accent); }
.form-field textarea { resize: vertical; }
.form-error { color: #ff8a8a; font-size: 0.82rem; min-height: 1em; }
.form-note { font-size: 0.85rem; color: var(--text-dim); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-top: 12px; }
.auth-status { font-size: 0.9rem; margin-bottom: 10px; text-align: center; }
.signout-btn { margin-bottom: 16px; }
.owner-notice { font-size: 0.9rem; color: var(--success); text-align: center; background: rgba(53, 208, 127, 0.08); border: 1px solid rgba(53, 208, 127, 0.3); border-radius: var(--radius); padding: 12px; margin: 0 0 14px; }
/* Trial Expired / Payment required - same real state color language as
   the rest of the site (--warning, matching frontend/index.html's own
   --warning token), never the success/green treatment. */
.owner-notice-warning { color: #f4b942; background: rgba(244, 185, 66, 0.08); border-color: rgba(244, 185, 66, 0.3); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-soft); padding: 44px 0; background: var(--bg-alt); }
.footer-row { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer-link-disabled { color: var(--text-faint); font-size: 0.85rem; }
.footer-copy { color: var(--text-faint); font-size: 0.8rem; margin: 0; }

/* ---------- Responsive nav ---------- */
@media (max-width: 900px) {
  .site-nav, .header-actions { display: none; }
  .site-nav.open { display: flex; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); flex-direction: column; padding: 16px 24px; }
  .nav-toggle { display: flex; }
}

/* ---------- Status pages (checkout success/cancelled, 404) ----------
   Added while building the 404 page: checkout-success.html and
   checkout-cancelled.html already reference .status-page/.status-card/
   .status-icon/.section-lead in their markup, but no rule for any of
   them existed anywhere in this file - those two pages have been
   rendering with zero layout (unstyled block content) since they were
   created. Real, demonstrated necessity, not a speculative addition -
   fixes those two existing pages as a side effect and gives 404.html
   the same real, already-in-use pattern instead of inventing a new one. */
.status-page { min-height: calc(100vh - 68px); display: flex; align-items: center; justify-content: center; padding: 60px 24px; }
.status-card { max-width: 480px; text-align: center; }
.status-icon { font-size: 2.4rem; margin-bottom: 16px; }
.section-lead { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- Legal / informational pages (Terms, Privacy, Support) ----------
   Reuses every existing token (--bg, --text, --accent, --border, etc.)
   and the same .container - this is not a second visual system, just a
   left-aligned, document-shaped reading layout for long-form text,
   which nothing on the site needed until now. */
.legal-page { padding: 56px 0 84px; }
.legal-page .container { max-width: 760px; }
.legal-page h1 { font-size: 1.9rem; margin: 0 0 6px; letter-spacing: 0.01em; }
.legal-updated { color: var(--text-faint); font-size: 0.82rem; margin: 0 0 40px; }
.legal-page h2 { font-size: 1.05rem; font-family: inherit; text-transform: none; letter-spacing: 0; text-align: left; color: var(--text); margin: 36px 0 12px; }
.legal-page h2:first-of-type { margin-top: 0; }
.legal-page p { color: var(--text-dim); font-size: 0.94rem; line-height: 1.7; margin: 0 0 14px; }
.legal-page ul { color: var(--text-dim); font-size: 0.94rem; line-height: 1.7; padding-left: 20px; margin: 0 0 16px; }
.legal-page li { margin-bottom: 6px; }
.legal-pending { display: inline-block; color: #f4b942; background: rgba(244, 185, 66, 0.1); border: 1px solid rgba(244, 185, 66, 0.35); border-radius: 5px; padding: 1px 8px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }

/* ---------- Support categories ---------- */
.support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 32px 0 40px; }
@media (max-width: 620px) { .support-grid { grid-template-columns: 1fr; } }
.support-item { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.support-item h3 { margin: 0 0 8px; font-size: 0.95rem; color: var(--text); }
.support-item p { margin: 0; color: var(--text-dim); font-size: 0.88rem; line-height: 1.6; }

/* ---------- Customer Portal shell (Phase 1) ----------
   Reuses .site-header/.site-nav/.nav-toggle exactly as-is for
   navigation (same responsive mechanism, no new pattern), .owner-notice
   for the status banner, and .panel/.border/.radius tokens for the
   account card - nothing here is a second visual system. */
.portal-main { padding: 48px 0 88px; }
.portal-welcome { font-size: 1.4rem; margin: 0 0 4px; }
.portal-email { color: var(--text-faint); font-size: 0.85rem; margin: 0 0 32px; }
.portal-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; max-width: 560px; }
.portal-card-label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 18px; }
.portal-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); font-size: 0.92rem; }
.portal-row:last-child { border-bottom: none; }
.portal-row span:first-child { color: var(--text-dim); }
/* Email + Sign Out live inside .site-nav itself (not .header-actions) -
   .header-actions has no reveal-on-mobile rule (it stays hidden even
   with the nav open), and Sign Out must stay reachable on every
   viewport, so it rides the same .site-nav.open reveal already used
   for the anchor links. */
.portal-nav-email { color: var(--text-dim); font-size: 0.85rem; font-weight: 600; }

/* ---------- License detail (Phase 2) ---------- */
.portal-cards { display: flex; flex-direction: column; gap: 20px; max-width: 640px; }
.portal-badge { display: inline-flex; align-items: center; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; }
.portal-badge-active { color: var(--success); background: rgba(53, 208, 127, 0.12); }
.portal-badge-trial { color: var(--accent); background: var(--accent-soft); }
.portal-badge-warning { color: #f4b942; background: rgba(244, 185, 66, 0.12); }
.portal-badge-expired { color: #ff8a8a; background: rgba(255, 138, 138, 0.12); }
.portal-badge-neutral { color: var(--text-faint); background: var(--border-soft); }
.portal-device-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.portal-device-row:last-child { border-bottom: none; }
.portal-device-name { font-size: 0.92rem; color: var(--text); font-weight: 600; }
.portal-device-meta { font-size: 0.78rem; color: var(--text-faint); margin-top: 2px; }
.portal-empty { color: var(--text-faint); font-size: 0.88rem; font-style: normal; }

/* ---------- Section entrance ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
