/* ============================================================
   MOGALE COMPLIANCE & WORKPLACE ASSISTANCE
   Token system
   ============================================================ */

:root {
  /* --- Light theme --- */
  --color-bg: #F5F7FA;
  --color-surface: #FFFFFF;
  --color-surface-2: #EEF2F7;
  --color-primary: #163B6D;
  --color-primary-dark: #0E2748;
  --color-accent: #2C6FD1;
  --color-seal: #B4913C;
  --color-seal-soft: #F3E9D2;
  --color-text: #1B2430;
  --color-text-muted: #5A6B80;
  --color-border: #DCE3EC;
  --color-success: #1E7A4C;
  --shadow-sm: 0 1px 2px rgba(14, 39, 72, 0.06);
  --shadow-md: 0 8px 24px rgba(14, 39, 72, 0.10);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  color-scheme: light;
}

html[data-theme="dark"] {
  --color-bg: #0A1420;
  --color-surface: #101E30;
  --color-surface-2: #16283F;
  --color-primary: #6FA3E8;
  --color-primary-dark: #9AC0F2;
  --color-accent: #5B9BF5;
  --color-seal: #D9B968;
  --color-seal-soft: rgba(217, 185, 104, 0.12);
  --color-text: #E7EDF5;
  --color-text-muted: #93A5BC;
  --color-border: #223349;
  --color-success: #4CBE85;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  transition: background 0.25s ease, color 0.25s ease;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-text);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }

p { color: var(--color-text-muted); margin: 0 0 1em; }

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

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

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

img { max-width: 100%; display: block; }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-seal {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.2;
}
.brand-name span {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.62rem;
  color: var(--color-seal);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.92rem;
}
.main-nav a:hover { color: var(--color-primary); text-decoration: none; }
.main-nav a.active { color: var(--color-primary); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--color-text);
}

/* Theme toggle */
.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: background 0.2s ease;
}
.theme-toggle:hover { background: var(--color-seal-soft); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.94rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-primary-dark); box-shadow: var(--shadow-md); }
html[data-theme="dark"] .btn-primary { color: #0A1420; }

.btn-outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }

.btn-whatsapp {
  background: #25D366;
  color: #073B23;
}
.btn-whatsapp:hover { background: #1FBF5C; }

.btn-linkedin {
  background: #0A66C2;
  color: #fff;
}
.btn-linkedin:hover { background: #084E96; }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

/* ---------------- Hero ---------------- */

.hero {
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-seal);
  margin-bottom: 18px;
}
.hero-eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--color-seal);
}

.hero-lede {
  font-size: 1.1rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-badge-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.seal-large {
  width: min(320px, 100%);
  height: auto;
}

.founder-portrait {
  position: relative;
  width: min(320px, 100%);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
.founder-portrait .seal-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.founder-portrait .founder-photo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 62%;
  height: 62%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-surface);
  box-shadow: var(--shadow-md);
  background: var(--color-surface-2);
}

/* ---------------- Sections ---------------- */

section { padding: 64px 0; }
.section-alt { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }

.section-head { max-width: 62ch; margin-bottom: 40px; }
.section-head .mono { color: var(--color-seal); display: block; margin-bottom: 10px; }

/* ---------------- Cards / grid ---------------- */

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-seal-soft);
  color: var(--color-seal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 16px;
  border: 1px solid var(--color-seal);
}

.card p { font-size: 0.94rem; margin-bottom: 0; }

/* ---------------- About / profile ---------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-copy p { color: var(--color-text); }
.about-copy p:first-of-type { font-size: 1.08rem; }

.ethics-note {
  margin-top: 28px;
  padding: 18px 20px;
  border-left: 3px solid var(--color-seal);
  background: var(--color-seal-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem;
  color: var(--color-text);
}

.stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.stat-list li {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.stat-list .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-seal);
  margin-top: 8px;
  flex-shrink: 0;
}
.stat-list strong { display: block; color: var(--color-text); font-family: var(--font-display); }
.stat-list span { color: var(--color-text-muted); font-size: 0.9rem; }

/* ---------------- Catalog ---------------- */

.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  padding: 20px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.service-card .ref {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-seal);
  margin-bottom: 6px;
  display: block;
}
.service-card h3 { margin-bottom: 10px; }
.service-card p { flex-grow: 1; }
.service-card .btn { margin-top: 18px; }

.service-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  font-size: 0.86rem;
}
.service-list li {
  padding: 6px 0 6px 20px;
  position: relative;
  color: var(--color-text-muted);
  border-top: 1px dashed var(--color-border);
}
.service-list li:first-child { border-top: none; }
.service-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-seal);
  font-weight: 700;
}

/* ---------------- Forms ---------------- */

.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}
.form-row .req { color: #C0392B; }

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.15s ease;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--color-accent);
  outline: none;
}

.form-row textarea { resize: vertical; min-height: 110px; }

.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 14px;
}

.form-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: none;
}
.form-status.show { display: block; }
.form-status.success {
  background: rgba(30, 122, 76, 0.1);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}
.form-status.error {
  background: rgba(192, 57, 43, 0.1);
  color: #C0392B;
  border: 1px solid #C0392B;
}
html[data-theme="dark"] .form-status.error { color: #E8867A; border-color: #E8867A; }

/* ---------------- FAQ accordion ---------------- */

.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 20px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
}
.faq-question .plus {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--color-seal);
  color: var(--color-seal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: transform 0.2s ease;
}
.faq-item.open .faq-question .plus { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.faq-answer-inner { padding: 0 4px 20px; font-size: 0.92rem; }

/* ---------------- Contact cards ---------------- */

.contact-methods {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}
.contact-method {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.contact-method .icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-seal-soft);
  color: var(--color-seal);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-method .label { font-size: 0.75rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-family: var(--font-mono); }
.contact-method .value { font-weight: 600; color: var(--color-text); }

/* ---------------- Footer ---------------- */

.site-footer {
  background: var(--color-primary-dark);
  color: #C8D6E8;
  padding: 48px 0 28px;
  margin-top: 40px;
}
html[data-theme="dark"] .site-footer { background: #060D17; }

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.site-footer h4 { color: #fff; font-size: 0.9rem; margin-bottom: 14px; }
.site-footer a { color: #AFC2DA; font-size: 0.88rem; display: block; margin-bottom: 8px; }
.site-footer a:hover { color: #fff; }
.site-footer p { color: #AFC2DA; font-size: 0.88rem; }

.footer-brand-name { color: #fff; font-family: var(--font-display); font-weight: 700; margin-bottom: 10px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  font-size: 0.78rem;
  color: #90A5C0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-badge-wrap { order: -1; }
  .seal-large { width: 160px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .main-nav { 
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    gap: 16px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .form-two { grid-template-columns: 1fr; }
  .catalog-toolbar { flex-direction: column; align-items: stretch; }
}

@media (max-width: 540px) {
  .grid-4 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  section { padding: 48px 0; }
  .form-card { padding: 24px 20px; }
}

/* Phase 4 platform enhancements */
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.grid-3 .card { height:100%; }
.form-note { font-size:.88rem; color:var(--color-text-muted); }
@media (max-width: 980px) {
  .main-nav { gap:14px; }
  .main-nav a { font-size:.82rem; }
}
@media (max-width: 820px) {
  .grid-3 { grid-template-columns:1fr 1fr; }
}
@media (max-width: 680px) {
  .grid-3 { grid-template-columns:1fr; }
}
