/* Ramos Legal Services
   Palette: cool official paper, green-black ink, a deep "sello" (notarial seal) green,
   and caoba (mahogany, the national tree) for stamps and links. */

:root {
  --paper: #F4F5F1;
  --paper-2: #E7EBE5;
  --ink: #16201E;
  --ink-soft: #4A5653;
  --sello: #1F4F46;
  --sello-deep: #163B34;
  --caoba: #7A2A1C;
  --line: #C6CDC4;
  --on-dark: #EEF2EC;
  --on-dark-soft: #B9C9C2;

  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(64px, 9vw, 120px);
  --header-h: 68px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; color: inherit; }
h1 { font-size: clamp(2.15rem, 4.4vw, 3.55rem); line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.18; }
h3 { font-size: 1.3rem; line-height: 1.3; }
p { margin: 0; }

a { color: var(--caoba); }
:focus-visible { outline: 2px solid var(--caoba); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 32px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); margin-right: auto;
}
.brand-mark { height: 46px; width: auto; border-radius: 4px; display: block; }
.brand-sub { align-self: center; padding-top: 4px; }
.brand-name { font-family: var(--serif); font-size: 1.55rem; font-weight: 700; letter-spacing: -0.01em; }
.brand-sub { font-size: 0.9rem; color: var(--ink-soft); }

.site-nav { display: flex; gap: 26px; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  padding: 6px 0; border-bottom: 1.5px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--caoba); }

.header-tools { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.lang button {
  font: 600 0.8rem var(--sans); letter-spacing: 0.04em;
  background: transparent; color: var(--ink-soft);
  border: 0; padding: 7px 11px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--sello); color: var(--on-dark); }
.lang button + button { border-left: 1px solid var(--line); }

.menu-toggle {
  display: none; width: 42px; height: 38px; padding: 0;
  background: transparent; border: 1px solid var(--line); border-radius: 3px; cursor: pointer;
}
.menu-bars, .menu-bars::before, .menu-bars::after {
  display: block; width: 18px; height: 1.5px; background: var(--ink); margin: 0 auto;
  position: relative; transition: transform .2s ease, opacity .2s ease;
}
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 880px) {
  .menu-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 13px 0; border-bottom: 1px solid var(--paper-2); font-size: 1.05rem; }
  .site-nav a:last-child { border-bottom: 0; }
  .brand-sub { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 1rem var(--sans);
  padding: 14px 22px; border-radius: 3px; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn .icon { width: 20px; height: 20px; }
.btn-light { background: var(--paper); color: var(--sello-deep); }
.btn-light:hover { background: #fff; }
.btn-outline-light { color: var(--on-dark); border-color: rgba(238, 242, 236, .55); }
.btn-outline-light:hover { border-color: var(--on-dark); background: rgba(238, 242, 236, .08); }
.btn-primary { background: var(--sello); color: var(--on-dark); }
.btn-primary:hover { background: var(--sello-deep); }
.btn[disabled] { opacity: .65; cursor: progress; }
.hero :focus-visible { outline-color: var(--on-dark); }

.text-link {
  display: inline-block; font-weight: 600; color: var(--caoba);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.text-link:hover { text-decoration-thickness: 2px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--sello);
  color: var(--on-dark);
  padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 9vw, 112px);
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: clamp(40px, 6vw, 88px); align-items: center;
}
.hero-copy h1 { max-width: 17ch; }
.lede { margin-top: 24px; max-width: 58ch; font-size: 1.12rem; color: var(--on-dark-soft); }
.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note { margin-top: 22px; font-size: 0.92rem; color: var(--on-dark-soft); }

/* The case file: the page's one illustrative moment */
.file { position: relative; color: var(--ink); max-width: 430px; justify-self: end; width: 100%; }
.file-tab {
  display: inline-block;
  background: var(--paper-2);
  font: 600 0.85rem var(--sans); color: var(--ink-soft);
  padding: 9px 18px 7px; border-radius: 4px 4px 0 0;
}
.file-body {
  position: relative;
  background: var(--paper);
  border-radius: 0 4px 4px 4px;
  padding: 28px 28px 150px;
  background-image: repeating-linear-gradient(to bottom, transparent 0 51px, var(--paper-2) 51px 52px);
  background-position: 0 28px;
  box-shadow: 0 30px 60px -30px rgba(5, 20, 17, .55);
}
.file-steps { list-style: none; margin: 0; padding: 0; counter-reset: f; }
.file-steps li {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 52px; font-size: 0.98rem;
}
.file-steps li::before {
  counter-increment: f; content: counter(f) ".";
  font-family: var(--serif); color: var(--ink-soft); width: 1.4em; flex: none;
}
.file-steps li > span:first-of-type { flex: 1; }
.tick {
  width: 28px; height: 28px; flex: none;
  border: 1.5px solid var(--caoba); border-radius: 50%;
  position: relative; transform: rotate(-8deg);
}
.tick::after {
  content: ""; position: absolute; left: 9px; top: 5px;
  width: 7px; height: 12px;
  border: solid var(--caoba); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.seal {
  position: absolute; right: 22px; bottom: 18px;
  width: 112px; height: 112px; color: var(--caoba);
  transform: rotate(-14deg); opacity: .9;
}

/* One orchestrated load sequence: each line is stamped, then the seal */
@media (prefers-reduced-motion: no-preference) {
  .tick, .seal { opacity: 0; animation: stamp .38s cubic-bezier(.2, .9, .3, 1.3) forwards; }
  .file-steps li:nth-child(1) .tick { animation-delay: .5s; }
  .file-steps li:nth-child(2) .tick { animation-delay: .8s; }
  .file-steps li:nth-child(3) .tick { animation-delay: 1.1s; }
  .file-steps li:nth-child(4) .tick { animation-delay: 1.4s; }
  .seal { animation-delay: 1.85s; --rot: -14deg; --end: .9; }
  @keyframes stamp {
    from { opacity: 0; transform: scale(1.6) rotate(var(--rot, -8deg)); }
    to { opacity: var(--end, 1); transform: scale(1) rotate(var(--rot, -8deg)); }
  }
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .file { justify-self: start; max-width: 460px; }
}

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--paper-2); }
.section-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 1.08rem; }

/* Services: two columns divided like facing pages */
.services-grid { display: grid; grid-template-columns: 1fr 1fr; }
.service { padding: 8px clamp(24px, 4vw, 56px) 8px 0; }
.service + .service { padding: 8px 0 8px clamp(24px, 4vw, 56px); border-left: 1px solid var(--line); }
.service h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); max-width: 20ch; }
.service-intro { margin-top: 12px; color: var(--ink-soft); }
.service-list { list-style: none; padding: 0; margin: 28px 0 30px; border-top: 1px solid var(--ink); }
.service-list li {
  padding: 14px 0 14px 26px; border-bottom: 1px solid var(--line); position: relative;
}
.service-list li::before {
  content: ""; position: absolute; left: 2px; top: 1.45em;
  width: 9px; height: 1.5px; background: var(--caoba);
}
@media (max-width: 760px) {
  .services-grid { grid-template-columns: 1fr; gap: 56px; }
  .service, .service + .service { padding: 0; border-left: 0; }
}

/* Process: a true sequence, so it is numbered */
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--ink);
}
.step { padding: 26px 28px 8px 0; position: relative; }
.step + .step { padding-left: 28px; border-left: 1px solid var(--line); }
.step-num {
  display: block; font-family: var(--serif); font-size: 3rem; line-height: 1;
  color: var(--caoba); margin-bottom: 18px;
}
.step h3 { margin-bottom: 10px; }
.step p { color: var(--ink-soft); font-size: 0.98rem; }
@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 8px; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 22px 0 18px 64px; border-left: 0; }
  .step + .step { border-top: 1px solid var(--line); margin-top: 0; }
  .step-num { position: absolute; left: 0; top: 20px; font-size: 2.4rem; }
}

/* Reviews */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 40px); }
.review { margin: 0; padding-top: 22px; border-top: 1px solid var(--ink); display: flex; flex-direction: column; }
.review blockquote {
  margin: 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.6;
}
.review figcaption { margin-top: 18px; font-size: 0.92rem; color: var(--ink-soft); }
.review figcaption strong { color: var(--ink); font-weight: 600; display: block; }
.review.is-placeholder { border-top-style: dashed; border-top-color: var(--line); color: var(--ink-soft); }
.review.is-placeholder blockquote { font-style: italic; color: var(--ink-soft); }
@media (max-width: 860px) { .reviews { grid-template-columns: 1fr; } }

/* Why */
.why-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); }
.why-grid .section-head { margin-bottom: 0; }
.why-grid h2 { max-width: 14ch; }
.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 40px clamp(24px, 4vw, 48px); }
.reason h3 { font-size: 1.22rem; margin-bottom: 10px; padding-left: 16px; border-left: 2px solid var(--caoba); }
.reason p { color: var(--ink-soft); }
@media (max-width: 880px) { .why-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .reasons { grid-template-columns: 1fr; gap: 30px; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
.contact-intro { margin-top: 14px; color: var(--ink-soft); font-size: 1.08rem; }
.form { margin-top: 34px; display: grid; gap: 22px; max-width: 620px; }
.field label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; font: 400 1rem var(--sans); color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 3px;
  padding: 12px 14px;
}
.field textarea { resize: vertical; min-height: 140px; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--sello); outline-offset: 0; border-color: var(--sello); }
.field [aria-invalid="true"] { border-color: var(--caoba); }
.field-error { color: var(--caoba); font-size: 0.88rem; margin-top: 6px; min-height: 0; }
.field-error:empty { display: none; }
.form .btn { justify-self: start; }
.form-status { font-size: 0.98rem; }
.form-status.is-success { color: var(--sello); font-weight: 600; }
.form-status.is-error { color: var(--caoba); font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-direct {
  background: var(--sello); color: var(--on-dark);
  padding: clamp(28px, 4vw, 40px); border-radius: 4px;
}
.contact-direct h3 { font-size: 1.4rem; }
.direct-list { margin: 26px 0 0; display: grid; gap: 22px; }
.direct-list dt { font-size: 0.85rem; color: var(--on-dark-soft); margin-bottom: 4px; }
.direct-list dd { margin: 0; }
.direct-list a { color: var(--on-dark); font-weight: 600; word-break: break-word; }
.direct-list address { font-style: normal; margin-bottom: 8px; }
.contact-direct :focus-visible { outline-color: var(--on-dark); }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

/* Footer */
/* Footer background matches the logo's black so the full logo sits in it seamlessly */
.site-footer { background: #121113; color: #B8B4AA; padding: 40px 0 52px; font-size: 0.92rem; }
.footer-inner { display: grid; gap: 8px; }
.footer-logo {
  width: 200px; height: auto; display: block; margin: -10px 0 4px -26px;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
.footer-legal { margin-top: 14px; max-width: 70ch; }

/* Floating WhatsApp on small screens */
.wa-float {
  display: none;
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--sello); color: var(--on-dark);
  align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -8px rgba(5, 20, 17, .6);
}
.wa-float svg { width: 26px; height: 26px; }
@media (max-width: 880px) { .wa-float { display: flex; } .site-footer { padding-bottom: 96px; } }
