@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,400;1,500&family=EB+Garamond:ital@0;1&family=Jost:wght@400;500;600&display=swap');

/* ============================================================
   The Hidden Tree — stilla galleri. Konsten talar.
   Bonvit vägg · inramade verk · dämpad skogsgrön · serif
   ============================================================ */
:root {
  --paper: #F1ECE1;      /* galleriväggen */
  --paper-2: #E9E3D5;    /* sektioner */
  --surface: #FBF8F1;    /* mat / kort */
  --ink: #262420;        /* varm nästan-svart */
  --ink-2: #4b463d;
  --muted: #6c6659;      /* AA mot papper */
  --faint: #928b7d;
  --line: #d9d2c2;
  --line-2: #cabfa9;
  --forest: #3c5245;     /* accent — sparsamt */
  --forest-2: #2c3d33;
  --gold: #93763c;       /* dämpat guld — pris/detaljer */
  --frame: #2a251d;      /* ramträ */
  --mat: #FBF8F1;        /* passepartout */

  --r: 3px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --body: 'EB Garamond', 'Iowan Old Style', Georgia, serif;
  --ui: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hung: 0 1px 2px rgba(38,34,28,.14), 0 22px 44px -26px rgba(38,34,28,.5);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }

body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
::selection { background: rgba(60,82,69,.18); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; }

/* Etiketter / UI-text i sans, spärrad versal */
.eyebrow, .brand-sub, .nav-links a, .badge, .chip, .card-artist, .card-meta,
.card-price, .di-price, .drawer-sum b, .m-meta, .m-pris, .count, select,
.trust div, .foot h4, .foot-bottom, .hero-trust, .card-tag, .m-tag, .card-add,
.act-heart, .di-artist { font-family: var(--ui); }

/* ---------- Knappar ---------- */
.btn {
  font-family: var(--ui); font-weight: 500; font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; cursor: pointer; border: 1px solid transparent; border-radius: var(--r);
  padding: 13px 26px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { color: var(--paper); background: var(--forest); }
.btn-primary:hover { background: var(--forest-2); }
.btn-ghost { color: var(--ink); background: transparent; border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-full { width: 100%; }
.link { background: none; border: 0; color: var(--forest); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

:where(a, button, input, select):focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }

/* ---------- Ram (delas av kort, hero, spot, modal) ---------- */
.artframe, .card-art, .spot-frame, .modal-art {
  background: var(--mat); border: 3px solid var(--frame); box-shadow: var(--hung);
}
.artframe, .card-art { padding: clamp(10px, 1.5vw, 18px); }
.artcanvas {
  aspect-ratio: 4 / 5; background: var(--mat) center/contain no-repeat;
}

/* ---------- Announce ---------- */
.announce {
  text-align: center; font-family: var(--ui); font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); padding: 9px 16px;
  background: var(--paper-2); border-bottom: 1px solid var(--line);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 24px;
  padding: 18px clamp(16px, 4vw, 48px); background: rgba(241,236,225,.9);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo { width: 30px; height: 34px; color: var(--forest); flex: none; }
.logo svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.mark { font-family: var(--display); font-weight: 600; font-size: 24px; letter-spacing: .01em; }
.brand-sub { font-size: 9.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav-links { display: flex; gap: 6px; margin-left: 14px; }
.nav-links a {
  color: var(--ink-2); text-decoration: none; font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; padding: 8px 12px; transition: color .18s; position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1px; background: var(--forest); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.search { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line-2); padding: 6px 4px; }
.search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.search input { border: 0; background: none; color: var(--ink); font-family: var(--ui); font-size: 13px; width: 170px; outline: none; }
.search input::placeholder { color: var(--faint); }
.icon-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; background: none; border: 0; color: var(--ink); cursor: pointer; border-radius: 50%; transition: background .18s; }
.icon-btn:hover { background: rgba(0,0,0,.05); }
.icon-btn svg { width: 21px; height: 21px; }
.badge { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; font-size: 10px; font-weight: 600; color: var(--paper); background: var(--forest); border-radius: 999px; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1fr 0.82fr; gap: clamp(28px, 5vw, 72px); align-items: center;
  max-width: 1240px; margin: 0 auto; padding: clamp(40px, 7vw, 96px) clamp(16px, 4vw, 48px) clamp(30px, 4vw, 60px);
}
.eyebrow { font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.hero h1 { font-size: clamp(52px, 8vw, 104px); line-height: .95; letter-spacing: -.01em; margin: 18px 0 20px; font-weight: 500; }
.hero p { color: var(--ink-2); font-size: 19px; max-width: 44ch; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { font-family: var(--ui); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 34px 0 0; }
.hero-feature { margin: 0; }
.hero-feature .artframe { max-width: 380px; margin: 0 auto; }
.hero-feature .artcanvas { aspect-ratio: 4 / 5; }
.hero-feature figcaption { font-family: var(--ui); font-size: 12px; letter-spacing: .04em; color: var(--muted); text-align: center; margin-top: 16px; }
.hero-feature figcaption span { color: var(--ink); }
.hero-feature figcaption i { font-family: var(--display); font-style: italic; font-size: 15px; }

/* ---------- Trust ---------- */
.trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(20px, 5vw, 64px);
  max-width: 1240px; margin: 0 auto; padding: 22px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.trust div { display: flex; align-items: center; gap: 9px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.trust svg { width: 18px; height: 18px; color: var(--forest); }

/* ---------- Katalog ---------- */
.catalog { max-width: 1240px; margin: 0 auto; padding: clamp(44px, 6vw, 80px) clamp(16px, 4vw, 48px); }
.catalog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 34px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.catalog-head h2, .spot-body h2, .about h2 { font-size: clamp(32px, 4vw, 46px); margin: 0; font-weight: 500; letter-spacing: -.005em; }
.count { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 8px 0 0; }
.filters { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); cursor: pointer;
  padding: 7px 13px; border-radius: 999px; background: none; border: 1px solid var(--line-2); transition: all .18s;
}
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip.on { color: var(--paper); background: var(--forest); border-color: var(--forest); }
select { font-size: 12px; letter-spacing: .06em; color: var(--ink); background: none; border: 0; border-bottom: 1px solid var(--line-2); padding: 7px 20px 7px 4px; cursor: pointer; }
select:focus { outline: none; border-color: var(--forest); }

/* ---------- Rutnät (inramade verk på väggen) ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: clamp(28px, 4vw, 56px) clamp(22px, 3vw, 40px); }
.card { display: flex; flex-direction: column; animation: rise .6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.card-art { position: relative; padding: clamp(12px, 1.6vw, 18px); cursor: pointer; transition: transform .3s var(--ease), box-shadow .3s var(--ease); display: block; width: 100%; }
.card-art:hover { transform: translateY(-4px); box-shadow: 0 3px 6px rgba(38,34,28,.16), 0 34px 60px -30px rgba(38,34,28,.6); }
.card-tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; padding: 4px 11px; background: var(--forest); color: var(--paper); border-radius: 999px; }
.card-tag.sald { background: var(--ink); }
.card-body { padding: 18px 4px 0; text-align: center; }
.card-artist { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.card-title { font-family: var(--display); font-weight: 500; font-size: 24px; line-height: 1.12; margin: 4px 0 6px; }
.card-title i { font-style: italic; }
.card-meta { font-size: 11px; letter-spacing: .05em; color: var(--faint); text-transform: uppercase; }
.card-foot { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.card-price { font-size: 15px; letter-spacing: .03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.card-price.sald { color: var(--muted); }
.card-cta { display: inline-flex; align-items: center; gap: 8px; }
.card-add { font-family: var(--ui); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--forest); background: none; border: 0; border-bottom: 1px solid var(--line-2); padding: 4px 2px; cursor: pointer; transition: border-color .18s; }
.card-add:hover { border-color: var(--forest); }
.act-heart { width: 30px; height: 30px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); cursor: pointer; }
.act-heart svg { width: 18px; height: 18px; }
.act-heart:hover { color: var(--gold); }
.act-heart.on { color: var(--gold); }
.act-heart.on svg path { fill: var(--gold); stroke: var(--gold); }
.card.is-sald .card-art { filter: grayscale(.4) brightness(.97); }
.card.is-sald .card-art:hover { transform: none; }
.tomt { text-align: center; color: var(--muted); padding: 60px 0; font-size: 18px; }

/* ---------- Konstnärsspot (kuraterad essä) ---------- */
.spotlight {
  display: grid; grid-template-columns: 0.7fr 1fr; gap: clamp(30px, 5vw, 64px); align-items: center;
  max-width: 1080px; margin: clamp(20px, 3vw, 40px) auto; padding: clamp(30px, 5vw, 64px) clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line);
}
.spot-art { padding: clamp(12px, 1.6vw, 18px); }
.spot-art .artcanvas, .spot-frame .artcanvas { aspect-ratio: 4 / 5; }
.spot-frame { padding: clamp(12px, 1.6vw, 18px); }
.spot-body p { font-size: 18px; color: var(--ink-2); max-width: 54ch; margin: 16px 0 26px; }
.spot-body h2 { margin-top: 8px; }

/* ---------- Om ---------- */
.about { max-width: 760px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 48px); text-align: center; border-top: 1px solid var(--line); }
.about p { font-size: 19px; color: var(--ink-2); margin: 18px auto 30px; }
.about-badges { display: flex; justify-content: center; gap: clamp(28px, 6vw, 64px); flex-wrap: wrap; }
.about-badges div { display: flex; flex-direction: column; }
.about-badges b { font-family: var(--display); font-weight: 600; font-size: 26px; }
.about-badges span { font-family: var(--ui); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

/* ---------- Footer ---------- */
.foot { background: var(--paper-2); border-top: 1px solid var(--line); margin-top: 20px; padding: clamp(40px, 5vw, 64px) clamp(16px, 4vw, 48px) 28px; }
.foot-cols { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.6fr; gap: 34px; }
.foot-brand .logo { width: 30px; height: 34px; color: var(--forest); }
.foot-brand .mark { display: block; font-family: var(--display); font-size: 25px; margin-top: 10px; }
.foot-brand p { color: var(--muted); font-size: 15px; margin: 8px 0 0; max-width: 30ch; }
.foot h4 { font-family: var(--ui); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--ink); margin: 0 0 14px; }
.foot a { display: block; color: var(--muted); text-decoration: none; font-size: 15px; padding: 4px 0; transition: color .18s; }
.foot a:hover { color: var(--ink); }
.newsletter p { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.newsletter form { display: flex; gap: 8px; }
.newsletter input { flex: 1; min-width: 0; font-family: var(--ui); font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 14px; }
.newsletter input:focus { outline: none; border-color: var(--forest); }
.newsletter .btn { padding: 12px 18px; }
.foot-bottom { max-width: 1240px; margin: 34px auto 0; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--faint); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Modal ---------- */
.modal-overlay, .drawer-overlay { position: fixed; inset: 0; z-index: 100; display: grid; background: rgba(38,34,28,.42); backdrop-filter: blur(3px); animation: fade .3s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.modal-overlay { place-items: center; padding: 20px; }
.modal { position: relative; width: min(920px, 100%); max-height: 92vh; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 90px -30px rgba(38,34,28,.6); animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(14px); } }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; background: rgba(251,248,241,.7); border: 1px solid var(--line); color: var(--ink); }
.modal-close:hover { background: var(--paper); }
.modal-close svg { width: 20px; height: 20px; }
.modal-art { margin: clamp(22px, 3vw, 40px); background: var(--mat) center/contain no-repeat; border: 3px solid var(--frame); aspect-ratio: 4 / 5; box-shadow: var(--hung); position: relative; }
.m-tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; padding: 4px 11px; background: var(--forest); color: var(--paper); border-radius: 999px; }
.modal-info { padding: clamp(26px, 3vw, 42px) clamp(26px, 3vw, 42px) clamp(26px, 3vw, 42px) 0; }
.m-artist { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.m-titel { font-family: var(--display); font-weight: 500; font-style: italic; font-size: clamp(30px, 4vw, 44px); line-height: 1.05; margin: 4px 0 12px; }
.m-meta { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.m-pris { font-size: 24px; letter-spacing: .02em; margin: 20px 0 4px; color: var(--ink); font-variant-numeric: tabular-nums; }
.m-desc { color: var(--ink-2); font-size: 16px; line-height: 1.7; margin: 14px 0 24px; }
.m-actions { display: flex; gap: 12px; align-items: center; }
.m-actions .btn-primary { flex: 1; }
.ghost-heart { width: 50px; height: 48px; border: 1px solid var(--line-2); border-radius: var(--r); color: var(--muted); }
.ghost-heart:hover { border-color: var(--gold); color: var(--gold); }
.ghost-heart.on { color: var(--gold); }
.ghost-heart.on svg path { fill: var(--gold); stroke: var(--gold); }
.m-facts { list-style: none; margin: 26px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 11px; }
.m-facts li { display: flex; align-items: center; gap: 11px; font-family: var(--ui); font-size: 12.5px; letter-spacing: .04em; color: var(--ink-2); }
.m-facts svg { width: 17px; height: 17px; color: var(--forest); flex: none; }

/* ---------- Drawer ---------- */
.drawer-overlay { justify-items: end; }
.drawer { position: relative; width: min(430px, 100%); height: 100%; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -30px 0 80px -30px rgba(38,34,28,.5); animation: slide .38s var(--ease); }
@keyframes slide { from { transform: translateX(100%); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 26px; margin: 0; font-weight: 500; }
.drawer .modal-close { position: static; }
.drawer-items { flex: 1; overflow: auto; padding: 14px 20px; display: flex; flex-direction: column; gap: 14px; }
.drawer-item { display: grid; grid-template-columns: 54px 1fr auto; gap: 14px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.drawer-item .di-art { width: 54px; height: 66px; background: var(--mat) center/contain no-repeat; border: 2px solid var(--frame); }
.di-artist { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.di-title { font-family: var(--display); font-style: italic; font-size: 19px; line-height: 1.1; }
.di-price { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; letter-spacing: .03em; }
.di-remove { background: none; border: 0; color: var(--faint); cursor: pointer; font-family: var(--ui); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding: 6px; }
.di-remove:hover { color: var(--ink); }
.drawer-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--muted); text-align: center; padding: 30px; }
.drawer-foot { padding: 20px 24px 26px; border-top: 1px solid var(--line); }
.drawer-sum { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.drawer-sum span { font-family: var(--ui); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.drawer-sum b { font-size: 22px; font-variant-numeric: tabular-nums; }
.drawer-note { color: var(--faint); font-family: var(--ui); font-size: 11px; letter-spacing: .04em; margin: 0 0 14px; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(16px); z-index: 200; padding: 13px 22px; font-family: var(--ui); font-size: 13px; letter-spacing: .04em; background: var(--ink); color: var(--paper); box-shadow: var(--hung); opacity: 0; transition: opacity .3s var(--ease), transform .3s var(--ease); pointer-events: none; border-radius: var(--r); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast b { color: #d8c79b; font-weight: 500; }

/* ---------- Responsivt ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-feature { order: -1; }
  .hero-feature .artframe { max-width: 280px; }
  .spotlight { grid-template-columns: 1fr; }
  .spot-art, .spot-frame { max-width: 320px; }
  .modal { grid-template-columns: 1fr; }
  .modal-art { aspect-ratio: 3 / 2; }
  .modal-info { padding: 0 clamp(22px,4vw,34px) clamp(26px,4vw,34px); }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .search input { width: 108px; }
  .brand-sub { display: none; }
  .catalog-head { flex-direction: column; align-items: stretch; }
  .foot-cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .modal, .drawer, .toast, .modal-overlay, .drawer-overlay { animation: none !important; }
  * { transition-duration: .01ms !important; }
}
