/*
Theme Name: WPFacturaE
Theme URI: https://localhost:8080
Description: Commercial pitch site for the WPFacturaE plugin. Naked HTML5/CSS3/JS theme with built-in EN/ES language switching (no plugins).
Author: WPFacturaE Team
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: facturae-theme
Tags: custom-colors, custom-menu, one-column
*/

/* ============================================================
   Base
   ============================================================ */
:root {
  --ink: #101828;
  --ink-soft: #475467;
  --ink-faint: #98a2b3;
  --paper: #ffffff;
  --paper-soft: #f8fafc;
  --line: #e4e7ec;
  --brand: #1d4ed8;
  --brand-dark: #1e3a8a;
  --brand-soft: #eff6ff;
  --accent: #0f766e;
  --ok: #027a48;
  --ok-soft: #ecfdf3;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  --max: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 64px;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand .brand-mark { color: var(--brand); }

.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.site-nav a { color: var(--ink-soft); font-size: 0.95rem; }
.site-nav a:hover { color: var(--brand); text-decoration: none; }

.lang-switch {
  display: inline-flex;
  gap: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem;
  font-size: 0.85rem;
}
.lang-switch a {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  color: var(--ink-soft);
}
.lang-switch a.is-active {
  background: var(--brand);
  color: #fff;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-size: 1rem;
  cursor: pointer;
  color: var(--ink);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--paper); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  background:
    radial-gradient(60rem 30rem at 85% -10%, var(--brand-soft), transparent),
    var(--paper);
}
.hero .kicker {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ============================================================
   Sections
   ============================================================ */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-soft { background: var(--paper-soft); border-block: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 2rem; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.card .card-icon {
  font-size: 1.35rem;
  display: inline-flex;
  width: 2.6rem; height: 2.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 0.8rem;
  filter: saturate(1.1);
}
.card h3 { margin-bottom: 0.35em; }
.card p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ============================================================
   Security flow diagram
   ============================================================ */
.flow {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin: 1.5rem 0 2rem;
}
.flow-step {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem 1.2rem 3.6rem;
}
.flow-emoji {
  position: absolute;
  top: 1.05rem;
  left: 1rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  background: var(--brand-soft);
  border-radius: 10px;
}
.flow-step h3 { font-size: 1rem; margin-bottom: 0.3em; }
.flow-step p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
.flow-step code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82em;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.05em 0.35em;
}

.claims {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.claims li {
  background: var(--ok-soft);
  border: 1px solid #abefc6;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  color: var(--ok);
  font-size: 0.95rem;
}
.claims strong { display: block; color: var(--ink); margin-bottom: 0.15em; }

.roadmap-note {
  margin-top: 1.5rem;
  background: var(--warn-soft);
  border: 1px solid #fedf89;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  color: var(--warn);
  font-size: 0.95rem;
}

/* ============================================================
   How it works
   ============================================================ */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}
.steps li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}
.steps .step-num {
  flex: none;
  font-weight: 700;
  color: var(--brand);
  font-size: 1.05rem;
  min-width: 1.6rem;
}
.steps p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }
.steps strong { color: var(--ink); }

/* ============================================================
   Team
   ============================================================ */
.team {
  background: var(--ink);
  color: #e5e7eb;
  border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.team h2 { color: #fff; margin: 0; }
.team p { margin: 0; color: var(--ink-faint); }

/* ============================================================
   Contact
   ============================================================ */
.contact-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.contact-form {
  display: grid;
  gap: 0.9rem;
}
.contact-form label {
  display: grid;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.92rem;
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: transparent;
}
.contact-form textarea { min-height: 8rem; resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--ink-faint); margin: 0; }
.form-status { font-size: 0.9rem; color: var(--ok); min-height: 1.2em; margin: 0; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0;
  color: var(--ink-faint);
  font-size: 0.9rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
  align-items: center;
}
.site-footer a { color: var(--ink-soft); }

/* ============================================================
   Admin-bar safe + WordPress bits
   ============================================================ */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 1.25rem 1.25rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start; }
  .site-header .wrap { flex-wrap: wrap; }
  .lang-switch { order: 3; }
}

/* --- Threat model (page-threat-model.php) --- */
.proof-intro h1 { margin: 0.2em 0 0.4em; }
.section-lead-inline { color: var(--ink-soft); max-width: 60ch; margin-top: -0.5rem; }
.proof-grid { margin-top: 1.5rem; }
.proof-attack p { margin-bottom: 0.7rem; }
.proof-verdict {
  border-left: 3px solid var(--brand);
  padding: 0.35rem 0 0.35rem 0.75rem;
  background: var(--brand-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink);
  font-size: 0.92rem;
  margin: 0 !important;
}
.claims-proof li { font-size: 1.02rem; }
