/* CONFIGURACION GENERAL */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background-color: #FFFFFF;
    color: #292929;
}

/* CABECERA */

header {
    min-height: 100vh;
    background-color: #FFFFFF;
}

/* MENU DE NAVEGACION */

.navbar {
    width: 100%;
    min-height: 150px;
    padding: 10px 7%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #FFFFFF;
    border-bottom: 1px solid #dedbd4;
    position: relative;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 150px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    display: flex;
    align-items: center;
    min-height: 24px;
    text-decoration: none;
    color: #292929;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    transition: color 0.3s ease;
    position: relative;
}

/* PORTADA PRINCIPAL */

.hero {
    min-height: calc(100vh - 150px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    box-sizing: border-box;

    /* FOTOGRAFIA DE PORTADA */
    background-image: url("../images/video-final-soluciones-poster.webp");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    color: #111;
    position: relative;
    overflow: hidden;
}

.hero-video-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-video-background::after { content: none; }

.hero-background-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(1.14) contrast(1.04) saturate(1.08);
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.hero-background-video.is-active {
    opacity: 1;
}

.hero > :not(.hero-video-background) {
    position: relative;
    z-index: 1;
}
.hero-subtitle {
    font-size: 11px;
    letter-spacing: 5px;
    margin-bottom: 30px;
}

.hero h1 {
    font-family: Georgia, serif;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.15;
    font-weight: 400;
    letter-spacing: -2px;
}

.hero-description {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: clamp(18px, 3vh, 30px);
    margin: 0 auto;
    max-width: 48rem;
    padding: 8px 12px;
    font-size: clamp(12px, 1.05vw, 14px);
    line-height: 1.55;
    color: #111;
}
.hero-button {
    margin-top: 0;
    padding: 17px 28px;
    border: 1px solid #111;
    text-decoration: none;
    color: #111;
    font-size: 10px;
    letter-spacing: 2px;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* SECCIONES */

main section {
    min-height: 350px;
    padding: 100px 7%;
    text-align: center;
}

main section h2 {
    font-family: Georgia, serif;
    font-size: 40px;
    font-weight: 400;
    margin-bottom: 20px;
}

/* PIE DE PAGINA */

footer {
    padding: 30px;
    text-align: center;
    background-color: #292929;
    color: white;
    font-size: 12px;
}

/* ADAPTACION A MOVILES */

@media (max-width: 900px) {
    .navbar {
        flex-direction: column;
        gap: 20px;
        padding: 25px 15px;
    }

    .nav-links {
        width: calc(100vw - 30px);
        max-width: 100%;
        box-sizing: border-box;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px 20px;
    }

    .nav-links li {
        flex: 0 0 auto;
    }

    .language-selector {
        margin-left: 0;
    }

    .hero h1,
    .hero-subtitle,
    .hero-description {
        width: calc(100vw - 40px);
        max-width: 100%;
    }

    .hero h1 {
        font-size: clamp(28px, 6vw, 46px);
        letter-spacing: -1px;
        overflow-wrap: anywhere;
    }

    .hero-subtitle {
        letter-spacing: clamp(2px, 1vw, 5px);
    }

    .hero-description {
        line-height: 1.7;
    }
}/* COLECCIONES */
#collections {
    padding: 110px 7%;
    background-color: #FFFFFF;
}

#collections h2 {
    margin-bottom: 15px;
}

#collections > p {
    color: #5C605B;
    font-size: 14px;
    margin-bottom: 55px;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 35px;
    text-align: left;
}

.collection-card {
    width: 100%;
}

.collection-card img {
    width: 100%;
    height: 430px;
    object-fit: cover;
    display: block;
}

.collection-card h3 {
    font-family: Georgia, serif;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 2px;
    margin-top: 25px;
}

.collection-card p {
    color: #5C605B;
    font-size: 13px;
    margin-top: 10px;
}

/* ADAPTACION A MOVILES */
@media (max-width: 700px) {
    .collection-grid {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .collection-card img {
        height: 320px;
    }
}
/* DISE�OS CERAMICOS */

#designs {
    padding: 110px 7%;
    background-color: #ffffff;
}

#designs h2 {
    margin-bottom: 15px;
}

#designs > p {
    color: #5C605B;
    font-size: 14px;
    margin-bottom: 55px;
}

.design-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    text-align: left;
}

.design-card {
    width: 100%;
}

.design-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.design-card h3 {
    font-family: Georgia, serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 2px;
    margin-top: 20px;
}

.design-card p {
    color: #5C605B;
    font-size: 13px;
    margin-top: 8px;
}

/* ADAPTACION A MOVILES */

@media (max-width: 700px) {
    .design-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .design-card img {
        height: 200px;
    }
}
/* PROJECTS */

#projects {
    padding: 110px 7%;
    background-color: #FFFFFF;
}

#projects h2 {
    margin-bottom: 15px;
}

#projects > p {
    color: #5C605B;
    font-size: 14px;
    margin-bottom: 55px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 35px;
    text-align: left;
}

.project-card {
    width: 100%;
}

.project-card img {
    width: 100%;
    height: 430px;
    object-fit: cover;
    display: block;
}

.project-card h3 {
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 2px;
    margin-top: 25px;
}

.project-card p {
    color: #5C605B;
    font-size: 13px;
    margin-top: 10px;
}

/* ADAPTACION A MOVILES */

@media (max-width: 700px) {
    .project-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .project-card img {
        height: 320px;
    }
}
/* ABOUT US */

#about {
    padding: 140px 15%;
    background-color: #ffffff;
    text-align: center;
}

.about-content {
    max-width: 850px;
    margin: 0 auto;
}

.about-subtitle {
    font-size: 12px;
    letter-spacing: 4px;
    color: #5C605B;
    margin-bottom: 30px;
}

#about h2 {
    font-family: Georgia, serif;
    font-size: 42px;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 35px;
    color: #333;
}

.about-description {
    color: #5C605B;
    font-size: 15px;
    line-height: 2;
    margin-bottom: 20px;
}

.about-signature {
    font-family: Georgia, serif;
    font-size: 13px;
    letter-spacing: 1px;
    margin-top: 40px;
    color: #555;
}

/* ADAPTACION A MOVILES */

@media (max-width: 700px) {
    #about {
        padding: 90px 8%;
    }

    #about h2 {
        font-size: 30px;
    }
}
/* CONTACT */

#contact {
    padding: 110px 7%;
    background-color: #FFFFFF;
    text-align: center;
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
}

.contact-subtitle {
    font-size: 12px;
    letter-spacing: 4px;
    color: #5C605B;
    margin-bottom: 25px;
}

#contact h2 {
    font-family: Georgia, serif;
    font-size: 38px;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #333;
}

.contact-description {
    color: #5C605B;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #ddd;
    background-color: #fff;
    font-family: Arial, sans-serif;
    font-size: 13px;
    box-sizing: border-box;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form button {
    padding: 17px;
    border: 1px solid #333;
    background-color: #333;
    color: white;
    font-size: 12px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.contact-form button:hover {
    background-color: transparent;
    color: #333;
}

/* ADAPTACION A MOVILES */

@media (max-width: 700px) {
    .logo img { height: 96px; }
    #contact {
        padding: 85px 8%;
    }

    #contact h2 {
        font-size: 30px;
    }
}

@media (min-width: 701px) and (max-width: 900px) {
    .logo img { height: 118px; }
}
/* FOOTER */

footer {
    background-color: #292929;
    color: #ffffff;
    padding: 65px 7% 25px;
    text-align: center;
}

.footer-content h2 {
    font-family: Georgia, serif;
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 5px;
    margin-bottom: 15px;
}

.footer-content > p {
    font-size: 10px;
    letter-spacing: 3px;
    color: #c5c5c5;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 28px;
    margin: 45px 0;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 0;
    color: #ffffff;
    text-decoration: none;
    font-size: 10px;
    letter-spacing: 1px;
    transition: 0.3s;
}

.footer-links a:hover {
    color: #b9a88d;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 25px;
}

.footer-bottom p {
    color: #aaa;
    font-size: 11px;
}

/* ADAPTACION A MOVILES */

@media (max-width: 700px) {
    .footer-links {
        gap: 18px;
    }
}
/* SELECTOR DE IDIOMAS */

@media (min-width: 901px) and (max-width: 960px) {
    .navbar {
        padding-left: 8px;
    }

    .nav-links {
        gap: 24px;
    }
}

.language-selector {
    display: flex;
    align-items: center;
    margin-left: 25px;
}

.language-selector select {
    border: none;
    background-color: transparent;
    color: #292929;
    font-family: Arial, sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    padding: 8px;
    cursor: pointer;
}

/* CRS DESIGN � NEW BRAND COLOUR PALETTE */

:root {
     --crs-ivory: #F3EFE7;
    --crs-graphite: #262A27;
    --crs-clay: #B86F52;
    --crs-clay-contrast: #8B4E37;
    --crs-olive: #858A72;
    --crs-gold: #C1A477;
}

/* Main colours */
body {
    background-color: #FFFFFF;
    color: var(--crs-graphite);
}

/* Header */
.navbar {
    background-color: #FFFFFF;
    border-bottom: 1px solid #D8D0C4;
}

.nav-links a {
    color: var(--crs-graphite);
}

.nav-links a:hover,
.language-selector select:hover {
    color: var(--crs-clay-contrast);
}

/* Section backgrounds */
#collections,
#projects {
    background-color: #FFFFFF;
}

#designs,
#about,
#contact {
    background-color: #FFFFFF;
}

/* Buttons */
.hero-button,
.contact-form button {
    background-color: var(--crs-clay-contrast);
    border-color: var(--crs-clay-contrast);
    color: white;
}

.hero-button:hover,
.contact-form button:hover {
    background-color: var(--crs-graphite);
    border-color: var(--crs-graphite);
}

/* Footer */
footer {
    background-color: var(--crs-graphite);
}

/* Subtle decorative accents */
.about-subtitle,
.contact-subtitle {
    color: var(--crs-clay-contrast);
}

.hero-subtitle {
    color: var(--crs-ivory);
}

.collection-card p,
.design-card p,
.project-card p,
.about-description,
.contact-description {
    color: #5C605B;
}

.skip-link {
    position: absolute;
    z-index: 20;
    top: 12px;
    left: 12px;
    padding: 12px 16px;
    transform: translateY(-160%);
    background: var(--crs-graphite);
    color: var(--crs-ivory);
}

.skip-link:focus {
    transform: translateY(0);
}

.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;
}

.hero > h1.hero-title-placeholder {
    position: absolute;
    top: clamp(16px, 3vh, 28px);
    left: 16px;
    right: 16px;
    opacity: 1;
    pointer-events: auto;
    user-select: auto;
    color: #111;
    width: calc(100% - 32px);
    max-width: 52rem;
    margin: 0 auto;
    font-size: clamp(20px, 2.3vw, 32px);
    line-height: 1.25;
    letter-spacing: .02em;
    background: transparent;
    padding: 8px 14px;
    text-wrap: balance;
}
.hero > .hero-description { position: absolute; background: transparent; }
.hero > .hero-button {
    position: absolute;
    left: 50%;
    bottom: clamp(100px, 10vh, 112px);
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100vw - 24px);
    white-space: nowrap;
    border-color: var(--crs-clay-contrast);
    background: var(--crs-clay-contrast);
    color: #fff;
}

.hero-button:hover { background: #111; color: #fff; }
.hero-button:focus-visible { outline-color: #111; }
.contact-layout { display:grid; grid-template-columns:minmax(0, 2fr) minmax(180px, .8fr); gap:36px; align-items:start; text-align:left; }
.contact-form { min-width:0; }
.contact-form input[type="checkbox"] { width:auto; accent-color: var(--crs-olive, #66715f); }
.privacy-notice { color:#5c605b; font-size:12px; line-height:1.65; text-align:left; }
.privacy-notice a { color:inherit; text-underline-offset:3px; }
.contact-privacy-ack { display:flex; align-items:flex-start; gap:10px; color:#353935; font-size:13px; line-height:1.5; }
.social-links { display:grid; gap:12px; }
.social-links > p:first-child { margin-bottom:4px; font-family:Georgia,serif; font-size:20px; }
.social-button { display:flex; gap:12px; align-items:center; padding:14px 16px; border:1px solid #d8d5cf; background:#fff; color:#333; font:inherit; text-align:left; }
.social-button:disabled { opacity:.68; cursor:not-allowed; }
.social-button svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.social-button:nth-of-type(3) svg { fill:currentColor; stroke:none; }
.social-note { color:#686b66; font-size:12px; line-height:1.6; }
.footer-cookie-settings { border:0; padding:4px 0; background:none; color:#fff; font:inherit; font-size:10px; letter-spacing:1px; text-decoration:underline; cursor:pointer; }
.cookie-banner { position:fixed; z-index:1000; inset:auto 16px 16px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:14px 24px; align-items:center; max-width:1100px; margin:auto; padding:20px 24px; border:1px solid #d8d5cf; background:#fff; color:#262a27; box-shadow:0 12px 40px #0003; }
.cookie-banner[hidden], .cookie-config[hidden] { display:none; }
.cookie-banner h2 { margin:0 0 6px; font:20px Georgia,serif; }
.cookie-banner p { font-size:13px; line-height:1.5; }
.cookie-actions,.cookie-config { display:flex; flex-wrap:wrap; gap:8px; }
.cookie-actions button,.cookie-config button { padding:10px 13px; border:1px solid #262a27; background:#fff; color:#262a27; cursor:pointer; }
.cookie-actions [data-cookie-accept],.cookie-config button { background:#262a27; color:#fff; }
.cookie-config { grid-column:1/-1; align-items:center; }
.cookie-config label { display:flex; align-items:center; gap:6px; margin-right:12px; font-size:12px; }
.legal-page { max-width:980px; margin:auto; padding:60px 24px; color:#292929; line-height:1.75; }
.legal-page h1,.legal-page h2 { font-family:Georgia,serif; font-weight:400; }
.legal-page h1 { font-size:clamp(32px,5vw,54px); margin:24px 0; }
.legal-page h2 { font-size:28px; margin:42px 0 12px; }
.legal-page h3 { margin:20px 0 6px; }
.legal-page p,.legal-page li { margin:8px 0; }
.legal-page ul { padding-left:24px; }
.legal-placeholder { padding:12px 16px; background:#f3efe7; border-left:3px solid #b86f52; }
.legal-language { margin-top:24px; }
.legal-language select { padding:9px; }
.legal-back { color:inherit; }
@media (max-width:700px) {
 .contact-layout { grid-template-columns:1fr; gap:32px; }
 .social-links { grid-template-columns:1fr; }
 .cookie-banner { grid-template-columns:1fr; inset:auto 8px 8px; padding:16px; }
 .cookie-actions button { flex:1 1 30%; }
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--crs-clay-contrast);
    outline-offset: 3px;
}

.hero-button:focus-visible,
footer a:focus-visible {
    outline-color: var(--crs-ivory);
}

.contact-form-status:not([data-fs-active]) {
    display: none;
}

.contact-form-status[data-fs-active] {
    margin-top: 18px;
    padding: 14px 16px;
    border-left: 3px solid var(--crs-olive);
    background: #EDE8DE;
    color: var(--crs-graphite);
    text-align: left;
}

.contact-form-status[data-fs-error][data-fs-active] {
    border-left-color: #9A3E32;
}

.contact-form button:disabled {
    cursor: wait;
    opacity: 0.72;
}

@media (max-width: 700px) {
    .hero {
        width: 100vw;
        min-height: max(400px, calc(100svh - 320px));
    }
    .hero > h1.hero-title-placeholder {
        top: 16px;
        left: 50vw;
        right: auto;
        width: calc(100vw - 24px);
        transform: translateX(-50%);
        font-size: clamp(15px, 4vw, 17px);
        letter-spacing: 0;
        padding: 7px 10px;
        white-space: normal;
    }

    .hero > .hero-description {
        left: 50vw;
        right: auto;
        width: 85vw;
        max-width: 85vw;
        transform: translateX(-50%);
        bottom: 16px;
        max-width: 36rem;
        padding: 8px 10px;
        font-size: 13px;
        line-height: 1.5;
    }

    .hero > .hero-button { left: 50vw; }

    .contact-form input,
    .contact-form textarea {
        font-size: 16px;
    }
}

@media (min-width: 701px) and (max-width: 900px) {
    .hero { min-height: max(420px, calc(100svh - 270px)); }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Portfolio tabs and editorial card grid */
.portfolio-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 34px 7% 0;
    background: #FFFFFF;
}

.portfolio-tab {
    min-height: 44px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-bottom-color: #c7c9c2;
    background: transparent;
    color: #5c605b;
    font: inherit;
    font-size: 11px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 180ms var(--portfolio-control-ease),
        border-color 180ms var(--portfolio-control-ease),
        background-color 180ms var(--portfolio-control-ease);
}

.portfolio-tab:hover,
.portfolio-tab[aria-selected="true"] {
    border-color: #25463b;
    background: #25463b;
    color: #fff;
}

.portfolio-tab:focus-visible,
.portfolio-card:focus-visible,
.portfolio-scroll-button:focus-visible,
.portfolio-gallery button:focus-visible {
    outline: 2px solid #25463b;
    outline-offset: 3px;
}

.portfolio-gallery__close:focus-visible {
    outline-color: #f3efe7;
}

.portfolio-tabs + section {
    padding-top: 58px;
}

#collections,
#designs,
#projects {
    padding: 58px 7% 72px;
}

#collections[hidden],
#designs[hidden],
#projects[hidden] {
    display: none !important;
}

[role="tabpanel"]:not([hidden]) {
    animation: portfolio-panel-in 220ms var(--portfolio-control-ease) both;
}

@keyframes portfolio-panel-in {
    from { opacity: 0.82; }
    to { opacity: 1; }
}

.collection-grid,
.design-grid,
.project-grid {
    display: block;
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.portfolio-track-content {
    display: flex;
    width: max-content;
    flex-flow: row nowrap;
    gap: 24px;
    padding: 2px 2px 14px;
    transform: translate3d(0, 0, 0);
}

.portfolio-track-content.is-moving {
    will-change: transform;
}

.portfolio-track-wrap {
    position: relative;
    min-width: 0;
}

.portfolio-scroll-button {
    position: absolute;
    z-index: 2;
    top: calc((100% - 94px) / 2);
    display: grid;
    width: 46px;
    height: 46px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(37, 70, 59, 0.24);
    border-radius: 50%;
    background: rgba(248, 247, 243, 0.96);
    color: #25463b;
    font: 400 22px/1 Georgia, serif;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 200ms var(--portfolio-control-ease),
        color 200ms var(--portfolio-control-ease),
        transform 200ms var(--portfolio-control-ease),
        opacity 200ms var(--portfolio-control-ease);
}

.portfolio-scroll-button:hover:not(:disabled) {
    background: #25463b;
    color: #fff;
    transform: translateY(-50%) scale(1.04);
}

.portfolio-scroll-button:active:not(:disabled) {
    transform: translateY(-50%) scale(0.97);
}

.portfolio-scroll-button:disabled {
    cursor: default;
    opacity: 0.35;
}

.portfolio-scroll-button--previous {
    left: -54px;
}

.portfolio-scroll-button--next {
    right: -54px;
}

.portfolio-scroll-progress {
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: 18px;
    margin: 4px 0 0;
    padding: 0 4px;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    touch-action: pan-x;
}

.portfolio-scroll-progress::-webkit-slider-runnable-track {
    height: 1px;
    background: rgba(37, 70, 59, 0.24);
}

.portfolio-scroll-progress::-webkit-slider-thumb {
    width: 9px;
    height: 9px;
    margin-top: -4px;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 50%;
    background: #25463b;
    transition: transform 160ms var(--portfolio-control-ease);
}

.portfolio-scroll-progress:hover::-webkit-slider-thumb {
    transform: scale(1.2);
}

.portfolio-scroll-progress::-moz-range-track {
    height: 1px;
    border: 0;
    background: rgba(37, 70, 59, 0.24);
}

.portfolio-scroll-progress::-moz-range-thumb {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 50%;
    background: #25463b;
}

.portfolio-scroll-progress:focus-visible {
    outline: 1px solid #25463b;
    outline-offset: 3px;
}

.collection-card,
.design-card,
.project-card {
    flex: 0 0 clamp(260px, 31vw, 380px);
    position: relative;
    min-width: 0;
    cursor: pointer;
}

.collection-card img,
.design-card img,
.project-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 300ms var(--portfolio-image-ease);
}

.design-card img {
    object-fit: contain;
}

.collection-card img {
    object-fit: contain;
    object-position: center top;
}

.portfolio-card-media {
    position: relative;
    display: block;
    overflow: hidden;
    background: #e9e6df;
}

.collection-card .portfolio-card-media,
.design-card .portfolio-card-media {
    background: #fff;
}

.portfolio-card-action {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 8px 11px;
    background: rgba(28, 50, 42, 0.92);
    color: #fff;
    font-size: 10px;
    letter-spacing: 0.8px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 200ms var(--portfolio-control-ease),
        transform 200ms var(--portfolio-control-ease);
}

.collection-card:hover img,
.design-card:hover img,
.project-card:hover img,
.collection-card:focus-visible img,
.design-card:focus-visible img,
.project-card:focus-visible img {
    transform: scale(1.025);
}

.collection-card:hover .portfolio-card-action,
.design-card:hover .portfolio-card-action,
.project-card:hover .portfolio-card-action,
.collection-card:focus-visible .portfolio-card-action,
.design-card:focus-visible .portfolio-card-action,
.project-card:focus-visible .portfolio-card-action {
    opacity: 1;
    transform: translateY(0);
}

.collection-card h3,
.design-card h3,
.project-card h3 {
    margin-top: 15px;
    margin-bottom: 0;
    font-size: 14px;
    letter-spacing: 1.2px;
    line-height: 1.45;
}

.collection-card p,
.design-card p,
.project-card p {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.55;
}

.portfolio-gallery {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: min(92vw, 1600px);
    max-width: 92vw;
    max-height: 90dvh;
    margin: auto;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    color: #292929;
}

.portfolio-gallery::backdrop {
    background: rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(1.5px);
}

.portfolio-gallery__layout {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0;
}

.portfolio-gallery__image-wrap {
    display: grid;
    width: 100%;
    min-height: 0;
    place-items: center;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.88);
}

.portfolio-gallery__image-wrap img {
    display: block;
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 85dvh;
    object-position: center;
    object-fit: contain;
    cursor: zoom-in;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-drag: none;
}

.portfolio-gallery__close {
    position: absolute;
    z-index: 1;
    top: 10px;
    right: 10px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    background: rgba(28, 50, 42, 0.92);
    color: #fff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.portfolio-gallery__caption {
    display: none !important;
}

.portfolio-gallery__caption[hidden],
.portfolio-gallery__caption h2[hidden],
.portfolio-gallery__caption p[hidden] {
    display: none !important;
}

.portfolio-gallery__caption h2 {
    margin: 2px 0 7px;
    color: #25463b;
    font: 400 clamp(20px, 3vw, 30px)/1.2 Georgia, serif;
}

.portfolio-gallery__caption p {
    margin: 0;
    color: #5c605b;
    font-size: 13px;
    line-height: 1.55;
}

.portfolio-gallery__controls[hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .collection-grid,
    .design-grid,
    .project-grid {
        gap: 18px;
    }

    .collection-card,
    .design-card,
    .project-card {
        flex-basis: 44vw;
    }
}

@media (max-width: 560px) {
    .nav-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        max-width: 100%;
        min-width: 0;
        align-self: stretch;
        justify-content: stretch;
        gap: 15px 8px;
    }

    .nav-links a {
        width: 100%;
        min-width: 0;
        justify-content: center;
        white-space: nowrap;
    }

    .portfolio-tabs {
        gap: 5px;
        padding: 24px 12px 0;
    }

    .portfolio-tab {
        padding: 9px 12px;
        font-size: 10px;
        letter-spacing: 1px;
    }

    .portfolio-tabs + section {
        padding-top: 42px;
    }

    #collections,
    #designs,
    #projects {
        padding: 42px 7% 54px;
    }

    .collection-grid,
    .design-grid,
    .project-grid {
        gap: 14px;
    }

    .collection-card,
    .design-card,
    .project-card {
        flex-basis: 78vw;
    }

    .collection-card h3,
    .design-card h3,
    .project-card h3 {
        margin-top: 10px;
        font-size: 12px;
        letter-spacing: 0.65px;
    }

    .collection-card p,
    .design-card p,
    .project-card p {
        font-size: 11px;
        line-height: 1.45;
    }

    .portfolio-card-action {
        right: 7px;
        bottom: 7px;
        padding: 6px 8px;
        font-size: 9px;
        opacity: 1;
        transform: none;
    }

    .portfolio-gallery {
        width: min(94vw, 1600px);
        max-width: 94vw;
        max-height: 90dvh;
        min-height: 0;
        margin: auto;
        padding: 0;
        border: 0;
    }

    .portfolio-gallery__layout {
        min-height: 0;
        grid-template-rows: auto;
        gap: 0;
    }

    .portfolio-gallery__image-wrap {
        min-height: 0;
        width: 100%;
        max-height: 90dvh;
    }

    .portfolio-gallery__image-wrap img {
        max-width: 92vw;
        max-height: 85dvh;
    }
}

.portfolio-gallery .portfolio-gallery__close.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;
}

.portfolio-gallery.is-zoomed .portfolio-gallery__image-wrap {
    touch-action: none;
    cursor: grab;
}

.portfolio-gallery.is-zoomed .portfolio-gallery__image-wrap:active {
    cursor: grabbing;
}

.portfolio-gallery__image-wrap img:focus-visible {
    outline: 2px solid #25463b;
    outline-offset: 3px;
}

.portfolio-gallery.is-zoomed .portfolio-gallery__image-wrap img {
    cursor: zoom-out;
}

@media (hover: none) {
    .portfolio-card-action {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 560px) {
    .portfolio-scroll-button {
        top: -40px;
        width: 36px;
        height: 36px;
        transform: none;
    }

    .portfolio-scroll-button--previous {
        right: 44px;
        left: auto;
    }

    .portfolio-scroll-button--next {
        right: 0;
    }

    .portfolio-scroll-button:hover:not(:disabled) {
        transform: scale(1.04);
    }

    .portfolio-scroll-button:active:not(:disabled) {
        transform: scale(0.97);
    }
}

@media (min-width: 561px) and (max-width: 760px) {
    .portfolio-scroll-button {
        top: -48px;
        transform: none;
    }

    .portfolio-scroll-button--previous {
        right: 56px;
        left: auto;
    }

    .portfolio-scroll-button--next {
        right: 0;
    }

    .portfolio-scroll-button:hover:not(:disabled) {
        transform: scale(1.04);
    }

    .portfolio-scroll-button:active:not(:disabled) {
        transform: scale(0.97);
    }
}

@media (prefers-reduced-motion: reduce) {
    .collection-card img,
    .design-card img,
    .project-card img,
    .portfolio-card-action {
        transition: none;
    }
}

:root {
    --portfolio-control-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --portfolio-image-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --portfolio-motion-ease: cubic-bezier(0.65, 0, 0.35, 1);
}

.portfolio-gallery {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.985);
    transition:
        opacity var(--portfolio-gallery-duration, 700ms) var(--portfolio-motion-ease),
        transform var(--portfolio-gallery-duration, 700ms) var(--portfolio-motion-ease),
        display var(--portfolio-gallery-duration, 700ms) allow-discrete,
        overlay var(--portfolio-gallery-duration, 700ms) allow-discrete;
}

.portfolio-gallery[open] {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.portfolio-gallery::backdrop {
    background-color: rgba(255, 255, 255, 0);
    transition: background-color var(--portfolio-gallery-duration, 700ms) var(--portfolio-motion-ease);
}

.portfolio-gallery[open]::backdrop {
    background-color: #fff;
}

.portfolio-gallery__image-wrap img {
    opacity: 0;
    transform: scale(0.985);
    transition:
        opacity var(--portfolio-gallery-duration, 700ms) var(--portfolio-motion-ease),
        transform var(--portfolio-gallery-duration, 700ms) var(--portfolio-motion-ease);
}

.portfolio-gallery[open] .portfolio-gallery__image-wrap img {
    opacity: 1;
    transform: scale(1);
}

.portfolio-gallery.is-zoomed .portfolio-gallery__image-wrap img {
    transform: translate3d(var(--portfolio-zoom-x, 0px), var(--portfolio-zoom-y, 0px), 0) scale(1.8);
    transition: transform 360ms var(--portfolio-image-ease);
    will-change: transform;
}

.portfolio-gallery.is-panning .portfolio-gallery__image-wrap img {
    transition: none !important;
}

@starting-style {
    .portfolio-gallery[open] {
        opacity: 0;
        transform: translate3d(0, 10px, 0) scale(0.985);
    }

    .portfolio-gallery[open]::backdrop {
        background-color: rgba(255, 255, 255, 0);
    }

    .portfolio-gallery[open] .portfolio-gallery__image-wrap img {
        opacity: 0;
        transform: scale(0.985);
    }
}

::view-transition-group(portfolio-active-photo) {
    animation-duration: var(--portfolio-motion-duration, 700ms);
    animation-timing-function: var(--portfolio-motion-ease);
    overflow: hidden;
}

::view-transition-old(portfolio-active-photo),
::view-transition-new(portfolio-active-photo) {
    animation-duration: var(--portfolio-motion-duration, 700ms);
    animation-timing-function: var(--portfolio-motion-ease);
    object-fit: contain;
    object-position: center;
}

html:has(.portfolio-gallery.is-view-transitioning:not([open]))::view-transition-old(portfolio-active-photo) {
    visibility: hidden;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 1ms;
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-gallery,
    .portfolio-gallery::backdrop,
    .portfolio-gallery__image-wrap img,
    ::view-transition-group(portfolio-active-photo),
    ::view-transition-old(portfolio-active-photo),
    ::view-transition-new(portfolio-active-photo) {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* The shared-photo transition owns image geometry; avoid a competing modal pop. */
.portfolio-gallery.is-view-transitioning {
    opacity: 1;
    transform: none;
    transition-property: display, overlay;
    transition-behavior: allow-discrete;
}

.portfolio-gallery.is-view-transitioning::backdrop {
    transition: background-color var(--portfolio-gallery-duration, 700ms) var(--portfolio-motion-ease);
}

.portfolio-gallery.is-view-transitioning .portfolio-gallery__image-wrap img {
    opacity: 1;
    transform: none;
    transition: none;
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-gallery.is-view-transitioning::backdrop {
        transition-duration: 0.01ms !important;
    }
}

