/* ==========================================================================
   CGS Desarrollos y Sistemas — SitioYa front-end theme
   Palette taken from the CGS monogram: navy seal, gold brackets, white type.
   ========================================================================== */

/* --- 1. Tokens ---------------------------------------------------------- */
:root {
  /* brand */
  --navy-900: #06152A;
  --navy-800: #0B2545;   /* logo seal */
  --navy-700: #13345F;
  --navy-600: #1B3A6B;
  --gold:      #C9A227;  /* logo brackets */
  --gold-light:#E2C35A;
  --gold-dark: #9E7C12;
  --gold-tint: #FBF5E3;

  /* neutrals */
  --ink:        #0B2545;
  --ink-soft:   #4A5B70;
  --ink-faint:  #7A889A;
  --ground:     #FFFFFF;
  --surface:    #F4F6FA;
  --line:       #E1E6EE;
  --on-dark:       #FFFFFF;
  --on-dark-soft:  #B7C3D6;
  --on-dark-line:  rgba(255,255,255,.12);

  --danger: #B4474B;

  /* type */
  --font-display: "Montserrat", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --step--1: .875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: clamp(1.3rem, 1.15rem + .6vw, 1.6rem);
  --step-3: clamp(1.7rem, 1.35rem + 1.5vw, 2.4rem);
  --step-4: clamp(2.2rem, 1.5rem + 3vw, 3.6rem);

  /* shape */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(11,37,69,.06), 0 4px 16px rgba(11,37,69,.06);
  --shadow-lift: 0 2px 4px rgba(11,37,69,.08), 0 18px 40px rgba(11,37,69,.14);

  --wrap: 1180px;
  --header-h: 76px;
}

/* --- 2. Base ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--navy-800); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- 3. Layout helpers -------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding-block: clamp(4rem, 3rem + 4vw, 6.5rem); }
.section--surface { background: var(--surface); }
.section--dark { background: var(--navy-800); color: var(--on-dark-soft); position: relative; overflow: hidden; }
.section--dark h2, .section--dark h3 { color: var(--on-dark); }

.section-head { max-width: 680px; margin-bottom: clamp(2.25rem, 1.5rem + 2vw, 3.5rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: var(--step-3); }
.section-head p { margin-top: 1rem; font-size: var(--step-1); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .8rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold-dark); margin-bottom: .9rem;
}
.eyebrow::before { content: "<"; color: var(--gold); }
.eyebrow::after { content: "/>"; color: var(--gold); }
.section--dark .eyebrow, .hero .eyebrow { color: var(--gold-light); }

/* grid-pattern background used on dark blocks */
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%);
}

/* --- 4. Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .75rem 1.4rem;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  border-radius: var(--radius-sm); border: 2px solid transparent;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn svg { flex: none; }
.btn--primary { background: var(--gold); color: var(--navy-900); }
.btn--primary:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(201,162,39,.3); }
.btn--navy { background: var(--navy-800); color: #fff; }
.btn--navy:hover { background: var(--navy-600); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn--ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* --- 5. Header ---------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--line); box-shadow: 0 6px 20px rgba(11,37,69,.06); }
.site-header__inner { height: var(--header-h); display: flex; align-items: center; gap: 2rem; }

.logo { display: inline-flex; align-items: center; gap: .75rem; flex: none; }
.logo__icon { width: 46px; height: auto; }
.logo__text { display: grid; line-height: 1.05; }
.logo__mark { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; color: var(--navy-800); letter-spacing: .02em; }
.logo__word { font-family: var(--font-display); font-weight: 500; font-size: .78rem; color: var(--ink-soft); letter-spacing: .04em; }
.logo img { height: 46px; width: auto; }

.nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.nav a {
  position: relative; padding: .55rem .85rem;
  font-family: var(--font-display); font-weight: 600; font-size: .92rem; color: var(--ink-soft);
  border-radius: var(--radius-sm); transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .25rem; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: .5rem; }
.header-cta { display: inline-flex; }
.icon-btn {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink); cursor: pointer; transition: border-color .2s, background .2s;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn[data-logged-in="true"] { color: var(--gold-dark); border-color: var(--gold); }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: grid; }
  .header-cta { display: none; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .75rem 1.25rem 1.5rem; margin: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lift);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .2s, opacity .2s, visibility .2s;
  }
  .nav[data-open="true"] { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: .95rem .25rem; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1rem; }
  .nav a::after { display: none; }
  .nav a[aria-current="page"] { color: var(--gold-dark); }
  .nav .nav__cta { display: flex; margin-top: 1rem; border: 0; padding: .75rem 1.4rem; color: var(--navy-900); justify-content: center; border-radius: var(--radius-sm); }
  .header-actions { margin-left: auto; }
}
@media (min-width: 901px) { .nav .nav__cta { display: none; } }
.nav a { white-space: nowrap; }
@media (min-width: 901px) and (max-width: 1199px) {
  .header-cta { display: none; }              /* keeps the 6-item menu on one line */
  .site-header__inner { gap: 1.25rem; }
  .nav a { padding-inline: .6rem; }
  .nav a::after { left: .6rem; right: .6rem; }
}
@media (max-width: 420px) { .logo__word { display: none; } }

/* --- 6. Hero ------------------------------------------------------------ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(201,162,39,.20), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(27,58,107,.9), transparent 60%),
    var(--navy-800);
  color: var(--on-dark-soft);
  padding-block: clamp(4rem, 3rem + 5vw, 7.5rem) clamp(4.5rem, 3rem + 5vw, 7rem);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2.5rem, 1rem + 4vw, 4.5rem); align-items: center; }
.hero__inner > * { min-width: 0; }
.hero__title { font-size: var(--step-4); font-weight: 800; color: #fff; letter-spacing: -.02em; }
.hero__title em { font-style: normal; color: var(--gold-light); }
.hero__lead { margin-top: 1.4rem; font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); max-width: 54ch; }
.hero__actions { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: .8rem; }
.hero__trust { margin-top: 2.6rem; display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; font-size: .92rem; color: var(--on-dark-soft); }
.hero__trust li { display: inline-flex; align-items: center; gap: .5rem; }
.hero__trust svg { color: var(--gold); }

/* code window */
.codecard {
  position: relative;
  background: linear-gradient(180deg, #0F2B50, #0A2140);
  border: 1px solid var(--on-dark-line);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06);
  overflow: hidden;
}
.codecard__bar { display: flex; align-items: center; gap: .45rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--on-dark-line); }
.codecard__bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.18); }
.codecard__bar i:first-child { background: var(--gold); }
.codecard__bar span { margin-left: auto; font-family: var(--font-mono); font-size: .75rem; color: var(--on-dark-soft); opacity: .8; }
.codecard pre {
  margin: 0; padding: 1.4rem 1.4rem 1.6rem;
  font-family: var(--font-mono); font-size: clamp(.78rem, .72rem + .25vw, .9rem); line-height: 1.85;
  color: #D6DEEA; white-space: pre; overflow-x: auto;
}
.codecard .k { color: var(--gold-light); }
.codecard .s { color: #9FD8C6; }
.codecard .c { color: #6F83A1; font-style: italic; }
.codecard .f { color: #8FB8F2; }
.codecard .cursor { display: inline-block; width: .55em; height: 1.1em; vertical-align: -.2em; background: var(--gold); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .codecard .cursor { animation: none; } }

.hero__visual { position: relative; }
.hero__badge {
  position: absolute; left: -1.5rem; bottom: -1.5rem;
  display: flex; align-items: center; gap: .8rem;
  padding: .9rem 1.1rem; background: #fff; color: var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow-lift);
}
.hero__badge-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--gold-tint); color: var(--gold-dark); }
.hero__badge strong { display: block; font-family: var(--font-display); font-size: .95rem; }
.hero__badge small { font-size: .8rem; color: var(--ink-soft); }

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__title br { display: none; }
  .hero__badge { left: 1rem; bottom: -1.25rem; }
}

/* --- 7. Business lines (two big cards) ---------------------------------- */
.lines { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.line-card {
  position: relative; overflow: hidden;
  padding: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  border-radius: var(--radius-lg); border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.line-card--dark { background: var(--navy-800); border-color: var(--navy-800); color: var(--on-dark-soft); }
.line-card--dark h3 { color: #fff; }
.line-card__icon {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  background: var(--navy-800); color: var(--gold); margin-bottom: 1.4rem;
}
.line-card--dark .line-card__icon { background: rgba(255,255,255,.08); }
.line-card h3 { font-size: var(--step-2); }
.line-card > p { margin-top: .8rem; }
.checks { margin-top: 1.4rem; display: grid; gap: .6rem; }
.checks li { display: flex; gap: .65rem; align-items: flex-start; }
.checks li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: .15rem; border-radius: 50%;
  background: var(--gold-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239E7C12' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.line-card--dark .checks li::before { background-color: rgba(201,162,39,.16); }
.line-card .btn { margin-top: auto; align-self: flex-start; }
.line-card .checks { margin-bottom: 2rem; }
@media (max-width: 820px) { .lines { grid-template-columns: 1fr; } }

/* --- 8. Services grid --------------------------------------------------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.service {
  position: relative; padding: 1.75rem; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.service::before {
  content: ""; position: absolute; left: 1.75rem; right: 1.75rem; top: -1px; height: 3px;
  background: var(--gold); border-radius: 0 0 3px 3px; transform: scaleX(0); transition: transform .3s;
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: transparent; }
.service:hover::before { transform: scaleX(1); }
.service__icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); color: var(--navy-700); margin-bottom: 1.2rem;
  transition: background .25s, color .25s;
}
.service:hover .service__icon { background: var(--navy-800); color: var(--gold); }
.service h3 { font-size: 1.12rem; }
.service p { margin-top: .6rem; font-size: .95rem; }
.service__tag { display: inline-block; margin-top: 1rem; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-faint); }
@media (max-width: 960px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services { grid-template-columns: 1fr; } }

/* --- 9. Values (dark) --------------------------------------------------- */
.values { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--on-dark-line); border: 1px solid var(--on-dark-line); border-radius: var(--radius-lg); overflow: hidden; }
.value { padding: 2rem 1.6rem; background: var(--navy-800); transition: background .25s; }
.value:hover { background: #0E2C52; }
.value__num { font-family: var(--font-mono); font-size: .8rem; color: var(--gold); }
.value h3 { margin-top: 1.1rem; font-size: 1.2rem; }
.value p { margin-top: .6rem; font-size: .95rem; }
@media (max-width: 960px) { .values { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .values { grid-template-columns: 1fr; } }

/* --- 10. Process -------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: step; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 27px; left: 12%; right: 12%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 8px, transparent 8px 16px); opacity: .6;
}
.step { position: relative; text-align: center; padding-inline: .5rem; }
.step__num {
  position: relative; width: 56px; height: 56px; margin: 0 auto 1.2rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy-800); color: var(--gold);
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  box-shadow: 0 0 0 8px var(--ground);
}
.section--surface .step__num { box-shadow: 0 0 0 8px var(--surface); }
.step h3 { font-size: 1.1rem; }
.step p { margin-top: .5rem; font-size: .95rem; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
  .steps::before { display: none; }
}
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* --- 10b. Hosting plans and domain band --------------------------------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: stretch; }
.plan {
  display: flex; flex-direction: column; padding: 2rem 1.75rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.plan__icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--surface); color: var(--navy-700); margin-bottom: 1.3rem; }
.plan__name { font-size: var(--step-2); }
.plan__price { margin-top: .4rem; font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--ink); }
.plan__features { margin: 1.4rem 0 2rem; }
.plan .btn { margin-top: auto; }
.plan--featured { background: var(--navy-800); border-color: var(--navy-800); color: var(--on-dark-soft); }
.plan--featured .plan__name, .plan--featured .plan__price { color: #fff; }
.plan--featured .plan__icon { background: rgba(255,255,255,.08); color: var(--gold); }
.plan--featured .checks li::before { background-color: rgba(201,162,39,.16); }
.plan--custom { background: var(--surface); border-style: dashed; box-shadow: none; }
.plan--custom .plan__icon { background: #fff; color: var(--gold-dark); }

.domain-band {
  margin-top: 1.5rem; display: flex; align-items: center; gap: 1.5rem;
  padding: 1.6rem 1.8rem; border-radius: var(--radius-lg);
  background: linear-gradient(100deg, var(--gold-tint), #fff 70%);
  border: 1px solid rgba(201,162,39,.35);
}
.domain-band__icon { width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--navy-800); color: var(--gold); }
.domain-band__text { flex: 1; }
.domain-band__text h3 { font-size: 1.2rem; }
.domain-band__text p { margin-top: .35rem; }
@media (max-width: 960px) { .plans { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }
@media (max-width: 720px) { .domain-band { flex-direction: column; align-items: flex-start; } .domain-band .btn { width: 100%; } }

/* --- 11. Contact -------------------------------------------------------- */
.contact > * { min-width: 0; }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: start; position: relative; }
.contact__title { font-size: var(--step-3); }
.contact__lead { margin-top: 1rem; font-size: var(--step-1); max-width: 46ch; }
.contact__meta { margin-top: 2rem; display: grid; gap: 1rem; }
.contact__meta li { display: flex; gap: .8rem; align-items: flex-start; }
.contact__meta svg { flex: none; margin-top: .2rem; color: var(--gold); }
.contact__meta strong { display: block; color: #fff; font-family: var(--font-display); font-weight: 600; font-size: .95rem; }
.channels { display: grid; gap: 1rem; }
.channel {
  display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.3rem;
  background: rgba(255,255,255,.05); border: 1px solid var(--on-dark-line); border-radius: var(--radius);
  color: var(--on-dark-soft); transition: background .2s, border-color .2s, transform .2s;
}
.channel:hover { background: rgba(255,255,255,.09); border-color: rgba(201,162,39,.6); transform: translateX(4px); }
.channel__icon { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--gold); color: var(--navy-900); }
.channel strong { display: block; color: #fff; font-family: var(--font-display); font-size: 1.02rem; }
.channel small { font-size: .88rem; }
.channel__arrow { margin-left: auto; color: var(--gold); }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* --- 12. Page header (inner pages) -------------------------------------- */
.page-head { background: var(--navy-800); color: var(--on-dark-soft); padding-block: 3.5rem 3rem; position: relative; overflow: hidden; }
.page-head h1 { color: #fff; font-size: var(--step-3); margin-top: .4rem; position: relative; }
.crumbs { font-size: var(--step--1); position: relative; }
.crumbs a { color: var(--gold-light); }

/* --- 13. Forms ---------------------------------------------------------- */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.field label { font-family: var(--font-display); font-size: .85rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: .65rem .85rem;
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(27,58,107,.15); }
.form-note { font-size: var(--step--1); color: var(--ink-soft); }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

/* --- 14. Footer --------------------------------------------------------- */
.site-footer { background: var(--navy-900); color: var(--on-dark-soft); padding-top: 4rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer-brand .logo__mark { color: #fff; }
.footer-brand .logo__word { color: var(--on-dark-soft); }
.footer-brand p { margin-top: 1.2rem; max-width: 34ch; }
.footer-col h3 { font-size: .8rem; font-family: var(--font-mono); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.1rem; }
.footer-col ul { display: grid; gap: .55rem; }
.footer-col a:hover { color: #fff; }
.social { display: flex; gap: .5rem; margin-top: 1.4rem; }
.social a { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--on-dark-line); border-radius: var(--radius-sm); transition: border-color .2s, color .2s, background .2s; }
.social a:hover { border-color: var(--gold); color: var(--gold); background: rgba(201,162,39,.08); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.4rem; border-top: 1px solid var(--on-dark-line); font-size: .85rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* --- 15. Floating WhatsApp ---------------------------------------------- */
.floats { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 90; display: grid; gap: .6rem; }
.float { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; box-shadow: var(--shadow-lift); transition: transform .2s; }
.float:hover { transform: scale(1.07); }
.float--wa { background: #25D366; color: #fff; }
.float--mail { background: var(--navy-800); color: var(--gold); }

/* --- 16. Reveal on scroll ----------------------------------------------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ==========================================================================
   SitioYa integration: account menu, Bootstrap-3 modals (JS only),
   validate.js states, alerts, toastr and error pages.
   ========================================================================== */

/* --- 17. Links inside running copy ------------------------------------- */
.prose a, .link { color: var(--navy-600); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.prose a:hover, .link:hover { color: var(--gold-dark); }

/* --- 18. Account menu -------------------------------------------------- */
.account { position: relative; }
.account > summary { list-style: none; }
.account > summary::-webkit-details-marker { display: none; }
.account__panel {
  position: absolute; right: 0; top: calc(100% + .5rem); min-width: 230px; padding: 1rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lift); display: grid; gap: .7rem; z-index: 110;
}
.account__hello { font-size: var(--step--1); color: var(--ink-faint); }
.account__name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--ink); }

/* --- 19. Modals -------------------------------------------------------- */
.modal-open { overflow: hidden; }
.modal { display: none; position: fixed; inset: 0; z-index: 1050; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; outline: 0; }
.modal-dialog { position: relative; width: auto; max-width: 450px; margin: clamp(1rem, 8vh, 5rem) auto; padding-inline: 1rem; }
.modal.fade .modal-dialog { transform: translateY(-16px); opacity: 0; transition: transform .25s ease, opacity .25s ease; }
.modal.in .modal-dialog { transform: none; opacity: 1; }
.modal-content { position: relative; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); outline: 0; overflow: hidden; }
.modal-content::before { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--navy-800), var(--gold)); }
.modal-backdrop { position: fixed; inset: 0; z-index: 1040; background: var(--navy-900); }
.modal-backdrop.fade { opacity: 0; transition: opacity .2s ease; }
.modal-backdrop.in { opacity: .6; }
.modal-header { padding: 1.6rem 1.6rem 0; position: relative; }
.modal-title { font-size: var(--step-2); padding-right: 2rem; }
.modal-header .close {
  position: absolute; top: 1.1rem; right: 1.1rem; width: 36px; height: 36px; display: grid; place-items: center;
  background: none; border: 0; border-radius: 50%; font-size: 1.5rem; line-height: 1; color: var(--ink-soft); cursor: pointer;
}
.modal-header .close:hover { background: var(--surface); color: var(--ink); }
.modal-body { padding: 1.25rem 1.6rem 1.6rem; }
.modal-body .btn--block { margin-top: .35rem; }
.modal-footer { padding: 1rem 1.6rem 1.4rem; border-top: 1px solid var(--line); background: var(--surface); font-size: var(--step--1); display: grid; gap: .25rem; }
.modal-footer a { color: var(--navy-600); font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 2px; }

/* --- 20. validate.js states -------------------------------------------- */
.field input.error, .field select.error, .field textarea.error { border-color: var(--danger); }
.field span.error { font-size: var(--step--1); color: var(--danger); }

/* --- 21. Alerts --------------------------------------------------------- */
.alert { padding: .9rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.alert-danger { border-color: rgba(180,71,75,.4); background: #FBEFEF; }

/* --- 22. Narrow page body ---------------------------------------------- */
.narrow { max-width: 450px; margin-inline: auto; }

/* --- 23. Toastr -------------------------------------------------------- */
#toast-container > div { font-family: var(--font-body); border-radius: var(--radius-sm); box-shadow: var(--shadow-lift); opacity: 1; }
#toast-container > .toast-success { background-color: var(--navy-700); }

/* --- 24. Error pages --------------------------------------------------- */
.error-page { text-align: center; }
.error-page__code { font-family: var(--font-mono); font-size: clamp(4rem, 3rem + 7vw, 7.5rem); font-weight: 700; line-height: 1; color: var(--navy-800); }
.error-page__code::before { content: "<"; color: var(--gold); }
.error-page__code::after { content: "/>"; color: var(--gold); }
.error-page h1 { font-size: var(--step-3); margin-top: 1rem; }
.error-page p { margin: .9rem auto 0; max-width: 52ch; }
.error-page__actions { margin-top: 1.75rem; display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.error-debug { margin-top: 2rem; text-align: left; font-size: var(--step--1); background: var(--surface); border-radius: var(--radius-sm); padding: 1rem; overflow-x: auto; white-space: pre-wrap; }

/* ==========================================================================
   25. Documentation (/docs — DocsController)
   ========================================================================== */
.docs-head { position: relative; overflow: hidden; background: var(--navy-800); color: var(--on-dark-soft); padding-block: 2.2rem 2rem; }
.docs-head__inner { position: relative; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: flex-end; justify-content: space-between; }
.docs-head .eyebrow { margin-bottom: .4rem; }
.docs-head__title { font-family: var(--font-display); font-weight: 800; font-size: var(--step-3); color: #fff; line-height: 1.1; }
.docs-lang { display: inline-flex; padding: 4px; gap: 2px; background: rgba(255,255,255,.06); border: 1px solid var(--on-dark-line); border-radius: var(--radius-sm); }
.docs-lang a { padding: .45rem .8rem; border-radius: 6px; font-family: var(--font-display); font-weight: 600; font-size: .85rem; color: var(--on-dark-soft); }
.docs-lang a:hover { color: #fff; }
.docs-lang a[aria-current="true"] { background: var(--gold); color: var(--navy-900); }

.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr) 210px; gap: 2.5rem; align-items: start; padding-block: 2.5rem 5rem; }
.docs-nav, .docs-toc { position: sticky; top: calc(var(--header-h) + 1.5rem); max-height: calc(100vh - var(--header-h) - 3rem); overflow-y: auto; }
.docs-nav__box > summary { display: none; }
.docs-nav__group { margin: 1.4rem 0 .5rem; font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dark); }
.docs-nav__group:first-of-type { margin-top: 0; }
.docs-nav ul { display: grid; gap: 1px; border-left: 1px solid var(--line); }
.docs-nav a { display: block; margin-left: -1px; padding: .38rem .9rem; border-left: 2px solid transparent; font-size: .92rem; color: var(--ink-soft); }
.docs-nav a:hover { color: var(--ink); border-left-color: var(--line); }
.docs-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-left-color: var(--gold); background: linear-gradient(90deg, var(--gold-tint), transparent); }

.docs-toc__title { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .7rem; }
.docs-toc ul { display: grid; gap: .1rem; }
.docs-toc a { display: block; padding: .28rem 0 .28rem .8rem; border-left: 2px solid var(--line); font-size: .85rem; color: var(--ink-soft); line-height: 1.35; }
.docs-toc a:hover { color: var(--ink); }
.docs-toc a[aria-current] { color: var(--ink); border-left-color: var(--gold); }

.docs-body { min-width: 0; }
.docs-body__group { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-dark); }
.docs-body > h1 { font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.7rem); font-weight: 800; margin-top: .4rem; letter-spacing: -.02em; }

/* running copy */
.prose { margin-top: 1.6rem; color: #33445A; font-size: 1.02rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line); font-size: var(--step-2); }
.prose h3 { margin-top: 2.2rem; font-size: 1.15rem; }
.prose h4 { margin-top: 1.6rem; font-size: 1rem; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .8rem; }
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose > p:first-child { font-size: 1.1rem; color: var(--ink-soft); }
.prose .heading-anchor { margin-left: .45rem; color: var(--gold); opacity: 0; text-decoration: none; transition: opacity .15s; }
.prose h2:hover .heading-anchor, .prose h3:hover .heading-anchor, .heading-anchor:focus { opacity: 1; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .35rem; }
.prose li::marker { color: var(--gold-dark); }
.prose strong { color: var(--ink); }
.prose a { color: var(--navy-600); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.prose a:hover { color: var(--gold-dark); }
.prose :not(pre) > code {
  font-family: var(--font-mono); font-size: .86em; padding: .12em .38em;
  background: var(--surface); border: 1px solid var(--line); border-radius: 5px; color: var(--navy-700);
  overflow-wrap: anywhere;
}
.prose .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.prose tr:last-child td { border-bottom: 0; }
.prose th, .prose td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { font-family: var(--font-display); font-size: .8rem; font-weight: 700; color: var(--ink); background: var(--surface); white-space: nowrap; }
.prose td { min-width: 9rem; }
.prose td:first-child { min-width: 11rem; }

/* callouts: !!! note / tip / warning (Markdown admonitions) */
.prose .admonition { padding: 1rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid var(--line); border-left: 4px solid var(--navy-600); background: var(--surface); }
.prose .admonition > * + * { margin-top: .5rem; }
.prose .admonition-title { font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--ink); }
.prose .admonition.tip { border-left-color: #2E9E7A; background: #F1FAF6; }
.prose .admonition.warning { border-left-color: var(--gold); background: var(--gold-tint); }
.prose .admonition.danger { border-left-color: var(--danger); background: #FBEFEF; }

/* code blocks (Pygments, pre-rendered) */
.prose .hl { position: relative; margin-top: 1.1rem; background: #0A1F3A; border: 1px solid #13345F; border-radius: var(--radius); }
.prose .hl pre { margin: 0; padding: 1.1rem 1.25rem; overflow-x: auto; font-family: var(--font-mono); font-size: .84rem; line-height: 1.7; color: #D6DEEA; tab-size: 4; }
.copy-btn {
  position: absolute; top: .55rem; right: .55rem; padding: .25rem .6rem;
  font-family: var(--font-mono); font-size: .7rem; color: var(--on-dark-soft);
  background: rgba(255,255,255,.06); border: 1px solid var(--on-dark-line); border-radius: 6px; cursor: pointer;
  opacity: 0; transition: opacity .15s;
}
.hl:hover .copy-btn, .copy-btn:focus { opacity: 1; }
.copy-btn:hover { color: #fff; border-color: var(--gold); }

/* diagram: request lifecycle */
.prose .flow { display: grid; gap: .5rem; counter-reset: flow; padding: 0; list-style: none; }
.prose .flow li { counter-increment: flow; position: relative; margin: 0; padding: .75rem 1rem .75rem 3.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose .flow li::before { content: counter(flow); position: absolute; left: .9rem; top: .75rem; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--navy-800); color: var(--gold); font-family: var(--font-display); font-weight: 800; font-size: .8rem; }
.prose .flow li + li::after { content: ""; position: absolute; left: 1.7rem; top: -.55rem; height: .55rem; border-left: 2px dashed var(--gold); }

.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.docs-pager__link { display: grid; gap: .2rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
.docs-pager__link:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.docs-pager__link small { font-family: var(--font-mono); font-size: .75rem; color: var(--ink-faint); }
.docs-pager__link span { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.docs-pager__link--next { text-align: right; grid-column: 2; }

@media (max-width: 1180px) { .docs { grid-template-columns: 230px minmax(0, 1fr); } .docs-toc { display: none; } }
@media (max-width: 960px) {
  .docs { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.5rem; }
  .docs-nav { position: static; max-height: none; overflow: visible; }
  .docs-nav__box { border: 1px solid var(--line); border-radius: var(--radius); padding: .2rem 1rem; }
  .docs-nav__box[open] { padding-bottom: 1rem; }
  .docs-nav__box > summary { display: flex; align-items: center; justify-content: space-between; padding: .8rem 0; font-family: var(--font-display); font-weight: 700; color: var(--ink); cursor: pointer; list-style: none; }
  .docs-nav__box > summary::-webkit-details-marker { display: none; }
  .docs-nav__box > summary::after { content: "+"; color: var(--gold-dark); font-size: 1.3rem; }
  .docs-nav__box[open] > summary::after { content: "−"; }
}
@media (max-width: 560px) { .docs-pager { grid-template-columns: 1fr; } .docs-pager__link--next { grid-column: auto; } }

/* docs: "questions and downloads" */
.docs-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.docs-head__contact { min-height: 42px; padding: .55rem 1rem; font-size: .88rem; }
.docs-contact {
  position: relative; overflow: hidden; margin-top: 3.5rem;
  display: flex; gap: 1.4rem; align-items: flex-start;
  padding: 1.8rem; border-radius: var(--radius-lg);
  background: radial-gradient(500px 240px at 100% 0%, rgba(201,162,39,.22), transparent 60%), var(--navy-800);
  color: var(--on-dark-soft); scroll-margin-top: calc(var(--header-h) + 20px);
}
.docs-contact__icon { width: 54px; height: 54px; flex: none; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.08); color: var(--gold); }
.docs-contact h2 { color: #fff; font-size: 1.35rem; }
.docs-contact p { margin-top: .5rem; max-width: 52ch; }
.docs-contact__actions { margin-top: 1.3rem; display: flex; flex-wrap: wrap; gap: .7rem; }
.docs-contact + .docs-pager { margin-top: 2rem; }
@media (max-width: 560px) {
  .docs-contact { flex-direction: column; padding: 1.4rem; }
  .docs-contact__actions .btn { width: 100%; }
  .docs-head__actions { width: 100%; }
}

/* Pygments token colours (style: github-dark) */
.hl .c { color: #8B949E; font-style: italic } /* Comment */
.hl .err { color: #F85149 } /* Error */
.hl .esc { color: #E6EDF3 } /* Escape */
.hl .g { color: #E6EDF3 } /* Generic */
.hl .k { color: #FF7B72 } /* Keyword */
.hl .l { color: #A5D6FF } /* Literal */
.hl .n { color: #E6EDF3 } /* Name */
.hl .o { color: #FF7B72; font-weight: bold } /* Operator */
.hl .x { color: #E6EDF3 } /* Other */
.hl .p { color: #E6EDF3 } /* Punctuation */
.hl .ch { color: #8B949E; font-style: italic } /* Comment.Hashbang */
.hl .cm { color: #8B949E; font-style: italic } /* Comment.Multiline */
.hl .cp { color: #8B949E; font-weight: bold; font-style: italic } /* Comment.Preproc */
.hl .cpf { color: #8B949E; font-style: italic } /* Comment.PreprocFile */
.hl .c1 { color: #8B949E; font-style: italic } /* Comment.Single */
.hl .cs { color: #8B949E; font-weight: bold; font-style: italic } /* Comment.Special */
.hl .gd { color: #FFA198; background-color: #490202 } /* Generic.Deleted */
.hl .ge { color: #E6EDF3; font-style: italic } /* Generic.Emph */
.hl .ges { color: #E6EDF3; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.hl .gr { color: #FFA198 } /* Generic.Error */
.hl .gh { color: #79C0FF; font-weight: bold } /* Generic.Heading */
.hl .gi { color: #56D364; background-color: #0F5323 } /* Generic.Inserted */
.hl .go { color: #8B949E } /* Generic.Output */
.hl .gp { color: #8B949E } /* Generic.Prompt */
.hl .gs { color: #E6EDF3; font-weight: bold } /* Generic.Strong */
.hl .gu { color: #79C0FF } /* Generic.Subheading */
.hl .gt { color: #FF7B72 } /* Generic.Traceback */
.hl .g-Underline { color: #E6EDF3; text-decoration: underline } /* Generic.Underline */
.hl .kc { color: #79C0FF } /* Keyword.Constant */
.hl .kd { color: #FF7B72 } /* Keyword.Declaration */
.hl .kn { color: #FF7B72 } /* Keyword.Namespace */
.hl .kp { color: #79C0FF } /* Keyword.Pseudo */
.hl .kr { color: #FF7B72 } /* Keyword.Reserved */
.hl .kt { color: #FF7B72 } /* Keyword.Type */
.hl .ld { color: #79C0FF } /* Literal.Date */
.hl .m { color: #A5D6FF } /* Literal.Number */
.hl .s { color: #A5D6FF } /* Literal.String */
.hl .na { color: #E6EDF3 } /* Name.Attribute */
.hl .nb { color: #E6EDF3 } /* Name.Builtin */
.hl .nc { color: #F0883E; font-weight: bold } /* Name.Class */
.hl .no { color: #79C0FF; font-weight: bold } /* Name.Constant */
.hl .nd { color: #D2A8FF; font-weight: bold } /* Name.Decorator */
.hl .ni { color: #FFA657 } /* Name.Entity */
.hl .ne { color: #F0883E; font-weight: bold } /* Name.Exception */
.hl .nf { color: #D2A8FF; font-weight: bold } /* Name.Function */
.hl .nl { color: #79C0FF; font-weight: bold } /* Name.Label */
.hl .nn { color: #FF7B72 } /* Name.Namespace */
.hl .nx { color: #E6EDF3 } /* Name.Other */
.hl .py { color: #79C0FF } /* Name.Property */
.hl .nt { color: #7EE787 } /* Name.Tag */
.hl .nv { color: #79C0FF } /* Name.Variable */
.hl .ow { color: #FF7B72; font-weight: bold } /* Operator.Word */
.hl .pm { color: #E6EDF3 } /* Punctuation.Marker */
.hl .w { color: #6E7681 } /* Text.Whitespace */
.hl .mb { color: #A5D6FF } /* Literal.Number.Bin */
.hl .mf { color: #A5D6FF } /* Literal.Number.Float */
.hl .mh { color: #A5D6FF } /* Literal.Number.Hex */
.hl .mi { color: #A5D6FF } /* Literal.Number.Integer */
.hl .mo { color: #A5D6FF } /* Literal.Number.Oct */
.hl .sa { color: #79C0FF } /* Literal.String.Affix */
.hl .sb { color: #A5D6FF } /* Literal.String.Backtick */
.hl .sc { color: #A5D6FF } /* Literal.String.Char */
.hl .dl { color: #79C0FF } /* Literal.String.Delimiter */
.hl .sd { color: #A5D6FF } /* Literal.String.Doc */
.hl .s2 { color: #A5D6FF } /* Literal.String.Double */
.hl .se { color: #79C0FF } /* Literal.String.Escape */
.hl .sh { color: #79C0FF } /* Literal.String.Heredoc */
.hl .si { color: #A5D6FF } /* Literal.String.Interpol */
.hl .sx { color: #A5D6FF } /* Literal.String.Other */
.hl .sr { color: #79C0FF } /* Literal.String.Regex */
.hl .s1 { color: #A5D6FF } /* Literal.String.Single */
.hl .ss { color: #A5D6FF } /* Literal.String.Symbol */
.hl .bp { color: #E6EDF3 } /* Name.Builtin.Pseudo */
.hl .fm { color: #D2A8FF; font-weight: bold } /* Name.Function.Magic */
.hl .vc { color: #79C0FF } /* Name.Variable.Class */
.hl .vg { color: #79C0FF } /* Name.Variable.Global */
.hl .vi { color: #79C0FF } /* Name.Variable.Instance */
.hl .vm { color: #79C0FF } /* Name.Variable.Magic */
.hl .il { color: #A5D6FF } /* Literal.Number.Integer.Long */
