/* ============================================================
   Karen Cross Photography, design system
   ============================================================ */

/* ---- tokens ---- */
:root {
  --paper: #FAFAFA;
  --surface: #FFFFFF;
  --ink: #1A1A1A;
  --grey-d: #4A4A4A;   /* "Cross" / secondary text */
  --grey-l: #A8A8A8;   /* "Karen" / muted UI */
  --bronze: #A0845C;   /* accent */
  --bronze-d: #8A6F49;
  --line: #E9E6E0;     /* hairline */
  --line-2: #F0EDE7;
  --night: #1C1E22;

  --maxw: 1320px;
  --gut: clamp(20px, 5vw, 64px);

  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-card: 0 1px 2px rgba(26,26,26,0.04), 0 18px 36px -28px rgba(26,26,26,0.28);
  --shadow-pop: 0 12px 28px -8px rgba(26,26,26,0.18), 0 40px 80px -40px rgba(26,26,26,0.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html body { background: var(--paper); }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(160,132,92,0.22); }

/* ---- layout helpers ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
.wrap-narrow { max-width: 920px; margin: 0 auto; padding-inline: var(--gut); }
.section { padding-block: clamp(56px, 9vw, 128px); }
.section-sm { padding-block: clamp(40px, 6vw, 80px); }

/* ---- type ---- */
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--bronze);
  margin: 0 0 18px;
}
.eyebrow.muted { color: var(--grey-d); }
.display {
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
h1.display { font-size: clamp(38px, 6vw, 76px); }
h2.display { font-size: clamp(30px, 4.4vw, 54px); }
h3.display { font-size: clamp(22px, 2.6vw, 32px); }
.lede { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.7; color: var(--grey-d); }
.muted { color: var(--grey-d); }
.faint { color: var(--grey-d); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 14px 26px; border: 1px solid transparent; border-radius: 2px;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .2s var(--ease);
  white-space: nowrap;
}
.btn .arr { transition: transform .35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--bronze); }
.btn-bronze { background: var(--bronze); color: #fff; }
.btn-bronze:hover { background: var(--bronze-d); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.5); backdrop-filter: blur(6px); }
.btn-light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 17px 32px; font-size: 13px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink);
  padding-bottom: 3px; border-bottom: 1px solid var(--line);
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.link-arrow .arr { transition: transform .3s var(--ease); color: var(--bronze); }
.link-arrow:hover { border-color: var(--bronze); color: var(--bronze); }
.link-arrow:hover .arr { transform: translateX(4px); }

/* ============================================================
   IMAGE PLACEHOLDERS (duotone, façade-textured)
   ============================================================ */
.ph {
  position: relative; overflow: hidden; background: #d9d9d6;
  display: flex; align-items: center; justify-content: center; isolation: isolate;
}
.ph::before { /* façade grid texture */
  content: ""; position: absolute; inset: 0; z-index: 1; mix-blend-mode: soft-light; opacity: 0.6;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.5) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.35) 0 1px, transparent 1px 26px);
}
.ph::after { /* soft vignette + light gradient */
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(150deg, rgba(255,255,255,0.18), transparent 40%, rgba(0,0,0,0.16));
}
.ph .ph-label {
  position: relative; z-index: 3; text-align: center; padding: 24px;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(15px, 1.6vw, 21px); color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 14px rgba(0,0,0,0.35); letter-spacing: 0.01em; line-height: 1.2;
}
.ph .ph-tag {
  position: absolute; left: 12px; bottom: 12px; z-index: 3;
  font-family: var(--sans); font-size: 9.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.78); background: rgba(0,0,0,0.28); backdrop-filter: blur(4px);
  padding: 4px 8px; border-radius: 2px;
}
/* tones */
.ph.tone-mono { background: linear-gradient(155deg, #e2e2e0, #9d9d9b 55%, #6f6f6e); }
.ph.tone-warm { background: linear-gradient(155deg, #e9ddca, #b89a76 55%, #8a6f4d); }
.ph.tone-cool { background: linear-gradient(155deg, #dbe3e7, #9db0b9 55%, #6c828c); }
.ph.tone-night { background: linear-gradient(155deg, #3b3f46, #24272d 55%, #15171b); }
.ph.tone-night .ph-label { color: rgba(255,255,255,0.86); }
/* real photo fill */
.ph.has-img { background: var(--line-2); }
.ph .ph-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 3; display: block; }
.ph.has-img::before, .ph.has-img::after { display: none; }
/* formats (aspect ratios) */
.fmt-horizontal { aspect-ratio: 3 / 2; }
.fmt-vertical { aspect-ratio: 2 / 3; }
.fmt-square { aspect-ratio: 1 / 1; }
.fmt-wide { aspect-ratio: 16 / 9; }
.fmt-tall { aspect-ratio: 4 / 5; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  transition: background .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header .bar {
  max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut);
  height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.site-header.solid { background: rgba(250,250,250,0.86); backdrop-filter: blur(14px) saturate(1.2); border-bottom-color: var(--line); }
.site-header.solid .nav-link { color: var(--grey-d); }
.site-header.solid .nav-link:hover, .site-header.solid .nav-link.active { color: var(--ink); }
.site-header.solid .icon-btn { color: var(--ink); }
/* transparent over hero (home top) */
.site-header.ghost .nav-link { color: rgba(255,255,255,0.82); }
.site-header.ghost .nav-link:hover, .site-header.ghost .nav-link.active { color: #fff; }
.site-header.ghost .icon-btn { color: #fff; }
.site-header.ghost .logo .k { color: rgba(255,255,255,0.7); }
.site-header.ghost .logo .c { color: #fff; }
.site-header.ghost .cart-count { background: #fff; color: var(--ink); }

.logo { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 27px; line-height: 1; letter-spacing: 0.01em; }
.logo .k { color: var(--grey-l); transition: color .4s var(--ease); }
.logo .c { color: var(--grey-d); transition: color .4s var(--ease); }
.logo:hover .c { color: var(--bronze); }

.nav { display: flex; align-items: center; gap: clamp(18px, 2vw, 34px); }
.nav-link {
  font-size: 13px; font-weight: 500; letter-spacing: 0.04em; color: var(--grey-d);
  position: relative; padding: 6px 0; transition: color .3s var(--ease);
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--bronze);
  transition: right .3s var(--ease);
}
.nav-link:hover::after, .nav-link.active::after { right: 0; }

.header-right { display: flex; align-items: center; gap: 18px; }
.icon-btn { background: none; border: none; padding: 6px; color: var(--ink); position: relative; display: inline-flex; }
.cart-count {
  position: absolute; top: -3px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--bronze); color: #fff; border-radius: 9px; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.hamburger { display: none; }

/* mobile nav drawer */
.drawer { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(26,26,26,0.4); opacity: 0; transition: opacity .35s var(--ease); }
.drawer-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(86vw, 380px);
  background: var(--surface); box-shadow: var(--shadow-pop); transform: translateX(100%);
  transition: transform .4s var(--ease); padding: 30px; display: flex; flex-direction: column;
}
.drawer.open { pointer-events: auto; }
.drawer.open .drawer-scrim { opacity: 1; }
.drawer.open .drawer-panel { transform: translateX(0); }
.drawer-panel .d-link { font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--ink); padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.drawer-panel .d-link:hover { color: var(--bronze); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding-block: 64px; }
.footer-top .logo { font-size: 30px; margin-bottom: 16px; }
.footer-col h4 { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--grey-d); margin: 0 0 18px; }
.footer-col a { display: block; font-size: 14px; color: var(--grey-d); padding: 6px 0; transition: color .25s var(--ease); }
.footer-col a:hover { color: var(--bronze); }
.foot-news p { font-size: 14px; color: var(--grey-d); margin: 0 0 16px; max-width: 30ch; }
.news-form { display: flex; gap: 8px; }
.news-form input {
  flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--paper); border-radius: 2px;
  padding: 12px 14px; font-family: inherit; font-size: 14px; color: var(--ink);
}
.news-form input:focus { outline: none; border-color: var(--bronze); }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-bottom .legal { font-size: 12.5px; color: var(--grey-d); display: flex; gap: 20px; flex-wrap: wrap; }
.footer-bottom .legal a:hover { color: var(--bronze); }
.pay-icons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pay-chip {
  height: 26px; min-width: 40px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800; letter-spacing: 0.04em; color: var(--grey-d); text-transform: uppercase;
}

/* ============================================================
   PAGE SHELL / reveal
   ============================================================ */
.page { padding-top: 78px; min-height: 100vh; }
.page.has-hero { padding-top: 0; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

.crumb { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--grey-d); margin-bottom: 22px; }
.crumb a:hover { color: var(--bronze); }
.crumb .sep { opacity: 0.6; }

/* ============================================================
   IMAGE CARD (shop / grids)
   ============================================================ */
.card-grid { display: grid; gap: clamp(18px, 2.4vw, 34px); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

.art-card { display: block; cursor: pointer; }
.art-card .frame { position: relative; overflow: hidden; background: var(--line-2); border-radius: 2px; }
.art-card .frame .ph { transition: transform 1.1s var(--ease); }
.art-card:hover .frame .ph { transform: scale(1.05); }
.art-card .quickadd {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 4;
  background: rgba(255,255,255,0.94); backdrop-filter: blur(6px); color: var(--ink);
  border: none; border-radius: 2px; padding: 12px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; opacity: 0; transform: translateY(8px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), background .3s var(--ease);
}
.art-card:hover .quickadd { opacity: 1; transform: none; }
.art-card .quickadd:hover { background: var(--bronze); color: #fff; }
.art-meta { padding: 16px 2px 4px; display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.art-title { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--ink); line-height: 1.2; position: relative; display: inline; background-image: linear-gradient(var(--bronze), var(--bronze)); background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 1.15em; transition: background-size .4s var(--ease); }
.art-card:hover .art-title { background-size: 100% 1px; }
.art-sub { font-size: 12px; letter-spacing: 0.04em; color: var(--grey-l); margin-top: 5px; text-transform: uppercase; }
.art-price { font-size: 14px; font-weight: 600; color: var(--grey-d); white-space: nowrap; }
.art-price .from { font-size: 11px; color: var(--grey-l); font-weight: 500; }

/* tiny tag pills */
.pill { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey-d); border: 1px solid var(--line); border-radius: 20px; padding: 5px 11px; background: var(--surface); }

@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .cols-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .nav, .header-right .nav-inline { display: none; }
  .hamburger { display: inline-flex; }
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
  .cols-2 { grid-template-columns: 1fr; }
}
