/* ============================================================
   CONTACT DIALOG — shared by index.html, /marcas/* and /blog/*
   Loaded alongside site.css (or the inline styles on the homepage).
   Accent follows --brand on portfolio pages, --accent elsewhere.
   ============================================================ */
  .ct-backdrop {
    position: fixed; inset: 0; z-index: 400;
    background: rgba(14, 12, 10, 0.58);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center; padding: 28px 20px;
    opacity: 0; visibility: hidden; transition: opacity .32s var(--easing), visibility .32s;
  }
  .ct-backdrop.open { opacity: 1; visibility: visible; }

  .ct-panel {
    --ct-accent: var(--brand, var(--accent));
    --ct-accent-soft: color-mix(in srgb, var(--ct-accent) 12%, #fff);
    position: relative; width: 100%; max-width: 580px; max-height: calc(100vh - 56px);
    overflow-y: auto; overscroll-behavior: contain;
    background: var(--paper-3); border-radius: 18px;
    box-shadow: 0 50px 110px -30px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,0,0,0.05);
    padding: 42px 44px 36px;
    transform: translateY(22px) scale(0.985); opacity: 0;
    transition: transform .42s var(--easing-snap), opacity .3s var(--easing);
  }
  .ct-backdrop.open .ct-panel { transform: none; opacity: 1; }
  .ct-panel::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(90deg, var(--ct-accent), color-mix(in srgb, var(--ct-accent) 45%, #fff));
  }

  .ct-close {
    position: absolute; top: 18px; right: 18px; width: 36px; height: 36px;
    border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--ink-2);
    display: flex; align-items: center; justify-content: center;
    transition: background .25s, color .25s, border-color .25s, transform .25s var(--easing-snap);
  }
  .ct-close:hover { background: var(--ink); color: #fff; border-color: var(--ink); transform: rotate(90deg); }

  .ct-panel .eyebrow { color: var(--ct-accent); display: block; margin-bottom: 14px; }
  .ct-title {
    font-family: 'Fraunces', Georgia, serif; font-weight: 400;
    font-size: clamp(27px, 3.2vw, 35px); line-height: 1.1; letter-spacing: -0.015em; color: var(--ink);
    padding-right: 40px;
  }
  .ct-sub { color: var(--ink-2); font-size: 15px; line-height: 1.6; margin-top: 12px; }

  .ct-form { margin-top: 26px; display: grid; gap: 14px; }
  .ct-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .ct-field { display: flex; flex-direction: column; gap: 7px; }
  .ct-field label {
    font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--ink-3);
  }
  .ct-field label .req { color: var(--ct-accent); }
  .ct-field input, .ct-field textarea, .ct-field select {
    font-family: 'Inter', system-ui, sans-serif; font-size: 15px; color: var(--ink);
    background: var(--paper-2); border: 1px solid var(--line);
    border-radius: 10px; padding: 13px 15px; width: 100%;
    transition: border-color .25s, background .25s, box-shadow .25s;
  }
  .ct-field textarea { resize: vertical; min-height: 92px; line-height: 1.55; }
  .ct-field input::placeholder, .ct-field textarea::placeholder { color: var(--ink-3); }
  .ct-field input:focus, .ct-field textarea:focus, .ct-field select:focus {
    outline: none; background: var(--paper-3);
    border-color: var(--ct-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ct-accent) 16%, transparent);
  }
  .ct-field.invalid input, .ct-field.invalid textarea { border-color: #C2453B; background: #FDF4F3; }
  .ct-error { font-size: 12px; color: #C2453B; min-height: 0; }
  .ct-field.invalid .ct-error { min-height: 16px; }

  .ct-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

  /* the custom cursor hides the caret site-wide — give it back inside the form */
  body.cursor-active .ct-panel,
  body.cursor-active .ct-panel a,
  body.cursor-active .ct-panel button { cursor: auto; }
  body.cursor-active .ct-panel a,
  body.cursor-active .ct-panel button { cursor: pointer; }
  body.cursor-active .ct-panel input,
  body.cursor-active .ct-panel textarea { cursor: text; }

  .ct-submit {
    margin-top: 8px; width: 100%;
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    padding: 17px 28px; border: 0; border-radius: 999px;
    background: var(--ink); color: #fff;
    font-family: 'JetBrains Mono', monospace; font-size: 11.5px;
    letter-spacing: 0.2em; text-transform: uppercase;
    transition: background .3s var(--easing), letter-spacing .3s var(--easing), box-shadow .3s;
  }
  .ct-submit:hover { background: var(--ct-accent); letter-spacing: 0.24em; box-shadow: 0 18px 40px -14px color-mix(in srgb, var(--ct-accent) 60%, transparent); }
  .ct-submit svg { transition: transform .35s var(--easing-snap); }
  .ct-submit:hover svg { transform: translateX(5px); }
  .ct-submit[disabled] { opacity: .6; pointer-events: none; }

  .ct-direct {
    margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line);
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    font-size: 13.5px; color: var(--ink-2);
  }
  .ct-direct .lbl { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); width: 100%; }
  .ct-direct a.mail { color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--line-2); transition: color .2s, border-color .2s; }
  .ct-direct a.mail:hover { color: var(--ct-accent); border-color: var(--ct-accent); }
  .ct-copy {
    display: inline-flex; align-items: center; gap: 7px;
    background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px;
    font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--ink-2);
    transition: border-color .2s, color .2s, background .2s;
  }
  .ct-copy:hover { border-color: var(--ct-accent); color: var(--ct-accent); }
  .ct-copy.done { background: var(--ct-accent); border-color: var(--ct-accent); color: #fff; }

  /* ---- success state ---- */
  .ct-done { display: none; text-align: center; padding: 12px 0 4px; }
  .ct-panel.is-done .ct-form, .ct-panel.is-done .ct-sub, .ct-panel.is-done .ct-intro-title { display: none; }
  .ct-panel.is-done .ct-done { display: block; }
  .ct-check {
    width: 62px; height: 62px; margin: 6px auto 22px; border-radius: 50%;
    background: color-mix(in srgb, var(--ct-accent) 14%, #fff); color: var(--ct-accent);
    display: flex; align-items: center; justify-content: center;
  }
  .ct-done h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 400; font-size: 28px; line-height: 1.15; color: var(--ink); }
  .ct-done p { color: var(--ink-2); font-size: 15px; line-height: 1.65; margin-top: 12px; }

  /* ---- toast (language switcher, copy confirmations) ---- */
  .ct-toast {
    position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 18px);
    z-index: 500; background: var(--ink); color: #fff;
    padding: 13px 22px; border-radius: 999px;
    font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
    box-shadow: 0 20px 45px -18px rgba(0,0,0,0.6);
    opacity: 0; pointer-events: none; transition: opacity .3s var(--easing), transform .35s var(--easing-snap);
  }
  .ct-toast.show { opacity: 1; transform: translate(-50%, 0); }

  @media (max-width: 620px) {
    .ct-backdrop { padding: 0; align-items: flex-end; }
    .ct-panel { max-width: none; border-radius: 20px 20px 0 0; padding: 34px 24px 28px; max-height: 92vh; }
    .ct-panel::before { border-radius: 20px 20px 0 0; }
    .ct-row { grid-template-columns: 1fr; }
    .ct-title { font-size: 26px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .ct-backdrop, .ct-panel, .ct-toast { transition: opacity .01ms; }
    .ct-panel { transform: none; }
  }

