:root {
  --paper: #f7f4ec;
  --surface: #faf8f3;
  --paper2: #f2eee5;
  --ink: #262320;
  --muted: #8c857d;
  --accent: #d9915f;
  --project-bg: #d5cfc6;
  --project-ink: #3d3935;
  --welcome-overlay: #d9824f;
  --welcome-overlay-opacity: .30;
  --welcome-max-width: 1500px;
  --base-font-size: 16px;
  --nav-font-size: 13px;
  --welcome-name-size: 64px;
  --welcome-role-size: 14px;
  --project-font-size: 16px;
  --caption-font-size: 14px;
  --font-body: "Avenir Next", "Century Gothic", "Trebuchet MS", Arial, sans-serif;
  --font-editorial: Georgia, "Times New Roman", serif;
  --rule: rgba(38,35,32,.14);
  --max: 1600px;
  --pad: clamp(22px,2.1vw,40px);
  --header-h: 118px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--base-font-size);
  -webkit-font-smoothing: antialiased;
}
body.font-primary-avenir { --font-body: "Avenir Next", "Century Gothic", "Trebuchet MS", Arial, sans-serif; }
body.font-primary-helvetica { --font-body: Helvetica, Arial, sans-serif; }
body.font-primary-trebuchet { --font-body: "Trebuchet MS", Arial, sans-serif; }
body.font-primary-arial { --font-body: Arial, Helvetica, sans-serif; }
body.font-primary-georgia { --font-body: Georgia, "Times New Roman", serif; }
body.font-editorial-georgia { --font-editorial: Georgia, "Times New Roman", serif; }
body.font-editorial-times { --font-editorial: "Times New Roman", Times, serif; }
body.font-editorial-avenir { --font-editorial: "Avenir Next", "Century Gothic", "Trebuchet MS", Arial, sans-serif; }
body.font-editorial-helvetica { --font-editorial: Helvetica, Arial, sans-serif; }
body.font-editorial-trebuchet { --font-editorial: "Trebuchet MS", Arial, sans-serif; }

a { color: inherit; }
button, input, textarea { font: inherit; }
img { max-width: 100%; display: block; }
.placeholder { background: linear-gradient(145deg,#e9e3d7,#f2ede4 48%,#e4ddd0); border: 1px solid rgba(38,35,32,.09); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; color: #9a9187; }
.placeholder::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg,transparent 49.7%,rgba(38,35,32,.07) 50%,transparent 50.3%), linear-gradient(45deg,transparent 49.7%,rgba(38,35,32,.07) 50%,transparent 50.3%); }
.placeholder span { position: relative; z-index: 1; background: rgba(247,244,236,.84); padding: 7px 10px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }

.site-header { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 0 var(--pad); position: relative; z-index: 10; background: var(--paper); }
.brand { display: flex; align-items: baseline; gap: 20px; text-decoration: none; white-space: nowrap; }
.brand-name { color: var(--accent); font-size: clamp(20px,1.45vw,29px); font-weight: 500; }
.brand-role { color: var(--muted); font-family: var(--font-editorial); font-size: clamp(13px,.92vw,18px); }
.main-nav { display: flex; gap: 30px; align-items: center; font-size: var(--nav-font-size); }
.main-nav a { text-decoration: none; color: var(--muted); transition: color .18s ease; }
.main-nav a:hover, .main-nav a.active { color: var(--ink); }
.main-nav a.active { font-weight: 600; }
.page { padding: 24px var(--pad) 70px; max-width: calc(var(--max) + (var(--pad)*2)); margin: 0 auto; }

/* Welcome */
.welcome-body { overflow: hidden; }
.welcome-hero { position: relative; width: 100%; height: 100vh; min-height: 650px; overflow: hidden; background: var(--paper); }
.welcome-slides { position: absolute; inset: 0; background: var(--paper); }
.welcome-slide { position: absolute; top: 0; bottom: 0; left: 50%; width: min(var(--welcome-max-width), 100vw); transform: translateX(-50%); opacity: 0; transition: opacity 1.15s ease; background-size: cover; background-position: center center; background-repeat: no-repeat; }
.welcome-slide.is-active { opacity: 1; }
.welcome-slide::after { content: ""; position: absolute; inset: 0; background: var(--welcome-overlay); opacity: var(--welcome-overlay-opacity); pointer-events: none; }
.welcome-slide:nth-child(4n+1):not([style]) { background: linear-gradient(112deg,#ccb18e 0 27%,#ead1ac 27% 60%,#b9948c 60% 100%); }
.welcome-slide:nth-child(4n+2):not([style]) { background: linear-gradient(135deg,#d6c0a4,#9e8878); }
.welcome-slide:nth-child(4n+3):not([style]) { background: linear-gradient(120deg,#d8b88f,#ead8b9); }
.welcome-slide:nth-child(4n):not([style]) { background: linear-gradient(135deg,#b99b83,#ddc9a9); }
.welcome-card { position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(690px,calc(100vw - 44px)); padding: 62px 60px 56px; background: var(--surface); text-align: center; box-shadow: 0 1px 0 rgba(0,0,0,.03); }
.welcome-card-role { margin: 0 0 22px; color: var(--accent); font-family: var(--font-editorial); font-size: var(--welcome-role-size); letter-spacing: .22em; text-transform: uppercase; }
.welcome-card-name { margin: 0 0 28px; color: var(--muted); font-size: clamp(38px,4.2vw,var(--welcome-name-size)); line-height: 1; letter-spacing: .10em; font-weight: 500; text-transform: uppercase; }
.welcome-card-nav { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; font-size: var(--nav-font-size); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.welcome-card-nav a { text-decoration: none; }
.welcome-card-nav a:hover { color: var(--accent); }
.welcome-socials { position: absolute; z-index: 6; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; gap: 10px; }
.social-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--accent); text-decoration: none; box-shadow: 0 1px 5px rgba(38,26,16,.10); transition: transform .18s ease,background .18s ease,color .18s ease; }
.social-icon:hover { transform: translateY(-2px); background: #fff; color: var(--accent); }
.social-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.social-icon svg .social-dot { fill: currentColor; stroke: none; }

/* Tasting */
.tasting-page { padding-top: 42px; padding-bottom: 80px; }
.tasting-gallery { columns: 3; column-gap: 12px; }
.tasting-item { break-inside: avoid; margin: 0 0 12px; position: relative; display: block; }
.tasting-thumb { display: block; width: 100%; border: 0; padding: 0; background: #e9e3d7; cursor: zoom-in; overflow: hidden; }
.tasting-thumb img { width: 100%; height: auto; transition: transform .28s ease,filter .28s ease; }
.tasting-thumb:hover img { transform: scale(1.012); filter: brightness(.92); }
.tasting-thumb .placeholder { width: 100%; height: 100%; }
.tasting-thumb.aspect-wide { aspect-ratio: 1.42/1; }
.tasting-thumb.aspect-portrait { aspect-ratio: .76/1; }
.tasting-thumb.aspect-square { aspect-ratio: 1/1; }
.tasting-thumb.aspect-tall { aspect-ratio: .64/1; }
.tasting-thumb.aspect-banner { aspect-ratio: 1.85/1; }

/* Projects */
.projects-page { padding-top: 46px; }
.project-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 16px 14px; }
.project-card { display: block; position: relative; text-decoration: none; aspect-ratio: .68; overflow: hidden; background: #e9e3d8; }
.project-card .placeholder, .project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease,filter .28s ease; }
.project-card:hover .placeholder, .project-card:hover img { transform: scale(1.015); filter: brightness(.72); }
.project-overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 18px; background: linear-gradient(to top,rgba(24,21,19,.72),transparent 55%); color: white; opacity: 0; transition: opacity .22s ease; }
.project-card:hover .project-overlay { opacity: 1; }
.project-title { font-size: 16px; line-height: 1.1; }
.project-subtitle { font-size: 11px; margin-top: 5px; opacity: .8; }

/* About */
.about-page { padding-top: 42px; }
.about-layout { max-width: 1040px; margin: 20px auto 0; display: grid; grid-template-columns: 1.42fr .48fr 1fr; gap: 28px; align-items: start; }
.about-photo { aspect-ratio: 1/1; }
.about-photo img, .about-photo .placeholder { width: 100%; height: 100%; object-fit: cover; }
.about-side h3 { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 2px 0 16px; font-weight: 500; }
.about-side ul { list-style: none; margin: 0 0 42px; padding: 0; font-family: var(--font-editorial); font-size: 13px; line-height: 1.65; color: var(--muted); }
.about-copy { font-family: var(--font-editorial); font-size: 14px; line-height: 1.75; color: var(--muted); }
.about-copy p { margin: 0 0 22px; }
.about-copy a { color: var(--accent); text-decoration: none; }
.contact-button { display: inline-block; margin-top: 18px; background: var(--ink)!important; color: var(--surface)!important; text-decoration: none; padding: 12px 34px; font-size: 12px; }

/* Project detail */
.project-detail { background: var(--project-bg); min-height: 100vh; color: var(--project-ink); font-family: var(--font-body); font-size: var(--project-font-size); }
.project-detail a, .project-detail button, .project-detail p, .project-detail figcaption, .project-detail div { font-family: var(--font-body); }
.project-back { position: fixed; top: 16px; right: 26px; z-index: 8; font-size: calc(var(--project-font-size) * 1.5); text-decoration: none; border-bottom: 2px solid var(--accent); line-height: 1.05; background: var(--project-bg); backdrop-filter: blur(4px); }
.project-hero { padding: 68px 38px 24px; display: grid; grid-template-columns: 270px minmax(330px,520px) 1fr; gap: 34px; align-items: start; }
.project-logo { height: 170px; }
.project-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.project-logo .placeholder { width: 100%; height: 100%; background: transparent; border: 0; color: var(--project-ink); }
.project-logo .placeholder::before { display: none; }
.project-logo .placeholder span { background: transparent; color: var(--project-ink); font-size: var(--project-font-size); }
.project-meta { font-size: var(--project-font-size); line-height: 1.45; padding-top: 4px; }
.meta-label { color: var(--accent); margin-top: 7px; }
.meta-value { margin-top: 2px; }
.project-description { grid-column: 1/-1; font-size: var(--project-font-size); line-height: 1.8; margin: 5px 0 0; max-width: 1500px; }
.project-gallery { padding: 16px 38px 72px; display: grid; grid-template-columns: repeat(12,1fr); gap: 32px 18px; align-items: start; }
.gallery-item { margin: 0; min-width: 0; }
.gallery-item.layout-quarter { grid-column: span 3; }
.gallery-item.layout-third { grid-column: span 4; }
.gallery-item.layout-half { grid-column: span 6; }
.gallery-item.layout-full { grid-column: span 12; }
.gallery-media { display: block; border: 0; padding: 0; width: 100%; background: transparent; cursor: zoom-in; text-align: left; }
.gallery-media img { width: 100%; height: auto; }
.project-image-placeholder { width: 100%; aspect-ratio: 4/3; background: linear-gradient(145deg,#bbb3a8,#c8c0b5 48%,#aaa296); color: var(--project-ink); }
.gallery-item figcaption { font-size: var(--caption-font-size); margin-top: 10px; line-height: 1.45; color: var(--project-ink); }
.project-footer-back { display: block; margin: 0 38px 46px; width: max-content; font-size: calc(var(--project-font-size) * 1.45); text-decoration: none; border-bottom: 2px solid var(--accent); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(18,16,14,.94); z-index: 100; display: none; align-items: center; justify-content: center; padding: 34px 70px; }
.lightbox.open { display: flex; }
.lightbox-content { max-width: 92vw; max-height: 90vh; display: flex; align-items: center; justify-content: center; }
.lightbox-content img { max-width: 92vw; max-height: 90vh; object-fit: contain; }
.lightbox-content .placeholder { width: min(1200px,80vw); height: min(78vh,800px); background: #292623; border-color: #45403b; color: #cfc6bb; }
.lightbox-close, .lightbox-prev, .lightbox-next { position: fixed; appearance: none; border: 0; background: none; color: white; cursor: pointer; font-size: 36px; line-height: 1; }
.lightbox-close { top: 22px; right: 28px; font-size: 30px; }
.lightbox-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 22px; top: 50%; transform: translateY(-50%); }
.lightbox-caption { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); color: #d4ccc2; font-family: var(--font-editorial); font-size: var(--caption-font-size); text-align: center; max-width: 70vw; }
.lightbox-caption:empty { display: none; }

@media(max-width:1200px) {
  .project-grid { grid-template-columns: repeat(4,1fr); }
  .project-hero { grid-template-columns: 220px minmax(300px,1fr); }
  .gallery-item.layout-quarter { grid-column: span 4; }
}

@media(max-width:820px) {
  :root { --header-h: auto; }
  .site-header { height: auto; align-items: flex-start; padding-top: 24px; padding-bottom: 22px; flex-direction: column; }
  .brand { gap: 10px; flex-direction: column; }
  .main-nav { gap: 18px; flex-wrap: wrap; }
  .page { padding-top: 18px; }
  .welcome-slide { width: 100vw; }
  .welcome-card { padding: 44px 26px 40px; }
  .welcome-card-name { letter-spacing: .06em; }
  .tasting-gallery { columns: 2; }
  .project-grid { grid-template-columns: repeat(2,1fr); }
  .about-layout { grid-template-columns: 1fr; }
  .about-photo { max-width: 520px; }
  .about-side { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .about-side ul { margin-bottom: 18px; }
  .project-back { position: static; display: block; margin: 18px 20px 0 auto; width: max-content; font-size: calc(var(--project-font-size) * 1.15); }
  .project-hero { padding: 36px 20px 20px; grid-template-columns: 1fr; }
  .project-logo { height: 120px; width: 250px; }
  .project-description { grid-column: 1; }
  .project-gallery { padding: 14px 20px 55px; grid-template-columns: 1fr; gap: 28px; }
  .gallery-item.layout-quarter, .gallery-item.layout-third, .gallery-item.layout-half, .gallery-item.layout-full { grid-column: 1; }
  .project-footer-back { margin-left: 20px; }
}

@media(max-width:560px) {
  .tasting-gallery { columns: 1; }
  .welcome-card-nav { gap: 13px; }
  .welcome-card { width: calc(100vw - 34px); }
}
