/* =============================================================================
   PORTAL DE CLIENTES · Juniper Ridge Construction
   -----------------------------------------------------------------------------
   Hecho primero para el celular. Colores de la marca (negro, crema, dorado)
   con contraste AA: el dorado claro solo en adornos y sobre fondo oscuro; el
   texto dorado pequeño usa --pt-oro-texto. Sin fuentes ni estilos de afuera
   (la política de seguridad del portal solo permite lo propio).
   ============================================================================= */
@font-face {
    font-family: "Montserrat";
    src: url("fonts/montserrat-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Playfair Display";
    src: url("fonts/playfair-display-latin-700-normal.woff2") format("woff2");
    font-weight: 700; font-style: normal; font-display: swap;
}

:root {
    --pt-tinta: #1a1a1a;
    --pt-tinta-2: #2b2824;
    --pt-crema: #f6f3ec;
    --pt-tarjeta: #ffffff;
    --pt-linea: #ebe5d8;
    --pt-oro: #c9a95c;
    --pt-oro-texto: #7a6027;
    --pt-oro-boton: #8a6d2d;
    --pt-oro-suave: #f5eddb;
    --pt-texto: #1f1f1f;
    --pt-tenue: #5f5b53;
    --pt-ok: #155d3b;
    --pt-ok-suave: #e6f4ec;
    --pt-error: #b42318;
    --pt-error-suave: #fdecea;
    --pt-radio: 18px;
    --pt-sombra: 0 1px 2px rgba(26, 26, 26, .04), 0 10px 30px rgba(26, 26, 26, .06);
    --pt-serif: "Playfair Display", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--pt-crema); color: var(--pt-texto);
    font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15.5px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--pt-oro-texto); text-underline-offset: 3px; }
a:hover { color: var(--pt-tinta); }
:focus-visible { outline: 3px solid var(--pt-oro); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; color: var(--pt-tinta); }
h1 { font-family: var(--pt-serif); font-size: 1.9rem; }
h2 { font-size: 1.12rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .8rem; }
.pt-ico { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.pt-visual-oculto { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.pt-saltar { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.pt-saltar:focus { left: 8px; }

/* ---------------------------------------------------------------- barra --- */
.pt-barra {
    position: sticky; top: 0; z-index: 20; background: var(--pt-tinta); color: #fff;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 10px max(16px, env(safe-area-inset-left)) 10px max(16px, env(safe-area-inset-right));
}
.pt-marca { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.pt-marca span { font-family: var(--pt-serif); font-size: 1.12rem; line-height: 1.1; color: #fff; }
.pt-marca small { display: block; font-family: "Montserrat", sans-serif; font-size: .66rem; letter-spacing: 2px; text-transform: uppercase; color: var(--pt-oro); font-weight: 700; margin-top: 2px; }
.pt-marca:hover span { color: #fff; }
.pt-nav { display: flex; gap: 4px; }
.pt-nav a {
    position: relative; display: flex; align-items: center; gap: 7px; color: #d9d4ca; text-decoration: none;
    padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .9rem;
}
.pt-nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.pt-nav a.activo { color: var(--pt-tinta); background: var(--pt-oro); }
.pt-globo {
    min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #c52b30; color: #fff;
    font-size: .68rem; font-weight: 800; display: inline-grid; place-items: center; font-style: normal;
}
@media (max-width: 759px) {
    .pt-con { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
    .pt-nav {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--pt-tinta);
        justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(255, 255, 255, .08);
    }
    .pt-nav a { flex-direction: column; gap: 2px; font-size: .7rem; padding: 6px 16px; border-radius: 14px; }
    .pt-nav a .pt-ico { width: 22px; height: 22px; }
    .pt-nav a.activo { background: rgba(201, 169, 92, .16); color: var(--pt-oro); }
    .pt-globo { position: absolute; top: 2px; right: 10px; }
}

/* --------------------------------------------------------------- página --- */
.pt-main { max-width: 1080px; margin: 0 auto; padding: 22px 16px 30px; }
.pt-hola { margin: 6px 0 22px; }
.pt-eyebrow { text-transform: uppercase; letter-spacing: 2.2px; font-size: .72rem; font-weight: 700; color: var(--pt-oro-texto); margin: 0 0 6px; }
.pt-sub { color: var(--pt-tenue); font-size: 1rem; max-width: 46rem; }
.pt-tenue { color: var(--pt-tenue); }
.pt-seccion { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 12px; font-size: 1.05rem; }
.pt-ver-todo { font-size: .86rem; font-weight: 600; }
.pt-tarjeta { background: var(--pt-tarjeta); border: 1px solid var(--pt-linea); border-radius: var(--pt-radio); padding: 20px; margin-bottom: 18px; box-shadow: var(--pt-sombra); }
.pt-tarjeta > h2 { margin-bottom: 14px; }
.pt-parrafo { white-space: normal; overflow-wrap: anywhere; }
.pt-columnas { display: grid; gap: 0 18px; }
@media (min-width: 960px) {
    .pt-main { padding: 30px 24px 40px; }
    h1 { font-size: 2.3rem; }
    .pt-columnas { grid-template-columns: 1.35fr 1fr; align-items: start; }
}

/* -------------------------------------------------------------- botones --- */
.pt-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
    background: var(--pt-tinta); color: #fff; font: inherit; font-weight: 700; font-size: .95rem;
    padding: 12px 20px; border-radius: 12px; text-decoration: none; transition: background .15s ease, transform .05s ease;
}
.pt-btn:hover { background: #333; color: #fff; }
.pt-btn:active { transform: translateY(1px); }
.pt-btn-ancho { width: 100%; }
.pt-btn-claro { background: #fff; color: var(--pt-tinta); border: 1px solid var(--pt-linea); }
.pt-btn-claro:hover { background: var(--pt-oro-suave); color: var(--pt-tinta); }
.pt-btn-link { background: none; border: 0; padding: 8px 0; font: inherit; color: var(--pt-error); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pt-botones { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pt-botones form { margin: 0; }

/* -------------------------------------------------------- formularios --- */
.pt-form { display: grid; gap: 10px; margin: 0; }
.pt-form label { font-weight: 600; font-size: .9rem; }
.pt-form input[type=email], .pt-form input[type=text], .pt-form textarea {
    width: 100%; font: inherit; color: var(--pt-texto); background: #fff; border: 1.5px solid #ddd5c5; border-radius: 12px; padding: 12px 14px;
}
.pt-form input:focus, .pt-form textarea:focus { border-color: var(--pt-oro-boton); outline: 3px solid rgba(201, 169, 92, .35); outline-offset: 0; }
.pt-form textarea { resize: vertical; min-height: 96px; }
.pt-codigo { font-size: 1.6rem !important; letter-spacing: .5em; text-align: center; font-weight: 700; }
.pt-interruptor { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--pt-linea); cursor: pointer; font-weight: 400 !important; }
.pt-interruptor input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--pt-oro-boton); flex: none; }
.pt-interruptor small { display: block; color: var(--pt-tenue); font-size: .84rem; }
.pt-nota { font-size: .85rem; color: var(--pt-tenue); margin: 12px 0 0; }
.pt-nota .pt-ico { width: 15px; height: 15px; }
.pt-aviso { border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; font-weight: 600; font-size: .92rem; }
.pt-aviso-ok { background: var(--pt-ok-suave); color: var(--pt-ok); }
.pt-aviso-info { background: var(--pt-oro-suave); color: #4f3f17; }
.pt-aviso-error { background: var(--pt-error-suave); color: var(--pt-error); }

/* ------------------------------------------------------- entrar (solo) --- */
.pt-solo { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(1200px 500px at 50% -10%, #ffffff 0%, var(--pt-crema) 60%); }
.pt-solo .pt-main { flex: 1; width: 100%; }
.pt-centro { min-height: 70vh; display: grid; place-items: center; padding: 10px 0; }
.pt-login { width: 100%; max-width: 430px; padding: 32px 26px; text-align: left; }
.pt-login h1 { font-size: 1.85rem; }
.pt-logo-claro { width: 72px; height: auto; margin: 0 0 18px; }
.pt-nota-pie { border-top: 1px solid var(--pt-linea); padding-top: 14px; margin-top: 20px; }

/* --------------------------------------------------- tarjetas proyecto --- */
.pt-proyectos { display: grid; gap: 16px; }
@media (min-width: 720px) { .pt-proyectos { grid-template-columns: 1fr 1fr; } }
.pt-proy {
    display: flex; flex-direction: column; background: #fff; border: 1px solid var(--pt-linea); border-radius: var(--pt-radio);
    overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--pt-sombra); transition: transform .15s ease, box-shadow .15s ease;
}
.pt-proy:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(26, 26, 26, .1); color: inherit; }
.pt-proy-foto { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--pt-tinta-2), var(--pt-tinta)); }
.pt-proy-foto img { width: 100%; height: 100%; object-fit: cover; }
.pt-monograma { position: absolute; inset: 0; display: grid; place-items: center; color: var(--pt-oro); }
.pt-monograma .pt-ico { width: 46px; height: 46px; stroke-width: 1.3; }
.pt-proy-foto .pt-etapa { position: absolute; left: 12px; bottom: 12px; }
.pt-nuevo { position: absolute; right: 12px; top: 12px; background: var(--pt-oro); color: var(--pt-tinta); font-weight: 800; font-size: .74rem; padding: 3px 10px; border-radius: 999px; }
.pt-proy-cuerpo { padding: 16px 18px 18px; }
.pt-proy-cuerpo h3 { font-size: 1.12rem; margin-bottom: 4px; }
.pt-dir { color: var(--pt-tenue); font-size: .88rem; margin-bottom: 12px; }
.pt-dir .pt-ico { width: 15px; height: 15px; }
.pt-meta { font-size: .82rem; color: var(--pt-tenue); margin: 8px 0 0; }

.pt-etapa { display: inline-flex; align-items: center; gap: 7px; font-size: .76rem; font-weight: 800; padding: 5px 12px; border-radius: 999px; letter-spacing: .2px; background: #fff; color: var(--pt-tinta); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.pt-etapa::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pt-etapa-planning, .pt-etapa-scheduled { color: #2f4a72; }
.pt-etapa-in_progress { color: #7a5310; }
.pt-etapa-in_progress::before { background: #d39b1d; box-shadow: 0 0 0 4px rgba(211, 155, 29, .2); }
.pt-etapa-final_touches { color: #5f4718; }
.pt-etapa-completed { color: var(--pt-ok); }
.pt-etapa-on_hold { color: #4f4b43; }

.pt-avance { display: flex; align-items: center; gap: 12px; }
.pt-avance strong { font-size: .9rem; min-width: 3ch; text-align: right; }
.pt-avance.grande strong { font-size: 1.15rem; }
.pt-barra-avance { flex: 1; height: 8px; background: #efe9dc; border-radius: 999px; overflow: hidden; }
.pt-avance.grande .pt-barra-avance { height: 12px; }
.pt-barra-avance span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #d8bd7a, var(--pt-oro), #a88944); transition: width .4s ease; }
.pc-0 { width: 0; } .pc-5 { width: 5%; } .pc-10 { width: 10%; } .pc-15 { width: 15%; } .pc-20 { width: 20%; }
.pc-25 { width: 25%; } .pc-30 { width: 30%; } .pc-35 { width: 35%; } .pc-40 { width: 40%; } .pc-45 { width: 45%; }
.pc-50 { width: 50%; } .pc-55 { width: 55%; } .pc-60 { width: 60%; } .pc-65 { width: 65%; } .pc-70 { width: 70%; }
.pc-75 { width: 75%; } .pc-80 { width: 80%; } .pc-85 { width: 85%; } .pc-90 { width: 90%; } .pc-95 { width: 95%; } .pc-100 { width: 100%; }

/* --------------------------------------------------------- listas, avisos --- */
.pt-lista { padding: 6px 8px; }
.pt-fila { display: flex; align-items: flex-start; gap: 12px; padding: 12px 10px; border-radius: 12px; text-decoration: none; color: inherit; }
.pt-fila + .pt-fila { border-top: 1px solid var(--pt-linea); }
.pt-fila:hover { background: #faf8f3; color: inherit; }
.pt-fila-texto { flex: 1; min-width: 0; display: grid; gap: 1px; }
.pt-fila-texto small { color: var(--pt-tenue); font-size: .8rem; }
.pt-extracto { color: #3d3a35; font-size: .9rem; }
.pt-punto { width: 10px; height: 10px; border-radius: 50%; background: var(--pt-oro); margin-top: 8px; flex: none; }
.pt-dia { font-size: .74rem; text-transform: uppercase; letter-spacing: 1.6px; font-weight: 700; color: var(--pt-oro-texto); padding: 14px 10px 4px; }
.pt-burbuja { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--pt-oro-suave); color: var(--pt-oro-texto); flex: none; }
.pt-burbuja.chica { width: 36px; height: 36px; background: #f1ede4; color: #5f5b53; }
.pt-burbuja.chica .pt-ico { width: 17px; height: 17px; }
.pt-burbuja.oro { background: var(--pt-tinta); color: var(--pt-oro); }
.pt-vacio { text-align: center; padding: 40px 24px; }
.pt-vacio .pt-burbuja { margin: 0 auto 14px; }
.pt-vacio p { color: var(--pt-tenue); max-width: 30rem; margin: 0 auto; }

.pt-contacto { background: var(--pt-tinta); color: #e9e5dc; border-color: var(--pt-tinta); display: grid; gap: 14px; margin-top: 26px; }
.pt-contacto h2 { color: #fff; font-family: var(--pt-serif); font-size: 1.35rem; }
.pt-contacto p { margin: 0; color: #cfc9bd; }
.pt-contacto-botones { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 760px) { .pt-contacto { grid-template-columns: 1fr auto; align-items: center; } }

/* --------------------------------------------------------------- proyecto --- */
.pt-volver { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--pt-tenue); margin-bottom: 12px; }
.pt-hero {
    position: relative; border-radius: 22px; overflow: hidden; min-height: 210px; margin-bottom: 18px;
    background: radial-gradient(600px 300px at 85% 0%, rgba(201, 169, 92, .28), transparent 60%), linear-gradient(135deg, var(--pt-tinta-2), var(--pt-tinta));
    display: flex; align-items: flex-end;
}
.pt-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pt-hero.con-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05) 30%, rgba(0, 0, 0, .72)); }
.pt-hero-texto { position: relative; z-index: 1; padding: 22px; color: #fff; }
.pt-hero-texto h1 { color: #fff; margin: 12px 0 6px; font-size: 2rem; text-shadow: 0 2px 12px rgba(0, 0, 0, .3); }
.pt-hero-texto p { margin: 0; color: #f1ece2; }
@media (min-width: 760px) { .pt-hero { min-height: 300px; } .pt-hero-texto { padding: 30px; } .pt-hero-texto h1 { font-size: 2.5rem; } }

.pt-pasos { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); margin: 4px 0 16px; padding: 0; }
.pt-pasos li { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; font-size: .78rem; color: var(--pt-tenue); }
.pt-pasos li::before { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 3px; background: var(--pt-linea); z-index: 0; }
.pt-pasos li:first-child::before { display: none; }
.pt-pasos li.hecho::before, .pt-pasos li.ahora::before { background: var(--pt-oro); }
.pt-paso-punto { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 3px solid var(--pt-linea); display: grid; place-items: center; }
.pt-paso-punto .pt-ico { width: 14px; height: 14px; stroke-width: 3; }
.pt-pasos li.hecho .pt-paso-punto { background: var(--pt-oro); border-color: var(--pt-oro); color: var(--pt-tinta); }
.pt-pasos li.ahora { color: var(--pt-tinta); font-weight: 800; }
.pt-pasos li.ahora .pt-paso-punto { background: var(--pt-tinta); border-color: var(--pt-oro); box-shadow: 0 0 0 6px rgba(201, 169, 92, .22); }
@media (max-width: 480px) { .pt-paso-nombre { font-size: .66rem; line-height: 1.2; } }
.pt-estado-desc { font-size: 1.02rem; color: #2e2b27; margin-bottom: 16px; }
.pt-pausa { display: flex; gap: 10px; align-items: flex-start; background: var(--pt-oro-suave); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.pt-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--pt-linea); }
.pt-datos dt, .pt-ficha dt { font-size: .74rem; text-transform: uppercase; letter-spacing: 1.4px; font-weight: 700; color: var(--pt-tenue); }
.pt-datos dd, .pt-ficha dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.pt-ficha { display: grid; gap: 14px; margin: 0; }
.pt-candado { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; color: var(--pt-tenue); background: #f1ede4; border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.pt-candado .pt-ico { width: 12px; height: 12px; }

.pt-linea { list-style: none; margin: 0; padding: 0; }
.pt-linea > li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; position: relative; padding-bottom: 22px; }
.pt-linea > li:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 40px; bottom: 4px; width: 2px; background: var(--pt-linea); }
.pt-linea article header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; margin-bottom: 4px; }
.pt-linea article h3 { margin: 0; }
.pt-linea time { font-size: .8rem; color: var(--pt-tenue); }
.pt-autor { font-size: .85rem; color: var(--pt-oro-texto); font-weight: 600; margin: 6px 0 0; }
.pt-sub-titulo { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin: 18px 0 10px; }
.pt-sub-titulo:first-of-type { margin-top: 0; }
.pt-sub-titulo span { background: #f1ede4; border-radius: 999px; padding: 0 8px; font-size: .74rem; color: var(--pt-tenue); }
.pt-fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 4px; }
.pt-fotos a { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #efe9dc; }
.pt-fotos img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.pt-fotos a:hover img { transform: scale(1.04); }
.pt-subir { margin-top: 14px; }
.pt-subir label { cursor: pointer; }
.pt-progreso { display: grid; gap: 4px; margin-top: 10px; }
.pt-progreso small { color: var(--pt-tenue); }

/* ---------------------------------------------------------------- visor --- */
.pt-visor { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.pt-visor::backdrop { background: rgba(10, 10, 10, .92); }
.pt-visor[open] { display: grid; place-items: center; }
.pt-visor img { max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: 8px; }
.pt-visor button { position: fixed; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.pt-visor button:hover { background: rgba(255, 255, 255, .24); }
.pt-visor-cerrar { top: 16px; right: 16px; }
.pt-visor-ant { left: 12px; top: 50%; transform: translateY(-50%); }
.pt-visor-sig { right: 12px; top: 50%; transform: translateY(-50%); }

/* ----------------------------------------------------------------- pie --- */
.pt-pie { text-align: center; font-size: .78rem; color: var(--pt-tenue); padding: 20px 16px 26px; display: grid; gap: 3px; }
.pt-pie a { color: var(--pt-tenue); }

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