/* ============================================================
   YourMedLegal Design System — yourmedlegal.com
   "Let Us Ease Your Burden" — One call. We handle everything.
   ============================================================ */

/* === TOKENS === */
:root {
  /* Primary */
  --navy: #1B2D4F;
  --ocean: #2E5B8A;
  --teal: #4A8DB8;

  /* Accent */
  --amber: #D46A2E;
  --amber-hover: #BF5A22;
  --amber-light: #E8A838;

  /* Beacon */
  --beacon: #E8A838;
  --glow: #F5D28B;

  /* Neutrals */
  --charcoal: #1A1F2E;
  --slate: #3A3D4A;
  --steel: #6B6157;
  --mist: #B5AFA6;
  --cloud: #E8E4DD;
  --snow: #F0EDE6;
  --white: #FFFFFF;
  --linen: #FAF8F4;

  /* Semantic */
  --success: #2E7D5B;
  --error: #C0392B;

  /* Typography */
  --font-display: 'Lora', Georgia, serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Layout */
  --max-width: 1200px;
  --content-width: 800px;
  --nav-height: 72px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-amber: 0 4px 16px rgba(212, 106, 46, 0.35);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--linen);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ocean); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--navy); }

/* === FOCUS STYLES (WCAG 2.4.7) === */
:focus-visible {
  outline: 3px solid var(--ocean);
  outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--ocean);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(46, 134, 171, 0.2);
}

.nav-links a:focus-visible,
.nav-cta:focus-visible {
  outline-color: var(--teal);
}

/* === LAYOUT === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 { line-height: 1.3; }

h1 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  color: var(--navy);
}

h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
}

h3 {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 700;
  color: var(--charcoal);
}

h4 {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  color: var(--charcoal);
}

p {
  color: var(--slate);
  margin-bottom: var(--space-md);
}

p:last-child { margin-bottom: 0; }

.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.text-steel { color: var(--steel); }
.text-center { text-align: center; }
.text-white { color: var(--white); }

/* === NAV === */
.nav {
  background: var(--navy);
  height: var(--nav-height);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.nav-logo svg { height: 36px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--white); }
.nav-links a.active { color: var(--teal); }

.nav-lang {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.nav-lang:hover { background: rgba(255,255,255,0.2); color: var(--white); }

.nav-phone {
  color: var(--amber-light) !important;
  font-weight: 600 !important;
}

.nav-cta {
  background: var(--amber);
  color: var(--white) !important;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600 !important;
  font-size: 13px !important;
  transition: background 0.2s, transform 0.2s;
}

.nav-cta:hover {
  background: var(--amber-hover);
  transform: translateY(-1px);
  color: var(--white) !important;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: 0.3s;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.btn-primary {
  background: var(--amber);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--amber-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-amber);
  color: var(--white);
}

.btn-secondary {
  background: var(--navy);
  color: var(--white);
}

.btn-secondary:hover {
  background: #163d61;
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--ocean);
  padding: 14px 16px;
}

.btn-ghost:hover {
  background: rgba(46, 134, 171, 0.08);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 18px;
}

.btn-block { width: 100%; }

/* === HERO === */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #163d61 40%, var(--ocean) 100%);
  padding: var(--space-3xl) 0 var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(91,192,190,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: var(--space-2xl);
  align-items: center;
  position: relative;
}

.hero-content { color: var(--white); }

.hero h1 {
  color: var(--white);
  font-size: 44px;
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.hero-subtitle {
  color: rgba(255,255,255,0.85);
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  max-width: 520px;
}

/* === TRUST BAR === */
.trust-bar {
  background: var(--snow);
  border-bottom: 1px solid var(--cloud);
  padding: var(--space-md) 0;
}

.trust-bar .container {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.trust-item svg {
  width: 20px;
  height: 20px;
  color: var(--teal);
  flex-shrink: 0;
}

/* === SECTIONS === */
.section {
  padding: var(--space-2xl) 0;
}

.section--alt {
  background: var(--snow);
}

.section--navy {
  background: var(--navy);
  color: var(--white);
}

.section--navy h2,
.section--navy h3 { color: var(--white); }
.section--navy p { color: rgba(255,255,255,0.85); }

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-xl);
}

.section-header p {
  font-size: 18px;
  margin-top: var(--space-sm);
}

/* === CARDS === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--cloud);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  background: rgba(46, 134, 171, 0.1);
}

.card-icon svg {
  width: 28px;
  height: 28px;
  color: var(--ocean);
}

.card h3 {
  margin-bottom: var(--space-sm);
}

.card p {
  font-size: 15px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-md);
  font-weight: 600;
  font-size: 15px;
  color: var(--ocean);
}

.card-link:hover { color: var(--navy); }

/* === STEPS === */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  position: relative;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ocean);
  color: var(--white);
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.step h3 { margin-bottom: var(--space-sm); }
.step p { font-size: 15px; max-width: 280px; margin: 0 auto; }

/* === STATS === */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  text-align: center;
}

.stat-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--teal);
  margin-bottom: var(--space-xs);
}

.section--navy .stat-value { color: var(--teal); }

.stat-label {
  font-size: 14px;
  color: var(--steel);
}

.section--navy .stat-label { color: rgba(255,255,255,0.7); }

/* === INTAKE FORM CARD === */
.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
}

.form-card-header {
  background: linear-gradient(135deg, var(--navy), var(--ocean));
  padding: var(--space-lg);
  color: var(--white);
}

.form-card-header h3 {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 20px;
  margin-bottom: var(--space-xs);
}

.form-card-header p {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
}

.form-card-body {
  padding: var(--space-lg);
}

/* === FORM FIELDS === */
.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: var(--space-xs);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--cloud);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--charcoal);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--ocean);
  box-shadow: 0 0 0 3px rgba(46,134,171,0.12);
}

.form-control::placeholder { color: var(--mist); }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B7B8D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-consent {
  font-size: 13px;
  color: var(--steel);
  margin-top: var(--space-md);
}

.form-consent a { color: var(--ocean); }

.form-note {
  font-size: 12px;
  color: var(--steel);
  text-align: center;
  margin-top: var(--space-md);
}

/* === FAQ === */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--cloud);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: var(--space-lg) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  color: var(--charcoal);
  text-align: left;
}

.faq-question:hover { color: var(--ocean); }

.faq-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-left: var(--space-md);
  transition: transform 0.3s;
  color: var(--ocean);
}

.faq-item.active .faq-icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding: 0 0 var(--space-lg);
  font-size: 15px;
  color: var(--slate);
  line-height: 1.7;
}

/* === FOOTER === */
.footer {
  background: var(--charcoal);
  padding: var(--space-2xl) 0 var(--space-xl);
  color: rgba(255,255,255,0.6);
}

.footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
}

.footer-brand p {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  margin-top: var(--space-md);
  max-width: 300px;
}

.footer h4 {
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
}

.footer-links li { margin-bottom: var(--space-sm); }

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.footer-disclaimer {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-top: var(--space-lg);
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
}

/* === STICKY MOBILE CTA === */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--white);
  padding: var(--space-sm) var(--space-md);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
  border-top: 1px solid var(--cloud);
}

.sticky-cta .btn { width: 100%; }

/* === WHATSAPP BUTTON === */
.whatsapp-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 80;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s;
  text-decoration: none;
}

.whatsapp-btn:hover { transform: scale(1.1); }
.whatsapp-btn svg { width: 32px; height: 32px; fill: white; }

/* === CHATBOT PLACEHOLDER === */
.chatbot-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 80;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--ocean);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(46, 134, 171, 0.4);
  transition: transform 0.2s;
  cursor: pointer;
  border: none;
}

.chatbot-btn:hover { transform: scale(1.1); }
.chatbot-btn svg { width: 28px; height: 28px; color: white; }

/* === EMPATHY GRID === */
.empathy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

/* === HERO CTA (visible on mobile when form is below fold) === */
.hero-cta-mobile { display: none; }

/* === RESPONSIVE === */
@media (max-width: 968px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero h1 { font-size: 34px; }
  .hero-subtitle { margin: 0 auto var(--space-lg); }
  .hero-cta-mobile { display: inline-flex; margin-bottom: var(--space-lg); }

  .form-card {
    max-width: 480px;
    margin: 0 auto;
  }

  .steps { grid-template-columns: 1fr; gap: var(--space-xl); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .empathy-grid { grid-template-columns: 1fr; }

  .footer .container {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
}

@media (max-width: 768px) {
  h1 { font-size: 30px; }
  h2 { font-size: 26px; }

  .nav-links { display: none; }
  .nav-toggle { display: block; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--navy);
    padding: var(--space-lg);
    gap: var(--space-md);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }

  .trust-bar .container {
    gap: var(--space-md);
    justify-content: space-around;
  }

  .trust-item { font-size: 12px; }

  .section { padding: var(--space-xl) 0; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
  .stat-value { font-size: 28px; }

  .sticky-cta { display: block; }
  .chatbot-btn { bottom: 72px; }
  .whatsapp-btn { bottom: 72px; }

  .footer .container { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-sm); text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-md); }
  h1 { font-size: 26px; }
  .hero { padding: var(--space-xl) 0; }
  .trust-bar .container { flex-direction: column; align-items: center; gap: var(--space-sm); }
}
