/* AP's Agency premium visual system. Content and behavior stay in the existing HTML/JS. */
:root {
  --premium-night: #061522;
  --premium-deep: #081c2d;
  --premium-petrol: #0d2738;
  --premium-panel: rgba(15, 42, 58, .72);
  --premium-gold: #c89b3c;
  --premium-gold-light: #e6c56d;
  --premium-paper: #f4f1ea;
  --premium-muted: #b7c4cc;
  --premium-line: rgba(183, 196, 204, .18);
  --premium-line-gold: rgba(200, 155, 60, .42);
  --premium-ease: cubic-bezier(.16, 1, .3, 1);
}

html { background: var(--premium-night); scroll-padding-top: 94px; }
body,
body.legal-page { color: var(--premium-paper); background: var(--premium-night); }
body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .16; background-image: linear-gradient(rgba(183,196,204,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(183,196,204,.08) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 70%); }
main { background: transparent; }
main > section { color: var(--premium-paper); }
h1, h2, h3, p, a, strong { text-wrap: balance; }
p, .service-lead, .service-content article p, .service-explainer p { color: var(--premium-muted); }
.eyebrow { color: var(--premium-gold-light); letter-spacing: .24em; }
.eyebrow::before { background: currentColor; }
.chapter { border-color: var(--premium-line); }
.chapter > span { color: var(--premium-muted); }

.header, .header.scrolled { height: 88px; background: rgba(6, 21, 34, .84); border-color: var(--premium-line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.header { justify-content: space-between; }
.header .brand { order: 1; margin-right: auto; }
.header .brand img, .header.scrolled .brand img { width: 132px; height: 62px; object-fit: contain; background: #fff; border-radius: 0; filter: none !important; }
.header .brand { gap: 12px; }
.header .brand span { display: inline; color: var(--premium-paper); font-size: .82rem; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.header nav { order: 2; }
.header .brand span, .header nav { color: var(--premium-paper); }
.header nav > a:not(.btn)::after { background: var(--premium-gold-light); }
.header .menu { border-color: var(--premium-line); }
.header .menu span { background: var(--premium-paper); }
.btn { color: var(--premium-paper); background: transparent; border-color: var(--premium-gold); }
.btn.gold { color: var(--premium-night); background: var(--premium-gold-light); border-color: var(--premium-gold-light); }
.btn:hover { background: var(--premium-gold); border-color: var(--premium-gold); color: var(--premium-night); transform: translateY(-3px); }
.btn.ghost:hover { color: var(--premium-paper); background: var(--premium-petrol); }
.text-link { color: var(--premium-paper); border-color: var(--premium-gold); }
.scroll-progress { background: var(--premium-gold-light); box-shadow: 0 0 14px rgba(200,155,60,.5); }

main > .hero { width: 100%; min-height: calc(100svh - 88px); padding: clamp(76px, 10vw, 148px) var(--ap-gutter) 42px !important; background: radial-gradient(circle at 78% 30%, rgba(200,155,60,.13), transparent 24%), linear-gradient(135deg, var(--premium-night), var(--premium-deep) 62%, #0b2638); }
.hero::before { content: ''; position: absolute; width: 54vw; height: 54vw; max-width: 800px; max-height: 800px; right: -22vw; top: -28vw; border: 1px solid var(--premium-line-gold); border-radius: 50%; opacity: .7; }
.hero::after { content: ''; position: absolute; inset: auto 0 0; height: 35%; background: linear-gradient(transparent, rgba(6,21,34,.7)); pointer-events: none; }
.hero h1 { color: var(--premium-paper); max-width: 900px; }
.hero h1 em { color: var(--premium-gold-light); }
.hero > .hero-copy > p { color: var(--premium-muted); }
.brand-plate { border-color: var(--premium-line-gold); }
.plate-index, .cover-index { color: var(--premium-gold-light); border-color: var(--premium-line-gold); }
.brand-plate figcaption { color: var(--premium-muted); }
.brand-plate figcaption strong { color: var(--premium-paper); }

.problem, #zonas, #servicios, #proceso, #portfolio, #faq { background: var(--premium-night); }
.problem-grid article, .services article, .steps article, .portfolio article { color: var(--premium-paper); border-color: var(--premium-line) !important; background: transparent !important; }
.problem-grid article:hover, .services article:hover, .steps article:hover, .portfolio article:hover, .faq details:hover, .faq details[open] { background: var(--premium-petrol) !important; }
.problem-grid p, .services article p, .steps article p, .portfolio small, .faq details p { color: var(--premium-muted); }
.problem blockquote { color: var(--premium-paper); border-color: var(--premium-gold); }
.services article i, .steps b, .portfolio article span { color: var(--premium-gold-light) !important; }
.service-heading-link::after { color: var(--premium-gold-light); }
.services article:hover, .steps article:hover, .portfolio article:hover { border-color: var(--premium-line-gold) !important; }
.process::before { background: var(--premium-line-gold); }
.approval { background: var(--premium-petrol) !important; border-color: var(--premium-line-gold) !important; }
.approval, .approval p, .approval strong { color: var(--premium-paper) !important; }

/* Text containers use one consistent, generous inset across the site. */
.problem-grid article,
.services article,
.steps article,
.portfolio article,
.stats > div,
.service-summary,
.service-feature-grid article,
.service-cta,
.approval,
.contact-links a,
.contact form,
.faq details { border-radius: 22px !important; }
.problem-grid article { padding: 24px 28px !important; }
.problem-grid article p { margin-top: 8px; }
.services { gap: 14px; border-top: 0; }
.services article { padding: 30px 34px !important; border: 1px solid var(--premium-line) !important; }
.services article h3 { margin-top: 0; }
.steps { gap: 14px; }
.steps article { padding: 28px !important; border: 1px solid var(--premium-line) !important; }
main > #portfolio { width: min(calc(100% - var(--ap-gutter) * 2), 1600px); margin-inline: auto; }
.portfolio { width: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.portfolio article { position: relative; min-height: 430px; display: grid; grid-template-rows: auto 1fr auto; gap: 16px; padding: 34px !important; border: 1px solid rgba(200,155,60,.16) !important; overflow: hidden; isolation: isolate; color: var(--premium-paper) !important; }
.portfolio article::before, .portfolio article::after { content: none !important; }
.portfolio-art { display: block; width: 100%; min-height: 230px; margin: 12px auto 0; background-repeat: no-repeat; background-position: center; background-size: min(82%, 340px) auto; }
.portfolio article:nth-child(1) { background: #173449 !important; }
.portfolio article:nth-child(2) { background: #e7e2d7 !important; color: #1b3035 !important; border-color: rgba(90,91,77,.18) !important; }
.portfolio article:nth-child(3) { background: #dce4df !important; color: #1b3035 !important; border-color: rgba(90,91,77,.18) !important; }
.portfolio article:nth-child(4) { background: #203c39 !important; }
.portfolio article:nth-child(1)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 180' fill='none' stroke='%23c89b3c' stroke-width='2'%3E%3Cpath d='M38 154V65l49-29 49 29v89M87 36v118M58 83h16m24 0h16M58 108h16m24 0h16M58 133h16m24 0h16M136 89l31-19v84M151 103h14m-14 24h14m-14 24h14M18 154h184'/%3E%3C/svg%3E"); }
.portfolio article:nth-child(2)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 180' fill='none' stroke='%238f825a' stroke-width='2'%3E%3Cpath d='M55 83h88v30c0 24-19 42-44 42s-44-18-44-42V83Zm88 8h17c14 0 25 11 25 25s-11 25-25 25h-17M43 159h110M77 53c-10-13 10-18 0-31m31 31c-10-13 10-18 0-31m31 31c-10-13 10-18 0-31'/%3E%3C/svg%3E"); }
.portfolio article:nth-child(3)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 180' fill='none' stroke='%23829486' stroke-width='2'%3E%3Crect x='48' y='61' width='124' height='86' rx='12'/%3E%3Cpath d='M76 61V43c0-8 6-14 14-14h40c8 0 14 6 14 14v18M48 91c27 21 97 21 124 0M99 93h22v19H99zM65 132h21m48 0h21'/%3E%3C/svg%3E"); }
.portfolio article:nth-child(4)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 180' fill='none' stroke='%23c89b3c' stroke-width='2'%3E%3Cpath d='M39 71h142l-12 36c-4 12-18 12-24 0-7 12-21 12-28 0-7 12-21 12-28 0-7 12-21 12-28 0-6 12-20 12-24 0L39 71Zm12 36v47h118v-47M84 154v-39h40v39M96 79v18m20-18v18'/%3E%3C/svg%3E"); }
.portfolio article > span, .portfolio article h3 { position: relative; z-index: 1; }
.portfolio article > span { position: absolute; top: 34px; left: 34px; }
.portfolio article h3 { margin: 0; max-width: 15ch; }
.portfolio article:nth-child(2) > span, .portfolio article:nth-child(2) h3, .portfolio article:nth-child(3) > span, .portfolio article:nth-child(3) h3 { color: #1b3035 !important; }
.portfolio article:nth-child(2) > span:first-child, .portfolio article:nth-child(2) h3, .portfolio article:nth-child(3) > span:first-child, .portfolio article:nth-child(3) h3 { color: #1b3035 !important; }
.portfolio article { min-height: 270px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; padding: 48px 30px !important; text-align: center; background: var(--premium-petrol) !important; color: var(--premium-paper) !important; }
.portfolio article:nth-child(2), .portfolio article:nth-child(3) { background: var(--premium-petrol) !important; color: var(--premium-paper) !important; border-color: var(--premium-line) !important; }
.portfolio article > span:first-child { top: 26px; left: 28px; color: var(--premium-gold-light) !important; }
.portfolio article h3 { max-width: none; margin: 0; }
.portfolio article p { max-width: 28ch; margin: 0; color: var(--premium-muted) !important; font-size: .92rem; line-height: 1.65; }
.portfolio-art { display: none; }
.portfolio article:nth-child(2) > span:first-child, .portfolio article:nth-child(2) h3, .portfolio article:nth-child(3) > span:first-child, .portfolio article:nth-child(3) h3 { color: var(--premium-paper) !important; }
.portfolio article > span:first-child { position: absolute; top: 34px; left: 34px; }
.portfolio article:nth-child(1) .portfolio-art { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 180' fill='none' stroke='%23c89b3c' stroke-width='2'%3E%3Cpath d='M38 154V65l49-29 49 29v89M87 36v118M58 83h16m24 0h16M58 108h16m24 0h16M58 133h16m24 0h16M136 89l31-19v84M151 103h14m-14 24h14m-14 24h14M18 154h184'/%3E%3C/svg%3E"); }
.portfolio article:nth-child(2) .portfolio-art { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 180' fill='none' stroke='%238f825a' stroke-width='2'%3E%3Cpath d='M55 83h88v30c0 24-19 42-44 42s-44-18-44-42V83Zm88 8h17c14 0 25 11 25 25s-11 25-25 25h-17M43 159h110M77 53c-10-13 10-18 0-31m31 31c-10-13 10-18 0-31m31 31c-10-13 10-18 0-31'/%3E%3C/svg%3E"); }
.portfolio article:nth-child(3) .portfolio-art { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 180' fill='none' stroke='%23829486' stroke-width='2'%3E%3Crect x='48' y='61' width='124' height='86' rx='12'/%3E%3Cpath d='M76 61V43c0-8 6-14 14-14h40c8 0 14 6 14 14v18M48 91c27 21 97 21 124 0M99 93h22v19H99zM65 132h21m48 0h21'/%3E%3C/svg%3E"); }
.portfolio article:nth-child(4) .portfolio-art { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 180' fill='none' stroke='%23c89b3c' stroke-width='2'%3E%3Cpath d='M39 71h142l-12 36c-4 12-18 12-24 0-7 12-21 12-28 0-7 12-21 12-28 0-7 12-21 12-28 0-6 12-20 12-24 0L39 71Zm12 36v47h118v-47M84 154v-39h40v39M96 79v18m20-18v18'/%3E%3C/svg%3E"); }
.stats > div { padding: 22px 26px; border: 1px solid var(--premium-line); }
.service-summary, .service-feature-grid article { padding: 34px !important; }
.service-feature-grid { gap: 18px; }
.service-feature-grid article { border: 1px solid var(--premium-line-gold); }
.service-feature-grid article h3 { margin-top: 24px; }
.service-page .service-hero > div > p,
.service-page .service-explainer p,
.service-page .service-summary p,
.service-page .service-feature-grid article p { color: var(--premium-muted) !important; }
.service-page .service-lead { color: var(--premium-paper) !important; }
.faq details { margin-bottom: 10px; border: 1px solid var(--premium-line); overflow: hidden; }
.faq summary { padding: 22px 60px 22px 24px; }
.faq details p { padding: 0 60px 24px 24px; }

main > .solutions { width: 100%; background: var(--premium-petrol); color: var(--premium-paper); }
.solutions .proposal-price, .proposal-notes li { border-color: var(--premium-line-gold); }
.solutions .proposal-price strong, .proposal-notes span { color: var(--premium-gold-light); }
.solutions p, .proposal-notes p { color: var(--premium-muted); }
main > .results { width: 100%; background: #0b2233; color: var(--premium-paper); }
.results > div > p, .results figcaption, .stats span, .note { color: var(--premium-muted); }
.stats > div { border-color: var(--premium-line); }
.stats strong { color: var(--premium-gold-light); }
.phone img { border: 1px solid var(--premium-line-gold); }

.faq { border-color: var(--premium-line); }
.faq details { border-color: var(--premium-line); }
.faq summary { color: var(--premium-paper); }
.faq summary::after { color: var(--premium-gold-light); border-color: var(--premium-line-gold); }
.faq details[open] summary::after { background: var(--premium-gold); color: var(--premium-night); }

main > .contact { width: 100%; background: var(--premium-deep) !important; color: var(--premium-paper); border-top: 1px solid var(--premium-line-gold); }
.contact h2 { color: var(--premium-paper); }
.contact-links a { border-color: var(--premium-line-gold) !important; color: var(--premium-paper) !important; }
.contact-links a { background: var(--premium-petrol) !important; padding: 24px 28px !important; min-height: 116px; }
.contact-links a:hover { background: var(--premium-petrol) !important; border-color: var(--premium-gold-light) !important; }
.contact-links small, .contact-links a > span { color: var(--premium-gold-light) !important; }
.contact form { background: #0d2738 !important; color: var(--premium-paper); border: 1px solid var(--premium-line-gold) !important; }
.contact form p, .contact label { color: var(--premium-muted); }
.contact input, .contact select, .contact textarea { color: var(--premium-paper); background: rgba(6,21,34,.72) !important; border-color: var(--premium-line) !important; }
.contact input::placeholder, .contact textarea::placeholder { color: #80919a; }
.contact input:focus, .contact select:focus, .contact textarea:focus { border-color: var(--premium-gold-light) !important; outline-color: var(--premium-gold-light); box-shadow: 0 0 0 3px rgba(200,155,60,.12) !important; }
.contact option { color: var(--premium-paper); background: var(--premium-deep); }
.form-head span { color: var(--premium-gold-light); }

footer { background: #040e17 !important; border-top: 1px solid var(--premium-line); color: var(--premium-paper); }
.footer-brand p, .footer-main small { color: var(--premium-gold-light) !important; }
.footer-main a, .footer-bottom { color: var(--premium-muted); }
.footer-main a:hover { color: var(--premium-gold-light) !important; }

/* Shared service-page art direction. */
.service-page main > section { background: var(--premium-night); }
.service-page .breadcrumbs { color: var(--premium-muted); }
.service-page .service-hero { background: radial-gradient(circle at 90% 20%, rgba(200,155,60,.12), transparent 30%), var(--premium-deep); }
.service-page .service-hero h1, .service-page .service-content h2, .service-page .service-explainer h2, .service-page .service-faq h2, .service-page .service-cta h2 { color: var(--premium-paper); }
.service-page .service-summary, .service-page .service-feature-grid article { background: var(--premium-petrol); border-color: var(--premium-line-gold); color: var(--premium-paper); }
.service-page .service-summary p, .service-page .service-feature-grid article p, .service-page .service-explainer p { color: var(--premium-muted); }
.service-page .service-price { color: var(--premium-gold-light); }
.service-page .service-summary li::marker { color: var(--premium-gold-light); }
.service-page .service-cta { background: var(--premium-petrol); border-color: var(--premium-line-gold); }
.service-page .service-hero { width: 100%; padding-inline: clamp(24px, 5vw, 88px) !important; gap: clamp(32px, 5vw, 88px); }
.service-page .service-hero h1 { font-size: clamp(3rem, 5vw, 6rem); }

.premium-ticker { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; min-height: 38px; display: flex; align-items: center; overflow: hidden; background: rgba(3, 12, 20, .96); border-top: 1px solid var(--premium-line-gold); color: var(--premium-muted); }
.premium-ticker__label { flex: 0 0 auto; padding: 0 18px; color: var(--premium-gold-light); font-size: .6rem; font-weight: 800; letter-spacing: .2em; }
.premium-ticker__viewport { min-width: 0; overflow: hidden; }
.premium-ticker__track { display: flex; width: max-content; animation: premiumTicker 42s linear infinite; }
.premium-ticker__group { display: flex; align-items: center; white-space: nowrap; }
.premium-ticker__group span { padding: 0 18px; font-size: .62rem; font-weight: 700; letter-spacing: .16em; }
.premium-ticker__group span:not(:first-child)::before { content: '◆'; margin-right: 36px; color: var(--premium-gold); font-size: .45rem; vertical-align: 2px; }
.premium-ticker:hover .premium-ticker__track { animation-play-state: paused; }
@keyframes premiumTicker { to { transform: translateX(-50%); } }
body { padding-bottom: 38px; }
html, body { max-width: 100%; overflow-x: hidden; }
body { overscroll-behavior-x: none; }

.premium-reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--premium-ease), transform .7s var(--premium-ease); }
.premium-reveal.is-visible { opacity: 1; transform: none; }
.premium-reveal.is-visible > * { animation: premiumChildIn .65s var(--premium-ease) both; }
.premium-reveal.is-visible > *:nth-child(2) { animation-delay: 70ms; }
.premium-reveal.is-visible > *:nth-child(3) { animation-delay: 140ms; }
@keyframes premiumChildIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 1000px) {
  .header, .header.scrolled { height: 76px; }
  .header .brand img, .header.scrolled .brand img { width: 116px; height: 56px; }
  .header .brand span { font-size: .72rem; letter-spacing: .05em; }
  main > .hero { min-height: auto; }
  .header nav { background: rgba(6,21,34,.98); border-color: var(--premium-line); }
  .header nav > a { color: var(--premium-paper); }
  .portfolio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { padding-bottom: 34px; }
  body::after { background-size: 46px 46px; }
  main > .hero { padding-top: 68px !important; }
  main, main > section, footer { max-width: 100%; overflow-x: hidden; }
  .hero::before { width: 90vw; height: 90vw; right: -50vw; top: -18vw; }
  .header { padding-inline: 18px; }
  .header nav { max-width: calc(100vw - 18px); }
  .services article, .steps article, .portfolio article, .problem-grid article, .service-summary, .service-feature-grid article { padding: 24px 22px !important; }
  .services article, #zonas .services article { display: grid !important; grid-template-columns: 42px minmax(0, 1fr) !important; grid-template-rows: auto auto !important; align-items: start !important; gap: 14px 12px !important; min-height: 0 !important; padding: 28px 22px !important; overflow: hidden !important; }
  .services article i { grid-column: 1 !important; grid-row: 1 !important; align-self: start !important; padding-top: .2em; }
  .services article h3 { grid-column: 2 !important; grid-row: 1 !important; min-width: 0; margin: 0 !important; font-size: clamp(1.35rem, 7vw, 2rem) !important; line-height: 1.16 !important; overflow-wrap: anywhere; }
  .services article p { grid-column: 2 !important; grid-row: 2 !important; min-width: 0; margin: 0 !important; line-height: 1.6 !important; overflow-wrap: anywhere; }
  .service-page .service-hero { padding-inline: 22px !important; }
  .service-page .service-hero h1 { font-size: clamp(2.7rem, 10vw, 4.4rem); }
  .contact-links a { padding: 22px !important; }
  .faq summary { padding-left: 20px; }
  .faq details p { padding-left: 20px; padding-right: 20px; }
  .premium-ticker { min-height: 34px; }
  .premium-ticker__label { display: none; }
  .premium-ticker__group span { padding-inline: 12px; font-size: .56rem; letter-spacing: .12em; }
  .premium-ticker__group span:not(:first-child)::before { margin-right: 22px; }
}
@media (max-width: 480px) {
  .portfolio { grid-template-columns: minmax(0, 1fr); }
  .portfolio article { min-height: 360px; }
  .portfolio article { min-height: 250px; padding: 44px 22px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .premium-ticker__track { animation: none; }
  .premium-reveal, .premium-reveal.is-visible { opacity: 1; transform: none; transition: none; }
  .premium-reveal.is-visible > * { animation: none; }
}
