/* ============================================================
   Infosec Tools: styles shared by every page (menu, hero, sections,
   call to action, footer, contact form). What belongs to one page
   only lives in css/pages/<page>.css, loaded after this file.
   Visual identity aligned with PFC Consulting (pfcconsulting.pt).
   ============================================================ */

:root {
  --primary:         #3369e7;
  --primary-dark:    #2954b9;
  --primary-darkest: #1f3f8b;
  --accent:          #00aaff;
  --accent-dark:     #0088cc;

  --text:         #212529;
  --text-muted:   #6c757d;
  --text-dim:     #adb5bd;
  --bg:           #ffffff;
  --bg-alt:       #f8f9fa;
  --bg-tint:      #f9fafb;
  --border:       #dee2e6;
  --border-light: #e9ecef;
  --success:      #198754;

  --container: 1200px;
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(33, 37, 41, 0.06);
  --shadow:    0 4px 14px rgba(51, 105, 231, 0.08);
  --shadow-lg: 0 20px 40px rgba(51, 105, 231, 0.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px; line-height: 1.65; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--primary-dark); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; }

/* ------ NAV ------ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border-light);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; background: var(--primary); color: white; border: none;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.nav-cta:hover { background: var(--primary-dark); color: white; transform: translateY(-1px); box-shadow: var(--shadow); }

/* ------ HERO ------ */
.hero {
  padding: 104px 0 88px;
  background: linear-gradient(180deg, var(--bg-tint) 0%, var(--bg) 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(51, 105, 231, 0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner { max-width: 840px; position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-block; padding: 6px 14px;
  background: rgba(51, 105, 231, 0.1); color: var(--primary-dark);
  font-size: 13px; font-weight: 700; border-radius: 100px;
  margin-bottom: 24px; letter-spacing: 0.02em;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 58px); font-weight: 800; line-height: 1.08;
  letter-spacing: -0.03em; color: var(--text); margin-bottom: 24px;
}
.hero h1 em { font-style: normal; color: var(--primary); }
.hero-lede {
  font-size: 20px; line-height: 1.55; color: var(--text-muted);
  margin-bottom: 40px; max-width: 720px;
}

/* ------ SECTION ------ */
section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-header { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.section-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; color: var(--primary);
  text-transform: uppercase; margin-bottom: 14px;
}
.section-header h2 {
  font-size: clamp(28px, 3.5vw, 40px); font-weight: 800;
  line-height: 1.18; letter-spacing: -0.02em;
  color: var(--text); margin-bottom: 16px;
}
.section-header p { font-size: 17px; color: var(--text-muted); line-height: 1.6; }

/* ------ INNER PAGES (security, roadmap, changelog, 404): compact hero and sections ------ */
.page-inner .hero { padding: 96px 0 64px; }
.page-inner .hero-lede { margin-bottom: 0; }
.page-inner section { padding: 80px 0; }
.page-inner .section-header { margin-bottom: 56px; }
.page-inner .cta-section { padding: 96px 0; }

/* ------ CALL TO ACTION ------ */
.cta-section {
  padding: 96px 0;
  background-image: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 70%, var(--primary-darkest) 100%);
  color: white; text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; top: -100px; left: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0, 170, 255, 0.2) 0%, transparent 60%);
  pointer-events: none;
}
.cta-section::after {
  content: ''; position: absolute; bottom: -100px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0, 170, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
}
.cta-section > .container { position: relative; z-index: 1; }
.cta-section h2 {
  font-size: clamp(28px, 3.5vw, 42px); font-weight: 800;
  line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 16px;
}
.cta-section p {
  font-size: 18px; color: rgba(255, 255, 255, 0.88);
  margin-bottom: 36px; max-width: 560px; margin-left: auto; margin-right: auto;
}
.cta-section-button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 18px 36px; background: white; color: var(--primary-dark); border: none;
  border-radius: var(--radius); font-size: 16px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.cta-section-button:hover { transform: translateY(-2px); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); color: var(--primary-darkest); }

/* ------ FOOTER ------ */
.footer { padding: 48px 0 40px; background: #141619; color: rgba(255, 255, 255, 0.55); font-size: 14px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer a { color: rgba(255, 255, 255, 0.75); transition: color 0.15s; }
.footer a:hover { color: white; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { height: 28px; opacity: 0.75; }

/* ------ CONTACT FORM ------ */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-content {
  background: white; border-radius: var(--radius-lg);
  padding: 40px; max-width: 520px; width: 90%;
  max-height: 90vh; overflow-y: auto; position: relative;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.3);
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 28px;
  color: var(--text-muted); cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-content h2 { font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.modal-content > p { font-size: 15px; color: var(--text-muted); margin-bottom: 28px; }
.form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-required { color: var(--primary); }
.form-optional { color: var(--text-muted); font-weight: 400; }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 15px; color: var(--text);
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(51, 105, 231, 0.12);
}
.form-group textarea { resize: vertical; }
.form-submit {
  width: 100%; padding: 14px;
  background: var(--primary); color: white; border: none;
  border-radius: var(--radius); font-size: 16px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.form-submit:hover { background: var(--primary-dark); }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.form-sent { text-align: center; padding: 8px 0 4px; }
.form-sent[hidden], #contactForm[hidden], #contactModalLede[hidden] { display: none; }
.form-sent-icon {
  width: 56px; height: 56px; margin: 0 auto 16px;
  background: var(--success); color: white; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.form-sent-icon svg { width: 28px; height: 28px; }
.form-sent h3 { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.form-sent p { font-size: 15px; color: var(--text-muted); margin-bottom: 24px; }
#formStatus { margin-bottom: 16px; padding: 12px; border-radius: var(--radius-sm); font-size: 14px; display: none; }
#formStatus.success { display: block; background: rgba(25, 135, 84, 0.1); color: #198754; }
#formStatus.error   { display: block; background: rgba(220, 53, 69, 0.1); color: #dc3545; }

/* ------ RESPONSIVE ------ */
@media (max-width: 640px) {
  .hero { padding: 72px 0 60px; }
  section { padding: 64px 0; }
  .section-header { margin-bottom: 44px; }
  .page-inner .hero { padding: 64px 0 40px; }
  .page-inner section { padding: 56px 0; }
  .page-inner .cta-section { padding: 56px 0; }
  .nav-cta span { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}
.form-privacy { font-size: 0.85rem; color: var(--text-muted); margin: 0.5rem 0 1rem; }
/* Title band of every page (site_hero()); the home page keeps the taller band. */
.hero-page { padding: 96px 0 64px; }
.hero-page .hero-lede { margin-bottom: 0; }
.hero-page .hero-lede + .hero-lede { margin-top: 16px; }
@media (max-width: 640px) { .hero-page { padding: 64px 0 40px; } }
/* Language switch next to the demo button (same place as on pfcconsulting.pt). */
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-lang { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--text); text-decoration: none; }
.nav-lang:hover { border-color: var(--primary); color: var(--primary); }
