/* ============================================================
   Juana Bravo — Ficha Descriptiva
   Mobile first. Misma estructura en mobile y desktop.
   ============================================================ */

/* ---------- Fuentes (mismas que juanabravomezcal) ---------- */
@font-face {
    font-family: 'Holybuck Signature';
    src: url('../fonts/holybuck-signature/Holybuck-Regular.otf') format('opentype'),
        url('../fonts/holybuck-signature/Holybuck-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Late Eighties';
    src: url('../fonts/late-eighties/Late Eighties.otf') format('opentype'),
        url('../fonts/late-eighties/Late Eighties.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Late Eighties';
    src: url('../fonts/late-eighties/Late Eighties Bold.otf') format('opentype'),
        url('../fonts/late-eighties/Late Eighties Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Late Eighties';
    src: url('../fonts/late-eighties/Late Eighties Italic.otf') format('opentype'),
        url('../fonts/late-eighties/Late Eighties Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Source Code Pro';
    src: url('../fonts/source-code-pro/SourceCodePro-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Serif Pro';
    src: url('../fonts/source-serif-pro/SourceSerifPro-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Serif Pro';
    src: url('../fonts/source-serif-pro/SourceSerifPro-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* ---------- Variables ---------- */
:root {
    --primary: #623F6F;
    --accent: #9A8347;
    /* dorado */
    --accent-soft: #b6a25f;
    --neutral-dark: #607C7C;
    /* verde grisáceo footer */
    --dark: #1a1a1a;
    --text: #3d3d3d;
    --muted: #6f6f6f;
    --bg: #efeadd;
    /* crema fondo ficha */
    --bg-soft: #f4f0e6;
    --line: #c9b98a;

    --serif: 'Source Serif Pro', Georgia, serif;
    --display: 'Late Eighties', 'Times New Roman', serif;
    --mono: 'Source Code Pro', ui-monospace, monospace;
    --script: 'Holybuck Signature', cursive;
}

/* ---------- Reset ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

img {
    max-width: 100%;
    display: block;
}

body {
    font-family: var(--serif);
    color: var(--text);
    background-color: var(--bg);
    background-image:
        repeating-linear-gradient(0deg, rgba(154, 131, 71, 0.025) 0 1px, transparent 1px 4px);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

strong {
    font-weight: 700;
    color: var(--dark);
}

/* ============================================================
   LAYOUT PRINCIPAL — MOBILE FIRST
   ============================================================ */
.ficha {
    max-width: 1240px;
    margin: 0 auto;
    background-color: var(--bg);
    background-image:
        repeating-linear-gradient(0deg, rgba(154, 131, 71, 0.025) 0 1px, transparent 1px 4px);
    position: relative;
    overflow: hidden;
}

/* ---------- HEADER ---------- */
.ficha__header {
    position: relative;
    padding: 34px 20px 24px;
    text-align: center;
    min-height: 150px;
}

.ficha__leaves {
    position: absolute;
    top: -10px;
    right: -40px;
    width: 190px;
    opacity: 0.95;
    pointer-events: none;
    z-index: 1;
    /* Efecto de entrada (estilo nopalIn del otro proyecto) */
    transform-origin: top right;
    animation: leavesIn 1.3s ease .35s both;
    will-change: transform, opacity;
}

@keyframes leavesIn {
    from {
        opacity: 0;
        transform: translate(28%, -34%) rotate(-10deg);
    }
    to {
        opacity: 0.95;
        transform: translate(0, 0) rotate(0deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ficha__leaves {
        opacity: 0.95;
        transform: none;
        animation: none;
    }
}

.brand {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.brand__logo {
    width: 100%;
    max-width: 340px;
    height: auto;
}

/* Esquinas decoradas tipo marco (doradas escalonadas) */
.corner {
    position: absolute;
    width: 30px;
    height: 30px;
    pointer-events: none;
    z-index: 3;
}

.ficha__header .corner--tl {
    top: 16px;
    left: 16px;
    border-top: 3px solid var(--accent);
    border-left: 3px solid var(--accent);
}

.ficha__header .corner--tr {
    top: 16px;
    right: 16px;
    border-top: 3px solid var(--accent);
    border-right: 3px solid var(--accent);
}

/* Línea dorada horizontal centrada, al nivel de las esquinas superiores */
.header__topline {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 340px;
    height: 3px;
    background-color: var(--accent);
    z-index: 3;
    pointer-events: none;
}

/* ---------- BODY ---------- */
.ficha__body {
    display: flex;
    flex-direction: column;
    padding: 8px 24px 30px;
    gap: 8px;
}

.col {
    min-width: 0;
}

/* Divisor de rombos (rombo.png) — horizontal en mobile */
.col-divider {
    align-self: stretch;
    height: 40px;
    background-image: url('../img/rombo-tile.png');
    background-size: 40px 40px;
    background-position: center;
    background-repeat: repeat-x;
    margin: 6px 0;
}

/* ---------- Columna izquierda ---------- */
.bottle {
    text-align: center;
    padding: 10px 0 6px;
    background-image: url('../img/fondo.png');
    background-repeat: no-repeat;
    background-position: center center;
}

.bottle__img {
    width: auto;
    max-width: 62%;
    max-height: 460px;
    margin: 0 auto;
    /* Entrada al cargar (estilo ATF) */
    opacity: 0;
    transform: translateY(30px);
    animation: bottleIn 1.2s ease .3s forwards;
}

/* Flotado continuo sutil (capa externa para no chocar con el hover) */
.bottle__float {
    display: inline-block;
    animation: bottleFloat 4.5s ease-in-out 1.8s infinite;
    transition: transform .5s ease;
    will-change: transform;
}

.bottle__float:hover {
    transform: scale(1.05);
}

@keyframes bottleIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bottleFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

@media (prefers-reduced-motion: reduce) {

    .bottle__img,
    .bottle__float {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

.story {
    padding: 14px 4px 0;
}

.story__title {
    font-weight: normal;
    margin-bottom: 18px;
    line-height: 1;
}

.story__title-top {
    display: block;
    font-family: var(--display);
    font-size: clamp(1.5rem, 6vw, 2.1rem);
    letter-spacing: 0.5px;
    color: var(--dark);
    text-align: center;
}

.story__title-script {
    display: block;
    font-family: var(--script);
    font-size: clamp(2rem, 9vw, 3rem);
    color: var(--dark);
    margin-top: 4px;
    padding-left: 30px;
    text-align: center;
}

.story p {
    font-size: 0.98rem;
    text-align: justify;
    margin-bottom: 14px;
    color: var(--text);
}

/* ---------- Columna derecha ---------- */
.product {
    padding: 4px 0 6px;
}

.product__name {
    font-family: var(--mono);
    font-weight: 700;
    font-size: clamp(1.05rem, 4.6vw, 1.5rem);
    letter-spacing: 0.5px;
    color: var(--dark);
    line-height: 1.2;
    text-align: center;
}

.product__age {
    font-family: var(--mono);
    font-weight: 600;
    font-size: clamp(1rem, 4vw, 1.25rem);
    color: var(--dark);
    margin-top: 6px;
    letter-spacing: 0.5px;
    text-align: center;
}

.product__origin {
    font-family: var(--mono);
    font-weight: 500;
    font-size: clamp(0.85rem, 3.4vw, 1rem);
    color: var(--accent);
    margin-top: 4px;
    letter-spacing: 0.5px;
    text-align: center;
}

.section-title {
    font-family: var(--mono);
    font-weight: 700;
    font-size: clamp(1rem, 4vw, 1.25rem);
    letter-spacing: 1px;
    color: var(--dark);
    margin: 28px 0 16px;
}

/* Tarjetas de perfil sensorial */
.sense-card {
    position: relative;
    border: 1.5px solid var(--line);
    padding: 22px 20px 24px;
    margin-bottom: 20px;
}

.sense-card .corner {
    width: 16px;
    height: 16px;
    background: var(--bg);
}

.sense-card .corner--tl {
    top: -2px;
    left: 24px;
    border-left: 0;
    border-top: 0;
    width: 34px;
    height: 6px;
}

.sense-card .corner--br {
    bottom: -2px;
    right: 24px;
    width: 34px;
    height: 6px;
}

.sense-card__title {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    color: var(--dark);
    margin-bottom: 10px;
}

.sense-card p {
    font-size: 0.95rem;
    text-align: justify;
    color: var(--text);
}

/* Lista de especificaciones */
.specs {
    margin-top: 4px;
}

.specs__row {
    padding: 12px 2px;
    border-bottom: 1px solid var(--line);
}

.specs__row dt {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    color: var(--dark);
    display: inline;
}

.specs__row dd {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    color: var(--text);
    display: inline;
    margin-left: 6px;
}

/* ---------- DIVISOR DE ROMBOS ANTES DEL FOOTER ---------- */
.rombo-row {
    height: 40px;
    margin: 8px 24px 4px;
    background-image: url('../img/rombo-tile.png');
    background-size: 40px 40px;
    background-position: center;
    background-repeat: repeat-x;
}

/* ---------- FOOTER ---------- */
.ficha__footer {
    padding: 10px 24px 40px;
}

.footer-box {
    background-color: var(--neutral-dark);
    color: #eef0ec;
    border-radius: 4px;
    padding: 34px 28px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer-box__left {
    text-align: center;
}

.footer-box__symbol {
    width: 58px;
    margin: 0 auto 16px;
    opacity: 0.95;
}

.footer-box__quote {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1.5px;
    line-height: 1.5;
    color: #fff;
}

.footer-box__right p {
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: #e7eae5;
}

.footer-box__about {
    font-weight: 700;
}

.footer-box__right p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   TABLET  (>= 680px)
   ============================================================ */
@media (min-width: 680px) {
    .footer-box {
        flex-direction: row;
        align-items: center;
        gap: 40px;
        padding: 40px 44px;
    }

    .footer-box__left {
        flex: 0 0 34%;
        border-right: 1px solid rgba(255, 255, 255, 0.25);
        padding-right: 20px;
    }

    .footer-box__right {
        flex: 1;
    }
}

/* ============================================================
   DESKTOP  (>= 900px) — misma estructura, layout a 2 columnas
   ============================================================ */
@media (min-width: 900px) {
    .ficha__header {
        padding: 48px 40px 30px;
        min-height: 220px;
    }

    .ficha__leaves {
        width: 230px;
        top: -20px;
        right: -30px;
    }

    .brand__logo {
        max-width: 460px;
    }

    .ficha__header .corner--tl,
    .ficha__header .corner--tr {
        width: 46px;
        height: 46px;
        top: 26px;
    }

    .ficha__header .corner--tl {
        left: 26px;
    }

    .ficha__header .corner--tr {
        right: 26px;
    }

    .header__topline {
        top: 26px;
        max-width: 460px;
    }

    /* Dos columnas + divisor central punteado */
    .ficha__body {
        flex-direction: row;
        align-items: stretch;
        padding: 10px 48px 40px;
        gap: 0;
    }

    .col--left {
        flex: 0 0 43%;
        max-width: 43%;
        padding-right: 30px;
    }

    .col--right {
        flex: 1;
        padding-left: 40px;
    }

    /* Divisor vertical de rombos */
    .col-divider {
        flex: 0 0 40px;
        width: 40px;
        height: auto;
        align-self: stretch;
        margin: 10px 0;
        background-image: url('../img/rombo-tile.png');
        background-size: 40px 40px;
        background-position: center;
        background-repeat: repeat-y;
    }

    .rombo-row {
        margin-left: 48px;
        margin-right: 48px;
    }

    .bottle {
        padding-top: 20px;
    }

    .bottle__img {
        max-width: 82%;
        max-height: 560px;
    }

    .story {
        padding-top: 30px;
    }

    .story__title-top {
        font-size: 2.5rem;
    }

    .story__title-script {
        font-size: 3.4rem;
    }

    .story p {
        font-size: 1rem;
    }

    .product__name {
        font-size: 1.55rem;
    }

    .sense-card p,
    .footer-box__right p {
        font-size: 1rem;
    }

    .specs__row dt,
    .specs__row dd {
        font-size: 0.95rem;
    }
}

/* ============================================================
   DESKTOP (>= 1000px) — texto un poco más grande en todo
   ============================================================ */
@media (min-width: 1000px) {
    .story p {
        font-size: 1.1rem;
    }

    .product__name {
        font-size: 1.75rem;
    }

    .product__age {
        font-size: 1.35rem;
    }

    .product__origin {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .sense-card__title {
        font-size: 1.1rem;
    }

    .sense-card p,
    .footer-box__right p {
        font-size: 1.08rem;
    }

    .specs__row dt,
    .specs__row dd {
        font-size: 1.05rem;
    }

    .story__title-top {
        font-size: 2.8rem;
    }

    .story__title-script {
        font-size: 3.8rem;
    }

    .footer-box__quote {
        font-size: 1.1rem;
    }
}

/* ============================================================
   DESKTOP GRANDE (>= 1100px)
   ============================================================ */
@media (min-width: 1100px) {
    .product__name {
        font-size: 1.7rem;
    }
}

/* ============================================================
   Efecto de aparición (JS)
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ============================================================
   MODAL VERIFICACIÓN DE EDAD — mobile first
   ============================================================ */
.age-gate {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background-color: rgba(20, 24, 22, 0.75);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    overflow-y: auto;
}

.age-gate[hidden] {
    display: none;
}

.age-gate__dialog {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 420px;
    background-color: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    animation: ageGateIn .45s ease both;
}

@keyframes ageGateIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Imagen (arriba en mobile) */
.age-gate__media {
    width: 100%;
    height: 240px;
}

.age-gate__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Contenido */
.age-gate__content {
    padding: 28px 24px 32px;
    text-align: center;
}

.age-gate__title {
    font-family: var(--mono);
    font-weight: bold;
    font-style: italic;
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.2;
}

.age-gate__subtitle {
    font-size: 0.98rem;
    color: var(--muted);
    margin-bottom: 24px;
}

.age-gate__actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.age-gate__btn {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.25;
    padding: 16px 18px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, transform .15s ease;
}

.age-gate__btn:active {
    transform: translateY(1px);
}

.age-gate__btn--deny {
    background-color: #fff;
    color: var(--dark);
    border: 1.5px solid #d8d8d8;
}

.age-gate__btn--deny:hover {
    background-color: #f5f5f5;
}

.age-gate__btn--confirm {
    background-color: #1d5cff;
    color: #fff;
    border: 1.5px solid #1d5cff;
}

.age-gate__btn--confirm:hover {
    background-color: #164ad1;
    border-color: #164ad1;
}

.age-gate__legal {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.5;
}

/* Estado de rechazo (menor de edad) */
.age-gate__message {
    font-size: 0.98rem;
    color: var(--dark);
    line-height: 1.55;
    margin-bottom: 24px;
    animation: ageGateIn .4s ease both;
}

/* Evitar scroll del fondo cuando el modal está abierto */
body.age-gate-open {
    overflow: hidden;
}

/* ---------- Desktop: imagen a la izquierda, contenido a la derecha ---------- */
@media (min-width: 760px) {
    .age-gate__dialog {
        flex-direction: row;
        max-width: 860px;
        min-height: 520px;
    }

    .age-gate__media {
        flex: 0 0 47%;
        max-width: 47%;
        height: auto;
    }

    .age-gate__content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 48px 44px;
        text-align: center;
    }

    .age-gate__actions {
        flex-direction: row;
        justify-content: center;
        gap: 18px;
    }

    .age-gate__btn {
        flex: 1;
        max-width: 220px;
    }

    .age-gate__title {
        font-size: 1.6rem;
    }
}
