/* Meridian Trust Bank — bespoke brand system */

/* ── Type + base ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --navy: #0a2540;
  --navy-light: #154a6b;
  --gold: #c9a227;
  --gold-light: #e8d5a3;
  --cream: #faf8f5;
  --white: #ffffff;
  --gray: #6b7280;
  --gray-light: #f3f4f6;
  --success: #059669;
  --danger: #dc2626;
  --radius: 8px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--navy);
  background: var(--cream);
}

/* ── Security banner ──────────────────────────────────────────── */
.security-banner {
  background: #f59e0b; /* amber-500 */
  color: #1e293b; /* slate-800 */
  font-weight: 700;
  font-size: 0.875rem;
  text-align: center;
  padding: 0.625rem 1rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #d97706;
}

/* ── Nav ──────────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  padding: 0 1.5rem;
}

.site-nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex; align-items: center; gap: 0.75rem;
  color: var(--white); text-decoration: none; font-weight: 700; font-size: 1.25rem;
}

.brand-mark {
  width: 36px; height: 36px; background: var(--gold); border-radius: 50%;
  display: grid; place-items: center; font-size: 1rem; color: var(--navy);
}

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--white); text-decoration: none; font-size: 0.875rem; font-weight: 500; opacity: 0.85; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }

#employeeLogin {
  background: transparent; border: 1px solid var(--gold); color: var(--gold);
  padding: 0.5rem 1rem; border-radius: var(--radius); font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.2s;
}
#employeeLogin:hover:not([disabled]) { background: var(--gold); color: var(--navy); }
#employeeLogin[disabled] { opacity: 0.5; cursor: not-allowed; border-color: var(--gray); color: var(--gray); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 5rem 1.5rem 6rem;
  position: relative; overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute; bottom: -40px; right: -40px; width: 300px; height: 300px;
  background: var(--gold); opacity: 0.08; border-radius: 50%;
}

.hero-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }

.hero h1 { font-size: 3.5rem; font-weight: 700; line-height: 1.1; margin-bottom: 1.25rem; }
.hero h1 span { color: var(--gold); }

.hero p { font-size: 1.125rem; opacity: 0.85; margin-bottom: 2rem; max-width: 480px; }

.cta-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primary {
  background: var(--gold); color: var(--navy); padding: 0.875rem 1.75rem;
  border-radius: var(--radius); font-weight: 600; text-decoration: none;
  border: none; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-secondary {
  background: transparent; color: var(--white); padding: 0.875rem 1.75rem;
  border-radius: var(--radius); font-weight: 600; text-decoration: none;
  border: 1px solid rgba(255,255,255,0.3); cursor: pointer; transition: background 0.2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); }

.hero-visual {
  background: var(--navy-light); border-radius: var(--radius); padding: 2rem;
  box-shadow: var(--shadow-lg); position: relative;
}

.branch-card {
  background: var(--white); color: var(--navy); border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow);
}
.branch-card h3 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray); margin-bottom: 0.5rem; }
.branch-card .locator-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.branch-card .locator-row input {
  flex: 1; padding: 0.625rem; border: 1px solid #e5e7eb; border-radius: var(--radius); font-size: 0.875rem;
}
.branch-card .locator-row button {
  background: var(--navy); color: var(--white); border: none; padding: 0.625rem 1rem;
  border-radius: var(--radius); font-size: 0.875rem; font-weight: 500; cursor: pointer;
}
.branch-list { list-style: none; }
.branch-list li { padding: 0.75rem 0; border-bottom: 1px solid #f3f4f6; font-size: 0.875rem; display: flex; justify-content: space-between; }
.branch-list li:last-child { border-bottom: none; }
.branch-list .distance { color: var(--gold); font-weight: 600; }

/* ── Sections ─────────────────────────────────────────────────── */
.section { padding: 5rem 1.5rem; }
.section-alt { background: var(--white); }
.section-inner { max-width: 1200px; margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.25rem; font-weight: 700; margin-bottom: 0.75rem; }
.section-header p { color: var(--gray); font-size: 1.125rem; max-width: 600px; margin: 0 auto; }

/* ── Products grid ────────────────────────────────────────────── */
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.product-card {
  background: var(--white); border: 1px solid #e5e7eb; border-radius: var(--radius);
  padding: 2rem; transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.product-card .icon { width: 48px; height: 48px; background: var(--gold-light); border-radius: var(--radius); display: grid; place-items: center; margin-bottom: 1rem; font-size: 1.5rem; }
.product-card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
.product-card p { font-size: 0.875rem; color: var(--gray); line-height: 1.6; }

/* ── Stats ────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
.stat-item h3 { font-size: 2.5rem; font-weight: 700; color: var(--gold); margin-bottom: 0.25rem; }
.stat-item p { font-size: 0.875rem; color: var(--gray); text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Trust bar ────────────────────────────────────────────────── */
.trust-bar {
  background: var(--navy-light); color: var(--white); padding: 2rem 1.5rem;
}
.trust-bar-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap; gap: 1rem; }
.trust-bar span { font-size: 0.875rem; opacity: 0.9; }

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer { background: var(--navy); color: var(--white); padding: 3rem 1.5rem 2rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand { font-weight: 700; font-size: 1.125rem; margin-bottom: 0.5rem; }
.footer-desc { font-size: 0.875rem; opacity: 0.7; line-height: 1.6; }
.footer-col h4 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; opacity: 0.9; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--white); text-decoration: none; font-size: 0.875rem; opacity: 0.7; transition: opacity 0.2s; }
.footer-col a:hover { opacity: 1; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 2rem; padding-top: 1.5rem; text-align: center; font-size: 0.75rem; opacity: 0.5; }

/* ── Chat widget (chassis contract) ───────────────────────────── */
#chatLaunch {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200;
  background: var(--gold); color: var(--navy); border: none;
  width: 56px; height: 56px; border-radius: 50%; font-weight: 600;
  cursor: pointer; box-shadow: var(--shadow-lg); transition: transform 0.2s;
  font-size: 0; /* hide text, show icon via pseudo */
}
#chatLaunch::before { content: '💬'; font-size: 1.5rem; }
#chatLaunch:hover { transform: scale(1.05); }

#chatPanel {
  position: fixed; bottom: 5rem; right: 1.5rem; z-index: 200;
  width: 360px; max-height: 520px; background: var(--white);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(10px); visibility: hidden;
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}
#chatPanel[hidden] { display: none; }
#chatPanel.open { opacity: 1; transform: translateY(0); visibility: visible; }

#chatPanel header {
  background: var(--navy); color: var(--white); padding: 1rem;
  display: flex; justify-content: space-between; align-items: center;
}
#chatPanel header span { font-weight: 600; font-size: 0.9375rem; }
#chatClose { background: none; border: none; color: var(--white); font-size: 1.25rem; cursor: pointer; }

#chatLog { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
#chatLog .msg { padding: 0.75rem 1rem; border-radius: var(--radius); font-size: 0.875rem; line-height: 1.5; max-width: 85%; }
#chatLog .msg.user { background: var(--navy); color: var(--white); align-self: flex-end; }
#chatLog .msg.bot { background: var(--gray-light); color: var(--navy); align-self: flex-start; }
#chatLog .msg.blocked { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
#chatLog .msg .control { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; margin-bottom: 0.25rem; opacity: 0.7; }

#chatForm { display: flex; gap: 0.5rem; padding: 0.75rem 1rem; border-top: 1px solid #e5e7eb; }
#chatInput { flex: 1; padding: 0.625rem; border: 1px solid #e5e7eb; border-radius: var(--radius); font-size: 0.875rem; }
#chatSend { background: var(--navy); color: var(--white); border: none; padding: 0.625rem 1rem; border-radius: var(--radius); font-weight: 500; cursor: pointer; }

/* ── SE demo panel (chassis contract) ───────────────────────── */
#sePanel { background: var(--gray-light); padding: 2rem 1.5rem; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.25rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  #chatPanel { width: calc(100vw - 2rem); right: 1rem; }
}
