/* Studio Yñigo: shared styles */
:root { --serif: 'Cormorant Garamond', Georgia, serif; --sans: 'Jost', 'Century Gothic', sans-serif; --gutter: clamp(1.25rem, 4vw, 3rem); }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-weight: 300; font-size: 1.0625rem; line-height: 1.8; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:hover { color: var(--acc); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #b08d57; outline-offset: 3px; }
h1, h2, h3, p, ul, ol { margin: 0; }
button { font: inherit; }

/* Tones. Each section keeps its own tone unless the flowing mode has taken over. */
.page { --ink: #17120f; --body: #4a423c; --acc: #7d6238; --rule: #d5cec4; --paper: #ffffff; color: var(--body); background: #ffffff; transition: background-color 1.1s ease, color 1.1s ease; }
.tone-stone { background: #f3f0eb; }
.tone-dark { --ink: #ffffff; --body: #e9e3da; --acc: #c9a872; --rule: #6b6056; --paper: #14100d; color: var(--body); background: #14100d; }
.panel { --ink: #17120f; --body: #4a423c; --acc: #7d6238; --paper: #ffffff; color: var(--body); background: #ffffff; }
.page.flow-on .tone-stone, .page.flow-on .tone-dark { --ink: inherit; --body: inherit; --acc: inherit; --rule: inherit; --paper: inherit; color: inherit; background: transparent; }
.page.flow-on.now-stone { background: #f3f0eb; }
.page.flow-on.now-dark { --ink: #ffffff; --body: #e9e3da; --acc: #c9a872; --rule: #6b6056; --paper: #14100d; color: #e9e3da; background: #14100d; }
.page h2, .page h3, .page li, .page label { transition: color 1.1s ease; }

/* Type */
.display { font-family: var(--serif); font-weight: 300; font-size: clamp(2.25rem, 4vw, 3.25rem); line-height: 1.1; color: var(--ink); }
.eyebrow { font-size: .8125rem; font-weight: 400; letter-spacing: .24em; line-height: 1.8; text-transform: uppercase; color: var(--acc); }
.center { text-align: center; }
.stack > * + * { margin-top: 1.25rem; }

/* Skip link */
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 60; padding: .5rem 1rem; background: #ffffff; color: #17120f; }
.skip:focus { top: 1rem; }

/* Header */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; justify-content: space-between; align-items: center; padding: 1.5rem clamp(1.25rem, 4vw, 3.5rem); color: #ffffff; transition: transform .5s ease, background-color .5s ease, padding .5s ease; }
.site-header.is-solid { background: rgba(14, 11, 9, .94); padding-block: .5rem; }
.site-header.is-hidden { transform: translateY(-100%); }
.brand { display: block; }
.brand img { width: clamp(10.5rem, 18vw, 15rem); height: auto; filter: drop-shadow(0 1px 6px rgba(8,6,5,.55)); transition: width .5s ease; }
.is-solid .brand img { width: clamp(7.5rem, 11vw, 9.5rem); filter: none; }
.brand:hover { color: inherit; }
.menu-btn { min-height: 44px; padding: 0 .25rem; background: none; border: 0; color: #ffffff; font-size: .875rem; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; cursor: pointer; text-shadow: 0 1px 6px rgba(8,6,5,.6); }

/* Full-screen menu */
.menu { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 2rem; border: 0; background: #0f0b09; color: #ffffff; }
.menu[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; animation: menu-in .5s ease both; }
.menu::backdrop { background: #0f0b09; }
.menu-close { position: absolute; top: 1.5rem; right: clamp(1.25rem, 4vw, 3.5rem); }
.menu img { width: clamp(10rem, 16vw, 13rem); height: auto; margin-bottom: 1rem; }
.menu a { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.45; color: #ffffff; text-decoration: none; }
.menu a:hover, .menu a[aria-current] { color: #c9a872; }
@keyframes menu-in { from { opacity: 0; } to { opacity: 1; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .5rem 2rem; font-size: .8125rem; font-weight: 400; letter-spacing: .22em; line-height: 1.5; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background-color .35s ease, color .35s ease, border-color 1.1s ease, opacity 1.1s cubic-bezier(.2,.7,.2,1), transform 1.3s cubic-bezier(.2,.7,.2,1); }
.btn-solid { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-solid:hover { background: var(--acc); border-color: var(--acc); color: #ffffff; }
.btn-line { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }

/* Arriving as they scroll into view. Only script ever hides anything. */
.reveal { transition: opacity 1.1s cubic-bezier(.2,.7,.2,1), transform 1.3s cubic-bezier(.2,.7,.2,1), color 1.1s ease; }
.reveal.armed { opacity: 0; transform: translateY(2.75rem); }
.curtain { transition: clip-path 1.6s cubic-bezier(.65,0,.2,1); clip-path: inset(0 0 0 0); }
.curtain.armed { clip-path: inset(0 0 100% 0); }
.curtain-side { transition: clip-path 1.7s cubic-bezier(.65,0,.2,1); clip-path: inset(0 0 0 0); }
.curtain-side.armed { clip-path: inset(0 100% 0 0); }
.draw { height: 1px; background: var(--acc); transform-origin: left center; transition: transform 1.8s cubic-bezier(.65,0,.2,1), background-color 1.1s ease; }
.draw.armed { transform: scaleX(0); }
.d1 { transition-delay: .12s; } .d2 { transition-delay: .24s; } .d3 { transition-delay: .36s; } .d4 { transition-delay: .48s; } .d5 { transition-delay: .6s; }
.btn.reveal.d3 { transition-delay: .36s, .36s, 0s, .36s, .36s; }

/* Frames that let a photo drift */
.frame { position: relative; overflow: hidden; min-width: 0; }
.frame img { position: absolute; top: -8%; left: 0; width: 100%; max-width: none; height: 116%; object-fit: cover; will-change: transform; }

/* Opening screens */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 34rem; max-height: 62rem; background: #0b0807; overflow: hidden; color: #ffffff; }
.hero-short { height: 68vh; height: 68svh; min-height: 26rem; max-height: 42rem; }
.hero-stage { position: absolute; inset: 0; will-change: transform; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 2s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.hero-short .slide img { object-position: center 8%; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(8,6,5,.38) 0%, rgba(8,6,5,0) 15%, rgba(8,6,5,0) 64%, rgba(8,6,5,.62) 100%); }
.hero-copy { position: absolute; left: 0; right: 0; bottom: 3.5rem; z-index: 1; padding: 0 1.25rem; text-align: center; text-shadow: 0 1px 3px rgba(8,6,5,.75), 0 2px 26px rgba(8,6,5,.7); }
.hero-short .hero-copy { bottom: 2.5rem; }
.hero-title { font-family: var(--serif); font-weight: 300; font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1.05; letter-spacing: .02em; }
.hero-controls { display: flex; justify-content: center; align-items: center; gap: 1.25rem; margin-top: 1.25rem; }
.hero-arrow { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: none; border: 0; color: #ffffff; cursor: pointer; }
.hero-count { font-size: .875rem; font-weight: 400; letter-spacing: .2em; min-width: 5.5rem; }
.cue { position: absolute; left: 50%; bottom: 0; z-index: 1; width: 1px; height: 2.75rem; background: rgba(255,255,255,.85); }

@keyframes drift-a { from { transform: scale(1.02); } to { transform: scale(1.1) translate(-1%, -1%); } }
@keyframes drift-b { from { transform: scale(1.1) translate(1%, 0); } to { transform: scale(1.02); } }
@keyframes settle { from { opacity: 0; letter-spacing: .14em; } to { opacity: 1; letter-spacing: .02em; } }
@keyframes rise { from { opacity: 0; transform: translateY(1.25rem); } to { opacity: 1; transform: none; } }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.drift-a img { animation: drift-a 26s ease-in-out infinite alternate; }
.drift-b img { animation: drift-b 30s ease-in-out infinite alternate; }
.title-in { animation: settle 2.2s cubic-bezier(.2,.7,.2,1) both; }
.ctrl-in { animation: rise 1.4s 1.1s cubic-bezier(.2,.7,.2,1) both; }
.cue { animation: cue 3s ease-in-out infinite; }

/* Sections */
.wrap { max-width: 76rem; margin-inline: auto; }
.wrap-wide { max-width: 80rem; margin-inline: auto; }
.section { padding: clamp(4rem, 8vw, 7rem) var(--gutter); }
.split { display: flex; flex-wrap: wrap; gap: clamp(2rem, 6vw, 6rem); }
.split > * { flex: 1 1 20rem; min-width: 0; }
.split > .wide { flex: 2 1 22rem; }

/* Ribbon */
.ribbon-section { padding-bottom: clamp(3rem, 6vw, 5rem); }
.ribbon-wrap { overflow: hidden; }
.ribbon-track { display: flex; width: max-content; }
.js .ribbon-track { animation: ribbon 90s linear infinite; }
.ribbon-wrap:hover .ribbon-track, .ribbon-track.paused { animation-play-state: paused !important; }
.ribbon-track img { height: clamp(15rem, 25vw, 23rem); width: auto; aspect-ratio: 2 / 3; object-fit: cover; margin-right: 1.25rem; flex: none; }
@keyframes ribbon { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ribbon-toggle { display: none; min-height: 44px; margin: .5rem auto 0; padding: 0 1rem; background: none; border: 0; color: var(--body); font-size: .75rem; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; }
.js .ribbon-toggle { display: block; }

/* Photo beside a white panel */
.feature { display: flex; flex-wrap: wrap; align-items: stretch; }
.feature .frame { flex: 1 1 20rem; aspect-ratio: 2 / 3; margin-top: clamp(0rem, 4vw, 4rem); }
.feature .panel { flex: 1 1 22rem; padding: clamp(2.5rem, 6vw, 6rem) clamp(1.5rem, 5vw, 5rem); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }

/* Collections */
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.col { display: flex; flex-direction: column; gap: clamp(1.5rem, 3vw, 2.5rem); will-change: transform; }
.col-mid { margin-top: 7rem; }
@media (max-width: 800px) {
  .cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
  .col { display: contents; }
}
.tile { display: block; text-decoration: none; color: var(--ink); }
.tile-img { overflow: hidden; aspect-ratio: 2 / 3; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s ease; }
.tile:hover img { transform: scale(1.04); }
.tile h3 { margin-top: 1rem; text-align: center; font-family: var(--serif); font-weight: 400; font-size: 1.625rem; line-height: 1.3; }

/* Dark feature */
.band { display: flex; flex-wrap: wrap; align-items: center; max-width: 90rem; margin-inline: auto; }
.band .frame { flex: 3 1 24rem; aspect-ratio: 5 / 4; }
.band-copy { flex: 2 1 20rem; padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 5vw, 5rem); }

/* Gallery */
.gallery { columns: 3 17rem; column-gap: 1.25rem; }
.gallery img { width: 100%; margin-bottom: 1.25rem; break-inside: avoid; }

/* Lists */
.lines { list-style: none; padding: 0; }
.lines li { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.price { font-family: var(--serif); font-size: 2.25rem; line-height: 1.2; color: var(--ink); }

/* Steps */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: clamp(2rem, 4vw, 4rem); text-align: center; }
.step-num { font-family: var(--serif); font-style: italic; font-size: 1.5rem; line-height: 1.3; color: var(--acc); margin-bottom: .5rem; }
.steps h3 { font-family: var(--serif); font-weight: 400; font-size: 1.75rem; line-height: 1.2; color: var(--ink); margin-bottom: .75rem; }

/* Contact */
.contact { display: flex; flex-wrap: wrap; align-items: stretch; max-width: 90rem; margin-inline: auto; }
.contact-copy { flex: 1 1 22rem; min-width: 0; padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 5vw, 6rem); }
.contact .frame { flex: 1 1 22rem; min-height: 26rem; }
.form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-row { display: flex; flex-direction: column; gap: .25rem; }
.form label { font-size: .8125rem; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; }
.field { min-height: 44px; width: 100%; background: transparent; border: 0; border-bottom: 1px solid #9c9186; border-radius: 0; color: var(--ink); font-family: inherit; font-size: 1rem; transition: color 1.1s ease; }
select.field { background: var(--paper); }
textarea.field { resize: vertical; }
.trap { position: absolute; left: -9999px; }
.form-note { font-size: .875rem; }
.form-status { font-size: 1rem; font-weight: 400; color: var(--ink); min-height: 1.5rem; }

/* Portfolio */
.page-title { padding: clamp(9rem, 16vw, 12rem) var(--gutter) clamp(2.5rem, 5vw, 4rem); text-align: center; }
.page-title .display { font-size: clamp(2.75rem, 6vw, 4.5rem); margin-bottom: 1rem; }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1rem; margin-top: 2rem; }
.filter { min-height: 44px; padding: 0 .5rem; background: none; border: 0; border-bottom: 1px solid transparent; color: var(--body); font-size: .8125rem; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; }
.filter:hover { color: var(--acc); }
.filter[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--acc); }
.works { columns: 3 17rem; column-gap: 1.25rem; }
.work { display: block; width: 100%; margin: 0 0 1.25rem; padding: 0; background: none; border: 0; break-inside: avoid; cursor: zoom-in; overflow: hidden; }
.work[hidden] { display: none; }
.work img { width: 100%; transition: transform 1.1s ease; }
.work:hover img { transform: scale(1.03); }

/* Lightbox */
.lightbox { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(9, 7, 6, .97); color: #ffffff; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(9, 7, 6, .97); }
.lightbox img { max-width: calc(100% - 2rem); max-height: calc(100% - 7rem); width: auto; height: auto; object-fit: contain; }
.lb-close { position: absolute; top: .75rem; right: clamp(1rem, 3vw, 2rem); }
.lb-prev, .lb-next { position: absolute; bottom: .75rem; }
.lb-prev { left: calc(50% - 5.5rem); }
.lb-next { right: calc(50% - 5.5rem); }
.lb-count { position: absolute; bottom: 1.5rem; left: 0; right: 0; text-align: center; font-size: .8125rem; letter-spacing: .2em; pointer-events: none; }

/* Plain text pages */
.prose { max-width: 44rem; margin-inline: auto; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 1.875rem; line-height: 1.2; color: var(--ink); margin: 2.5rem 0 .75rem; }
.prose p + p { margin-top: 1rem; }
.prose ul { padding-left: 1.25rem; }

/* Footer */
.site-footer { background: #0b0807; color: #d9d2c8; padding: 3.5rem var(--gutter); text-align: center; }
.site-footer img { width: clamp(14rem, 26vw, 21rem); height: auto; margin: 0 auto 1.75rem; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.5rem; margin: 1.5rem 0; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .8125rem; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; }
.site-footer a:hover { color: #c9a872; }
.site-footer .eyebrow { color: #d9d2c8; }
.footer-contact { font-size: .9375rem; }
.footer-small { margin-top: 1.5rem; font-size: .8125rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .drift-a img, .drift-b img, .title-in, .ctrl-in, .cue, .js .ribbon-track, .menu[open] { animation: none; }
  .slide { transition: none; }
}
