:root {
  --bg: #0f0e0c; --bg2: #171512; --ink: #f2ede4; --muted: #a49d90; --line: #2a2723;
  --accent: #d9b56a; --accent-ink: #1a1506; --err: #e5786d; --ok: #7fc59a;
  --serif: 'Instrument Serif', Georgia, serif; --sans: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* regression: 2026-09-04-modal-wont-close — .modal/.ready set display:grid which beat the hidden attribute */
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; margin: 0 0 .4em; }
h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); line-height: 1.02; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.35rem; }
em { font-style: italic; color: var(--accent); }
main { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
section { padding: 72px 0; border-bottom: 1px solid var(--line); }
.sub { color: var(--muted); max-width: 60ch; margin-top: 0; }
.hint { color: var(--muted); font-size: .9rem; min-height: 1.2em; }
.hint.err { color: var(--err); }

.nav { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; max-width: 1120px; margin: 0 auto; }
.brand { font-family: var(--serif); font-size: 1.35rem; display: flex; align-items: center; gap: 10px; }
.mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font-size: .95rem; }
.nav nav { display: flex; gap: 22px; align-items: center; color: var(--muted); font-size: .95rem; }

.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); padding: 14px 24px; border-radius: 999px; font-weight: 600; border: 1px solid var(--accent); cursor: pointer; font-family: var(--sans); font-size: 1rem; transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.small { padding: 9px 16px; font-size: .9rem; }
.btn.wide { width: 100%; margin-top: 8px; }

.hero { padding-top: 96px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; margin: 0 0 18px; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 56ch; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 40px; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; color: var(--muted); font-size: .92rem; }
.facts li { border-top: 1px solid var(--line); padding-top: 12px; }
.facts strong { color: var(--ink); display: block; font-weight: 500; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 28px; }
.look { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; transition: border-color .15s; }
.look:hover, .look.active { border-color: var(--accent); }
.look .swatch { aspect-ratio: 3/4; display: grid; place-items: end start; padding: 12px; }
.look .swatch span { font-family: var(--serif); font-size: 1.3rem; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.look p { margin: 0; padding: 10px 12px 12px; color: var(--muted); font-size: .82rem; }

.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
@media (max-width: 760px) { .app-grid { grid-template-columns: 1fr; } .nav nav a:not(.btn) { display: none; } }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.drop { display: grid; place-items: center; aspect-ratio: 4/3; border: 1px dashed #4a453d; border-radius: 12px; cursor: pointer; color: var(--muted); text-align: center; padding: 16px; position: relative; overflow: hidden; }
.drop.over { border-color: var(--accent); color: var(--ink); }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop img + span { position: relative; background: rgba(0,0,0,.55); padding: 6px 10px; border-radius: 8px; font-size: .85rem; }
.editor { margin-top: 12px; }
.editor canvas { width: 100%; max-width: 360px; aspect-ratio: 3/4; display: block; margin: 0 auto; border-radius: 12px; background: #000; cursor: grab; touch-action: none; }
.editor canvas:active { cursor: grabbing; }
.tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.tools label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; flex: 1; min-width: 160px; }
.tools input[type=range] { flex: 1; accent-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; background: transparent; color: var(--ink); cursor: pointer; font-family: var(--sans); display: flex; align-items: center; gap: 8px; }
.chip i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.chip.active { border-color: var(--accent); background: rgba(217,181,106,.12); }

.gallery-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 40px; flex-wrap: wrap; gap: 8px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 12px; }
.shot { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.shot .img { aspect-ratio: 3/4; display: grid; place-items: center; color: var(--muted); font-size: .85rem; background: #121110; }
.shot .img img { width: 100%; height: 100%; object-fit: cover; }
.shot .meta { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-size: .85rem; color: var(--muted); }
.shot .meta a { color: var(--accent); }
.shot .meta .fail { color: var(--err); }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 26px; }
.pack { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.pack .price { font-family: var(--serif); font-size: 2.2rem; }
.pack .tbc { color: var(--muted); font-size: 1.2rem; font-family: var(--serif); }
.pack .per { color: var(--muted); font-size: .85rem; }
.pack.free { border-color: var(--accent); }

.faq details { border-top: 1px solid var(--line); padding: 14px 0; color: var(--muted); }
.faq summary { color: var(--ink); cursor: pointer; font-weight: 500; }

footer { display: flex; justify-content: space-between; max-width: 1120px; margin: 0 auto; padding: 28px 20px 48px; color: var(--muted); font-size: .85rem; flex-wrap: wrap; gap: 10px; }

.info { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--muted); color: var(--muted); font-size: .7rem; font-family: var(--sans); font-style: normal; cursor: help; position: relative; vertical-align: middle; margin-left: 6px; }
.info:hover::after { content: attr(data-tip); position: absolute; left: 50%; bottom: 130%; transform: translateX(-50%); width: 260px; background: #222; color: var(--ink); padding: 10px 12px; border-radius: 8px; font-size: .8rem; line-height: 1.4; z-index: 5; border: 1px solid var(--line); text-align: left; }

/* --- ready state (auto-crop) --- */
.ready { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; margin-top: 8px; }
.ready img { width: 120px; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.look .swatch { background-size: cover; background-position: center; position: relative; }
.look .swatch::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.65)); pointer-events: none; }
.look .swatch span { position: relative; z-index: 1; }
.shot { position: relative; }
.shot .img { cursor: pointer; }
.shot .tag { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.6); color: var(--ink); font-size: .7rem; padding: 3px 8px; border-radius: 999px; }
.shot .meta button { background: none; border: none; color: var(--accent); cursor: pointer; font-family: var(--sans); font-size: .85rem; padding: 0; }

/* --- modal editor --- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.75); display: grid; place-items: center; z-index: 50; padding: 16px; overflow: auto; }
.modal-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; width: min(1000px, 100%); max-height: 100%; overflow: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-body { display: grid; grid-template-columns: minmax(240px, 420px) 1fr; gap: 20px; padding: 20px; }
@media (max-width: 760px) { .modal-body { grid-template-columns: 1fr; } .ready { grid-template-columns: 90px 1fr; } }
#edit-canvas { width: 100%; height: auto; border-radius: 12px; background: #000; }
.edit-side h4 { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; margin: 6px 0 8px; }
.edit-side label { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 6px 0; }
.edit-side input[type=range] { accent-color: var(--accent); width: 100%; }
#refine-chips { display: flex; flex-direction: column; gap: 6px; }
#refine-chips .group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#refine-chips .group b { color: var(--muted); font-weight: 500; font-size: .8rem; width: 90px; }

/* --- hero collage --- */
.hero--split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero-collage { margin: 0; }
.hero-collage img { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); display: block; }
.hero-collage figcaption { color: var(--muted); font-size: .8rem; margin-top: 10px; }
@media (max-width: 900px) { .hero--split { grid-template-columns: 1fr; } .hero-collage { order: -1; } }
