/* ============================================================
   aisea — Exemple 1 "Arxiu"
   Estil editorial clar, inspirat en webs d'artista tipus galeria.
   Un sol fitxer d'estils per a les 3 versions d'idioma.
   ============================================================ */

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

:root {
    --bg: #fbfaf8;
    --ink: #14131a;
    --ink-soft: #6b6976;
    --ink-faint: #9a98a6;
    --line: #e4e2dc;
    --accent: #120a8f;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

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

/* ---------- Contenidor ---------- */
.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---------- Barra de dalt ---------- */
header {
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: rgba(251, 250, 248, 0.92);
    backdrop-filter: blur(8px);
    z-index: 50;
}
.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem 0;
}
.brand {
    text-decoration: none;
    color: var(--ink);
    line-height: 1.1;
    margin-left: 2.5rem;   /* una mica cap al centre */
}
.brand b {
    display: block;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}
/* logo dibuixat (logo.jpg): el blanc es fon amb el fons */
.brand-logo {
    display: block;
    height: 4.2rem;
    width: auto;
    mix-blend-mode: multiply;
}
.brand span {
    display: block;
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-top: 0.15rem;
}

nav.menu { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }

/* Botó del menú hamburguesa: només es veu al mòbil */
.burger {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    /* 19-10-2026: minimalista, sense cercle ni halo: només els tres puntets (::after). Copia del cercle blanc d'abans a
       /home/aisea/copia-boton-menu-circulo/. Truc: en tocar, apareix un cercle gris molt suau que s'apaga sol i els puntets
       s'arrauleixen un instant; obert, el cercle suau es queda i els puntets es tornen una X (::before). */
    background: transparent;
    transition: background .35s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;   /* sense el requadre que pinta el mòbil en tocar */
    outline: none;
}
.burger::before,
.burger::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    transition: transform .45s cubic-bezier(.4, 0, .2, 1), opacity .3s ease;
}
.burger::after {
    /* 14-10-2026: tres puntets grisos en vertical (símbol de menú) */
    --dot: radial-gradient(circle, #3a3a3f 0 1.9px, transparent 2.4px);
    background: var(--dot) center calc(50% - 6.5px) / 6px 6px no-repeat, var(--dot) center / 6px 6px no-repeat, var(--dot) center calc(50% + 6.5px) / 6px 6px no-repeat;
}
.burger:active { background: rgba(58, 58, 62, 0.08); transition-duration: .05s; }
.burger:active::after { transform: scale(.82); transition-duration: .12s; }
.bar.open:not(.closing) .burger { background: rgba(58, 58, 62, 0.06); }
/* 19-10-2026: en obrir el menú, els puntets giren i s'apaguen i apareix una X girant (::before, una creu girada 45°) */
.burger::before {
    --bar: linear-gradient(#3a3a3f, #3a3a3f);
    background: var(--bar) center / 17px 1.6px no-repeat, var(--bar) center / 1.6px 17px no-repeat;
    opacity: 0;
    transform: rotate(-45deg) scale(.3);
}
.bar.open:not(.closing) .burger::after { opacity: 0; transform: rotate(90deg) scale(.3); }
.bar.open:not(.closing) .burger::before { opacity: 1; transform: rotate(45deg) scale(1); }
@media (prefers-reduced-motion: reduce) { .burger::before, .burger::after { transition: none; } }
.burger span { display: none; }
.burger:focus-visible { outline: 2px solid #8a8a90; outline-offset: 4px; border-radius: 999px; }
nav.menu a {
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    transition: color .25s, background .25s;
    white-space: nowrap;
}
nav.menu a:hover { color: var(--ink); }
nav.menu a.on {
    background: var(--ink);
    color: var(--bg);
}

.langs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 0.6rem;
    padding-left: 1rem;
    border-left: 1px solid var(--line);
}
.langs a {
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--ink-faint);
    transition: color .25s;
}
.langs a:hover, .langs a.on { color: var(--accent); }

/* ---------- Capçalera de secció ---------- */
.sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 2.6rem 0 1rem;
    border-bottom: 1px solid var(--line);
}
.sec-head h1, .sec-head h2 {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
.sec-head .note {
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* ---------- Obra gran ---------- */
.work { padding: 3rem 0 4rem; border-bottom: 1px solid var(--line); }
.work-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.8rem;
}
.work-head h3 {
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}
.work-head .tag {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faint);
}
.canvas {
    margin: 0 auto;
    max-width: 760px;
    cursor: zoom-in;
}
.canvas img {
    width: 100%;
    background: #eceae4;
}
.placeholder {
    aspect-ratio: 4 / 5;
    background: repeating-linear-gradient(135deg, #f0eee8 0 14px, #eae7e0 14px 28px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-faint);
    font-size: 0.66rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: center;
    padding: 2rem;
}
.work-foot {
    max-width: 760px;
    margin: 1.1rem auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.work-meta {
    font-size: 0.8rem;
    color: var(--ink-soft);
    font-style: italic;
}
.zoom-hint { display: none; }   /* «Click to enlarge» amagat per sempre (06-10-2026) */

/* ---------- Botons ---------- */
.btn {
    display: inline-block;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 0.85rem 1.7rem;
    border: 1px solid var(--ink);
    color: var(--ink);
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    transition: background .25s, color .25s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.solid:hover { background: var(--ink); border-color: var(--ink); }

/* ---------- Graella de col·leccions ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2.2rem 1.8rem;
    padding: 2.8rem 0 4rem;
}
.tile { text-decoration: none; color: inherit; display: block; }
.tile .shot {
    background: #eceae4;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}
.tile .shot img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}
.tile:hover .shot img { transform: scale(1.04); }
.tile h4 {
    margin-top: 0.9rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.tile p {
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-top: 0.15rem;
}
.state {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 0.28rem 0.6rem;
    border: 1px solid var(--line);
    color: var(--ink-soft);
}
.state.free { border-color: var(--accent); color: var(--accent); }

/* ---------- Text llarg ---------- */
.prose { max-width: 620px; padding: 3rem 0 4rem; }
.prose p { color: var(--ink-soft); margin-bottom: 1.2rem; font-size: 0.98rem; }
.prose p.lead { color: var(--ink); font-size: 1.15rem; line-height: 1.55; }

/* ---------- Llistes tipus CV ---------- */
.cv { padding: 2.6rem 0 1rem; }
.cv h3 {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 1rem;
}
.cv ul { list-style: none; margin-bottom: 2.6rem; }
.cv li {
    display: flex;
    gap: 1.5rem;
    padding: 0.85rem 0;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
}
.cv li:last-child { border-bottom: 1px solid var(--line); }
.cv li .year {
    flex: 0 0 4.5rem;
    color: var(--ink-faint);
    font-variant-numeric: tabular-nums;
    font-size: 0.82rem;
}
.cv li .what { color: var(--ink-soft); }

/* ---------- Formulari ---------- */
.form { max-width: 560px; padding: 2.8rem 0 4rem; }
.field { margin-bottom: 1.4rem; }
.field label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 0.5rem;
}
.field input, .field textarea, .field select {
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    padding: 0.8rem 0.9rem;
    outline: none;
    transition: border-color .25s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field textarea { min-height: 140px; resize: vertical; }
.form small {
    display: block;
    margin-top: 1rem;
    font-size: 0.78rem;
    color: var(--ink-faint);
    line-height: 1.6;
}

/* ---------- Contacte (/contact/, /es/contacto/) ---------- */
.contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
    padding: 3.4rem 0 4.5rem;
    align-items: start;
}
.contact-title { font-size: 2rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 2.2rem; }
.contact-intro { color: var(--ink-soft); font-size: 0.98rem; margin: 1rem 0 2.2rem; max-width: 440px; }
.contact-item { padding: 1rem 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.3rem; }
.contact-item:last-of-type { border-bottom: 1px solid var(--line); }
.contact-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faint);
}
.contact-mail, .contact-ig {
    color: var(--ink);
    text-decoration: none;
    font-size: 1.05rem;
    word-break: break-word;
    transition: color .25s;
}
.contact-mail:hover, .contact-ig:hover { color: var(--accent); }
.ig-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-top: 1.6rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    transition: color .25s, border-color .25s, transform .25s;
}
.ig-logo:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
/* Logos d'Instagram i correu a baix al centre (Selected works i About, fora de <main>) */
.social-row { display: flex; justify-content: center; gap: 1.1rem; padding: 3.2rem 0 2.6rem; }
.social-row .ig-logo { margin-top: 0; }
.contact-form { padding: 0; max-width: none; }
.contact-form textarea { min-height: 180px; }

/* ---------- Butlletí ---------- */
.dispatch {
    border: 1px solid var(--line);
    background: #fff;
    padding: 2.4rem;
    margin: 3rem 0 4rem;
    max-width: 560px;
}
.dispatch .kicker {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
}
.dispatch h3 { font-size: 1.6rem; font-weight: 500; margin: 0.6rem 0 0.7rem; letter-spacing: -0.02em; }
.dispatch p { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 1.4rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }   /* casella trampa per als robots */
.form-msg { margin: 1rem 0 0; font-size: 0.85rem; color: var(--ink-soft); }
.dispatch .form-msg { margin: 1rem 0 0; }
.form-msg.ok { color: var(--accent); font-weight: 600; }

/* ---------- Blocs afegits amb l'editor ---------- */
.zone:not(:empty) { padding: 2.4rem 0 3rem; border-bottom: 1px solid var(--line); }
.blk + .blk { margin-top: 2rem; }
.blk-heading h2 {
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}
.blk-text { max-width: 620px; }
.blk-text p { color: var(--ink-soft); margin-bottom: 1.2rem; font-size: 0.98rem; }
.blk-text p:last-child { margin-bottom: 0; }
.blk-image .canvas { max-width: 760px; }
.blk-image.blk-m .canvas { max-width: 440px; }
.blk-image figcaption {
    display: block;
    max-width: 760px;
    margin: 1.1rem auto 0;
}
.blk-image.blk-m figcaption { max-width: 440px; }

/* ---------- Peu ---------- */
footer {
    border-top: 1px solid var(--line);
    padding: 2.5rem 0 3.5rem;
    font-size: 0.72rem;
    color: var(--ink-faint);
    letter-spacing: 0.06em;
}
.foot-row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
footer a { color: var(--ink-soft); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* ---------- Lightbox ---------- */
.lb {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 19, 26, 0.94);
    z-index: 200;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    padding: 3rem 1.5rem;
}
.lb.on { display: flex; }
.lb img { max-width: 92vw; max-height: 82vh; object-fit: contain; }
.lb .cap {
    display: none;   /* sense peu de foto a la imatge ampliada */
    position: fixed;
    bottom: 1.8rem; left: 50%;
    transform: translateX(-50%);
    color: #e9e7e1;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-align: center;
    padding: 0 1.5rem;
}
.lb .x {
    position: fixed;
    top: 1.2rem; right: 1.8rem;
    color: #e9e7e1;
    font-size: 2rem;
    line-height: 1;
    font-weight: 300;
}

/* ---------- Textos col·locats amb l'editor (About): mida, amplada, posició i alineació ---------- */
.prose.tx-wide { max-width: none; }
.prose.tx-wide > :not(.tx-pos) { max-width: 620px; }
.tx-pos {
    width: calc(var(--tx-w, 100) * 1%);
    max-width: none;
    margin-left: calc(var(--tx-x, 0) * 1%);
    padding-top: calc(var(--tx-y, 0) * 1px);
}
.blk-image.tx-pos .canvas, .blk-image.tx-pos figcaption { max-width: none; }
.tx-row { display: flex; align-items: flex-start; gap: 2rem; }
.tx-row > .blk { flex: 0 1 auto; min-width: 0; }
.tx-row > .blk + .blk { margin-top: 0; }
.tx-row + .blk, .blk + .tx-row, .tx-row + .tx-row { margin-top: 2rem; }
.tx-gone { display: none; }
.tx-al-c { text-align: center; }
.tx-al-r { text-align: right; }
main .tx-pos.tx-l, main .tx-pos.tx-l p { color: var(--ink); font-size: 1.15rem; line-height: 1.55; }
main .tx-pos.tx-m, main .tx-pos.tx-m p { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.6; }
main .tx-pos.tx-s, main .tx-pos.tx-s p { color: var(--ink-soft); font-size: 0.82rem; line-height: 1.6; }
main .tx-pos.tx-fs, main .tx-pos.tx-fs p, main .tx-pos.tx-fs h2 { font-size: calc(var(--tx-fs) * 1rem); line-height: 1.45; }
@media (max-width: 820px) {
    /* al mòbil no hi ha lloc per moure'l als costats: ocupa tot l'ample */
    .tx-pos { width: auto; margin-left: 0; padding-top: calc(var(--tx-y, 0) * 0.5px); }
    .tx-row { flex-direction: column; align-items: stretch; }
}

/* ---------- Llenç lliure (About), com a Canva: cada cosa on s'ha deixat ----------
   Mides en % de l'amplada del llenç (cqw), així el disseny es veu igual a qualsevol pantalla gran. */
.cvs-zone { container: cvz / inline-size; }
.cvs { position: relative; container-type: inline-size; }
.cvs > .cv-el {
    position: absolute;
    left: calc(var(--x, 0) * 1%);
    top: calc(var(--y, 0) * 1cqw);
    width: calc(var(--w, 40) * 1%);
    max-width: none;
    margin: 0;
    opacity: var(--o, 1);
    transform: rotate(calc(var(--r, 0) * 1deg));
}
.cv-el.blk-text, .cv-el.blk-heading { font-size: calc(var(--fs, 1.5) * 1cqw); color: var(--ink-soft); line-height: 1.45; }
.cv-el.blk-heading { color: var(--ink); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.cv-el h2, .cv-el p { font: inherit; color: inherit; letter-spacing: inherit; }
.cv-el p { margin: 0 0 0.7em; white-space: pre-wrap; }   /* respeta los espacios al principio de los párrafos */
.cv-el p:last-child { margin-bottom: 0; }
.cvs > .cv-el .canvas, .cvs > .cv-el figcaption { max-width: none; margin: 0; }
.cv-el figcaption { margin-top: 0.6rem; }
.cv-el.blk-shape { height: calc(var(--h, 10) * 1cqw); }
.cv-el.blk-circle { border-radius: 50%; }
@container cvz (max-width: 700px) {
    /* al mòbil: una cosa sota l'altra, de dalt a baix (a l'editor, amb «Ver en móvil») */
    /* fotos centrades al mòbil (els textos fan tota l'amplada i van com a l'ordinador) */
    body:not(.ed-on) .cvs, .cv-phone .cvs { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; height: auto !important; }
    body:not(.ed-on) .cvs > .cv-el, .cv-phone .cvs > .cv-el { position: static; width: 100%; transform: none; }
    body:not(.ed-on) .cvs > .cv-el.blk-image, .cv-phone .cvs > .cv-el.blk-image { width: min(100%, calc(var(--w, 40) * 2%)); }
    body:not(.ed-on) .cv-el.blk-text, .cv-phone .cv-el.blk-text { font-size: clamp(0.9rem, calc(var(--fs, 1.5) * 11px), 1.25rem); }
    body:not(.ed-on) .cv-el.blk-heading, .cv-phone .cv-el.blk-heading { font-size: clamp(1.2rem, calc(var(--fs, 2.9) * 11px), 2.4rem); }
    body:not(.ed-on) .cv-el.blk-shape, .cv-phone .cv-el.blk-shape { display: none; }
}

/* ---------- Mòbil ---------- */
@media (max-width: 820px) {
    .wrap { padding: 0 1.2rem; }
    /* menú hamburguesa: el botó obre i tanca el menú a sota de la barra (script.js) */
    .bar { flex-wrap: wrap; gap: 0; padding: 0.9rem 0; }
    .brand { margin-left: 0.9rem; }
    .brand-logo { height: 3.3rem; }
    .burger { display: flex; margin-right: 0.9rem; }   /* (un pèl cap al centre, com el logo a l'altra banda) */
    /* 08-10-2026: el menú s'obre per sobre de la pàgina (no l'empeny cap avall), com una targeta amb marge als costats */
    nav.menu {
        display: none;
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 1.2rem;
        right: 1.2rem;
        z-index: 60;
        flex-direction: column;
        align-items: stretch;
        gap: 0.3rem;
        padding: 0.6rem;
        background: rgba(251, 250, 248, 0.97);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border: 1px solid var(--line);
        border-radius: 16px;
        box-shadow: 0 18px 40px -18px rgba(20, 19, 26, 0.35);
    }
    .bar.open nav.menu { display: flex; }
    nav.menu a { padding: 0.85rem 1rem; font-size: 0.72rem; border-radius: 10px; text-align: left; }
    nav.menu a:not(.on):hover { background: var(--line); }
    .langs { margin-left: 0; padding: 0.6rem 1rem 0; border-left: 0; border-top: 1px solid var(--line); }
    .work-head { flex-direction: column; gap: 0.3rem; }
    .work-head h3 { font-size: 1.15rem; }
    .grid { grid-template-columns: 1fr 1fr; gap: 1.6rem 1rem; }
    .dispatch { padding: 1.6rem; }
    .contact { grid-template-columns: 1fr; gap: 2.4rem; padding: 2.4rem 0 3.4rem; }
    .contact-title { font-size: 1.6rem; }
    header { position: relative; }   /* (no és fixa; el menú obert es col·loca a sota d'aquí) */
}
@media (max-width: 420px) {
    .grid { grid-template-columns: 1fr; }
}
