/* Samarkan is self-hosted from assets/fonts (it is not on any web-font CDN) and preloaded in index.html.
   font-display: block keeps the wordmark invisible while the font loads instead of flashing the fallback serif. */
@font-face {
  font-family: "Samarkan";
  src: url("./assets/fonts/Samarkan.ttf") format("truetype");
  font-display: block;
}

/* Fraunces (SIL OFL, see assets/fonts/Fraunces-OFL.txt) is self-hosted as two variable-font subsets from
   Google Fonts, covering weights 300-700 and the optical-size axis. The browser downloads only the subsets
   whose characters appear on the page. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 700;
  font-display: block;
  src: url("./assets/fonts/Fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 700;
  font-display: block;
  src: url("./assets/fonts/Fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --display: "Samarkan", Georgia, "Times New Roman", serif;
  --green: #173832;
  --green-deep: #102923;
  --burgundy: #57252d;
  --ivory: #f4efe6;
  --paper: #fbf8f2;
  --ink: #171715;
  --copper: #c47a4f;
  --saffron: #d19a52;
  --line-light: rgba(244, 239, 230, 0.26);
  --line-dark: rgba(23, 23, 21, 0.18);
  --page-gutter: clamp(22px, 4.2vw, 72px);
  --serif: Georgia, "Times New Roman", serif;
  --fraunces: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--green-deep); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
img { display: block; width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto 0;
  height: 106px;
  padding: 0 var(--page-gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: var(--ivory);
  transition: height 240ms ease, background-color 240ms ease, box-shadow 240ms ease;
}
.site-header.is-scrolled {
  height: 78px;
  background: rgba(30, 30, 30, .45);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-header.is-scrolled .wordmark-main { font-size: 1.75rem; }
.site-header.is-scrolled .wordmark-sub { margin-top: 3px; opacity: .78; }
.wordmark-main, .wordmark-sub { transition: font-size 240ms ease, margin 240ms ease, opacity 240ms ease; }

.wordmark { grid-column: 2; text-align: center; display: flex; flex-direction: column; line-height: 1.1; }
/* Samarkan's connected headline stroke needs mixed case and no extra letter spacing */
.wordmark-main { font-family: var(--display); font-size: 2.5rem; letter-spacing: 0; }
.wordmark-sub { margin-top: 6px; font-family: var(--sans); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em; color: rgba(244, 239, 230, 0.72); }
.site-nav { justify-self: end; display: flex; align-items: center; gap: clamp(18px, 2.1vw, 38px); font-family: var(--fraunces); font-size: 0.8rem; text-transform: uppercase; }
.site-nav a { position: relative; }
.site-nav a::after { content: ""; position: absolute; left: 0; bottom: -8px; width: 100%; height: 1px; background: var(--copper); transform: scaleX(0); transform-origin: right; transition: transform 220ms ease; }
.site-nav a:hover::after, .site-nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.nav-enquire { color: #efb58f; }
.menu-toggle { display: none; }

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 44% 56%;
  overflow: hidden;
  background: var(--green);
  color: var(--ivory);
}

/* Stacked sections: each one scrolls until its bottom edge reaches the bottom of the screen, then freezes
   while the next section slides up over it. script.js sets --sticky-top to (window height - section height). */
main > section { position: sticky; top: var(--sticky-top, 0px); }
main > section:nth-child(1) { z-index: 1; }
main > section:nth-child(2) { z-index: 2; }
main > section:nth-child(3) { z-index: 3; }
main > section:nth-child(4) { z-index: 4; }
.hero-copy { min-width: 0; padding: 200px clamp(36px, 5.5vw, 104px) 72px var(--page-gutter); display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 2; }
.eyebrow { margin: 0 0 18px; font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--copper); }
.hero h1, .section-heading h2, .artist h2, .commissions h2 { margin: 0; font-family: var(--fraunces); font-weight: 400; letter-spacing: 0; line-height: 0.94; }
.hero h1 { font-size: clamp(2rem, 12vw, 12rem); white-space: nowrap; position: relative; z-index: 3; }
.hero-intro { max-width: 500px; margin: 32px 0 35px; color: rgba(244,239,230,.78); font-family: var(--serif); font-size: 1.15rem; line-height: 1.7; }
.button { width: fit-content; min-height: 48px; padding: 13px 23px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 0; font-family: var(--serif); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; cursor: pointer; transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease; }
.button-light { background: var(--ivory); color: var(--green); }
.button-light:hover { background: var(--copper); color: var(--ink); }
.hero-art { margin: 106px 0 0; min-height: calc(100svh - 106px); position: relative; overflow: hidden; background: #0f292a; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16,41,35,.26), transparent 28%); pointer-events: none; }
.hero-art img { height: 100%; object-fit: cover; }
.hero-art figcaption { position: absolute; z-index: 2; right: var(--page-gutter); bottom: 34px; text-align: right; display: flex; flex-direction: column; color: var(--ivory); text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.hero-art figcaption span:first-child { font-family: var(--serif); font-size: 1.25rem; }
.hero-art figcaption span:last-child { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .08em; }
.scroll-cue { position: absolute; z-index: 4; left: calc(44% + 30px); bottom: 64px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.5rem; letter-spacing: .05em; color: #EBAA91; animation: scroll-cue-intro 1.2s cubic-bezier(.22, 1, .36, 1) 2.3s both, scroll-cue-nudge 3s ease-in-out 3.5s infinite; }
.scroll-cue-arrow { position: relative; width: 1.5px; height: 52px; background: currentColor; animation: scroll-cue-arrow 4s ease-in-out 3.5s infinite; }
/* Fades down into place on load (after the hero button), then the nudge loop takes over. Uses `translate` so it
   doesn't fight the nudge, which animates `transform`. */
@keyframes scroll-cue-intro {
  from { opacity: 0; translate: 0 -28px; }
  to { opacity: 1; translate: 0 0; }
}
.scroll-cue-arrow::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateX(-50%) rotate(45deg); transform-origin: center; }
@keyframes scroll-cue-nudge {
  0%, 70%, 100% { transform: translateY(0); }
  80% { transform: translateY(8px); }
  90% { transform: translateY(0); }
}
@keyframes scroll-cue-arrow {
  0%, 70%, 100% { transform: translateY(0); opacity: 1; }
  80% { transform: translateY(10px); opacity: .55; }
  90% { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue, .scroll-cue span { animation: none; }
}

/* Landing intro: art fades in diagonally from the top left, title wipes in left to right, then the intro copy and button rise into place */
.hero-art {
  -webkit-mask-image: linear-gradient(to bottom right, #000 40%, transparent 60%);
  mask-image: linear-gradient(to bottom right, #000 40%, transparent 60%);
  -webkit-mask-size: 300% 300%;
  mask-size: 300% 300%;
  animation: hero-art-wipe 3s cubic-bezier(.65, 0, .35, 1) .3s both;
}
.hero-art img { animation: hero-art-brighten 3.2s cubic-bezier(.33, 0, .2, 1) .2s both; }
.hero h1 { width: fit-content; animation: hero-title-wipe 1.8s cubic-bezier(.65, 0, .35, 1) .6s both; }
/* "backwards" (not "both") so no transform lingers on the header afterwards: a leftover transform would trap the
   fixed mobile menu inside the header. */
.site-header { animation: hero-rise 1.2s cubic-bezier(.22, 1, .36, 1) .1s backwards; }
.hero .eyebrow { animation: hero-rise 1.2s cubic-bezier(.22, 1, .36, 1) .3s both; }
.hero-intro { animation: hero-rise 1.2s cubic-bezier(.22, 1, .36, 1) 1.8s both; }
.hero-copy .button { animation: hero-rise 1.2s cubic-bezier(.22, 1, .36, 1) 2.05s both; }
@keyframes hero-art-wipe {
  from { -webkit-mask-position: 100% 100%; mask-position: 100% 100%; }
  to { -webkit-mask-position: 0 0; mask-position: 0 0; }
}
@keyframes hero-art-brighten {
  from { filter: brightness(.2); }
  to { filter: brightness(1); }
}
@keyframes hero-title-wipe {
  from { clip-path: inset(-15% 100% -25% -5%); }
  to { clip-path: inset(-15% -5% -25% -5%); }
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.collection { background: var(--paper); color: var(--ink); padding: 130px var(--page-gutter) 150px; }
.section-heading { display: grid; grid-template-columns: 1.15fr .85fr; gap: 60px; align-items: end; }
.section-heading h2, .artist h2, .commissions h2 { font-size: clamp(3.25rem, 6vw, 7.2rem); }
.collection-heading > p { max-width: 520px; margin: 0 0 8px; color: #544e47; font-family: var(--serif); font-size: 1.12rem; }
.collection-tabs { margin: 70px 0 42px; display: flex; flex-wrap: wrap; gap: 8px 30px; border-bottom: 1px solid var(--line-dark); }
.filter-button { padding: 0 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-family: var(--serif); font-size: 1rem; cursor: pointer; opacity: .6; }
.filter-button:hover, .filter-button:focus-visible, .filter-button.is-active { opacity: 1; color: #8b4d35; border-bottom-color: #8b4d35; }
.art-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 58px 30px; align-items: start; }
/* Each card spans two rows of the grid (image, caption) via subgrid, so images in a row share a top line
   and captions in a row start on a shared line below the tallest image. */
.art-card { grid-column: span 4; grid-row: span 2; display: grid; grid-template-rows: subgrid; row-gap: 0; min-width: 0; transition: opacity 220ms ease, transform 220ms ease; }
.art-card.is-hidden { display: none; }
.art-image-wrap { align-self: start; overflow: hidden; background: #e9e2d6; }
.art-card-wide .art-image-wrap { aspect-ratio: 4 / 3; }
.art-card-tall .art-image-wrap { aspect-ratio: 4 / 5; }
.art-card-square .art-image-wrap { aspect-ratio: 1; }
.art-image-wrap img { height: 100%; object-fit: cover; transition: transform 700ms cubic-bezier(.2,.7,.2,1); }
.art-card:hover .art-image-wrap img { transform: scale(1.025); }
.art-details { display: grid; grid-template-columns: 1fr auto; gap: 2px 20px; padding-top: 18px; border-top: 1px solid var(--line-dark); }
.art-details h3 { grid-column: 1 / -1; margin: 0 0 7px; font-family: var(--serif); font-size: clamp(1.5rem, 2.2vw, 2.25rem); font-weight: 400; line-height: 1.15; color: var(--burgundy); }
.art-details p { grid-column: 1; margin: 0; font-size: .82rem; color: #544e47; }
.availability { grid-column: 1; margin-top: 9px; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); }
.art-enquire { grid-column: 2; grid-row: 2 / 5; align-self: end; padding: 7px 0; border: 0; border-bottom: 1px solid #8b4d35; background: transparent; color: #8b4d35; font-family: var(--serif); cursor: pointer; }

.artist { min-height: 840px; padding: 120px var(--page-gutter); display: grid; grid-template-columns: minmax(300px,.85fr) 1.15fr; gap: clamp(70px,10vw,170px); align-items: center; background: var(--burgundy); color: var(--ivory); }
.artist-mark { aspect-ratio: 4/5; max-width: 560px; width: 100%; justify-self: end; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--green); color: var(--ivory); position: relative; }
.artist-mark::before, .artist-mark::after { content: ""; position: absolute; width: 58%; aspect-ratio: 1; border: 1px solid rgba(196,122,79,.65); transform: rotate(45deg); }
.artist-mark::after { width: 38%; border-color: rgba(244,239,230,.38); }
.artist-mark span:first-child { position: relative; z-index: 1; font-family: var(--serif); font-size: clamp(4rem,8vw,8rem); color: var(--copper); line-height: 1; }
.artist-mark span:last-child { position: relative; z-index: 1; margin-top: 18px; text-transform: uppercase; letter-spacing: .2em; font-family: var(--serif); }
.artist-copy { max-width: 730px; }
.artist-copy .eyebrow { margin-bottom: 25px; }
.artist-lead { margin: 42px 0 20px; max-width: 670px; font-family: var(--serif); font-size: clamp(1.16rem,2vw,1.84rem); line-height: 1.45; }
.artist-copy > p:not(.eyebrow):not(.artist-lead) { max-width: 620px; color: rgba(244,239,230,.74); }
.text-link { display: inline-flex; gap: 12px; margin-top: 24px; padding-bottom: 3px; border-bottom: 1px solid var(--copper); font-family: var(--serif); color: #efaa7b; }

.commissions { padding: 130px var(--page-gutter); display: grid; grid-template-columns: minmax(0,.9fr) minmax(460px,1.1fr); gap: clamp(70px,10vw,170px); background: var(--green); color: var(--ivory); }
.commission-intro > p:not(.eyebrow) { max-width: 550px; margin: 34px 0 44px; font-family: var(--serif); font-size: 1.18rem; color: rgba(244,239,230,.74); }
.commission-notes { margin: 0; border-top: 1px solid var(--line-light); }
.commission-notes div { padding: 13px 0; display: grid; grid-template-columns: 130px 1fr; border-bottom: 1px solid var(--line-light); }
.commission-notes dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--copper); }
.commission-notes dd { margin: 0; font-family: var(--serif); }
.enquiry-form { align-self: start; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; padding: 44px; background: var(--ivory); color: var(--ink); }
.field { min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 5px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: #655e55; }
.field label span { text-transform: none; letter-spacing: 0; font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 9px 0; border: 0; border-bottom: 1px solid #aaa196; border-radius: 0; background: transparent; color: var(--ink); outline: none; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--copper); box-shadow: 0 1px 0 var(--copper); }
.button-dark { grid-column: 1 / -1; width: 100%; margin-top: 6px; background: var(--ink); color: var(--ivory); }
.button-dark:hover { background: var(--burgundy); }
.form-note { grid-column: 1 / -1; margin: -14px 0 0; text-align: center; font-size: .75rem; color: #72695f; }

.site-footer { padding: 55px var(--page-gutter); display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 30px; align-items: end; background: var(--green-deep); color: rgba(244,239,230,.7); border-top: 1px solid var(--line-light); font-size: .78rem; }
.footer-brand { display: flex; flex-direction: column; }
.footer-brand span:first-child { font-family: var(--display); font-size: 1.45rem; letter-spacing: 0; color: var(--ivory); }
.footer-brand span:last-child { text-transform: uppercase; letter-spacing: .1em; }
.site-footer p { margin: 0; }
.footer-whatsapp { margin: 0; }
.footer-whatsapp button { padding: 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: #efaa7b; font: inherit; cursor: pointer; }
.copyright { grid-column: 1 / -1; padding-top: 24px; margin-top: 5px !important; border-top: 1px solid var(--line-light); }

:focus-visible { outline: 2px solid var(--saffron); outline-offset: 4px; }

/* Scroll reveal: script.js marks the page with .has-reveal and adds .is-visible as each element scrolls into view.
   Without the script, everything simply shows. */
.reveal { transition: opacity 1.2s cubic-bezier(.22, 1, .36, 1), transform 1.2s cubic-bezier(.22, 1, .36, 1); }
.has-reveal .reveal:not(.is-visible) { opacity: 0; transform: translateY(40px); }

@media (max-width: 1050px) {
  .site-header { grid-template-columns: 1fr auto; }
  .wordmark { grid-column: 1; justify-self: start; text-align: left; position: relative; z-index: 2; }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 7px; width: 44px; height: 44px; padding: 0 7px; border: 0; background: transparent; cursor: pointer; position: relative; z-index: 2; }
  .menu-toggle span:not(.sr-only) { display: block; width: 100%; height: 1px; background: var(--ivory); transition: transform 180ms ease; }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }
  .site-nav { position: fixed; inset: 0; z-index: 1; width: 100vw; height: 100vh; justify-self: stretch; padding: 130px var(--page-gutter) 50px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 24px; background: var(--green-deep); opacity: 0; visibility: hidden; transition: opacity 180ms ease, visibility 180ms ease; font-size: clamp(2rem,6vw,4.2rem); text-transform: none; }
  .site-nav.is-open { opacity: 1; visibility: visible; }
  .hero { grid-template-columns: 48% 52%; }
  .hero h1 { font-size: clamp(3.8rem,10vw,8rem); }
  .scroll-cue { left: calc(48% + 20px); }
  .art-card { grid-column: span 6; }
  .artist { grid-template-columns: .8fr 1.2fr; gap: 60px; }
  .commissions { grid-template-columns: 1fr; }
}

@media (max-width: 740px) {
  .site-header { height: 88px; }
  .site-header.is-scrolled { height: 72px; }
  .wordmark-main { font-size: 1.7rem; }
  .wordmark-sub { font-family: var(--serif); font-size: .5rem; }
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-copy { min-height: 73svh; padding: 145px var(--page-gutter) 54px; }
  .hero-copy::before { margin-bottom: 26px; }
  .hero h1 { font-size: clamp(3.5rem, 18vw, 5.7rem); white-space: normal; }
  .hero-intro { margin: 26px 0 30px; }
  .hero-art { margin: 0; min-height: 0; height: 72svh; }
  .hero-art figcaption { right: 22px; bottom: 20px; max-width: 75%; }
  .scroll-cue { display: none; }
  .collection { padding-top: 90px; padding-bottom: 100px; }
  .section-heading { grid-template-columns: 1fr; gap: 28px; }
  .section-heading h2, .artist h2, .commissions h2 { font-size: clamp(3.2rem,16vw,5.3rem); }
  .collection-tabs { margin-top: 45px; gap: 8px 20px; }
  .filter-button { font-size: .88rem; }
  .art-grid { display: block; }
  .art-card { display: block; margin: 0 0 58px; }
  .art-details { gap: 2px 10px; }
  .artist { min-height: 0; padding-top: 90px; padding-bottom: 100px; grid-template-columns: 1fr; gap: 60px; }
  .artist-mark { justify-self: center; max-width: 440px; }
  .artist-lead { margin-top: 32px; }
  .commissions { padding-top: 90px; padding-bottom: 90px; gap: 60px; }
  .enquiry-form { grid-template-columns: 1fr; padding: 28px 22px; }
  .field, .field-full { grid-column: 1; }
  .site-footer { grid-template-columns: 1fr; align-items: start; }
  .copyright { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
