/* ─────────────────────────────────────────
   FocaLabs — Shared Stylesheet
   ───────────────────────────────────────── */

/* 1. Custom Properties
   ───────────────────────────────────────── */
:root {
  --bg: #0a1628;
  --surface: #111d33;
  --surface-hover: #162440;
  --primary: #22a9d9;
  --primary-hover: #1e97c4;
  --accent: #2bc8d7;
  --heading: #f1f5f9;
  --body: #94a3b8;
  --border: #1a3a55;
  --border-bright: #22a9d9;
  --backdrop: rgba(10, 22, 40, 0.88);
}

/* 2. Reset + Base
   ───────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  background-color: var(--bg);
  color: var(--body);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 3. Bilingual
   ───────────────────────────────────────── */
body.ro .en { display: none; }
body.en .ro { display: none; }

/* 4. Scroll Reveal
   ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 5. Buttons
   ───────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 7px 16px;
  font-size: 0.8125rem;
}

.btn-secondary {
  display: block;
  text-align: center;
  padding: 14px;
  font-size: 0.9375rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--body);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--heading);
}

/* 6. Section Utilities
   ───────────────────────────────────────── */
.section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  font-weight: 600;
  text-align: center;
  margin-bottom: 48px;
}

section {
  padding: 80px 0;
}

/* 7. Header
   ───────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
  flex-wrap: wrap;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-group img {
  height: 32px;
  width: auto;
  display: block;
}

.brand-name {
  font-weight: 700;
  font-size: 1.1875rem;
  color: var(--heading);
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--body);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--heading);
  background: var(--surface);
}

.nav-link.active {
  font-weight: 600;
  color: var(--heading);
  background: var(--surface);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#lang-toggle {
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--body);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.2s;
}
#lang-toggle:hover { background: var(--surface-hover); }

/* Mobile hamburger */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.mobile-menu-toggle span {
  display: block;
  height: 2px;
  background: var(--body);
  border-radius: 2px;
  transition: opacity 0.2s;
}

/* 8. Hero — Homepage
   ───────────────────────────────────────── */
.hero {
  padding: 80px 0 64px;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 700px;
  margin: 0 auto;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--body);
  line-height: 1.65;
  max-width: 580px;
  margin: 20px auto 0;
}

.hero-cta {
  margin-top: 32px;
}

.hero-cta .btn-primary {
  padding: 14px 32px;
  font-size: 1rem;
}

/* Hero variant — sub-pages (smaller, left-aligned) */
.hero-sub {
  padding: 60px 0 48px;
}

.hero-sub h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.025em;
  line-height: 1.2;
  max-width: 640px;
}

.hero-sub .hero-subtitle {
  margin: 16px 0 0;
  text-align: left;
}

/* 9. Browser Frame
   ───────────────────────────────────────── */
.screenshot-wrap {
  margin-top: 48px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.browser-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.browser-bar {
  height: 36px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; margin-left: 6px; }
.dot-green  { background: #28c840; margin-left: 6px; }

.browser-url {
  margin-left: 12px;
  font-size: 0.7rem;
  color: var(--body);
  opacity: 0.5;
}

.browser-img-area {
  background: var(--surface);
  min-height: 40px;
}

.browser-img-area img {
  width: 100%;
  display: block;
}

.browser-placeholder {
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--body);
  font-size: 0.875rem;
  opacity: 0.35;
  letter-spacing: 0.05em;
}

/* 10. How It Works — 3 steps
   ───────────────────────────────────────── */
.how-it-works .steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 960px;
  margin: 0 auto;
}

.step {
  display: flex;
  flex-direction: column;
}

.step-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.step h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--heading);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 10px;
}

.step p {
  font-size: 0.875rem;
  color: var(--body);
  line-height: 1.65;
}

.step-screenshot {
  margin-top: 16px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.step-screenshot img {
  width: 100%;
  height: auto;
  display: block;
}

/* 11. Differentiator Cards
   ───────────────────────────────────────── */
.why-foca .diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.diff-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.diff-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-bright);
  box-shadow: 0 8px 32px rgba(34, 169, 217, 0.08);
}

.diff-icon {
  font-size: 1.5rem;
  margin-bottom: 14px;
  line-height: 1;
}

.diff-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.diff-card p {
  font-size: 0.875rem;
  color: var(--body);
  line-height: 1.65;
}

/* 12. Use Cases
   ───────────────────────────────────────── */
.use-cases .cases-list {
  max-width: 720px;
  margin: 0 auto;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cases-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 0.9375rem;
  color: var(--heading);
  line-height: 1.5;
  transition: transform 0.15s ease, border-left-color 0.15s ease;
}

.cases-list li:hover {
  transform: translateX(3px);
  border-left-color: var(--accent);
}

/* 13. Personas
   ───────────────────────────────────────── */
.personas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.persona-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.persona-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-bright);
  box-shadow: 0 8px 32px rgba(34, 169, 217, 0.08);
}

.persona-role {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 12px;
}

.persona-card p:last-child {
  font-size: 0.875rem;
  color: var(--body);
  line-height: 1.65;
}

/* 14. Contact
   ───────────────────────────────────────── */
.contact-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.contact-lead {
  font-size: 1.0625rem;
  color: var(--body);
  line-height: 1.65;
  margin-bottom: 28px;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.contact-info a {
  font-size: 0.9375rem;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.contact-info a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Contact form */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 0;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-row + * {
  margin-top: 16px;
}

.form-group label {
  font-size: 0.8125rem;
  color: var(--body);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--heading);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.2s;
  outline: none;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.5;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--body);
  opacity: 0.45;
}

.form-submit {
  margin-top: 20px;
}

.form-submit .btn-primary {
  padding: 12px 28px;
  font-size: 0.9375rem;
}

.form-note {
  font-size: 0.75rem;
  color: var(--body);
  opacity: 0.5;
}

.form-success {
  text-align: center;
  padding: 48px 24px;
}

.form-success-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 8px;
}

.form-success-text {
  font-size: 0.9375rem;
  color: var(--body);
}

/* 15. Footer
   ───────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  text-align: center;
}

.footer-trust {
  font-size: 0.875rem;
  color: var(--body);
  opacity: 0.7;
  line-height: 1.75;
  margin-bottom: 20px;
}

.footer-nav {
  display: flex;
  gap: 2px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.footer-nav a {
  padding: 5px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.875rem;
  color: var(--body);
  transition: color 0.2s, background 0.2s;
}

.footer-nav a:hover {
  color: var(--heading);
  background: var(--surface);
}

.footer-contact-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.footer-contact-row a {
  color: var(--body);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-contact-row a:hover {
  color: var(--primary);
}

.footer-contact-sep {
  color: var(--body);
  opacity: 0.35;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--body);
  opacity: 0.5;
}

/* 16. Header login link (ghost/outline button)
   ───────────────────────────────────────── */
.header-login-link {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.8125rem;
  color: var(--body);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}
.header-login-link:hover {
  border-color: var(--primary);
  color: var(--heading);
}

/* 17. Chrome autofill — prevent white background override
   ───────────────────────────────────────── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset !important;
  -webkit-text-fill-color: var(--heading) !important;
  border-color: var(--border) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* 18. Responsive
   ───────────────────────────────────────── */
@media (max-width: 768px) {
  section { padding: 56px 0; }

  /* Header mobile */
  .header-inner {
    height: auto;
    padding: 10px 0;
    gap: 8px;
  }

  .mobile-menu-toggle { display: flex; }

  .main-nav {
    display: none;
    order: 10;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    border-top: 1px solid var(--border);
    padding: 10px 0 6px;
    gap: 2px;
    flex: none;
  }

  .nav-open .main-nav { display: flex; }

  /* Keep lang toggle visible, hide CTA in header on mobile */
  .header-actions .btn-primary { display: none; }

  /* Hero */
  .hero { padding: 48px 0 32px; }
  .hero h1 { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }

  .hero-sub h1 { font-size: 1.75rem; }

  /* How it works */
  .how-it-works .steps-grid { grid-template-columns: 1fr; gap: 32px; }

  /* Differentiators */
  .why-foca .diff-grid { grid-template-columns: 1fr; }

  /* Personas */
  .personas-grid { grid-template-columns: 1fr; }

  /* Contact form */
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 24px 20px; }
  .contact-info { gap: 16px; flex-direction: column; align-items: center; }

  /* Footer — already centered; contact row wraps naturally on mobile */
  .footer-contact-row { gap: 6px; }

  /* Header login link — hide on mobile */
  .header-login-link { display: none; }
}

/* ─────────────────────────────────────────
   platforma.html — Page-specific styles
   ───────────────────────────────────────── */

/* 18. Page Hero (sub-pages — left-aligned, compact)
   ───────────────────────────────────────── */
.page-hero {
  padding: 56px 0 40px;
}

.page-hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.025em;
  line-height: 1.2;
  max-width: 640px;
  margin-bottom: 16px;
}

.page-hero .hero-subtitle {
  text-align: left;
  margin: 0;
  max-width: 540px;
}

/* 19. Modules Section
   ───────────────────────────────────────── */
.modules-list {
  max-width: 800px;
  margin: 0 auto;
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}

.module-card:hover {
  border-color: var(--primary);
}

.module-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 10px;
}

.module-card p {
  font-size: 0.9375rem;
  color: var(--body);
  line-height: 1.6;
}

/* 20. Technical Details Grid
   ───────────────────────────────────────── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 860px;
  margin: 0 auto;
}

.tech-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--heading);
  line-height: 1.5;
  transition: border-left-color 0.15s ease;
}

.tech-item:hover {
  border-left-color: var(--accent);
}

/* 21. Page CTA block
   ───────────────────────────────────────── */
.page-cta {
  text-align: center;
  padding: 72px 0 80px;
}

.page-cta h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.page-cta p {
  font-size: 1rem;
  color: var(--body);
  margin-bottom: 28px;
}

.page-cta .btn-primary {
  padding: 14px 32px;
  font-size: 1rem;
}

/* Responsive additions for platform page */
@media (max-width: 768px) {
  .page-hero { padding: 40px 0 28px; }
  .page-hero h1 { font-size: 1.75rem; }

  .tech-grid { grid-template-columns: 1fr; }

  .page-cta { padding: 48px 0 56px; }
  .page-cta h2 { font-size: 1.375rem; }
}

/* ─────────────────────────────────────────
   securitate.html — Page-specific styles
   ───────────────────────────────────────── */

/* 22. Architecture Diagram
   ───────────────────────────────────────── */
.arch-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}

.arch-column {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  min-width: 0;
}

.arch-column--highlight {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(34, 169, 217, 0.15);
}

.arch-column-icon {
  font-size: 1.625rem;
  margin-bottom: 10px;
  line-height: 1;
}

.arch-column-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--heading);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.arch-column-label {
  font-size: 0.8125rem;
  color: var(--body);
  line-height: 1.5;
  margin-bottom: 14px;
  opacity: 0.85;
}

.arch-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.arch-items li {
  font-size: 0.8125rem;
  color: var(--body);
  padding: 5px 10px;
  background: var(--bg);
  border-radius: 5px;
  border: 1px solid var(--border);
  line-height: 1.3;
}

/* Arrow connector */
.arch-arrow {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  gap: 5px;
}

.arch-arrow-track {
  display: flex;
  align-items: center;
}

.arch-arrow-line {
  width: 28px;
  height: 2px;
  background: var(--primary);
}

.arch-arrow-head {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid var(--primary);
}

/* Partial arrow — dashed, muted */
.arch-arrow--partial .arch-arrow-line {
  background: transparent;
  border-top: 2px dashed var(--body);
  height: 0;
  opacity: 0.5;
}

.arch-arrow--partial .arch-arrow-head {
  border-left-color: var(--body);
  opacity: 0.5;
}

.arch-arrow-label {
  font-size: 0.6875rem;
  color: var(--body);
  text-align: center;
  line-height: 1.3;
  opacity: 0.6;
  max-width: 56px;
}

/* 23. Security Principles Grid
   ───────────────────────────────────────── */
.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}

.security-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.security-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-bright);
  box-shadow: 0 6px 24px rgba(34, 169, 217, 0.07);
}

.security-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.security-card p {
  font-size: 0.875rem;
  color: var(--body);
  line-height: 1.65;
}

/* 24. Article Section (long-form text)
   ───────────────────────────────────────── */
.article-section {
  max-width: 650px;
  margin: 0 auto;
}

.article-section p {
  font-size: 0.9375rem;
  color: var(--body);
  line-height: 1.75;
}

.article-section p + p {
  margin-top: 16px;
}

/* Responsive for security page */
@media (max-width: 768px) {
  .arch-diagram {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  /* Hide horizontal arrows on mobile — columns stack naturally */
  .arch-arrow { display: none; }

  .security-grid { grid-template-columns: 1fr; }
}
