/* ============================================================
   Lopez Financial Consulting — style.css
   Light editorial theme, single forest-green accent.
   ============================================================ */

:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --ink: #17201b;
  --muted: #55605a;
  --accent: #14532d;
  --accent-strong: #0d3b20;
  --amber: #d97706;
  --border: #e3e1da;
  --radius-card: 14px;
  --shadow: 0 18px 44px -18px rgba(20, 83, 45, 0.22);
  --font-display: "Cabinet Grotesk", "Outfit", system-ui, sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --container: 1140px;
}

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Cabinet Grotesk";
  src: url("../fonts/cabinet-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cabinet Grotesk";
  src: url("../fonts/cabinet-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 0.6em;
  color: var(--ink);
}
h1 { font-size: clamp(2.3rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; max-width: 65ch; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin-bottom: 0.45em; }

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

.section { padding: 88px 0; }
.section-tight { padding: 64px 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 2px;
  background: var(--amber);
  margin-right: 10px;
  vertical-align: middle;
}

.lead { font-size: 1.15rem; color: var(--muted); }

.text-muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 13px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-light { background: #fff; color: var(--accent-strong); }
.btn-light:hover { background: #eef3ef; color: var(--accent-strong); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 68px;
  background: rgba(247, 246, 243, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 34px; width: auto; }

.main-nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  font-weight: 500;
  font-size: 0.96rem;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.main-nav a:hover { color: var(--accent); }
.main-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--amber); }

.header-cta { flex-shrink: 0; }
.header-cta-mobile { display: none; }

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  margin: 4px auto;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 767px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 12px 24px 20px; }
  .main-nav a { display: block; padding: 13px 0; min-height: 48px; }
  .header-cta { display: none; }
  .header-cta-mobile { display: block; }
  .main-nav .btn { margin-top: 10px; width: 100%; }
}

/* ---------- Hero (split) ---------- */
.hero {
  padding: 96px 0 100px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.hero-copy p.lead { margin-bottom: 2em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-media img {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}
.hero-media {
  position: relative;
}
.hero-badge {
  position: absolute;
  bottom: -22px;
  left: -22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 16px 22px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}
.hero-badge small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---------- Trust strip ---------- */
.trust-strip {
  background: var(--accent-strong);
  color: #e7efe9;
  padding: 26px 0;
}
.trust-strip .container {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 48px;
  justify-content: space-between;
  align-items: center;
}
.trust-item { display: flex; align-items: baseline; gap: 10px; }
.trust-item strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: #fff;
}
.trust-item span { font-size: 0.9rem; color: #b9ccc0; }

/* ---------- Cards & grids ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 30px 28px;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card h3 { margin-bottom: 0.5em; }
.card p { font-size: 0.95rem; color: var(--muted); margin-bottom: 0; }

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #e8f0ea;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }

.card-link {
  display: inline-block;
  margin-top: 16px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}
.card-link::after { content: " \2192"; }

/* ---------- Split blocks (about teaser, articles) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split.reverse > .split-media { order: 2; }
.split-media img { border-radius: var(--radius-card); box-shadow: var(--shadow); }

.check-list { list-style: none; padding: 0; margin: 0 0 1.6em; }
.check-list li {
  padding-left: 30px;
  position: relative;
  margin-bottom: 0.7em;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2' d='M3 8.5l3.2 3L13 4.5'/%3E%3C/svg%3E") center/12px no-repeat, linear-gradient(#fff,#fff);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2' d='M3 8.5l3.2 3L13 4.5'/%3E%3C/svg%3E") center/12px no-repeat, linear-gradient(#fff,#fff);
}

/* ---------- Blog cards ---------- */
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.post-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.post-card-body { padding: 24px 26px 28px; }
.post-meta {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.post-meta .tag { color: var(--amber); }
.post-card h3 { margin-bottom: 0.4em; }
.post-card p { font-size: 0.94rem; color: var(--muted); margin-bottom: 0; }

/* ---------- Testimonials ---------- */
.testimonial-section { background: #eef3ef; }
.quote-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 26px; align-items: stretch; }
blockquote.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-card);
  margin: 0;
  padding: 34px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
blockquote.testimonial p {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.18rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  max-width: none;
}
.testimonial cite {
  font-style: normal;
  font-size: 0.92rem;
  color: var(--muted);
}
.testimonial cite strong { color: var(--ink); display: block; font-size: 0.98rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  border-radius: var(--radius-card);
  padding: 64px 56px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.cta-band h2 { color: #fff; margin-bottom: 0.25em; }
.cta-band p { color: #cfe0d4; margin-bottom: 0; max-width: 46ch; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { padding: 84px 0 56px; }
.page-hero p.lead { margin-bottom: 0; }

/* ---------- Article layout ---------- */
.article-body { max-width: 720px; margin: 0 auto; }
.article-body img.article-hero {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  margin: 30px 0 40px;
}
.article-body h2 { font-size: 1.55rem; margin-top: 1.8em; }
.disclosure {
  background: #fdf6ec;
  border: 1px solid #f0e0c8;
  border-left: 4px solid var(--amber);
  border-radius: var(--radius-card);
  padding: 18px 22px;
  font-size: 0.9rem;
  color: #6b5320;
  margin: 30px 0;
}

/* ---------- Services ---------- */
.service-block {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  padding: 44px 0;
  border-bottom: 1px solid var(--border);
}
.service-block:last-child { border-bottom: 0; }
.service-block:nth-child(even) { grid-template-columns: 0.8fr 1.2fr; }
.service-block:nth-child(even) .service-main { order: 2; }
.service-side {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  align-self: start;
}
.service-side h3 { font-size: 1.05rem; margin-bottom: 0.6em; }
.price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent);
  margin: 18px 0 4px;
}
.price small { font-family: var(--font-body); font-weight: 500; font-size: 0.85rem; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 38px 34px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 15px;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 83, 45, 0.14);
}
.field-error {
  display: none;
  color: #b3261e;
  font-size: 0.84rem;
  margin-top: 6px;
}
.field.invalid .field-error { display: block; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: #b3261e; }

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

.form-status {
  display: none;
  border-radius: 12px;
  padding: 15px 18px;
  font-size: 0.95rem;
  margin-bottom: 20px;
}
.form-status.ok { display: block; background: #e8f0ea; border: 1px solid #c4d8ca; color: var(--accent-strong); }
.form-status.err { display: block; background: #fdeceb; border: 1px solid #f2c8c4; color: #8c1d18; }

.contact-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.contact-item:last-of-type { border-bottom: 0; }
.contact-item h3 { font-size: 1rem; margin-bottom: 0.25em; }
.contact-item p { margin-bottom: 0; font-size: 0.95rem; color: var(--muted); }
.contact-item a { font-weight: 500; text-decoration: none; }

.map-card {
  margin-top: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.map-card-visual {
  position: relative;
  height: 220px;
  background:
    linear-gradient(0deg, rgba(20,83,45,0.05), rgba(20,83,45,0.05)),
    repeating-linear-gradient(0deg, transparent 0 34px, var(--border) 34px 35px),
    repeating-linear-gradient(90deg, transparent 0 34px, var(--border) 34px 35px),
    #eef0ec;
}
.map-pin {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -100%);
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 50% 50% 50% 0;
  rotate: -45deg;
  box-shadow: var(--shadow);
}
.map-pin::after {
  content: "";
  position: absolute;
  inset: 9px;
  background: #fff;
  border-radius: 50%;
}
.map-card-body { padding: 18px 22px; font-size: 0.92rem; color: var(--muted); }
.map-card-body strong { color: var(--ink); display: block; font-size: 0.98rem; }

/* ---------- Legal pages ---------- */
.legal-body { max-width: 760px; }
.legal-body h2 { font-size: 1.4rem; margin-top: 1.9em; }
.legal-body h3 { font-size: 1.1rem; margin-top: 1.4em; }
.updated {
  font-size: 0.85rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
  margin-bottom: 34px;
}
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 20px 0 30px;
}
.cookie-table th, .cookie-table td {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--border);
}
.cookie-table th { background: #eef3ef; font-family: var(--font-display); font-weight: 700; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--accent-strong);
  color: #b9ccc0;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 70px 0 46px;
}
.site-footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 1em;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.55em; }
.site-footer a { color: #cfe0d4; text-decoration: none; font-size: 0.94rem; }
.site-footer a:hover { color: #fff; }
.footer-brand p { font-size: 0.92rem; }
.footer-legal-block {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 26px 0;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 40px;
  justify-content: space-between;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 20px 0 26px;
  font-size: 0.8rem;
  color: #93a89a;
}
.footer-bottom p { margin: 0 0 6px; max-width: none; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 24px 26px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { font-size: 0.9rem; color: var(--muted); margin-bottom: 16px; }
.cookie-banner p a { white-space: nowrap; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn { min-height: 46px; padding: 10px 22px; font-size: 0.9rem; flex: 1 1 auto; }
.cookie-manage { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 16px; display: none; }
.cookie-manage.open { display: block; }
.cookie-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  font-size: 0.92rem;
}
.cookie-toggle small { display: block; color: var(--muted); font-size: 0.8rem; }
.cookie-toggle label { font-weight: 600; }
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i {
  position: absolute;
  inset: 0;
  background: #cbd5ce;
  border-radius: 999px;
  transition: background 0.2s ease;
  pointer-events: none;
}
.switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:disabled + i { background: var(--accent); opacity: 0.55; }
.switch input:disabled { cursor: not-allowed; }

/* ---------- Reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.in-view { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; gap: 56px; padding: 64px 0 72px; }
  .hero-badge { left: 12px; bottom: -18px; }
  .service-block, .service-block:nth-child(even) { grid-template-columns: 1fr; gap: 26px; }
  .service-block:nth-child(even) .service-main { order: 0; }
}
@media (max-width: 767px) {
  .section { padding: 60px 0; }
  .grid-3, .grid-2, .quote-grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .split.reverse > .split-media { order: 0; }
  .cta-band { padding: 44px 30px; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; padding: 52px 0 36px; }
}
