/* ABC Translation — Spain
   Palette: official-document paper, navy ink, passport burgundy seal.
   ------------------------------------------------------------------ */
:root {
  --ink: #1c2a44;
  --ink-2: #3b4760;
  --muted: #58627a;
  --paper: #f4f6f3;
  --sheet: #ffffff;
  --tint: #e3ebe5;
  --guill: #93b3a0;
  --seal: #8c1d2f;
  --seal-dark: #6c1423;
  --rule: #cdd5cf;
  --focus: #b8862b;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 74rem;
  --gap: clamp(1rem, 3vw, 2rem);
  --band: clamp(2.75rem, 6vw, 4.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 1.0625rem/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--seal); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--seal-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.005em; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: clamp(2.05rem, 4.2vw, 3.3rem); line-height: 1.08; max-width: 22ch; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); max-width: 30ch; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gap); }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: .5rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.9rem; padding: .7rem 1.35rem; border-radius: 3px;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--seal); color: #fff; }
.btn-primary:hover { background: var(--seal-dark); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-small { min-height: 2.4rem; padding: .45rem 1rem; font-size: .95rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- header */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--rule); }
@supports (backdrop-filter: blur(6px)) { .site-head { background: rgba(255,255,255,.88); backdrop-filter: blur(6px); } }
.head-row { display: flex; align-items: center; gap: 1.25rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--ink); }
.logo-mark { width: 2.4rem; height: 2.4rem; color: var(--seal); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 600 1.2rem/1.1 var(--serif); }
.brand-tag { font-size: .78rem; color: var(--muted); }
.nav-panel { display: flex; align-items: center; gap: 1.25rem; }
.nav, .lang-switch { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.nav a { display: block; padding: .5rem .7rem; color: var(--ink); text-decoration: none; font-weight: 500; border-radius: 3px; }
.nav a:hover { background: var(--tint); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--seal); border-radius: 0; }
.lang-switch { border-left: 1px solid var(--rule); padding-left: 1rem; }
.lang-switch a { display: block; padding: .35rem .45rem; font-size: .85rem; font-weight: 600; color: var(--muted); text-decoration: none; letter-spacing: .02em; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.nav-toggle { display: none; align-items: center; gap: .5rem; background: none; border: 1.5px solid var(--ink); border-radius: 3px; padding: .45rem .75rem; font: 600 .95rem var(--sans); color: var(--ink); cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 1.1rem; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; } .bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .brand-tag { display: none; }
  .nav-panel {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 1rem;
    background: #fff; border-bottom: 1px solid var(--rule); padding: 1rem var(--gap) 1.5rem;
  }
  .nav-panel.open { display: flex; }
  .nav { flex-direction: column; }
  .nav a { padding: .75rem .25rem; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .lang-switch { border-left: 0; padding-left: 0; }
  .lang-switch a { padding: .5rem .75rem; font-size: .95rem; }
}

/* ---------- hero */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--rule); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero .lead { font-size: 1.2rem; color: var(--ink-2); max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 1.75rem; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; color: var(--ink-2); font-size: .98rem; }
.hero-points li { padding-left: 1.6rem; position: relative; }
.hero-points li::before { content: ""; position: absolute; left: 0; top: .42em; width: .85rem; height: .5rem; border-left: 2px solid var(--seal); border-bottom: 2px solid var(--seal); transform: rotate(-45deg); }

.hero-art { position: relative; justify-self: center; width: min(100%, 25rem); }
.cert { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(28,42,68,.14)); transform: rotate(2deg); }
.cert .sheet { fill: #fff; stroke: var(--rule); }
.cert .guill { opacity: .9; }
.cert .g1 { stroke: var(--guill); stroke-width: .6; }
.cert .g2 { stroke: #c3d5ca; stroke-width: .6; }
.cert .inner { fill: #fff; stroke: var(--guill); stroke-width: 1; }
.cert .d-title { font: 700 26px var(--serif); letter-spacing: 6px; fill: var(--ink); }
.cert .d-sub { font: italic 11px var(--serif); fill: var(--muted); }
.cert .rule { stroke: var(--ink); stroke-width: 1; }
.cert .f-n { font: 600 12px var(--sans); fill: var(--ink-2); }
.cert .f-l { fill: #dfe5e1; }
.stamp { position: absolute; width: 52%; left: -12%; bottom: 4%; transform: rotate(-14deg); mix-blend-mode: multiply; opacity: .92; }
.stamp .s-ring { fill: none; stroke: var(--seal); stroke-width: 5; }
.stamp .s-ring.thin { stroke-width: 2; }
.stamp .s-text { font: 700 17.5px var(--sans); letter-spacing: 2.2px; fill: var(--seal); }
.stamp .s-mark { fill: var(--seal); }

@media (prefers-reduced-motion: no-preference) {
  .stamp { animation: stamp-down .55s cubic-bezier(.2,.9,.3,1.2) .6s both; }
  @keyframes stamp-down {
    0% { opacity: 0; transform: rotate(-24deg) scale(1.7); }
    70% { opacity: .95; transform: rotate(-13deg) scale(.95); }
    100% { opacity: .92; transform: rotate(-14deg) scale(1); }
  }
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { width: min(80%, 20rem); margin-top: .5rem; }
}

/* ---------- page head (inner pages) */
.page-head {
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule);
  background-color: var(--tint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12'%3E%3Cpath d='M0 6C6 0 6 12 12 6S18 0 24 6' fill='none' stroke='%23c7d8cd' stroke-width='.7'/%3E%3Cpath d='M0 6C6 12 6 0 12 6S18 12 24 6' fill='none' stroke='%23d5e2d9' stroke-width='.7'/%3E%3C/svg%3E");
}
.page-head .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 64ch; margin-bottom: 0; }
.crumbs ol { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 .5rem; color: var(--guill); }
.crumbs a { color: var(--ink-2); }

/* ---------- bands */
.band { padding: var(--band) 0; }
.band + .band { border-top: 1px solid var(--rule); }
.band-tint { background: var(--tint); }
.band-steps { background: var(--sheet); }
.section-lead { color: var(--ink-2); margin-top: -.25rem; }
.sub-h { margin-top: 2rem; font-size: 1.1rem; }
.more-link { margin: 1.25rem 0 0; font-weight: 600; }

/* ---------- services register (a ledger, not cards) */
.register { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: 2px solid var(--ink); }
.reg-row {
  display: grid; grid-template-columns: 2.5rem minmax(12rem, 18rem) minmax(0, 1fr); gap: 0 1.5rem;
  align-items: baseline; padding: 1.25rem 0; border-bottom: 1px solid var(--rule); position: relative;
}
.reg-row .icon { width: 2rem; height: 2rem; color: var(--seal); align-self: start; }
.reg-name h3 { margin: 0; font-size: 1.25rem; }
.reg-name a { color: var(--ink); text-decoration: none; }
.reg-name a::after { content: ""; position: absolute; inset: 0; }
.reg-row:hover .reg-name a { color: var(--seal); text-decoration: underline; }
.reg-row:hover { background: linear-gradient(90deg, rgba(140,29,47,.04), transparent 70%); }
.reg-desc { margin: 0; color: var(--ink-2); }
@media (max-width: 720px) {
  .reg-row { grid-template-columns: 2.25rem 1fr; }
  .reg-desc { grid-column: 2; margin-top: .35rem; }
}

/* ---------- steps (a real sequence) */
.steps { list-style: none; counter-reset: step; margin: 1.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.steps li { counter-increment: step; border-top: 1px solid var(--ink); padding-top: 1rem; }
.steps li::before { content: counter(step); display: block; font: 600 2.4rem/1 var(--serif); color: var(--seal); margin-bottom: .6rem; }
.steps h3 { margin-bottom: .35rem; }
.steps p { margin: 0; color: var(--ink-2); font-size: .98rem; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- why */
.why { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; margin-top: 1.5rem; }
.why-item { border-left: 3px solid var(--ink); padding-left: 1.1rem; }
.why-item p { margin: 0; color: var(--ink-2); }
@media (max-width: 700px) { .why { grid-template-columns: 1fr; } }

/* ---------- chips */
.chips { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips a {
  display: inline-block; padding: .4rem .8rem; border: 1px solid var(--rule); border-radius: 3px;
  background: var(--sheet); color: var(--ink); text-decoration: none; font-size: .95rem;
}
.chips a:hover { border-color: var(--seal); color: var(--seal); }
.chips-strong a { border-color: var(--ink-2); font-weight: 600; }
.chips-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
.chips-cols a { display: block; }
.region-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 2.25rem 3rem; }
.region-group h2 { font-size: 1.3rem; margin-bottom: 0; }
.region-group h2 a { color: var(--ink); }
.region-group .chips { margin-top: .75rem; }

/* ---------- prose + side box */
.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.prose h2 { font-size: 1.45rem; margin-top: 1.75rem; }
.prose h2:first-child { margin-top: 0; }
.side-box { background: var(--sheet); border: 1px solid var(--rule); border-top: 4px solid var(--seal); padding: 1.5rem 1.5rem .75rem; }
.side-box h2 { font-size: 1.2rem; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { padding: .55rem 0 .55rem 1.6rem; border-top: 1px solid var(--rule); position: relative; }
.ticks li::before { content: ""; position: absolute; left: .1rem; top: 1.05em; width: .75rem; height: .42rem; border-left: 2px solid var(--seal); border-bottom: 2px solid var(--seal); transform: rotate(-45deg); }

/* ---------- FAQ */
.faqs { border-top: 1px solid var(--ink); max-width: 52rem; }
.faq { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
  font: 600 1.1rem/1.35 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after, .faq summary::before {
  content: ""; position: absolute; right: .5rem; top: 50%; width: 14px; height: 2px; background: var(--seal); transition: transform .2s;
}
.faq summary::before { transform: rotate(90deg); }
.faq[open] summary::before { transform: rotate(0deg); }
.faq p { color: var(--ink-2); padding-bottom: .5rem; }

/* ---------- quote band + form */
.band-quote { background: var(--ink); color: #e9edf3; }
.band-quote h2, .band-quote h3 { color: #fff; }
.band-quote a { color: #fff; }
.quote-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 900px) { .quote-grid { grid-template-columns: 1fr; } }
.quote-intro p { color: #cfd6e2; }
.direct { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.2); }
.direct h3 { font-size: 1.1rem; }
.direct p { margin: 0 0 .4rem; }
.big-link { font: 600 1.25rem/1.4 var(--serif); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.4); word-break: break-word; }
.big-link:hover { border-bottom-color: #fff; }

.quote-form { background: var(--sheet); color: var(--ink); padding: clamp(1.25rem, 3vw, 2rem); border-radius: 3px; border-top: 4px solid var(--seal); }
.quote-form a { color: var(--seal); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.field { margin-bottom: 1rem; }
.field.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; grid-column: 1 / -1; }
@media (max-width: 560px) { .field.pair { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; font: 1rem/1.4 var(--sans); color: var(--ink); background: #fff;
  border: 1.5px solid #b9c2bc; border-radius: 3px; padding: .65rem .75rem; min-height: 2.9rem;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: 3px solid rgba(184,134,43,.45); outline-offset: 0; }
.field input[type="file"] { font: .95rem var(--sans); max-width: 100%; }
.field [aria-invalid="true"] { border-color: var(--seal); background: #fff6f7; }
.field.check { display: flex; gap: .65rem; align-items: flex-start; }
.field.check input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; flex: none; accent-color: var(--seal); }
.field.check label { font-weight: 400; margin: 0; }
.hint { font-size: .86rem; color: var(--muted); margin: .35rem 0 0; }
.form-status { margin: 1rem 0 0; font-weight: 600; }
.form-status.ok { color: #1f6b43; }
.form-status.err { color: var(--seal); }

/* ---------- footer */
.site-foot { background: #121c30; color: #c3cbd8; padding: 3.5rem 0 2rem; font-size: .95rem; }
.site-foot a { color: #e6eaf1; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.site-foot h2 { font: 600 1rem var(--sans); color: #fff; margin-bottom: .8rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: .35rem; }
.brand-foot { display: flex; align-items: center; gap: .6rem; font: 600 1.2rem var(--serif); color: #fff; }
.brand-foot .logo-mark { color: #d9a3ad; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.14); font-size: .88rem; }
.foot-legal p { margin: 0; }
.foot-legal ul { display: flex; flex-wrap: wrap; gap: 1.25rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-head, .site-foot, .band-quote, .hero-art { display: none; }
}
.field.check [aria-invalid="true"] { outline: 2px solid var(--seal); outline-offset: 2px; }
.btn-small { white-space: nowrap; }
.two-col h2, .prose h2 { max-width: 40ch; }
