/* ABC Translation Portugal
   Palette: official-document ink + azulejo cobalt + wax-seal red on cool paper. */
:root {
  --ink: #16233f;
  --ink-2: #33415c;
  --muted: #5a6478;
  --azul: #1f4e9c;
  --azul-deep: #173c7a;
  --azul-soft: #e9eff9;
  --paper: #ffffff;
  --paper-2: #f4f6fa;
  --line: #d6dde8;
  --seal: #a11d2b;
  --seal-deep: #82161f;
  --ok: #1d6b45;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "URW Palladio L", "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 72rem;
  --radius: 4px;
}

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

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -.005em; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: clamp(2.05rem, 4.2vw, 3.25rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; line-height: 1.55; color: var(--ink-2); max-width: 62ch; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 46rem; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* Top line + header */
.topline { background: var(--ink); color: #c9d2e3; font-size: .875rem; }
.topline-inner { display: flex; gap: 1.5rem; justify-content: flex-end; padding-top: .35rem; padding-bottom: .35rem; flex-wrap: wrap; }
.topline a { color: #fff; text-decoration: none; }
.topline a:hover { text-decoration: underline; }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.bar { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand .seal { width: 2.25rem; height: 2.25rem; flex: none; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; line-height: 1; display: flex; flex-direction: column; }
.brand-sub { font-family: var(--sans); font-weight: 500; font-size: .78rem; color: var(--muted); margin-top: .2rem; letter-spacing: .02em; }

.seal-ring { fill: var(--seal); }
.seal-core { fill: none; stroke: #fff; stroke-width: 1.4; }
.seal-tick { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.site-nav ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; }
.site-nav ul a:hover, .site-nav ul a[aria-current="page"] { color: var(--azul); box-shadow: inset 0 -2px 0 var(--azul); }
.lang-switch { font-size: .9rem !important; color: var(--muted) !important; border: 1px solid var(--line); padding: .25rem .6rem; border-radius: 999px; }
.lang-switch:hover { border-color: var(--azul); color: var(--azul) !important; }
.menu-toggle { display: none; }

/* Buttons */
.btn {
  display: inline-block; background: var(--seal); color: #fff !important; text-decoration: none; font-weight: 600;
  padding: .8rem 1.35rem; border-radius: var(--radius); border: 2px solid var(--seal); line-height: 1.2; cursor: pointer;
  font-size: 1rem; font-family: var(--sans);
}
.btn:hover { background: var(--seal-deep); border-color: var(--seal-deep); }
.btn-small { padding: .5rem .95rem; font-size: .93rem; }
.btn-ghost { background: transparent; color: var(--ink) !important; border-color: var(--line); }
.btn-ghost:hover { background: var(--paper-2); border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink) !important; border-color: #fff; }
.btn-light:hover { background: var(--azul-soft); border-color: var(--azul-soft); }

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { max-width: 20ch; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; }
.hero-art { position: relative; }
.azulejo { display: block; width: 100%; height: auto; }
.t-bg { fill: #f7f9fc; }
.t-grout { fill: none; stroke: #cfd8e8; stroke-width: 2; }
.t-line { fill: none; stroke: var(--azul); stroke-width: 3; }
.t-fill { fill: var(--azul); }
.t-bg-dot { fill: #f7f9fc; }
.doc-paper { fill: #fff; stroke: var(--ink); stroke-width: 1.5; filter: drop-shadow(0 18px 24px rgba(22, 35, 63, .22)); }
.doc-h { font-family: var(--serif); font-weight: 700; font-size: 22px; fill: var(--ink); }
.doc-line { fill: #dfe4ed; }
.doc-sign { fill: none; stroke: var(--azul-deep); stroke-width: 2.2; stroke-linecap: round; }
.ds-outer { fill: var(--seal); }
.ds-inner { fill: none; stroke: #fff; stroke-width: 2; stroke-dasharray: 3 3; }
.ds-tick { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: no-preference) {
  .doc-seal { animation: stamp .55s cubic-bezier(.2, .9, .3, 1.3) .5s both; transform-box: fill-box; transform-origin: center; }
  @keyframes stamp { from { opacity: 0; scale: 1.8; } to { opacity: 1; scale: 1; } }
}

/* Blocks */
.block { padding: clamp(2.5rem, 6vw, 4.25rem) 0; }
.block-flush { padding-top: 0; }
.block-tint { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.block-head { max-width: 44rem; margin-bottom: 1.75rem; }
.block-head p { color: var(--muted); }

.svc-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.svc-row { border-bottom: 1px solid var(--line); }
.svc-row a { display: grid; grid-template-columns: minmax(12rem, 20rem) 1fr; gap: .5rem 2rem; align-items: baseline; padding: 1.25rem .25rem; text-decoration: none; color: var(--ink); }
.svc-row h2, .svc-row h3 { margin: 0; font-size: 1.35rem; color: var(--azul); }
.svc-row p { margin: 0; color: var(--ink-2); max-width: 60ch; }
.svc-row a:hover { background: var(--azul-soft); }
.svc-row a:hover h2, .svc-row a:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 1rem; }
.steps li::before { content: counter(step); display: block; font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--seal); margin-bottom: .5rem; }
.steps h3 { margin-bottom: .35rem; }
.steps p { color: var(--ink-2); margin: 0; font-size: .98rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.two-col p { color: var(--ink-2); }

.chips { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.chips a { display: inline-block; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .94rem; background: #fff; }
.chips a:hover { border-color: var(--azul); color: var(--azul); background: var(--azul-soft); }

/* Page head + breadcrumbs */
.page-head { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.page-head h1 { max-width: 28ch; margin-bottom: .4em; }
.pair { font-size: 1.1rem; color: var(--muted); margin: 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: #a8b1c2; }
.crumbs a { color: var(--muted); }

/* Article + aside */
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: clamp(2rem, 5vw, 4rem); align-items: start; padding-bottom: 3.5rem; }
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2.2rem; }
.prose .lead { margin-bottom: 1.5rem; }
.quote-box { position: sticky; top: 6rem; background: var(--paper-2); border: 1px solid var(--line); border-top: 4px solid var(--seal); padding: 1.5rem; border-radius: var(--radius); }
.quote-box .seal { width: 2.5rem; height: 2.5rem; margin-bottom: .6rem; }
.quote-box h2 { font-size: 1.3rem; margin-bottom: .4rem; }
.quote-box p { color: var(--ink-2); font-size: .97rem; }
.quote-box .btn { width: 100%; text-align: center; margin: .25rem 0 1rem; }
.quote-alt { font-size: .92rem !important; margin: 0; }
.big-contact { font-size: 1.1rem !important; font-weight: 600; }

.ticks { list-style: none; padding: 0; margin: 0 0 1.5rem; columns: 2; column-gap: 2rem; }
.ticks li { padding-left: 1.6rem; position: relative; margin-bottom: .55rem; break-inside: avoid; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: .7rem; height: .4rem; border-left: 2px solid var(--seal); border-bottom: 2px solid var(--seal); transform: rotate(-45deg); }

.link-list { padding-left: 1.2rem; }
.link-list li { margin-bottom: .35rem; }

.svc-mini { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.svc-mini li { border-bottom: 1px solid var(--line); }
.svc-mini a { display: block; padding: .8rem 0; text-decoration: none; color: var(--ink-2); }
.svc-mini strong { color: var(--azul); font-weight: 600; margin-right: .35rem; }
.svc-mini a:hover strong { text-decoration: underline; }

.callout { border-left: 4px solid var(--azul); background: var(--azul-soft); padding: 1rem 1.2rem; border-radius: 0 var(--radius) var(--radius) 0; }
.note { color: var(--muted); margin-top: 1.5rem; }

.table-wrap { overflow-x: auto; margin-bottom: 1.5rem; }
.proc { width: 100%; border-collapse: collapse; font-size: .98rem; }
.proc th, .proc td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--line); }
.proc thead th { border-bottom: 2px solid var(--ink); font-size: .9rem; color: var(--muted); font-weight: 600; }
.proc tbody th { font-weight: 500; }
.tag { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .88rem; text-decoration: none; font-weight: 600; }
.tag-apostille { background: var(--azul-soft); color: var(--azul-deep); }
.tag-legalization { background: #f8e8ea; color: var(--seal-deep); }
.tag-check { background: #eef0f3; color: var(--ink-2); }

/* Languages grid */
.lang-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); border-top: 2px solid var(--ink); }
.lang-grid li { border-bottom: 1px solid var(--line); }
.lang-grid a { display: flex; flex-direction: column; padding: .9rem .5rem; text-decoration: none; }
.lang-grid a:hover { background: var(--azul-soft); }
.lg-name { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.lg-pair { font-size: .88rem; color: var(--muted); }

/* Locations */
.region { padding: 1.5rem 0 2rem; border-top: 2px solid var(--ink); }
.dist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1.25rem 2rem; }
.dist h3 { font-size: 1.12rem; margin-bottom: .35rem; }
.dist h3 a { text-decoration: none; }
.dist h3 a:hover { text-decoration: underline; }
.dist ul { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.dist li { margin-bottom: .2rem; }
.dist li a { color: var(--ink-2); }
.muni { list-style: none; margin: 0 0 1.5rem; padding: 0; columns: 3 11rem; column-gap: 1.5rem; font-size: .96rem; }
.muni li { margin-bottom: .3rem; break-inside: avoid; color: var(--ink-2); }
.muni li[aria-current] { font-weight: 700; color: var(--ink); }

/* FAQ */
.faq { margin: 2.25rem 0; max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .8rem; font-size: 1.4rem; color: var(--azul); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-2); padding-bottom: .5rem; max-width: 62ch; }

/* CTA band */
.cta-band { background: var(--azul); color: #fff; padding: clamp(2.25rem, 5vw, 3.25rem) 0; }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 2rem; align-items: center; }
.cta-band h2 { color: #fff; margin-bottom: .4rem; }
.cta-band p { color: #dfe7f5; margin: 0; max-width: 60ch; }
.cta-actions { display: flex; flex-direction: column; gap: .75rem; align-items: flex-start; }
.cta-mail { color: #fff; font-weight: 600; }
.cta-mail:hover { color: #fff; }

/* Contact form */
.quote-form { display: grid; gap: 1.1rem; max-width: 46rem; }
.quote-form label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .96rem; }
.req, .req-note span { color: var(--seal); }
.quote-form button[type=submit] { justify-self: start; min-width: 14rem; }
.quote-form input[type=text], .quote-form input[type=email], .quote-form input[type=tel], .quote-form select, .quote-form textarea {
  font: inherit; font-weight: 400; padding: .65rem .75rem; border: 1px solid #b8c2d3; border-radius: var(--radius); background: #fff; color: var(--ink); width: 100%;
}
.quote-form input:focus, .quote-form select:focus, .quote-form textarea:focus { outline: 2px solid var(--azul); outline-offset: 0; border-color: var(--azul); }
.quote-form input[type=file] { font: inherit; font-weight: 400; padding: .6rem; border: 1px dashed #9aa6bb; border-radius: var(--radius); background: var(--paper-2); }
.quote-form .help { font-weight: 400; font-size: .87rem; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.check { flex-direction: row !important; align-items: flex-start; gap: .6rem !important; font-weight: 400 !important; }
.check input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; flex: none; accent-color: var(--seal); }
.req-note { font-size: .9rem; color: var(--muted); margin: 0; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { background: #f8e8ea; border-left: 4px solid var(--seal); padding: .9rem 1rem; margin: 0; color: var(--seal-deep); font-weight: 500; }
.quote-form button[disabled] { opacity: .7; cursor: progress; }

.thanks { text-align: left; padding-top: 4rem; padding-bottom: 4rem; }
.thanks .seal { width: 4rem; height: 4rem; margin-bottom: 1rem; }

/* Footer */
.site-footer { background: var(--ink); color: #c9d2e3; font-size: .95rem; }
.tile-strip {
  height: 22px;
  background:
    radial-gradient(circle at 11px 11px, var(--azul) 0 4px, transparent 4.5px) 0 0 / 22px 22px,
    radial-gradient(circle at 0 0, transparent 7px, #fff 7.5px 9px, transparent 9.5px) 0 0 / 22px 22px,
    #f7f9fc;
  border-bottom: 1px solid #0e1830;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-top: 3rem; padding-bottom: 2rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.f-title { font-family: var(--serif); font-weight: 700; color: #fff; font-size: 1.1rem; margin-bottom: .75rem; }
.f-list { list-style: none; margin: 0 0 .6rem; padding: 0; }
.f-list li { margin-bottom: .35rem; }
.f-more { font-weight: 600; }
.footer-base { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid #2c3a58; padding-top: 1.25rem; padding-bottom: 1.5rem; font-size: .88rem; }
.footer-base p { margin: 0; }
.footer-base a + a { margin-left: 1.25rem; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 26rem; }
  .steps { grid-template-columns: 1fr 1fr; }
  .with-aside { grid-template-columns: 1fr; }
  .quote-box { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-inner { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .menu-toggle {
    display: inline-block; font: inherit; font-weight: 600; background: none; border: 1px solid var(--line);
    border-radius: var(--radius); padding: .45rem .85rem; color: var(--ink); cursor: pointer;
  }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 1rem 1.25rem 1.25rem; gap: .9rem; box-shadow: 0 12px 20px rgba(22, 35, 63, .08); }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: .6rem 0; border-bottom: 1px solid var(--paper-2); }
  .lang-switch { align-self: flex-start; }
  .no-js .site-nav { display: flex; position: static; box-shadow: none; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .topline-inner { justify-content: flex-start; gap: .25rem 1rem; }
  .topline-inner span { display: none; }
  .svc-row a { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .ticks { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media print {
  .topline, .site-header, .site-footer, .cta-band, .quote-box, .hero-art { display: none; }
}
