/* TagTrace — site styles */
:root {
  --ink: #16181d;
  --ink-2: #3a3f48;
  --muted: #6b7280;
  --line: #e7e1d8;
  --bg: #fbf8f4;
  --card: #ffffff;
  --sand: #f3ece2;
  --leather: #8a5a35;
  --leather-dark: #6b4325;
  --lagoon: #0f766e;
  --ok-bg: #e7f6ee; --ok: #166534;
  --warn-bg: #fff4dc; --warn: #92400e;
  --err-bg: #fde8e8; --err: #b91c1c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(22, 24, 29, .08);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Outfit", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--leather-dark); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.3rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 560px; }
.medium { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.eyebrow { font-family: var(--display); text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 600; color: var(--leather); margin-bottom: .8em; }
.code-text { font-family: var(--display); font-weight: 600; letter-spacing: .12em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .85em 1.5em; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--ink); color: #fff; font: 600 .95rem var(--font); text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, opacity .15s; }
.btn:hover { transform: translateY(-1px); background: #000; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-leather { background: var(--leather); border-color: var(--leather); }
.btn-leather:hover { background: var(--leather-dark); }
.btn-danger { background: var(--err); border-color: var(--err); }
.btn-sm { padding: .5em 1.05em; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--leather-dark); font: inherit; text-decoration: underline; cursor: pointer; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 248, 244, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.3rem; }
.brand svg { color: var(--leather); }
.brand-light { color: #fff; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem; }
.site-nav a.active, .site-nav a:hover { color: var(--ink); }
.site-nav a.btn { color: #fff; }
.site-nav .muted-link { color: var(--muted); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 18px; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav a.btn { margin-top: 12px; border-bottom: 0; }
  .nav-open .site-nav { display: flex; }
}

/* Flash */
.flash-wrap { margin-top: 18px; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 8px; font-size: .95rem; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-warn { background: var(--warn-bg); color: var(--warn); }
.flash-err { background: var(--err-bg); color: var(--err); }

/* Sections */
.section { padding: 84px 0; }
.section-tight { padding: 52px 0; }
.section-sand { background: var(--sand); }
.section-dark { background: var(--ink); color: #f5f1ea; }
.section-dark .eyebrow { color: #d6a77a; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; }

/* Hero */
.hero { position: relative; min-height: min(78vh, 680px); display: flex; align-items: center; color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center right; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 16, 20, .82) 0%, rgba(14, 16, 20, .55) 45%, rgba(14, 16, 20, .05) 80%); }
.hero-bg { background-color: #0e1014; z-index: 0; }   /* own stacking context, keeps the text above the overlay */
/* New slide fades in on top; the old one fades out a little later underneath (no dark dip). Slow zoom while shown. */
.hero-slide { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: var(--pos, center right); opacity: 0; transform: scale(1); transition: opacity 1.2s ease-in-out .5s, transform 0s linear 1.7s; }
.hero-slide.is-prev { z-index: 1; }
.hero-slide.is-active { z-index: 2; opacity: 1; transform: scale(1.05); transition: opacity 1.2s ease-in-out, transform 6s linear; }
@media (prefers-reduced-motion: reduce) { .hero-slide, .hero-slide.is-active { transform: none; } }
/* Square photos: right-hand side only, fading into the dark panel behind the text. */
.hero-slide.sq { left: 42%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%); mask-image: linear-gradient(90deg, transparent 0, #000 30%); }
.hero-bg::after { z-index: 3; }   /* dark tint always above every slide */
.hero-uses { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 26px; }
.hero-uses-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: #a9a196; margin-right: 4px; }
.hero-chip { background: rgba(255, 255, 255, .08); color: #e9e4dc; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; padding: .38em .95em; font: 500 .82rem var(--font); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.hero-chip:hover { border-color: #fff; }
.hero-chip.is-active { background: #fff; color: var(--ink); border-color: #fff; }
.hero > .wrap { width: 100%; }   /* flex item would otherwise shrink and centre */
.hero-content { position: relative; max-width: 560px; padding: 60px 0; }
.hero p.lead { font-size: 1.15rem; color: #e9e4dc; margin-bottom: 1.6em; }
.hero .btn-outline { color: #fff; border-color: #fff; }
.hero .btn-outline:hover { background: #fff; color: var(--ink); }
.hero .btn { background: #fff; color: var(--ink); border-color: #fff; }
.hero .btn.btn-outline { background: transparent; color: #fff; }
.hero-note { margin-top: 18px; font-size: .9rem; color: #cfc8bd; }
@media (max-width: 700px) {
  /* Mobile: photo on top (tag visible), text below on dark — no text over the photo. */
  .hero { display: block; min-height: 0; background: #0e1014; }
  .hero-bg { position: relative; inset: auto; height: 0; padding-top: 72%; }
  .hero-slide { background-position: var(--pos, 72% 40%); }
  .hero-slide.sq { left: 0; -webkit-mask-image: none; mask-image: none; }
  .hero-uses { justify-content: center; margin-top: 20px; }
  .hero-uses-label { width: 100%; text-align: center; margin: 0 0 2px; }
  .hero-bg::after { background: linear-gradient(0deg, #0e1014 0%, rgba(14, 16, 20, 0) 35%); }
  .hero-content { max-width: none; padding: 8px 0 40px; }
  .hero h1 { font-size: 1.85rem; line-height: 1.2; }
  .hero p.lead { font-size: 1rem; margin-bottom: 1.4em; }
  .hero .btn-row { flex-direction: column; gap: 10px; }
  .hero .btn-row .btn { width: 100%; }
  .hero-note { text-align: center; font-size: .85rem; }
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--sand); color: var(--leather-dark); display: grid; place-items: center; font-family: var(--display); font-weight: 700; margin-bottom: 16px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Split / feature */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.ticks { list-style: none; padding: 0; margin: 0 0 1.4em; }
.ticks li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: var(--sand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b4325' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }

/* Product cards */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }
.product-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-card img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.product-card .pc-body { padding: 20px 22px 24px; }
.price { font-family: var(--display); font-weight: 600; font-size: 1.15rem; }

/* Gallery strip */
.shop-showcase { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 26px; align-items: stretch; }
.shop-showcase .product-grid { grid-template-columns: 1fr; }
.shop-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; align-content: start; }
.shop-photos img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: 12px; transition: transform .2s; }
.shop-photos:hover img { transform: scale(1.01); }
@media (max-width: 860px) { .shop-showcase { grid-template-columns: 1fr; } .shop-photos { grid-template-columns: repeat(2, 1fr); } }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery img { aspect-ratio: 1; object-fit: cover; border-radius: 12px; width: 100%; }
@media (max-width: 700px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* Privacy band */
.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.promise h3 { color: #fff; }
.promise p { color: #c9c3b9; }
@media (max-width: 860px) { .promise { grid-template-columns: 1fr; } }

/* Product page */
.product-page { display: grid; grid-template-columns: 1.1fr 1fr; gap: 54px; padding: 48px 0 80px; }
.pp-main img { border-radius: var(--radius); aspect-ratio: 1; object-fit: cover; width: 100%; }
.pp-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 10px; }
.pp-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: none; }
.pp-thumbs button.on { border-color: var(--ink); }
.pp-thumbs img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; background: #fff; font-weight: 500; font-size: .92rem; }
.swatch span i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,.15); }
.swatch input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.swatch input:disabled + span { opacity: .4; cursor: not-allowed; }
@media (max-width: 860px) { .product-page { grid-template-columns: 1fr; gap: 30px; padding-top: 24px; } }

/* Forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.card + .card { margin-top: 22px; }
.form-page { padding: 56px 0 90px; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field { margin-bottom: 20px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=datetime-local], input[type=date], select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; font: 1rem var(--font); background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--leather); box-shadow: 0 0 0 3px rgba(138, 90, 53, .15); }
textarea { resize: vertical; min-height: 110px; }
.hint { font-size: .84rem; color: var(--muted); margin-top: 6px; }
.privacy-note { display: flex; gap: 8px; align-items: flex-start; font-size: .84rem; color: var(--lagoon); background: #e9f6f4; border-radius: 8px; padding: 8px 12px; margin-top: 8px; }
.field-error { font-size: .86rem; color: var(--err); margin-top: 6px; }
.counter { text-align: right; font-size: .82rem; color: var(--muted); margin-top: 4px; }
.counter.near { color: var(--err); font-weight: 600; }
.link-warning { display: none; background: var(--warn-bg); color: var(--warn); padding: 10px 14px; border-radius: 8px; font-size: .9rem; margin-top: 8px; }
.link-warning.show { display: block; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.inline-form { display: inline; }

/* Finder page */
.finder { padding: 48px 0 90px; }
.finder-head { text-align: center; margin-bottom: 26px; }
.finder-code { display: inline-block; background: var(--ink); color: #fff; padding: 6px 16px; border-radius: 999px; margin-bottom: 14px; }
.lost-banner { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; }
.code-entry { display: flex; gap: 10px; }
.code-entry input { text-transform: uppercase; letter-spacing: .18em; font-family: var(--display); font-weight: 600; font-size: 1.25rem; text-align: center; }

/* Account */
.account { padding: 44px 0 90px; }
.account-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 26px; align-items: start; }
@media (max-width: 860px) { .account-grid { grid-template-columns: 1fr; } }
.tag-preview { background: linear-gradient(160deg, #9a6640, #6b4325); border-radius: 22px; padding: 26px 26px 30px; max-width: 300px; margin: 0 auto 10px; box-shadow: var(--shadow); }
.tag-card { background: #1b1d21; color: #eceae6; border-radius: 10px; padding: 22px 16px; text-align: center; }
.tag-card .tc-name { font-family: var(--display); font-size: 1.35rem; }
.tag-card hr { width: 40px; border: 0; border-top: 1px solid #8b8f96; margin: 8px auto 14px; }
.tag-card .tc-qr { background: transparent; display: flex; justify-content: center; }
.tag-card .tc-qr svg { width: 108px; height: 108px; }
.tag-card .tc-scan { font-size: .62rem; letter-spacing: .22em; margin-top: 12px; }
.tag-card .tc-code { font-family: var(--display); font-weight: 600; letter-spacing: .14em; font-size: 1.05rem; margin: 4px 0 10px; }
.tag-card .tc-site { font-size: .78rem; display: inline-flex; align-items: center; gap: 5px; }
.msg-list { list-style: none; padding: 0; margin: 0; }
.msg { border-top: 1px solid var(--line); padding: 16px 0; }
.msg:first-child { border-top: 0; }
.msg-meta { font-size: .82rem; color: var(--muted); margin-bottom: 4px; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: .88rem; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--sand); color: var(--leather-dark); }
.badge-green { background: var(--ok-bg); color: var(--ok); }
.badge-amber { background: var(--warn-bg); color: var(--warn); }
.badge-red { background: var(--err-bg); color: var(--err); }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.toggle-row:first-of-type { border-top: 0; }
.danger-zone { border-color: #f3c4c4; }

/* FAQ / prose */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; font-size: 1.4rem; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; margin-bottom: 12px; }
.faq summary { font-weight: 600; cursor: pointer; font-family: var(--display); font-size: 1.05rem; }
.faq details p { margin: 12px 0 0; color: var(--ink-2); }

/* Tables (admin, orders) */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* Footer */
.site-footer { background: var(--ink); color: #c9c3b9; padding: 60px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer-grid a:not(.brand) { display: block; color: #c9c3b9; text-decoration: none; margin-bottom: 8px; font-size: .92rem; }
.footer-grid a:hover { color: #fff; }
.footer-note { margin-top: 14px; max-width: 300px; font-size: .92rem; }
.footer-bottom { border-top: 1px solid #2c3037; margin-top: 40px; padding-top: 20px; font-size: .82rem; color: #8b8f96; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* Admin */
.admin-bar { background: var(--ink); color: #fff; }
.admin-bar .wrap { display: flex; gap: 22px; align-items: center; height: 54px; overflow-x: auto; }
.admin-bar a { color: #d8d3ca; text-decoration: none; font-size: .9rem; white-space: nowrap; }
.admin-bar a.on, .admin-bar a:hover { color: #fff; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.stat b { display: block; font-family: var(--display); font-size: 1.8rem; }
.brand-tld { font-style: normal; color: var(--leather); font-weight: 600; }
.brand-light .brand-tld { color: #d6a77a; }
