/* Blanca Cabral — Art · shared styles */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --paper: #f2ede8;
  --ink: #1a1714;
  --ink-soft: #4a4540;
  --muted: #6b6560;
  --line: #cfc5b8;
  --accent: #7a5a2c;
  --gold: #c8a97a;
  --tile-1: #d9cfc2;
  --tile-2: #cdd3c9;
  --tile-3: #d8c7bd;
  --success-bg: #e3eedd;
  --success-ink: #24421a;
  --error-ink: #8a2a1f;
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  animation: pageIn 0.6s ease both;
}
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
body.leaving { opacity: 0; transition: opacity 0.25s ease; }

a { color: var(--ink); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
main { min-height: 70vh; }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.eyebrow { margin: 0; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.display { margin: 0; font-family: 'Bebas Neue', sans-serif; font-weight: 400; letter-spacing: 0.02em; line-height: 1; }
.serif { font-family: 'DM Serif Display', serif; font-weight: 400; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 14px 28px;
  font: 500 13px/1 'DM Sans', sans-serif; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn:disabled { cursor: not-allowed; opacity: 0.55; background: transparent; color: var(--ink); border-color: var(--ink); }
.link-btn {
  background: none; border: none; padding: 10px 0 3px; cursor: pointer;
  font: inherit; color: var(--ink); border-bottom: 1px solid var(--ink);
}
.link-btn:hover { color: var(--accent); border-color: var(--accent); }
.text-link { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--ink); padding: 12px 0 3px; }

/* HEADER */
header.site { position: sticky; top: 0; z-index: 20; background: rgba(242,237,232,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
header.site.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-top: 18px; padding-bottom: 18px; }
.logo { font-family: 'Bebas Neue', sans-serif; font-size: 26px; letter-spacing: 0.08em; text-decoration: none; }
.logo span { color: var(--accent); }
nav.main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
nav.main a { text-decoration: none; padding: 12px 0; border-bottom: 1px solid transparent; }
nav.main a[aria-current="page"] { border-bottom-color: var(--ink); }
nav.main .back { color: var(--muted); }
.cart-btn { min-height: 44px; padding: 12px 18px; }

/* PAGE HEAD */
.page-head { padding-top: 64px; padding-bottom: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; }
.page-head h1 { font-size: clamp(64px, 9vw, 120px); }
.page-head p { margin: 0; max-width: 420px; font-size: 16px; line-height: 1.7; color: var(--ink-soft); }

/* FRAMES */
.frame {
  aspect-ratio: 4 / 5; background: var(--tile-1); position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 32px;
}
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.placeholder-label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }

/* HOME */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 56px; align-items: end; padding-top: 72px; padding-bottom: 96px; }
.hero-text { display: flex; flex-direction: column; gap: 24px; }
.hero h1 { margin: 0; font-family: 'DM Serif Display', serif; font-weight: 400; font-size: clamp(46px, 6vw, 88px); line-height: 1.02; }
.hero p.lead { margin: 0; max-width: 460px; font-size: 17px; line-height: 1.7; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.hero .frame { padding: 0; }
.hero-caption { margin: 10px 0 0; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }

.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0; border-top: 1px solid var(--line); margin-bottom: 120px; }
.door {
  display: flex; flex-direction: column; gap: 14px; padding: 40px 28px 44px 0;
  text-decoration: none; border-bottom: 1px solid var(--line);
}
.door + .door { padding-left: 28px; border-left: 1px solid var(--line); }
.door .num { font-family: 'Bebas Neue', sans-serif; font-size: 18px; color: var(--accent); letter-spacing: 0.1em; }
.door h2 { margin: 0; font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 34px; line-height: 1.1; }
.door p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--ink-soft); max-width: 340px; }
.door .go { margin-top: auto; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; transition: transform 0.3s; }
.door:hover h2 { color: var(--accent); }
.door:hover .go { transform: translateX(6px); }

/* STUDIO */
.studio-grid { columns: 3 300px; column-gap: 28px; padding-bottom: 40px; }
.work {
  break-inside: avoid; margin: 0 0 40px; display: block; width: 100%;
  background: none; border: none; padding: 0; text-align: left; cursor: pointer; color: inherit; font: inherit;
}
.work .img { overflow: hidden; background: var(--tile-1); }
.work img { width: 100%; height: auto; transition: transform 0.7s ease; }
.work:hover img { transform: scale(1.03); }
.work .caption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 12px; }
.work .caption strong { font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 21px; }
.work .caption span { font-size: 13px; color: var(--muted); }
.work:hover .caption strong { color: var(--accent); }
.studio-note { margin: 0 0 120px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 24px; }

/* WORK DETAIL (full-screen view) */
.detail {
  position: fixed; inset: 0; z-index: 60; background: var(--paper); overflow-y: auto;
  transform: translateX(100%); transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
  visibility: hidden;
}
.detail.open { transform: none; visibility: visible; }
.detail-bar {
  position: sticky; top: 0; z-index: 2; background: rgba(242,237,232,0.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.detail-bar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.detail-bar button { background: none; border: none; cursor: pointer; font: 13px 'DM Sans', sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); padding: 12px 0; }
.detail-bar button:hover { color: var(--accent); }
.detail-count { font-size: 12px; letter-spacing: 0.14em; color: var(--muted); }
.detail-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 56px; align-items: start; padding-top: 48px; padding-bottom: 96px; }
.detail-img { display: flex; justify-content: center; }
.detail-img img { max-height: 82vh; width: auto; max-width: 100%; object-fit: contain; }
.detail-info { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 100px; }
.detail-info h2 { margin: 0; font-family: 'DM Serif Display', serif; font-weight: 400; font-size: clamp(34px, 4vw, 52px); line-height: 1.05; }
.detail-meta { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.detail-meta li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.detail-meta li span:first-child { color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; }
.detail-note { margin: 0; font-size: 16px; line-height: 1.8; color: var(--ink-soft); }
.detail-nav { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* PRINTS */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; border-top: 1px solid var(--line); padding-top: 40px; margin-bottom: 40px; }
.prints-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 44px 28px; padding-bottom: 120px; }
.print { display: flex; flex-direction: column; gap: 14px; }
.print .frame { padding: 24px; }
.print[data-tone="2"] .frame { background: var(--tile-2); }
.print[data-tone="3"] .frame { background: var(--tile-3); }
.badge {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  background: var(--paper); color: var(--ink); padding: 7px 12px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
}
.print-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.print h3 { margin: 0; font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 23px; }
.print .price { font-size: 15px; font-weight: 500; }
.print .meta { margin: 0; font-size: 13px; color: var(--muted); }
.print .btn { align-self: flex-start; font-size: 12px; padding: 13px 20px; }

/* ABOUT */
.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 56px; align-items: center; padding-top: 40px; padding-bottom: 120px; scroll-margin-top: 60px; }
.about .frame { aspect-ratio: 1 / 1; background: var(--tile-2); }
.about-text { display: flex; flex-direction: column; gap: 20px; }
.about-text h2 { margin: 0; font-family: 'DM Serif Display', serif; font-weight: 400; font-size: clamp(34px, 4vw, 46px); line-height: 1.1; }
.about-text p:not(.eyebrow) { margin: 0; font-size: 16px; line-height: 1.8; color: var(--ink-soft); max-width: 520px; }

/* MAILBOX */
.mailbox { background: var(--ink); color: var(--paper); }
.mailbox a { color: var(--paper); }
.mailbox-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px; align-items: center; padding-top: 96px; padding-bottom: 96px; }
.mailbox-copy { display: flex; flex-direction: column; gap: 18px; }
.mailbox .eyebrow { color: var(--gold); }
.mailbox h1 { font-size: clamp(56px, 8vw, 96px); line-height: 0.95; }
.mailbox-copy p:not(.eyebrow) { margin: 0; font-size: 16px; line-height: 1.8; color: #cfc5b8; max-width: 480px; }

/* FORMS */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field textarea {
  font: 15px/1.4 'DM Sans', sans-serif; letter-spacing: normal; text-transform: none;
  padding: 13px 14px; border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.check input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; }
.mailbox .field, .mailbox .check { color: #cfc5b8; }
.mailbox .field input { background: transparent; border-color: #6b6560; color: var(--paper); }
.mailbox .field input::placeholder { color: #9a9087; }
.mailbox .btn { background: var(--gold); border-color: var(--gold); color: var(--ink); align-self: flex-start; }
.mailbox .btn:hover { background: var(--paper); border-color: var(--paper); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin: 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.form-error { margin: 0; font-size: 14px; color: var(--error-ink); }
.mailbox .form-error { color: #f0b8ad; }
.success { padding: 22px; background: var(--success-bg); color: var(--success-ink); font-size: 15px; line-height: 1.6; }
.mailbox .success { background: #2a2622; color: var(--paper); border: 1px solid var(--gold); }

/* FOOTER */
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 32px; padding-bottom: 32px; font-size: 13px; color: var(--muted); }
footer.site .links { display: flex; flex-wrap: wrap; gap: 20px; }
footer.site a { color: var(--muted); }
.mailbox-page footer.site { background: var(--ink); }
.mailbox-page footer.site .wrap { border-top: 1px solid #3a3530; }

/* DIALOGS */
dialog { border: none; padding: 0; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: rgba(26,23,20,0.55); }
.close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px;
  background: none; border: none; font-size: 26px; line-height: 1; color: var(--ink); cursor: pointer;
}
.how { width: min(620px, calc(100% - 32px)); max-height: 90vh; }
.how-inner { position: relative; padding: 48px 40px 40px; display: flex; flex-direction: column; gap: 26px; }
.how h2 { font-size: 52px; }
.steps { display: flex; flex-direction: column; gap: 22px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 18px; align-items: baseline; }
.steps .num { font-family: 'Bebas Neue', sans-serif; font-size: 32px; color: var(--accent); }
.steps h3 { margin: 0 0 4px; font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 22px; }
.steps p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted); }

.cart { margin: 0 0 0 auto; width: min(440px, 100%); height: 100vh; max-height: 100vh; }
.cart-inner { position: relative; padding: 40px 28px; display: flex; flex-direction: column; gap: 22px; min-height: 100%; }
.cart h2 { font-size: 44px; }
.cart-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.cart-list li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-thumb { width: 56px; height: 70px; background: var(--tile-1); flex-shrink: 0; object-fit: cover; }
.cart-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.cart-info strong { font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 18px; }
.cart-info span { font-size: 13px; color: var(--muted); }
.remove { background: none; border: none; padding: 12px 4px; font: 13px 'DM Sans', sans-serif; color: var(--muted); text-decoration: underline; cursor: pointer; }
.empty { margin: 0; font-size: 15px; color: var(--muted); }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .detail { transition: none; }
}

@media (max-width: 860px) {
  .detail-body { grid-template-columns: 1fr; gap: 28px; padding-top: 24px; }
  .detail-info { position: static; }
  .door, .door + .door { padding: 32px 0; border-left: none; }
}
@media (max-width: 720px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  nav.main { gap: 0 16px; font-size: 12px; }
  .hero { padding-top: 40px; padding-bottom: 72px; gap: 40px; }
  .page-head { padding-top: 40px; padding-bottom: 32px; }
  .how-inner { padding: 44px 22px 28px; }
  .cart-inner { padding: 40px 18px; }
}
