/* /agenda — misma identidad visual que la home (index.html).
   La home no define variables CSS globales: estos tokens copian sus valores exactos
   y cada uno indica la línea de index.html de donde sale. Sin animaciones. */

:root {
  color-scheme: light;

  /* Color */
  --cream: #F6F5EF;                      /* body, index.html:60 */
  --ink: #171310;                        /* texto principal / botón, index.html:146, :777 */
  --title: #2A2018;                      /* títulos, index.html:341 */
  --body: #33291F;                       /* texto de cuerpo, index.html:344 */
  --muted: rgba(42, 32, 24, .62);        /* bajadas, index.html:802 */
  --line: rgba(42, 32, 24, .16);         /* bordes de inputs, index.html:770 */
  --accent: #7A0000;                     /* rojo TIB, index.html:336, :770 */
  --error: #C0342B;                      /* error del formulario, index.html:775 */
  --night: #0A0807;                      /* footer, index.html:816 */

  /* Superficies (formulario de contacto de la home, index.html:766-777) */
  --field-bg: rgba(255, 255, 255, .35);
  --field-bg-focus: rgba(255, 255, 255, .55);
  --card-bg: rgba(217, 217, 217, .28);
  --card-border: rgba(255, 255, 255, .5);
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 30px 70px -34px rgba(42, 32, 24, .4);

  /* Botón premium: CTA del hero mobile, index.html:65 */
  --cta-bg: linear-gradient(150deg, rgba(26, 20, 18, .95) 0%, rgba(92, 14, 14, .93) 52%, rgba(122, 0, 0, .96) 100%);
  --cta-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .4), inset 0 -10px 22px -10px rgba(0, 0, 0, .4), 0 16px 42px -14px rgba(122, 0, 0, .5), 0 5px 16px -6px rgba(23, 19, 16, .42);

  /* Radios (index.html:770, :766, :217) */
  --r-field: 14px;
  --r-card: 26px;
  --r-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cream);
  color: var(--ink);
  font-family: 'DM Sans', system-ui, sans-serif;            /* index.html:60 */
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* ---------- Fondo (index.html:196 y :198) ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 12% 6%, #F2EDE1 0%, rgba(242, 237, 225, 0) 55%),
    radial-gradient(110% 90% at 88% 18%, #E7DFCC 0%, rgba(231, 223, 204, 0) 52%),
    radial-gradient(130% 100% at 50% 100%, #DCD3BE 0%, rgba(220, 211, 190, 0) 55%),
    #F6F5EF;
}
.bg-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
  opacity: .04;
  mix-blend-mode: multiply;
}

.top, .wrap, .foot { position: relative; z-index: 1; }

/* ---------- Encabezado con logo ---------- */
.top {
  display: flex;
  justify-content: center;
  padding: 22px 16px 0;
}
/* Placa del logo: el logo de la home es claro (logo-tib-white.png), así que va sobre una placa
   oscura con el mismo degradado oscuro -> rojo TIB de los botones (index.html:65), brillo interno,
   un filo de luz y sombra roja suave. */
.logo-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, 0) 55%),
    var(--cta-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .38),
    inset 0 0 0 1px rgba(255, 255, 255, .08),
    inset 0 -10px 22px -12px rgba(0, 0, 0, .45),
    0 18px 40px -16px rgba(122, 0, 0, .55),
    0 6px 16px -8px rgba(23, 19, 16, .45);
}
.logo {
  display: block;
  height: 28px;
  width: auto;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .30)) drop-shadow(0 2px 8px rgba(0, 0, 0, .34));   /* index.html:206 */
}
@media (min-width: 640px) {
  .logo-badge { padding: 15px 26px; border-radius: 20px; }
  .logo { height: 32px; }                                   /* tope del clamp de la home, index.html:206 */
}

/* ---------- Layout ---------- */
.wrap {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.intro { text-align: center; margin-bottom: 20px; }

/* Etiqueta superior: estilo de "Por qué importa" (index.html:336), sin el brillo animado */
.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0 auto;
  max-width: 22ch;
  font-size: clamp(28px, 8.4vw, 36px);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -.015em;
  color: var(--title);
  text-wrap: balance;
}
/* Título con degradado negro -> gris, index.html:341 */
.title-grad {
  font-weight: 700;
  background: linear-gradient(180deg, #000000 0%, rgba(90, 90, 90, .8) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.lead {
  margin: 18px auto 0;
  max-width: 44ch;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  font-weight: 450;
  color: var(--body);
  text-wrap: balance;
}

/* ---------- Indicador de pasos ---------- */
.steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.steps li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  white-space: nowrap;
  border-radius: var(--r-pill);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(42, 32, 24, .08);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}
.steps li[aria-current="step"] {
  color: var(--ink);
  font-weight: 600;
  background: rgba(255, 255, 255, .55);
}
.steps li[aria-current="step"] .step-num {
  background: var(--cta-bg);
  color: var(--cream);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}

/* ---------- Tarjeta de vidrio (index.html:766) ---------- */
.card {
  border-radius: var(--r-card);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--card-shadow);
  padding: 22px 18px;
}

.card-title {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--ink);
}
.card-title:focus { outline: none; }
.card-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 6px; }

.note { margin: 0 0 18px; font-size: 14px; color: var(--muted); }
.note-center { text-align: center; margin: 14px 0 0; }

/* ---------- Campos (index.html:770) ---------- */
form { display: flex; flex-direction: column; }
.field { margin: 0 0 18px; }
/* Al enfocar un campo (o al saltar a uno con error) queda aire arriba y no pegado al borde */
input, textarea, .dd-trigger { scroll-margin: 24px 0 120px; }
.grid-2 { display: grid; grid-template-columns: 1fr; column-gap: 16px; }

label {
  display: block;
  padding: 0;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--title);
}
.req { color: var(--accent); }
.optional { font-weight: 400; color: var(--muted); }

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border-radius: var(--r-field);
  border: 1px solid var(--line);
  background: var(--field-bg);
  color: var(--ink);
  font: inherit;
  font-size: 16px;                /* ≥16px evita el zoom automático en iOS */
  transition: border-color .2s ease, background .2s ease;
}
textarea {
  height: auto;
  min-height: 116px;
  padding: 16px 18px;
  line-height: 1.5;
  resize: vertical;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--field-bg-focus);
}
input[type="text"]:focus-visible,
input[type="email"]:focus-visible,
input[type="tel"]:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(122, 0, 0, .32);
  outline-offset: 2px;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] { border-color: var(--error); }

/* Autocompletar del navegador: conserva el fondo de vidrio en lugar del amarillo/celeste por defecto */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px #F3F0E8 inset;
  caret-color: var(--ink);
}

::selection { background: rgba(122, 0, 0, .16); color: var(--ink); }

/* Separador entre datos de contacto y datos del proyecto (línea del formulario de la home, index.html:780) */
.divider {
  height: 1px;
  margin: 6px 0 26px;
  border: 0;
  background: var(--line);
}

.field-hint {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.field-hint:has(+ .field-error:not([hidden])) { display: none; }   /* si hay error, se muestra solo el error */

.field-error {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--error);
}

/* ---------- Menús desplegables (nativos: en celular abren el selector del sistema) ---------- */
.select-wrap { position: relative; }
.select-wrap::after {                 /* flecha propia, misma tinta que el texto */
  content: "";
  position: absolute;
  top: 50%;
  right: 20px;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 1.6px solid var(--ink);
  border-bottom: 1.6px solid var(--ink);
  transform: rotate(45deg);
  pointer-events: none;
  opacity: .7;
  z-index: 1;
  transition: transform .2s ease, margin-top .2s ease;
}
select {
  display: block;
  width: 100%;
  height: 52px;                       /* alto de inputs de la home, index.html:770 */
  padding: 0 48px 0 18px;
  border-radius: var(--r-field);
  border: 1px solid var(--line);
  background: var(--field-bg);
  color: var(--ink);
  font: inherit;
  font-size: 16px;                    /* ≥16px evita el zoom automático en iOS */
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s ease, background .2s ease;
}
select:invalid { color: var(--muted); }          /* "Elegí una opción" en gris, como un placeholder */
select option { color: var(--ink); background: #F6F5EF; }
@media (hover: hover) { select:hover { background: var(--field-bg-focus); } }
select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--field-bg-focus);
}
select:focus-visible { outline: 2px solid rgba(122, 0, 0, .32); outline-offset: 2px; }
select[aria-invalid="true"] { border-color: var(--error); }

/* Disparador del menú propio (dropdown.js): mismo aspecto que los inputs */
.dd-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 13px 48px 13px 18px;
  border-radius: var(--r-field);
  border: 1px solid var(--line);
  background: var(--field-bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.dd-value { min-width: 0; overflow-wrap: anywhere; }   /* textos largos pasan a dos renglones en celular */
.dd-trigger.is-placeholder .dd-value { color: var(--muted); }
@media (hover: hover) { .dd-trigger:hover { background: var(--field-bg-focus); } }
.dd-trigger:focus { outline: none; border-color: var(--accent); background: var(--field-bg-focus); }
.dd-trigger:focus-visible { outline: 2px solid rgba(122, 0, 0, .32); outline-offset: 2px; }
.dd-trigger[aria-invalid="true"] { border-color: var(--error); }
.select-wrap.is-open { z-index: 30; }
.select-wrap.is-open .dd-trigger { border-color: var(--accent); background: var(--field-bg-focus); }
.select-wrap.is-open::after { transform: rotate(-135deg); margin-top: -2px; }

/* Panel de opciones: vidrio claro con el radio y la sombra de las tarjetas de la home */
.dd-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: min(300px, 52vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .7);
  background: rgba(250, 248, 243, .985);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 28px 60px -24px rgba(42, 32, 24, .45), 0 8px 20px -12px rgba(42, 32, 24, .25);
  animation: ddIn .16s ease-out;
}
.dd-list.dd-up { top: auto; bottom: calc(100% + 8px); animation-name: ddInUp; }
.dd-list:focus { outline: none; }

.dd-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.dd-option + .dd-option { margin-top: 2px; }
.dd-option.is-active { background: rgba(42, 32, 24, .07); }
.dd-option[aria-selected="true"] { font-weight: 600; }
.dd-check { display: inline-flex; flex: none; color: var(--accent); opacity: 0; }
.dd-option[aria-selected="true"] .dd-check { opacity: 1; }

/* Celular: la lista sube como hoja desde abajo, con el fondo oscurecido (dropdown.js la mueve al <body>) */
.dd-list.is-sheet {
  position: fixed;
  left: 10px;
  right: 10px;
  top: auto;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 100;
  max-height: 64vh;
  max-height: 64dvh;
  padding: 6px 8px 10px;
  border-radius: 22px;
  box-shadow: 0 0 0 100vmax rgba(10, 8, 7, .38), 0 -10px 40px -10px rgba(0, 0, 0, .35);
  animation: ddSheet .24s cubic-bezier(.22, 1, .36, 1);
}
.dd-list.is-sheet::before {           /* nombre del campo + barra para indicar la hoja */
  content: attr(data-titulo);
  display: block;
  padding: 18px 14px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  background: linear-gradient(rgba(42, 32, 24, .18), rgba(42, 32, 24, .18)) center 6px / 38px 4px no-repeat;
}
.dd-list.is-sheet .dd-option { min-height: 54px; font-size: 16px; }
html.dd-lock { overflow: hidden; }
@keyframes ddSheet { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

@keyframes ddIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes ddInUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dd-list { animation: none; } }

/* ---------- Botón premium (CTA del hero, index.html:65 y :295) ---------- */
.actions { margin-top: 6px; }
.actions-center { display: flex; justify-content: center; margin-top: 26px; }

.btn-premium {
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 0 34px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--cta-bg);
  box-shadow: var(--cta-shadow);
  color: var(--cream);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: filter .3s ease, box-shadow .3s ease, transform .12s ease;
}
@media (hover: hover) {
.btn-premium:hover {
  filter: brightness(1.1);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .55), inset 0 -10px 22px -10px rgba(0, 0, 0, .4), 0 20px 48px -14px rgba(122, 0, 0, .6), 0 6px 18px -6px rgba(23, 19, 16, .45);
}
}
.btn-premium:active { transform: scale(.99); }
.btn-premium:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.btn-premium:disabled { cursor: progress; filter: saturate(.6) brightness(.95); opacity: .75; }
.btn-icon { flex: none; }

/* ---------- Mensajes ---------- */
.alert,
.status {
  padding: 14px 18px;
  border-radius: var(--r-field);
  border: 1px solid var(--line);
  background: var(--field-bg);
  font-size: 15px;
  color: var(--body);
}
.alert { margin: 0 0 22px; }
.alert p { margin: 0; }
.alert-error,
.status[data-state="error"] {
  border-color: rgba(192, 52, 43, .45);
  background: rgba(192, 52, 43, .07);
  color: #8E231C;
}
.status { margin-top: 16px; }
.status:empty { display: none; }

.legal { margin: 20px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Paso 2 ---------- */
.done { text-align: center; padding: 10px 0 6px; }
.done-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px; height: 60px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--cta-bg);
  box-shadow: var(--cta-shadow);
  color: var(--cream);
}
.lead-sm { margin: 10px auto 0; max-width: 40ch; font-size: 16px; line-height: 1.55; color: var(--body); }
.done .alert { margin-top: 20px; text-align: left; }

/* ---------- Pie (texto de la home, index.html:299) ---------- */
.foot {
  padding: 0 16px calc(28px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .02em;
}

/* ---------- Pantallas más grandes ---------- */
@media (min-width: 640px) {
  .top { padding-top: 28px; }
  .wrap { padding: 56px 24px 64px; }
  .intro { margin-bottom: 36px; }
  .eyebrow { margin-bottom: 14px; }
  h1 { font-size: clamp(40px, 3.9vw + 14px, 54px); }
  .steps { gap: 10px; margin-bottom: 22px; }
  .steps li { gap: 10px; padding: 8px 16px 8px 8px; font-size: 14px; }
  .step-num { width: 30px; height: 30px; }
  .card { padding: 40px; }                                  /* index.html:766 */
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .done .btn-premium { width: auto; min-width: 280px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
