/* Rosarito Legal — public site CSS
   Design goals: 45+ readability, high contrast, strong trust signals,
   fast load, semantic HTML. Base 18px body, 1.65 line-height, ample
   white space, generous tap targets. */

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

:root {
  --navy: #0f2a44;
  --navy-dark: #081a2c;
  --navy-light: #1e4b78;
  --gold: #b8892b;
  --gold-light: #d8a847;
  --bg: #ffffff;
  --surface: #f6f3ed;
  --surface-2: #edeae2;
  --text: #1a1a1a;
  --text-soft: #3a3a3a;
  --text-mute: #666;
  --border: #d8d2c4;
  --success: #1f6b3b;
  --danger: #b21e1e;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(15, 42, 68, 0.08);
  --shadow-md: 0 6px 20px rgba(15, 42, 68, 0.10);
  --container: 1180px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 18px;          /* larger base for 45+ readers */
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
  line-height: 1.25;
  color: var(--navy);
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }

a { color: var(--navy-light); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--gold); }

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

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; margin: 0 auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: 10px 16px; z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 14px 24px; min-height: 72px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; background: var(--navy); color: var(--gold);
  font-family: 'Merriweather', serif; font-weight: 900; font-size: 18px;
  border-radius: 8px; letter-spacing: -0.04em;
}
.brand-mark-lg { width: 64px; height: 64px; font-size: 26px; border-radius: 12px; }
.brand-text strong { font-family: 'Merriweather', serif; font-size: 1.2rem; color: var(--navy); display:block; line-height:1.1; }
.brand-text small { font-size: 0.78rem; color: var(--text-mute); }

.main-nav ul {
  display: flex; gap: 4px; list-style: none;
}
.main-nav a {
  display: inline-block; padding: 10px 16px; text-decoration: none;
  color: var(--text); font-weight: 500; font-size: 1rem; border-radius: 6px;
}
.main-nav a:hover { background: var(--surface); color: var(--navy); }
.main-nav a.is-active { color: var(--navy); font-weight: 600; background: var(--surface); }

.nav-toggle {
  display: none; background: transparent; border: 1.5px solid var(--border);
  padding: 8px 14px; border-radius: 6px; font-size: 0.95rem; font-family: inherit;
  cursor: pointer;
}

.header-cta { display: flex; gap: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 8px; text-decoration: none;
  font-weight: 600; font-size: 1rem; font-family: inherit; cursor: pointer;
  border: 2px solid transparent; transition: transform .1s, background .2s, border-color .2s, color .2s;
  min-height: 48px; /* large tap target */
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-light); color: var(--navy); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--navy); }
.btn-ghost:hover { border-color: var(--navy); background: var(--surface); color: var(--navy); }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; min-height: 56px; }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(135deg, rgba(15,42,68,0.96) 0%, rgba(8,26,44,0.96) 100%),
    url('/img/hero-pattern.svg');
  color: #fff;
  padding: 80px 0 96px;
}
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero .eyebrow { color: var(--gold-light); font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.hero .lede { font-size: 1.2rem; color: rgba(255,255,255,0.88); margin-bottom: 32px; max-width: 60ch; }
.hero-grid {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: center;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-ctas .btn-ghost { border-color: rgba(255,255,255,0.4); color: #fff; }
.hero-ctas .btn-ghost:hover { border-color: var(--gold); background: rgba(255,255,255,0.08); color: #fff; }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 24px; color: rgba(255,255,255,0.8); font-size: 0.95rem; }
.hero-trust li::before { content: "✓ "; color: var(--gold-light); font-weight: 700; }

.hero-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  padding: 28px; border-radius: 12px;
}
.hero-card h2 { color: #fff; font-size: 1.3rem; margin-bottom: 16px; }
.hero-card ul { list-style: none; }
.hero-card li { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.92); font-size: 1rem; }
.hero-card li:last-child { border: 0; }

/* ---------- Page hero (internal) ---------- */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 60px 0 48px;
}
.page-hero .eyebrow { color: var(--gold); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; }
.page-hero .eyebrow a { color: var(--navy); text-decoration: none; }
.page-hero h1 { margin-bottom: 14px; }
.page-hero .lede { font-size: 1.2rem; color: var(--text-soft); max-width: 70ch; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-dark { background: var(--navy); color: rgba(255,255,255,0.92); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: rgba(255,255,255,0.82); }

.section-title { margin-bottom: 10px; }
.section-lede { color: var(--text-mute); font-size: 1.1rem; margin-bottom: 36px; max-width: 60ch; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }

.eyebrow { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); margin-bottom: 12px; }

/* ---------- Service cards ---------- */
.service-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px;
}
.service-card {
  background: #fff; border: 1px solid var(--border); padding: 28px;
  border-radius: var(--radius); text-decoration: none; color: var(--text);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.service-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gold);
}
.service-card h3 { color: var(--navy); margin-bottom: 10px; }
.service-card p { color: var(--text-soft); margin-bottom: 16px; }
.card-link { color: var(--gold); font-weight: 600; }

/* ---------- Feature grid (dark section) ---------- */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px;
}
.feature-grid h3 { margin-bottom: 10px; color: var(--gold-light); }

/* ---------- Service block (services page) ---------- */
.service-block {
  padding: 32px 0; border-bottom: 1px solid var(--border);
}
.service-block:last-child { border-bottom: 0; }
.service-block h2 { margin-bottom: 14px; }

/* ---------- Lists ---------- */
.check-list { list-style: none; padding: 0; }
.check-list li {
  position: relative; padding: 8px 0 8px 32px; font-size: 1.05rem;
}
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold); color: var(--navy);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 0.8rem;
}

.numbered-list { padding-left: 20px; }
.numbered-list li { padding: 10px 0 10px 12px; font-size: 1.05rem; }

.callout {
  border-left: 4px solid var(--gold); background: var(--surface);
  padding: 16px 20px; margin: 24px 0; border-radius: 4px;
  color: var(--text-soft); font-size: 0.98rem;
}

.inline-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; }

/* ---------- CTA section ---------- */
.section-cta {
  background: var(--navy); color: #fff; padding: 56px 0;
}
.cta-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.section-cta h2 { color: #fff; margin-bottom: 6px; }
.section-cta p { color: rgba(255,255,255,0.85); margin-bottom: 0; }

/* ---------- Blog ---------- */
.post-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px;
}
.post-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .15s, box-shadow .15s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-cover { display:block; aspect-ratio: 16/9; overflow: hidden; background: var(--surface); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-cover img { transform: scale(1.03); }
.post-body { padding: 22px 24px 26px; }
.post-body time { color: var(--text-mute); font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.05em; }
.post-body h2, .post-body h3 { margin: 8px 0 10px; font-size: 1.3rem; }
.post-body h2 a, .post-body h3 a { text-decoration: none; color: var(--navy); }
.post-body h2 a:hover, .post-body h3 a:hover { color: var(--gold); }
.post-body p { color: var(--text-soft); font-size: 1rem; margin-bottom: 14px; }

/* ---------- Article ---------- */
.article-hero { background: var(--surface); padding: 56px 0 24px; }
.article-hero h1 { margin-bottom: 8px; }
.article-meta { color: var(--text-mute); font-size: 0.95rem; }
.article-cover { margin: 32px 0 0; border-radius: var(--radius); overflow: hidden; }
.article-cover img { width: 100%; max-height: 520px; object-fit: cover; }

.prose { padding: 32px 0 48px; font-size: 1.08rem; line-height: 1.75; color: var(--text-soft); }
.prose h1, .prose h2, .prose h3 { margin-top: 2em; margin-bottom: 0.6em; color: var(--navy); }
.prose h2 { font-size: 1.6rem; }
.prose h3 { font-size: 1.25rem; }
.prose p { margin-bottom: 1.15em; }
.prose ul, .prose ol { margin: 0 0 1.15em 1.5em; }
.prose li { margin-bottom: 0.35em; }
.prose img { margin: 1.5em 0; border-radius: 8px; }
.prose blockquote { border-left: 4px solid var(--gold); padding-left: 20px; color: var(--text-mute); font-style: italic; margin: 1.5em 0; }
.prose strong { color: var(--text); }
.prose a { color: var(--navy-light); }
.prose a:hover { color: var(--gold); }

.article-divider { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

.article-cta {
  background: var(--surface); padding: 32px; border-radius: var(--radius); margin-bottom: 48px;
  text-align: center;
}
.article-cta h2 { margin-bottom: 8px; font-size: 1.5rem; }
.article-cta p { margin-bottom: 20px; color: var(--text-soft); }

/* ---------- Contact form ---------- */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px;
}
.contact-grid h2 { font-size: 1.2rem; margin-bottom: 8px; }
.contact-grid address { font-style: normal; color: var(--text-soft); margin-bottom: 20px; }
.contact-grid p { color: var(--text-soft); margin-bottom: 20px; }

.form label { display: block; font-weight: 600; color: var(--text); margin-bottom: 6px; font-size: 0.95rem; }
.form input, .form select, .form textarea {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 1rem; font-family: inherit;
  background: #fff; color: var(--text);
  min-height: 48px;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 3px solid rgba(184, 137, 43, 0.3); outline-offset: 1px;
  border-color: var(--gold);
}
.form textarea { min-height: 140px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form label + input, .form label + select, .form label + textarea { margin-top: 6px; }
.form > label { margin-bottom: 20px; display: block; }

.alert {
  padding: 16px 20px; border-radius: 8px; margin-bottom: 20px; font-size: 1rem;
  border: 1px solid;
}
.alert-success { background: #eaf7ee; color: var(--success); border-color: #b3e0c3; }
.alert-error { background: #fdecec; color: var(--danger); border-color: #f0b4b4; }

.fine-print { font-size: 0.88rem; color: var(--text-mute); margin-top: 18px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark); color: rgba(255,255,255,0.78);
  padding: 56px 0 24px; margin-top: 80px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 40px;
}
.footer-grid h4 { color: var(--gold-light); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: #fff; }
.footer-brand strong { font-family: 'Merriweather', serif; font-size: 1.25rem; color: #fff; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.78); text-decoration: none; }
.footer-links a:hover { color: var(--gold-light); }
.site-footer address { font-style: normal; line-height: 1.7; }
.site-footer a { color: var(--gold-light); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: 24px; margin-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.55); font-size: 0.85rem; flex-wrap: wrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 56px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .form-row { grid-template-columns: 1fr; gap: 16px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .header-cta .btn-ghost { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 17px; }
  .section { padding: 52px 0; }
  .main-nav { position: relative; }
  .nav-toggle { display: inline-block; }
  .main-nav ul {
    display: none;
    position: absolute; top: calc(100% + 8px); right: 0;
    flex-direction: column; gap: 0;
    background: #fff; border: 1px solid var(--border); border-radius: 8px;
    box-shadow: var(--shadow-md); min-width: 200px; padding: 8px;
  }
  .main-nav[aria-expanded="true"] ul { display: flex; }
  .main-nav a { padding: 12px 16px; width: 100%; }
  .brand-text small { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
