/* ===========================================================
   FROSI — Diseño web / UX-UI
   Tipografías: Bricolage Grotesque (display) + Montserrat (UI)
   =========================================================== */

:root {
    --cream: #FFFBE9;
    --navy: #1E1E2D;
    --navy-soft: #26243A;
    --gold: #D2A876;
    --gold-dark: #B98F52;
    --ink: #1E1E2D;
    --ink-muted: rgba(29, 28, 43, 0.62);
    --paper-icon: #F5F1DE;
    --paper-muted: rgba(245, 241, 222, 0.62);
    --paper-line: rgba(245, 241, 222, 0.18);
    --ink-line: rgba(29, 28, 43, 0.15);

    --display: "Bricolage Grotesque", "Montserrat", "DM Sans", sans-serif;
    --body: "Montserrat", sans-serif;

    --container: 1500px;
    --pad: clamp(24px, 6vw, 96px);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100%;
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* Oculta contenido visualmente pero lo deja accesible para lectores de pantalla y buscadores */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding-left: var(--pad);
    padding-right: var(--pad);
}

h1,
h2,
h3 {
    font-family: var(--display);
    margin: 0;
    line-height: 0.92;
    letter-spacing: -0.01em;
}

.eyebrow h3 {
    font-family: var(--body);
    font-weight: 900;
    font-size: 25px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.3em;
}

#hago, #como {
    scroll-margin-top: 180px;
}

#hice, #contacto {
    scroll-margin-top: 130px;
}

/* ============ HEADER ============ */
.site-header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 50;
    background: var(--cream);
    border-bottom: 1px solid var(--ink-line);
    opacity: 95%;
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 82px;
}

.logo-link {
    display: flex;
}

.logo {
    display: flex;
    align-items: center;
    color: var(--ink);
}

.logo svg {
    height: 40px;
    width: auto;
    display: block;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: clamp(18px, 3vw, 40px);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.main-nav a {
    opacity: .85;
    transition: opacity .2s ease;
}

.main-nav a:hover {
    opacity: 1;
    color: var(--gold-dark);
}

.lang-switch {
    font-size: 11px;
    opacity: .85;
    border-left: 1px solid var(--ink-line);
    padding-left: clamp(18px, 3vw, 40px);
    line-height: 1.3;
    text-align: center;
    letter-spacing: 0.05em;
}

.lang-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: 700;
    letter-spacing: inherit;
    color: inherit;
    opacity: .4;
    cursor: pointer;
    transition: opacity .2s ease;
}

.lang-btn:hover {
    opacity: .75;
}

.lang-btn.is-active {
    opacity: 1;
    color: var(--gold-dark);
}

/* Botón hamburguesa (solo visible en mobile, ver media query) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    margin-left: 12px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    transition: transform .25s ease, opacity .25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Panel del menú móvil: navegación + selector de idioma juntos */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--cream);
    border-bottom: 1px solid var(--ink-line);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}

.mobile-nav.is-open {
    max-height: 420px;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 8px var(--pad) 0;
}

.mobile-nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--ink-line);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mobile-lang-switch {
    padding: 18px var(--pad) 24px;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.mobile-lang-switch .lang-btn {
    font-weight: 700;
}

/* Toggle de idioma: bloques con markup propio por idioma (ej. la palabra "Diseño"/"Design") */
[data-lang="es"] .lang-en {
    display: none;
}

[data-lang="en"] .lang-es {
    display: none;
}

/* ============ HERO ============ */
.hero {
    background: var(--navy);
    color: var(--cream);
    padding: calc(82px + clamp(48px, 8vw, 88px)) 0 clamp(56px, 9vw, 96px);
}

.hero .wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    flex-wrap: nowrap;
}

.hero-title-wrap {
    position: relative;
    min-width: 0;
    flex: 1 1 auto;
}

.hero-flip {
    position: relative;
    display: block;
    max-width: 100%;
    cursor: default;
}

.hero-flip .stack-inner {
    display: grid;
    justify-items: center;
    align-items: end;
    max-width: 100%;
}

.hero-flip .stack-inner > span {
    grid-area: 1/1;
    max-width: 100%;
    opacity: 0;
    transform: translateY(14px) scale(0.96);
    transition: opacity 1.5s ease, transform 1.5s ease;
    pointer-events: none;
}

.hero-flip .stack-inner > span.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hero-word-img {
    display: block;
    height: clamp(48px, 11vw, 128px);
    width: auto;
    max-width: 100%;
}

.hero-copy {
    font-family: 'Bricolage Grotesque', sans-serif;
    width: 0 0 300px;
    max-width: 300px;
    padding-bottom: 10px;
}

.hero-copy p {
    margin: 0 0 22px;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--cream);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--cream);
    border-radius: 999px;
    padding: 13px 26px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cream);
    background: transparent;
    transition: background .25s ease, color .25s ease;
    cursor: pointer;
    transition: transform .3s ease;
}

.btn:hover {
    transform: scale(1.08);
    border-color: var(--gold);
}

.btn-dark {
    border-color: var(--ink);
    color: var(--ink);
}

/* ============ INTRO / SWIRL ============ */
.intro {
    position: relative;
    background: var(--cream);
    padding: clamp(100px, 15vw, 150px) 0 clamp(60px, 20vw, 200px);
    overflow: hidden;
}

.intro .wrap {
    position: relative;
    z-index: 2;
}

.intro-copy {
    max-width: 610px;
}

.intro-copy h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(26px, 2.5vw, 30px);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 30px;
    line-height: 40px;
}

.intro-copy .lead {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-style: italic;
    font-size: clamp(18px, 1.5vw, 25px);
    letter-spacing: 0.05em;
    line-height: 1.4;
    max-width: 460px;
    margin: 0 0 30px;
}

.intro-copy .fine {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 300;
    font-size: clamp(15px, 1.3vw, 18px);
    letter-spacing: 0.05em;
    line-height: 1.5;
    color: var(--navy);
    max-width: 420px;
    margin: 0;
}

.swirl-stage {
    position: absolute;
    z-index: 1;
    top: clamp(-400px, -25vw, 400px);
    left: 40%;
    width: clamp(800px, 90vw, 1200px);
    aspect-ratio: 1600 / 1700;
    pointer-events: none;
}

.swirl-stage svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* ============ QUE HAGO ============ */

hr {
    height: .8px;
    margin: 20px 0;
    border: none;
    background: var(--cream);
}

.section-dark {
    background: var(--navy);
    color: var(--cream);
}

.services {
    position: relative;
    padding: clamp(50px, 6vw, 70px) 0 clamp(110px, 14vw, 170px);
}

/* .services-heading y .how-title son el mismo título "flotante": se agrupan
   junto con .made-heading / .contact-heading que llevan el mismo tratamiento
   tipográfico un poco más abajo, adaptado a su contenedor sin .wrap */
.services-heading,
.how-title {
    position: absolute;
    left: 0;
    right: 0;
    top: -81.5px;
    z-index: 2;
    pointer-events: none;
}

.services-heading h2,
.how-title h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(60px, 10vw, 100px);
    font-weight: 900;
    color: var(--gold);
}

.services .wrap {
    display: grid;
    grid-template-columns: 0.9fr 1.6fr;
    gap: 40px;
    align-items: start;
}

.title-block h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(46px, 7vw, 72px);
    font-weight: 900;
    color: var(--gold);
}

.service-item {
    border-bottom: 1px solid var(--cream);
}

.service-row {
    display: grid;
    grid-template-columns: 46px 40px 150px 1fr 28px;
    align-items: center;
    gap: 10px;
    padding: 30px 0;
    width: 100%;
    border: none;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.service-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
    background-color: #29294c;
    border-radius: 5px 5px 0 0;
}

.service-panel p {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--cream);
    margin: 0 0 10px;
    max-width: 640px;
    padding: 20px;
}

.service-panel-tag {
    display: block;
    margin: 0 0 26px 86px;
    font-family: var(--body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
}

.service-row[aria-expanded="true"] .plus {
    transform: rotate(45deg);
}

.service-row .num {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--cream);
}

.service-row .icon {
    width: 25px;
    height: 25px;
}

.service-row .stitle {
    font-size: 16px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: right;
    padding-right: 10px;
}

.service-row .sdesc {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--cream);
}

.service-row .plus {
    font-size: 25px;
    font-weight: 300;
    text-align: right;
    color: var(--gold);
    transition: transform .25s ease;
}

/* ============ COMO LO HAGO ============ */
.how {
    position: relative;
    background: var(--cream);
    padding: clamp(70px, 11vw, 120px) 0 clamp(60px, 9vw, 96px);
}

.how-title h2 .line-dark {
    color: var(--gold);
}

.how-steps {
    margin-top: clamp(36px, 6vw, 64px);
    display: flex;
    align-items: flex-start;
}

.step {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
}

.step-arrow {
    flex: 0 0 auto;
    width: clamp(30px, 3.6vw, 48px);
    margin: 52px 40px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
}

.step-arrow svg {
    width: 100%;
    height: auto;
    display: block;
}

.step .step-num {
    font-family: 'DM Sans', sans-serif;
    font-weight: 200;
    font-size: 45px;
    color: var(--ink);
    margin-bottom: 6px;
}

.step .step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.step p {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 300;
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    margin: 0;
    max-width: 220px;
}

/* ============ QUE HICE ============ */
.made {
    background: var(--ink);
    padding-top: clamp(36px, 5vw, 56px);
}

.made-title {
    background: var(--navy);
    position: relative;
}

.made-title .wrap {
    padding-top: clamp(86px, 12vw, 130px);
    position: relative;
}

/* .made-heading y .contact-heading comparten el mismo tratamiento de título
   "flotante" superpuesto entre secciones (misma tipografía, tamaño y posición) */
.made-heading,
.contact-heading {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 2;
    pointer-events: none;
    max-width: var(--container);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--pad);
    padding-right: var(--pad);
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(60px, 10vw, 100px);
    font-weight: 900;
}

.made-heading {
    top: -138px;
}

.contact-heading {
    top: -81.5px;
}

.made-heading .top,
.made-heading .bottom {
    color: var(--gold);
    display: block;
}

.made-head-row {
    display: flex;
    justify-content: flex-end;
}

.made-badge {
    text-align: right;
    color: var(--cream);
}

.made-badge .b1 {
    font-style: italic;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.02em;
}

.made-badge .b2 {
    font-style: italic;
    font-size: 15px;
    color: var(--cream);
    margin-top: 2px;
}

.brands {
    background: var(--navy);
    padding: clamp(30px, 5vw, 46px) 0 clamp(50px, 8vw, 80px);
}

.brands .eyebrow {
    color: var(--gold);
    margin-bottom: 50px;
    width: 40%;
}

.brand-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
}

.brand-logo {
    height: clamp(50px, 6vw, 70px);
    width: auto;
    max-width: 130px;
    object-fit: contain;
    filter: none;
}

.brand-logo--round {
    height: clamp(56px, 6vw, 76px);
    border-radius: 50%;
}

.experience {
    background: var(--navy);
    padding-bottom: clamp(60px, 10vw, 100px);
}

.experience .eyebrow {
    color: var(--gold);
    width: 30%;
    margin-bottom: 50px;
}

.experience h3 {
    font-family: var(--body);
    font-weight: 900;
    font-size: 25px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 20px;
    line-height: 1.3em;
}

.card-row {
    display: flex;
    gap: 18px;
    margin-bottom: 18px;
}

.card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    border-radius: 18px;
    flex: 1;
    overflow: hidden;
    transition: opacity .25s ease;
}

.card:hover {
    opacity: .82;
}

/* Placeholder: reemplazar por una <img> con la foto real de cada proyecto (ver comentario en el HTML) */
.card-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--ink-muted);
    opacity: .4;
}

.card-placeholder svg {
    width: 30px;
    height: 30px;
}

.card-title {
    font-family: var(--body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-row.row1 {
    height: clamp(180px, 26vw, 300px);
}

.card-row.row2 {
    height: clamp(150px, 22vw, 250px);
}

.card-row.row1 .c1 {
    flex: 2.3;
}

.card-row.row1 .c2 {
    flex: 1;
}

.card-row.row1 .c3 {
    flex: 2.5;
}

.card-row.row2 .c4 {
    flex: 1;
}

.card-row.row2 .c5 {
    flex: 2.5;
}

.card-row.row2 .c6 {
    flex: 2.3;
}

/* ============ CONTACT ============ */
.contact {
    background: var(--cream);
}

.contact-title {
    background: var(--navy);
    height: clamp(64px, 8vw, 96px);
}

.contact-body {
    position: relative;
    padding: clamp(100px, 12vw, 150px) 0 clamp(60px, 9vw, 100px);
}

.contact-heading .top-line,
.contact-heading .bottom-line {
    color: var(--gold);
    display: block;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
}

.contact-grid::after {
    content: "";
    position: absolute;
    top: 20%;
    bottom: 0;
    left: 60%;
    width: 1px;
    height: 70%;
    background: var(--navy);
}

.contact-side {
    margin: auto;
}

.field {
    margin-bottom: 26px;
}

.field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: var(--ink);
}

.field input {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--ink-line);
    background: transparent;
    padding: 6px 0 10px;
    font-family: var(--body);
    font-size: 14px;
    color: var(--ink);
}

.field input:focus {
    outline: none;
    border-bottom-color: var(--gold-dark);
}

.field select {
    width: 100%;
    padding: 12px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--ink-line);
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
}

.field select:hover {
    cursor: pointer;
}

.field select:focus {
    outline: none;
    border-bottom-color: var(--ink);
}

.field select option {
    background: var(--cream);
    color: var(--ink);
    border-radius: 5px;
    border: 2px var(--ink-line) solid;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.field textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid var(--ink-line);
    border-radius: 14px;
    background: transparent;
    padding: 14px 16px;
    font-family: var(--body);
    font-size: 13.5px;
    resize: vertical;
}

.field textarea:focus {
    outline: none;
    border-color: var(--gold-dark);
}

.contact-side p {
    font-size: 13px;
    margin: 0 0 20px;
    color: var(--ink-muted);
}

.contact-side .link-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 16px;
}

.contact-side .link-row svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ============ FOOTER ============ */
.site-footer {
    background: var(--navy);
    color: var(--cream);
    padding: 30px 0;
    text-align: center;
}

.site-footer p {
    margin: 0 0 16px;
    font-size: 13px;
    letter-spacing: 0.02em;
}

.ig-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--paper-line);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.ig-circle svg {
    width: 18px;
    height: 18px;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {

    .services-heading,
    .how-title {
        top: -49px;
    }
    
    .contact-heading {
        top: -41px;
        font-size: clamp(50px, 8vw, 80px);
    }
    
    .made-heading {
        top: -77px;
        font-size: clamp(50px, 8vw, 80px);
    }
    

    .services .wrap {
        grid-template-columns: 1fr;
    }

    .service-row {
        grid-template-columns: 32px 32px 1fr 20px;
        grid-template-areas: "num icon title plus""num icon desc plus";
    }
    
    .service-row .stitle {
        text-align: left;
    }

    .service-row .sdesc {
        grid-column: 3;
    }

    .service-panel-tag {
        margin-left: 64px;
    }

    .how-steps {
        flex-wrap: wrap;
        row-gap: 34px;
        justify-content: center;
        text-align: center;
    }

    .step {
        flex: 1 1 40%;
        min-width: 200px;
    }
    
    .step p {
        width: 80%;
        max-width: 80%;
        margin: auto;
    }
    
    .step .step-title {
        justify-content: center;
    }
    
    .step-arrow {
        width: auto;
        margin: 20px 0;
    }

    .step-arrow svg {
        rotate: 90deg;
        height: 15px;
    }

    .intro {
        display: flex;
        flex-direction: column;
        min-height: 0;
        padding: 50px 0 100px;
    }

    .intro .wrap {
        order: 2;
    }

    .intro-copy {
        max-width: 100%;
    }

    .swirl-stage {
        display: none;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid::after {
        width: 85%;
        height: 1px;
        top: 70%;
        left: 6%;
    }

    .contact-side {
        margin: 80px 0 0;
    }
    
    .experience .eyebrow, .brands .eyebrow {
        width: 95%
    }
}

@media (max-width: 640px) {
    .main-nav,
    .lang-switch {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .mobile-nav {
        display: flex;
    }

    .hero .wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-title-wrap {
        flex: 0 0 auto;
        width: 100%;
    }

    .hero-copy {
        max-width: 100%;
    }

    .card-row {
        flex-direction: column;
        height: auto !important;
    }

    .card-row.row1 .c1,
    .card-row.row1 .c2,
    .card-row.row1 .c3,
    .card-row.row2 .c4,
    .card-row.row2 .c5,
    .card-row.row2 .c6 {
        flex: none;
        height: 140px;
    }

    .field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .brand-row {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
    
    .brand-row img {
        height: 80px;
    }

    .service-row {
        padding: 16px 0;
    }

    .step {
        flex: 1 1 100%;
    }
    
    .contact-grid::after {
        top: 73%;
    }
}
