/* ============================================================
   LATE RECORDS — Shared Stylesheet
   ============================================================ */

/* ── Reset + Base ─────────────────────────────────────────── */

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

:root {
  --max-w:    780px;
  --pad-h:    30px;
  --header-h: 74px;
  --footer-h: 48px;

  /* ── Typography Tokens — Inter only ────────────────────── */
  --fn-artist:  'Inter', system-ui, sans-serif;
  --fn-title:   'Inter', system-ui, sans-serif;
  --fn-desc:    'Inter', system-ui, sans-serif;
  --fn-label:   'Inter', system-ui, sans-serif;
  --fn-price:   'Inter', system-ui, sans-serif;
  --fn-meta:    'Inter', system-ui, sans-serif;
  --fn-future:  'Inter', system-ui, sans-serif;

  /* Font weights */
  --fw-light:   300;
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-bold:    600;
}

/* ── Theme variables ──────────────────────────────────────── */

html {
  --bg:         #f5f1ed;
  --bg-dot:     rgba(42,37,32,.06);
  --ink:        #2a2520;
  --ink55:      rgba(42,37,32,.55);
  --ink45:      rgba(42,37,32,.45);
  --ink30:      rgba(42,37,32,.30);
  --ink15:      rgba(42,37,32,.15);
  --border:     rgba(42,37,32,.20);
  --border-mid: rgba(42,37,32,.10);
  --border-tag: rgba(42,37,32,.22);
  --art-bg:     rgba(42,37,32,.06);
  --btn-bg:     #2a2520;
  --btn-fg:     #f5f1ed;
  --accent:     #c17a56;
}

html.dark {
  --bg:         #1a1815;
  --bg-dot:     rgba(240,235,229,.04);
  --ink:        #f0ebe5;
  --ink55:      rgba(240,235,229,.55);
  --ink45:      rgba(240,235,229,.42);
  --ink30:      rgba(240,235,229,.26);
  --ink15:      rgba(240,235,229,.12);
  --border:     rgba(240,235,229,.16);
  --border-mid: rgba(240,235,229,.08);
  --border-tag: rgba(240,235,229,.18);
  --art-bg:     rgba(240,235,229,.05);
  --btn-bg:     #f0ebe5;
  --btn-fg:     #1a1815;
  --accent:     #d4a574;
}

html { overflow-x: hidden; } /* ARCH: clips body at viewport edge — belt+suspenders with body rule below */
body {
  font-family: Inter, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  /* ARCH RULE: never allow horizontal overflow — prevents content bleed site-wide */
  overflow-x: hidden;
}

img    { display: block; max-width: 100%; }
a      { color: inherit; text-decoration: none; touch-action: manipulation; }
button { cursor: pointer; font-family: inherit; touch-action: manipulation; }
input, select, textarea { touch-action: manipulation; }

/* ── Header ───────────────────────────────────────────────── */

.fixed-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  background-color: var(--bg);
  z-index: 1000;
  border-bottom: 1px solid var(--border-mid);
  height: var(--header-h);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 12px var(--pad-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header-logo {
  height: 37px; /* CHANGE THIS ONE VALUE TO RESIZE ALL LOGOS GLOBALLY */
  width: auto;
  display: block;
  transition: opacity .15s;
}

.header-logo:hover {
  opacity: .5;
}

.logo-dark            { display: none; }
html.dark .logo-light { display: none; }
html.dark .logo-dark  { display: block; }

.header-right { display: flex; align-items: center; gap: 16px; }

/* Cart styles moved to app.css */

/* Hide cart on checkout / success */
.checkout-page .cart-link,
.success-page  .cart-link { display: none; }

/* ── Theme toggle ─────────────────────────────────────────── */

.theme-toggle {
  background: none;
  border: none;
  padding: 4px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .15s;
  flex-shrink: 0;
}
.theme-toggle:hover { opacity: .6; }
.theme-toggle svg { width: 16px; height: 16px; display: block; }

/* ── Footer ───────────────────────────────────────────────── */

.fixed-footer {
  position: fixed;
  bottom: 0; left: 0;
  width: 100%;
  background: var(--bg);
  border-top: 1px solid var(--border-mid);
  height: var(--footer-h);
  z-index: 1000;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-h);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink55);
}

.footer-left { line-height: 1.4; }

.footer-links {
  display: flex;
  gap: 16px;
  align-items: baseline;
}

.footer-inner a {
  text-decoration: none;
  color: var(--ink45);
  transition: color .15s;
  display: flex;
  align-items: baseline;
}

.footer-inner a:hover { color: var(--ink); }

.external-arrow {
  font-family: 'Noto Sans Symbols 2', sans-serif;
  font-size: 15px;
  margin-left: 4px;
}

/* ── Container ────────────────────────────────────────────── */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--header-h) + 30px) var(--pad-h) calc(var(--footer-h) + 60px);
}

/* ── Buttons ──────────────────────────────────────────────── */

.btn {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  transition: all .15s;
}

.btn:hover       { background: var(--btn-bg); color: var(--btn-fg); }
.btn-solid       { background: var(--btn-bg); color: var(--btn-fg); }
.btn-solid:hover { background: var(--btn-bg); opacity: .85; }
.btn:disabled    { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--btn-bg); color: var(--btn-fg); }

/* ── Form fields ──────────────────────────────────────────── */

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--ink55);
}

.form-group input {
  border: 1px solid var(--ink);
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
  border-radius: 0;
  -webkit-appearance: none;
}

.form-group input:focus { border-color: var(--ink); }

/* ── Section label ────────────────────────────────────────── */

.section-label {
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink45);
  margin-bottom: 18px;
}

/* ── Modal base ───────────────────────────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal.is-open { display: flex; }

.modal-inner {
  background: var(--bg);
  max-width: 520px;
  width: 100%;
  max-height: 70vh;
  overflow-y: auto;
  padding: 34px;
  border: 1px solid var(--border);
  position: relative;
}

.modal-inner h2 {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 600;
}

.modal-inner p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink55);
}

.modal-close {
  position: absolute;
  top: 10px; right: 14px;
  border: 0;
  background: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--ink55);
  transition: color .15s;
}

.modal-close:hover { color: var(--ink); }

/* ── Skeleton loader dark mode ────────────────────────────── */

html.dark .sk {
  background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.10) 50%, rgba(255,255,255,.05) 75%);
  background-size: 200% 100%;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 768px) {
  /* 16px minimum prevents iOS auto-zoom on input focus */
  input, select, textarea { font-size: 16px !important; }
}

@media (max-width: 600px) {
  :root { --pad-h: 20px; }

  .modal { padding: 0; }

  .modal-inner {
    width: 80%;
    max-width: none;
    max-height: 60vh;
    padding: 20px 16px;
    font-size: 12px;
  }

  .header-logo { height: 37px; }
  .footer-inner { font-size: 11px; padding: 0 20px; }
  .footer-links  { gap: 12px; }
}
