/* Shared styles for every page except the homepage and /dev: the store,
   product, success and cancel pages, /portfolio, project pages and /policies.
   Tokens, nav, buttons, cards and footer mirror views/index.html so these
   pages read as the same site. Change them there first, then here. */

/* ── FONTS ── */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/cinzel-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/syne-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Share Tech Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/share-tech-mono-latin.woff2') format('woff2');
}

/* ── TOKENS ── */
:root {
  --bg:           #060807;
  --bg-surface:   #0b0e0c;
  --bg-raised:    #101410;
  --bg-nav:       rgba(6, 8, 7, 0.93);

  --border:       #191d1a;
  --border-mid:   #222a24;
  --border-hi:    #2c3830;

  --accent:       #5db882;
  --accent-hi:    #78d4a0;
  --accent-dim:   rgba(93, 184, 130, 0.07);
  --accent-glow:  rgba(93, 184, 130, 0.16);

  --text:         #bfcdc6;
  --text-muted:   #7d8c85;
  --text-ghost:   #72817a;

  --danger:       #d77a6e;

  --f-display: 'Cinzel', serif;
  --f-mono:    'Share Tech Mono', monospace;
  --f-body:    'Syne', sans-serif;

  --r: 3px;
  --ease: 0.22s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main { flex: 1; }

/* .product-page and friends set display, which would beat the UA rule. */
[hidden] { display: none !important; }

::selection { background: var(--accent); color: var(--bg); }

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 68px;
  padding: 0 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.logo { display: flex; align-items: center; text-decoration: none; }
.logo picture { display: block; }
.logo img { display: block; height: 54px; width: auto; transition: opacity var(--ease); }
.logo img:hover { opacity: 0.82; }

.nav-links { list-style: none; display: flex; align-items: center; gap: 4px; }

.nav-links a {
  font-family: var(--f-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 7px 16px;
  border: 1px solid transparent;
  border-radius: var(--r);
  transition: all var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--border-mid);
  background: var(--accent-dim);
}

/* ── BUTTONS ── */
.btn {
  font-family: var(--f-mono);
  font-size: 0.76rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 13px 30px;
  text-decoration: none;
  border-radius: var(--r);
  transition: all var(--ease);
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary { background: var(--accent); color: var(--bg); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hi); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(93,184,130,0.45);
}
.btn-outline:hover { background: var(--accent-dim); border-color: var(--accent); }

.btn-sm { padding: 9px 16px; font-size: 0.68rem; letter-spacing: 1.5px; }

/* ── SECTION HEADER ── */
.section {
  padding: 72px 52px 96px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.section-header { margin-bottom: 40px; }

.section-tag {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: block;
}

.section-title {
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
  line-height: 1.15;
}

.section-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 14px;
  max-width: 520px;
  line-height: 1.75;
}

/* ── FILTERS ── */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }

.filter-btn {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 8px 18px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-mid);
  border-radius: var(--r);
  cursor: pointer;
  transition: all var(--ease);
}

.filter-btn:hover { color: var(--text); border-color: var(--border-hi); }
.filter-btn.active { color: var(--accent); border-color: rgba(93,184,130,0.45); background: var(--accent-dim); }

/* ── PRODUCT CARDS ── */
.store-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color var(--ease), transform var(--ease);
}

.product-card:hover {
  border-color: rgba(93,184,130,0.5);
  transform: translateY(-3px);
}

.product-img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  background: var(--bg-raised);
  display: block;
}

.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.product-body { padding: 22px 20px; display: flex; flex-direction: column; flex: 1; }

.badge {
  font-family: var(--f-mono);
  font-size: 0.63rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 11px;
}

.badge-physical { background: rgba(93,184,130,0.1); color: var(--accent); border: 1px solid rgba(93,184,130,0.22); }
.badge-digital  { background: rgba(92,130,220,0.1); color: #7c9de8; border: 1px solid rgba(92,130,220,0.22); }

.product-body h3 {
  font-family: var(--f-display);
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.product-body p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 18px;
}

.product-foot {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.product-price {
  font-family: var(--f-mono);
  font-size: 1.1rem;
  color: var(--accent);
}

.ship-line {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 4px;
}

.loading, .empty {
  grid-column: 1 / -1;
  font-family: var(--f-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 60px;
  letter-spacing: 1px;
}

/* ── PRODUCT PAGE ── */
.product-page {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: start;
}

.gallery-main {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r);
  display: block;
}

.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

.thumb {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--ease), border-color var(--ease);
  padding: 0;
  background: none;
}

.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: var(--r); }
.thumb:hover { opacity: 0.9; }
.thumb.active { opacity: 1; border-color: var(--accent); }

.back-link {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 24px;
  transition: color var(--ease);
}
.back-link:hover { color: var(--accent); }

.product-info h1 {
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
}

.product-info .product-price { font-size: 1.6rem; }

.divider { border: none; border-top: 1px solid var(--border); margin: 26px 0; }

.product-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.85;
  white-space: pre-line;
}

.spec-list {
  list-style: none;
  margin: 26px 0 30px;
  border: 1px solid var(--border);
  border-radius: var(--r);
}

.spec-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.spec-list li + li { border-top: 1px solid var(--border); }

.spec-list strong {
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-ghost);
}

.buy-btn { width: 100%; padding: 16px 30px; }

.fine-print {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-ghost);
  line-height: 1.6;
}

.fine-print a, .error a { color: var(--accent); }

.error {
  color: var(--danger);
  font-family: var(--f-mono);
  font-size: 0.85rem;
  text-align: center;
  padding: 80px 20px;
  letter-spacing: 1px;
}

/* ── STATUS PAGES (success / cancel) ── */
.status {
  max-width: 560px;
  margin: 0 auto;
  padding: 120px 24px;
  text-align: center;
}

.status-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(93,184,130,0.45);
  background: var(--accent-dim);
  color: var(--accent);
}

.status-mark.is-cancel {
  border-color: var(--border-hi);
  background: transparent;
  color: var(--text-muted);
}

.status h1 {
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 18px;
}

.status p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 36px;
}

.status-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── PORTFOLIO ── */
.project-count {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: auto;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  cursor: zoom-in;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: border-color var(--ease), transform var(--ease);
}

.gallery-item:hover { border-color: rgba(93,184,130,0.5); transform: translateY(-3px); }

.gallery-item img, .gallery-item video {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  background: var(--bg-raised);
}

.gallery-item iframe { width: 100%; aspect-ratio: 16 / 9; display: block; border: 0; pointer-events: none; }

.gallery-item-info { padding: 16px 18px; }

.gallery-item-info h3 {
  font-family: var(--f-display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.gallery-item-info p { color: var(--text-muted); font-size: 0.84rem; line-height: 1.6; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 8, 7, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.active { display: flex; }

.lightbox-content img, .lightbox-content video {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: var(--r);
  display: block;
}

.lightbox-content iframe {
  width: 84vw;
  max-width: 1000px;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--r);
  display: block;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: var(--r);
  padding: 8px 14px;
  cursor: pointer;
  transition: all var(--ease);
}

.lightbox-close:hover { color: var(--accent); border-color: rgba(93,184,130,0.45); }

/* ── DOCUMENT PAGES (policies) ── */
.doc { max-width: 780px; margin: 0 auto; }

.doc .updated {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-ghost);
  margin-top: 14px;
}

.doc .intro, .doc section p, .doc section li {
  color: var(--text-muted);
  line-height: 1.85;
  font-size: 0.95rem;
}

.doc .intro { margin-top: 28px; }

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 32px 0 8px;
}

.toc a {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 7px 12px;
  border: 1px solid var(--border-mid);
  border-radius: var(--r);
  transition: all var(--ease);
}

.toc a:hover { color: var(--accent); border-color: rgba(93,184,130,0.45); background: var(--accent-dim); }

.doc section {
  padding-top: 48px;
  scroll-margin-top: 84px;
}

.doc h2 {
  font-family: var(--f-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.doc section p + p, .doc section p + ul, .doc section ul + p { margin-top: 14px; }
.doc section ul { padding-left: 20px; }
.doc section li + li { margin-top: 8px; }
.doc section li::marker { color: var(--accent); }
.doc strong { color: var(--text); font-weight: 600; }
.doc .intro a, .doc section a { color: var(--accent); }
.doc .intro a:hover, .doc section a:hover { color: var(--accent-hi); }

/* ── FOOTER ── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 28px 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-copy {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }

.footer-links a {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color var(--ease);
}

.footer-links a:hover { color: var(--accent); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  nav { padding: 0 28px; }
  .section { padding: 56px 28px 72px; }
  .store-grid { grid-template-columns: repeat(2, 1fr); }
  .product-page { grid-template-columns: 1fr; gap: 36px; }
  footer { padding: 24px 28px; }
}

@media (max-width: 600px) {
  nav { padding: 0 16px; height: 58px; }
  .gallery { grid-template-columns: 1fr; }
  .doc section { scroll-margin-top: 74px; }
  .logo img { height: 44px; }
  .nav-links a { padding: 7px 10px; letter-spacing: 1.5px; }
  .section { padding: 40px 16px 56px; }
  .store-grid { grid-template-columns: 1fr; }
  .status { padding: 80px 16px; }
  footer { padding: 20px 16px; flex-direction: column; align-items: flex-start; }
}
