/* ============================================
   EDUARDO GARCÍA PORTFOLIO — INNER PAGES
   Section pages (fotografia, web, diseno-grafico), project pages, contact, about,
   featured work (trabajos-destacados.html) and the cookie policy (cookies.html).
   Same language as the home and the header: solid black rules (--rule),
   numbers as black blocks, 3px lines, bold black labels, titles in Anybody
   700, solid black buttons that turn red on hover and a red block behind
   hovered links.
   ============================================ */

/* ---- Shared pieces ---- */
/* Numbers (and a few short labels) as black blocks with paper-coloured
   letters, like the home's 01, 02, 03 */
.page-meta__number,
.projects__count,
.projects__link-number,
.project__number,
.project-page__block-title span,
.project-page__related-section,
.gallery__count span,
.cv__title {
    flex: none;
    width: fit-content;
    padding: 4px 7px 3px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    color: var(--color-bg);
    background: var(--color-text);
}

/* Bold black labels, like the home's keywords */
.projects__heading,
.project__year,
.page-meta__label,
.project-page__fact dt,
.project-page__block-title,
.project-page__pager-label,
.figura__pie,
.media__caption,
.contact__heading,
.contact__copy,
.field__label,
.about__fact dt,
.gallery__discipline,
.gallery__count,
.legal-list__tag {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.3;
    text-transform: uppercase;
    color: var(--color-text);
}

/* Titles in the home's typeface */
.page-title,
.projects__link-name,
.project__title,
.project-page__pager-name,
.gallery__title,
.contact__email {
    font-family: var(--font-display);
    font-weight: 700;
    font-stretch: 100%;
    letter-spacing: -0.035em;
    line-height: 1;
}

/* Thick line after a number, like the home's */
.page-meta__line,
.project__line {
    flex: none;
    width: 28px;
    height: 3px;
    background: var(--color-text);
}

/* Links inside text: a thick underline that turns red */
.about__fact dd a,
.cv__note a,
.project-page__fact dd a,
.legal .project-page__block-text a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: text-decoration-color 0.3s ease;
}

.about__fact dd a:hover,
.cv__note a:hover,
.project-page__fact dd a:hover,
.legal .project-page__block-text a:hover {
    text-decoration-color: var(--color-accent);
}

/* ============================================
   SECTION PAGES (fotografia.html, web.html, diseno-grafico.html)
   ============================================ */
.section {
    display: flex;
    min-height: 100vh;
}

/* The section's column from the home, pinned on the left */
.section .hero__column,
.section .hero__column:hover {
    flex: none;
}

.section__intro {
    position: sticky;
    top: 0;
    width: 33.333%;
    height: 100vh;
}

.section__intro .hero__column-inner {
    padding-top: calc(var(--nav-height) + 28px);
    padding-bottom: 28px;
}

/* Same framing as on the home: the drawing starts below the nav */
.section__intro .hero__image {
    top: var(--nav-height);
}

/* ---- Projects ---- */
.projects {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: calc(var(--nav-height) + 40px) clamp(24px, 4vw, 64px) 32px;
    scroll-margin-top: var(--nav-height);
}

.projects__inner {
    max-width: 960px;
}

/* "Proyectos", a thick line and the count, like the side menu's headings */
.projects__header {
    display: flex;
    align-items: center;
    gap: 14px;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.4s forwards;
}

.projects__heading {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 14px;
}

.projects__heading::after {
    content: '';
    flex: 1;
    height: 3px;
    background: var(--color-text);
}

.projects__intro {
    max-width: 30ch;
    margin-top: 20px;
    font-size: clamp(1.25rem, 1.8vw, 1.75rem);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.015em;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.5s forwards;
}

.projects__list {
    display: flex;
    flex-direction: column;
    margin-top: 40px;
    border-top: var(--rule);
    list-style: none;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.6s forwards;
}

/* Hover (or keyboard focus) shows the project's preview; click opens its page.
   The one shown gets a red number and a round black arrow button. */
.projects__link {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 76px;
    padding: 14px 0;
    border-bottom: var(--rule);
    color: var(--color-text);
}

.projects__link-number {
    transition: background-color 0.25s ease, color 0.25s ease;
}

.projects__link.is-active .projects__link-number {
    background: var(--color-accent);
    color: var(--color-text);
}

.projects__link-name {
    font-size: clamp(1.35rem, 2vw, 2rem);
    transition: transform 0.5s var(--ease-out-expo);
}

.projects__link.is-active .projects__link-name {
    transform: translateX(8px);
}

.projects__link-arrow {
    flex: none;
    box-sizing: content-box;
    width: 20px;
    height: 20px;
    margin-left: auto;
    padding: 10px;
    border-radius: 50%;
    background: var(--color-text);
    color: var(--color-bg);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s ease, transform 0.4s var(--ease-out-expo), background-color 0.3s ease, color 0.3s ease;
}

.projects__link-arrow path,
.gallery__arrow path {
    stroke-width: 3.5;
}

.projects__link.is-active .projects__link-arrow {
    opacity: 1;
    transform: translateX(0);
}

.projects__link:hover .projects__link-arrow {
    background: var(--color-accent);
    color: var(--color-text);
    transform: translateX(4px);
}

/* ---- Project preview ---- */
.project {
    display: block;
    margin-top: 40px;
    animation: fadeInUp 0.5s var(--ease-out-expo);
}

.project[hidden] {
    display: none;
}

.project__info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 22px;
}

.project__meta {
    display: flex;
    align-items: center;
    gap: 14px;
}

.project__title {
    font-size: clamp(1.6rem, 2.4vw, 2.4rem);
}

.project__description {
    max-width: 52ch;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* "Ver proyecto" as a black pill; red while the preview is hovered */
.project__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    margin-top: 4px;
    padding: 12px 18px 11px 20px;
    border-radius: 999px;
    background: var(--color-text);
    color: var(--color-bg);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.project:hover .project__cta {
    background: var(--color-accent);
    color: var(--color-text);
}

.project__cta svg {
    transition: transform 0.4s var(--ease-out-expo);
}

.project:hover .project__cta svg {
    transform: translateX(4px);
}

/* ---- Media ----
   Frames for the project's images and videos, with the site's black rule
   (warm paper while they load) */
.media {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    container-type: inline-size;
    background: var(--color-bg-warm);
    border: var(--rule);
}

.media--portrait {
    aspect-ratio: 4 / 5;
}

.media--wide {
    grid-column: 1 / -1;
}

.media__number {
    font-family: var(--font-display);
    font-size: 22cqw;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    color: rgba(26, 26, 26, 0.08);
}

.media__caption {
    position: absolute;
    left: 20px;
    bottom: 16px;
}

/* Real media: an image, video or embedded player put inside .media fills the frame */
.media > img,
.media > video,
.media > iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}

/* Linked previews zoom in a little, like the home's drawings */
.project .media > img,
.gallery__link .media > img {
    transition: transform 0.8s var(--ease-out-expo);
}

.project:hover .media > img,
.gallery__link:hover .media > img {
    transform: scale(1.02);
}

.page-footer {
    margin-top: auto;
    padding-top: 64px;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--color-text);
}

/* ============================================
   INNER PAGES (proyectos, contacto)
   Sheet pinned on the left, like the section column; content on the right
   ============================================ */
.page-aside {
    position: sticky;
    top: 0;
    flex: none;
    display: flex;
    flex-direction: column;
    width: 33.333%;
    height: 100vh;
    padding: calc(var(--nav-height) + 28px) 28px 28px;
    overflow-y: auto;
    border-right: var(--rule);
}

.page-aside > * {
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out-expo) forwards;
}

.page-aside > :nth-child(2) { animation-delay: 0.1s; }
.page-aside > :nth-child(3) { animation-delay: 0.2s; }
.page-aside > :nth-child(4) { animation-delay: 0.3s; }
.page-aside > :nth-child(5) { animation-delay: 0.4s; }

/* Back to the section: a small black pill, like "Menú" */
.page-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 9px 16px 8px 12px;
    border-radius: 999px;
    background: var(--color-text);
    color: var(--color-bg);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.page-back svg {
    transform: scaleX(-1);
    transition: transform 0.4s var(--ease-out-expo);
}

.page-back:hover {
    background: var(--color-accent);
    color: var(--color-text);
}

.page-back:hover svg {
    transform: scaleX(-1) translateX(4px);
}

.page-meta {
    display: flex;
    align-items: center;
    gap: 14px;
}

.page-meta__number {
    font-size: 0.85rem;
}

.page-back + .page-meta {
    margin-top: 40px;
}

.page-title {
    margin-top: 22px;
    font-size: clamp(2.2rem, 3.4vw, 3.4rem);
    overflow-wrap: break-word;
}

.page-summary {
    max-width: 40ch;
    margin-top: 20px;
    font-size: 1rem;
    line-height: 1.6;
}

/* Page content on the right, in reading order */
.page-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 72px;
    padding: calc(var(--nav-height) + 40px) clamp(24px, 4vw, 64px) 32px;
}

.page-content > * {
    width: 100%;
    max-width: 960px;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.3s forwards;
}

/* ---- Buttons and links shared by the inner pages ---- */
/* Black pill: the main action of a page */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 26px 15px 28px;
    border-radius: 999px;
    background: var(--color-text);
    color: var(--color-bg);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pill:hover {
    background: var(--color-accent);
    color: var(--color-text);
}

.pill:focus-visible,
.page-back:focus-visible,
.text-link:focus-visible,
.contact__copy:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 3px;
}

/* Uppercase link with an arrow: a red block on hover, like the nav links
   (the negative margin keeps its text in line with the rest) */
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: -10px;
    padding: 8px 10px 7px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.text-link:hover {
    background: var(--color-accent);
    color: var(--color-text);
}

.pill svg,
.text-link svg {
    flex: none;
    transition: transform 0.4s var(--ease-out-expo);
}

.pill:hover svg,
.text-link:hover svg {
    transform: translateX(4px);
}

/* ---- Project pages (fotografia-…, web-…, diseno-grafico-….html) ---- */
.project-page__facts {
    margin-top: auto;
    padding-top: 32px;
}

.project-page__fact {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0 10px;
    border-top: var(--rule);
    font-size: 0.85rem;
    font-weight: 500;
}

.project-page__fact:last-child {
    border-bottom: var(--rule);
}

.project-page__fact dt {
    flex: none;
    white-space: nowrap;
}

.project-page__fact dd {
    text-align: right;
}

.project-page__fact dd a svg {
    display: inline;
    vertical-align: -1px;
}

/* Text blocks open with a black rule; their title is number, line and label */
.project-page__block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 16px 40px;
    padding-top: 20px;
    border-top: var(--rule);
}

.project-page__block-title {
    display: flex;
    align-items: center;
    align-self: start;
    gap: 12px;
}

.project-page__block-title span {
    order: -2;
    font-size: 0.75rem;
}

.project-page__block-title::before {
    content: '';
    order: -1;
    flex: none;
    width: 20px;
    height: 3px;
    background: var(--color-text);
}

.project-page__block-text p {
    font-size: 1.05rem;
    line-height: 1.65;
}

.project-page__block-text p + p {
    margin-top: 1em;
}

.project-page__gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
}

/* An image (or video) with its caption below */
.figura {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.figura--ancha {
    grid-column: 1 / -1;
}

.figura__pie {
    font-size: 0.65rem;
}

/* Links to the same client in the other sections: the section in a black
   block, then what it is */
.project-page__related {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.project-page__related .text-link {
    gap: 12px;
}

.project-page__related-section {
    font-size: 0.7rem;
}

.project-page__gallery--storyboard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Previous / next project */
.project-page__pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding-top: 20px;
    border-top: var(--rule);
}

.project-page__pager-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.project-page__pager-link--next {
    align-items: flex-end;
    text-align: right;
}

/* The label turns into a red block on hover (the negative margin keeps its
   text in line with the name) */
.project-page__pager-label {
    margin: 0 -8px;
    padding: 6px 8px 5px;
    line-height: 1;
    transition: background-color 0.25s ease;
}

.project-page__pager-name {
    font-size: clamp(1.3rem, 1.9vw, 1.9rem);
    transition: transform 0.4s var(--ease-out-expo);
}

.project-page__pager-link:hover .project-page__pager-label {
    background: var(--color-accent);
}

.project-page__pager-link--prev:hover .project-page__pager-name {
    transform: translateX(-4px);
}

.project-page__pager-link--next:hover .project-page__pager-name {
    transform: translateX(4px);
}

/* ============================================
   CONTACT PAGE (contacto.html)
   ============================================ */
.contact__title {
    font-size: clamp(3rem, 5vw, 5rem);
}

/* The email, big and bold with a thick underline that turns red */
.contact__email {
    align-self: flex-start;
    margin-top: 40px;
    font-size: clamp(1.3rem, 1.9vw, 1.8rem);
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 7px;
    transition: text-decoration-color 0.3s ease;
}

.contact__email:hover {
    text-decoration-color: var(--color-accent);
}

/* "Copiar email": red block on hover, black block once copied */
.contact__copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    margin: 14px 0 0 -10px;
    padding: 7px 10px 6px;
    line-height: 1;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.contact__copy:hover {
    background: var(--color-accent);
    color: var(--color-text);
}

.contact__copy.is-copied {
    background: var(--color-text);
    color: var(--color-bg);
}

.contact__social {
    margin-top: auto;
    padding-top: 32px;
    list-style: none;
}

/* Rows between black rules; the hovered one fills with red */
.contact__social a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 13px;
    border-top: var(--rule);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    transition: background-color 0.25s ease, padding 0.4s var(--ease-out-expo);
}

.contact__social li:last-child a {
    border-bottom: var(--rule);
}

.contact__social svg {
    transition: transform 0.4s var(--ease-out-expo);
}

.contact__social a:hover {
    padding-right: 10px;
    padding-left: 10px;
    background: var(--color-accent);
}

.contact__social a:hover svg {
    transform: translate(3px, -3px);
}

.contact__social a:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 3px;
}

/* ---- Contact form ---- */
/* Label and a thick line, like the side menu's headings */
.contact__heading {
    display: flex;
    align-items: center;
    gap: 14px;
}

.contact__heading::after {
    content: '';
    flex: 1;
    height: 3px;
    background: var(--color-text);
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 720px;
}

.contact__choices {
    min-width: 0;
    border: none;
}

.contact__choices legend {
    padding-bottom: 14px;
}

.choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Radio buttons shown as pills; the input stays focusable for the keyboard.
   Outlined in black, red on hover, black once chosen. */
.choice__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.choice {
    padding: 11px 18px 10px;
    border: 2px solid var(--color-text);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    color: var(--color-text);
    transition: color 0.25s ease, background-color 0.25s ease;
}

.choice:hover {
    background: var(--color-accent);
}

.choice__input:checked + .choice {
    background: var(--color-text);
    color: var(--color-bg);
}

.choice__input:focus-visible + .choice {
    outline: 2px solid var(--color-text);
    outline-offset: 3px;
}

.contact__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Fields on a black rule that turns red while typing */
.field__input {
    width: 100%;
    padding: 8px 0 12px;
    border: none;
    border-bottom: var(--rule);
    border-radius: 0;
    background: transparent;
    font: inherit;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: text;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.field__input::placeholder {
    font-weight: 400;
    color: rgba(107, 101, 96, 0.7);
}

.field__input:focus {
    outline: none;
    border-bottom-color: var(--color-accent);
    box-shadow: 0 2px 0 var(--color-accent);
}

.field__input--area {
    min-height: 140px;
    line-height: 1.5;
    resize: vertical;
}

.contact__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
}

.contact__note {
    max-width: 34ch;
    font-size: 0.8rem;
    line-height: 1.5;
}

.contact__status {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
}

.contact__status:empty {
    display: none;
}

/* Sent: a red block before the message. Something to fix: a muted brick red. */
.contact__status[data-state="sent"]::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 10px;
    background: var(--color-accent);
    vertical-align: 0;
}

.contact__status[data-state="error"] {
    color: #a1453a;
}

/* While the message is being sent */
.contact__form .pill:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================
   ABOUT PAGE (sobre-mi.html)
   ============================================ */
/* The portrait, whole and centred in the column (the home drawings are cropped to fill it) */
.about__portrait .hero__image {
    inset: calc(var(--nav-height) + 150px) 28px 110px;
}

.about__portrait .hero__image img {
    object-fit: contain;
    object-position: center;
}

.about__header {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* His full name as the page title, in the titles' typeface */
.about__name {
    max-width: 10em;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.4vw, 4rem);
    font-weight: 700;
    font-stretch: 100%;
    letter-spacing: -0.035em;
    line-height: 1;
}

.about__lead {
    max-width: 26ch;
    font-size: clamp(1.4rem, 2.2vw, 2.1rem);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.about__facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.about__fact {
    padding-top: 14px;
    border-top: var(--rule);
}

.about__fact dd {
    margin-top: 10px;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.4;
}

.about__header .about__text {
    margin-top: -8px;
}

.about__text {
    max-width: 60ch;
    font-size: 1rem;
    line-height: 1.65;
}

.about__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 32px;
}

.about.page-content {
    gap: 56px;
}

/* ---- CV: label on the left, dated rows on the right ----
   Same three columns as .about__facts, so the rows line up with its 2nd column */
.cv {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 24px;
}

.cv > :not(.cv__title) {
    grid-column: 2 / -1;
}

/* The title in a black block, level with the first row's years */
.cv__title {
    align-self: start;
    margin-top: 15px;
    font-size: 0.72rem;
}

.cv__list {
    list-style: none;
    border-bottom: var(--rule);
}

.cv__item {
    display: grid;
    grid-template-columns: 7.5em minmax(0, 1fr);
    gap: 4px 24px;
    padding: 14px 0 16px;
    border-top: var(--rule);
}

.cv__years {
    padding-top: 3px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

.cv__role {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
}

.cv__place {
    margin-top: 2px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.45;
}

.cv__note {
    max-width: 52ch;
    margin-top: 10px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--color-text-light);
}

.cv__link {
    margin-top: 12px;
}

.cv__tools {
    padding: 14px 0 16px;
    border-top: var(--rule);
    border-bottom: var(--rule);
    font-size: 1.05rem;
    font-weight: 500;
}

/* ============================================
   FEATURED WORK (trabajos-destacados.html)
   ============================================ */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px 24px;
    list-style: none;
}

/* The first work takes the full width, the rest go in pairs */
.gallery__item--wide {
    grid-column: 1 / -1;
}

.gallery__item:not(.gallery__item--wide) .media {
    aspect-ratio: 4 / 5;
}

.gallery__link {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gallery__info {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px 16px;
}

.gallery__discipline {
    grid-column: 1 / -1;
}

.gallery__title {
    font-size: clamp(1.4rem, 2vw, 2rem);
}

/* A round black button, red on hover, like the home's arrows */
.gallery__arrow {
    box-sizing: content-box;
    width: 18px;
    height: 18px;
    padding: 10px;
    border-radius: 50%;
    background: var(--color-text);
    color: var(--color-bg);
    transition: transform 0.4s var(--ease-out-expo), background-color 0.3s ease, color 0.3s ease;
}

.gallery__link:hover .gallery__arrow {
    background: var(--color-accent);
    color: var(--color-text);
    transform: translateX(4px);
}

.gallery__count {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 32px;
}

.gallery__count span {
    font-size: 0.85rem;
}

/* Hidden on screen, still read by screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   COOKIES PAGE (cookies.html)
   Numbered blocks like the project pages (.project-page__block)
   ============================================ */
/* What the site keeps, one row each, between black rules */
.legal-list {
    margin-top: 1.4em;
    list-style: none;
    border-bottom: var(--rule);
}

.legal-list__item {
    padding: 16px 0 18px;
    border-top: var(--rule);
}

.legal-list__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
}

.legal-list__name {
    font-size: 1.05rem;
    font-weight: 600;
}

.legal-list__tag {
    font-size: 0.65rem;
}

.project-page__block-text .legal-list__text {
    margin-top: 6px;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--color-text-light);
}

.project-page__block-text .legal-list__meta {
    margin-top: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}

/* "Cambiar mi elección" and the current choice, in the page's sheet */
.legal__choice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-top: 32px;
}

.legal__status {
    font-size: 0.8rem;
    font-weight: 500;
}
