:root {
  --bg: #111318;
  --plum: #2A1C32;
  --surface: #181b22;
  --surface-2: #20232d;
  --text: #F7F4EF;
  --text-dim: rgba(247, 244, 239, 0.74);
  --muted: #9B9CA3;
  --border: rgba(155, 156, 163, 0.16);
  --border-strong: rgba(155, 156, 163, 0.32);
  --ember: #D98B4A;
  --ember-soft: rgba(217, 139, 74, 0.14);
  --ember-hover: #e6a05f;
  --danger: #e0795f;
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(217, 139, 74, 0.10), transparent 60%),
    radial-gradient(900px 600px at -10% 0%, rgba(42, 28, 50, 0.6), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4, .brand {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin: 0 0 16px; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.2rem; }

a { color: var(--ember); text-decoration: none; }
a:hover { text-decoration: underline; }

p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.lead { color: var(--text-dim); font-size: 1.05rem; }

.container { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(17, 19, 24, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header.admin { background: rgba(42, 28, 50, 0.8); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 12px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-text { font-family: 'Sora', 'Inter', sans-serif; font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; }
.brand .nine { color: var(--ember); }
.logo { width: 38px; height: 30px; object-fit: contain; flex: none; }

/* ---- Big call-to-action band ---- */
.cta-band {
  text-align: center;
  background: radial-gradient(600px 200px at 50% 0%, rgba(217, 139, 74, 0.16), transparent 70%), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px 24px;
}
.cta-band h2 { margin: 0 0 6px; }
.cta-band .muted { margin-bottom: 22px; }
.btn-lg { font-size: 1.1rem; padding: 16px 40px; }
.btn.primary.btn-lg {
  box-shadow: 0 8px 30px rgba(217, 139, 74, 0.45);
  animation: cta-pulse 2.4s ease-in-out infinite;
}
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(217, 139, 74, 0.4); transform: scale(1); }
  50% { box-shadow: 0 10px 46px rgba(217, 139, 74, 0.8); transform: scale(1.03); }
}
@media (prefers-reduced-motion: reduce) { .btn.primary.btn-lg { animation: none; } }
.nav-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav-links a { color: var(--text-dim); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.cart { color: var(--text); }
.who { color: var(--muted); font-size: 0.85rem; }

main.container { padding-top: 32px; padding-bottom: 64px; min-height: 64vh; }
section { margin-bottom: 44px; }
.section-head { margin-bottom: 18px; }

/* ---- Buttons ---- */
.btn, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.97rem;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1;
}
.btn:hover, button:hover { border-color: var(--text); text-decoration: none; }
.btn.primary, button.primary {
  background: var(--ember);
  color: #1a130b;
  border-color: var(--ember);
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(217, 139, 74, 0.25);
}
.btn.primary:hover, button.primary:hover { background: var(--ember-hover); border-color: var(--ember-hover); }
button.danger { border-color: rgba(224, 121, 95, 0.5); color: var(--danger); }
button.danger:hover { border-color: var(--danger); }
button.linkbtn { border: none; background: none; padding: 0; color: var(--text-dim); font-weight: 500; border-radius: 0; }
button.linkbtn:hover { color: var(--text); text-decoration: underline; }

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  align-items: center;
  background:
    radial-gradient(700px 320px at 90% -30%, rgba(217, 139, 74, 0.18), transparent 60%),
    linear-gradient(160deg, var(--plum), #14121b 70%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(28px, 4.5vw, 48px);
  margin-bottom: 44px;
}
.hero h1 { max-width: 18ch; }
.hero .sub { color: var(--text-dim); font-size: 1.12rem; max-width: 50ch; margin-bottom: 26px; }
.hero-media img { width: 100%; height: 100%; max-height: 320px; object-fit: cover; border-radius: 18px; border: 1px solid var(--border); display: block; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media img { max-height: 220px; }
}

/* ---- Full-bleed hero with right-aligned copy ---- */
.hero-full {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: -32px;
  margin-bottom: 44px;
  min-height: 66vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, rgba(10, 8, 12, 0.74) 0%, rgba(10, 8, 12, 0.42) 38%, rgba(10, 8, 12, 0.06) 62%, transparent 100%);
}
.hero-inner { position: relative; width: 100%; }
.hero-content { max-width: 470px; margin-left: auto; text-align: right; }
.hero-content h1 {
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.6), 0 0 40px rgba(255, 255, 255, 0.35), 0 2px 10px rgba(0, 0, 0, 0.85);
}
.hero-content .sub {
  color: #fff;
  font-size: 1.12rem;
  margin-bottom: 26px;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.5), 0 2px 10px rgba(0, 0, 0, 0.9);
}
.hero-full .cta-row { justify-content: flex-end; }
@media (max-width: 760px) {
  .hero-full { min-height: 58vh; }
  .hero-content { max-width: 100%; text-align: center; }
  .hero-full .cta-row { justify-content: center; }
  .hero-scrim { background: linear-gradient(to top, rgba(10, 8, 12, 0.82) 10%, rgba(10, 8, 12, 0.35) 60%, rgba(10, 8, 12, 0.15)); }
}

/* ---- Cards ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card {
  background: linear-gradient(180deg, var(--surface), #15171e);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.card h2, .card h3 { margin-top: 0; }
.card-img {
  display: block;
  width: calc(100% + 48px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  margin: -24px -24px 18px;
  border-bottom: 1px solid var(--border);
}
/* Smaller preview image (home teaser cards) */
.card-img.card-img-sm { aspect-ratio: auto; height: 150px; }
.price { color: var(--ember); font-weight: 700; font-size: 1.05rem; }
.note { font-size: 0.85rem; color: var(--ember); margin: -4px 0 14px; }

/* ---- Gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.gallery img { width: 100%; height: 180px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); display: block; }

/* ---- How it works ---- */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--text-dim);
}
.steps li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ember-soft);
  color: var(--ember);
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  margin-bottom: 12px;
}

/* ---- Forms ---- */
.form {
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.form label, .product-form label {
  display: block;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}
.form input, .form textarea, .form select,
.product-form input, .product-form select {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #13151b;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}
.form input:focus, .form textarea:focus, .form select:focus,
.product-form input:focus, .product-form select:focus {
  outline: none;
  border-color: var(--ember);
  box-shadow: 0 0 0 3px var(--ember-soft);
}
.form input:disabled { opacity: 0.55; }
.form textarea { min-height: 84px; resize: vertical; }
label.checkbox { font-weight: 400; color: var(--text-dim); display: flex; align-items: flex-start; gap: 10px; }
label.checkbox.muted { color: var(--muted); }
label.checkbox input { width: auto; margin: 3px 0 0; }
.product-form { display: flex; flex-direction: column; gap: 2px; }
.product-form button { margin-top: 10px; width: 100%; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.95rem; }
.table th, .table td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.table td { color: var(--text-dim); }
.table a { font-weight: 600; }

/* ---- Totals ---- */
.totals {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  max-width: 360px;
  margin: 20px 0;
}
.totals p { display: flex; justify-content: space-between; margin: 8px 0; color: var(--text-dim); }
.totals .grand {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 6px;
}

/* ---- Inline forms (cart row controls) ---- */
.inline { display: inline; }
.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 6px 0; }
.inline-form label { font-weight: 600; margin: 0; }
.inline-form select, .inline-form input {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #13151b;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font: inherit;
}
.inline-form button { padding: 10px 16px; }
.tiny { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.tiny input { width: 90px; margin-top: 4px; }

/* ---- Messages ---- */
.errors {
  background: rgba(224, 121, 95, 0.10);
  border: 1px solid rgba(224, 121, 95, 0.4);
  color: #f0b4a4;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  list-style-position: inside;
  margin: 0 0 20px;
}
.notice {
  background: var(--ember-soft);
  border: 1px solid rgba(217, 139, 74, 0.4);
  color: var(--ember);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin: 0 0 16px;
}
.notice.big { font-size: 1.05rem; font-weight: 700; }

/* ---- Panels ---- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin: 16px 0; }
.panel h2 { margin-top: 0; }
.panel p { color: var(--text-dim); }
.panel strong { color: var(--text); }

/* ---- Checkout ---- */
.checkout-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: sticky; top: 92px; }
.summary h2 { margin-top: 0; }
.summary-list { list-style: none; padding: 0; margin: 0 0 16px; }
.summary-list li { padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text-dim); }
@media (max-width: 760px) { .checkout-grid { grid-template-columns: 1fr; } .summary { position: static; } }

/* ---- Empty state ---- */
.empty { text-align: center; padding: 56px 24px; color: var(--muted); }
.empty p { font-size: 1.05rem; margin-bottom: 18px; }

/* ---- Timeline ---- */
.timeline { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.timeline li {
  flex: 1;
  min-width: 130px;
  text-align: center;
  padding: 16px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  text-transform: capitalize;
  font-size: 0.9rem;
}
.timeline li.done { background: var(--ember-soft); border-color: rgba(217, 139, 74, 0.4); color: var(--ember); }
.timeline li.current { border-color: var(--ember); color: var(--text); font-weight: 700; box-shadow: 0 0 0 3px var(--ember-soft); }
@media (max-width: 640px) { .timeline { flex-direction: column; } }

/* ---- Chat ---- */
.chat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  max-height: 420px;
  overflow-y: auto;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg { padding: 12px 16px; border-radius: 16px; max-width: 78%; }
.msg.customer { background: var(--surface-2); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.support { background: var(--ember-soft); border: 1px solid rgba(217, 139, 74, 0.3); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg .who { font-weight: 700; font-size: 0.76rem; display: block; color: var(--text); }
.msg .body { display: block; color: var(--text-dim); margin-top: 2px; }
.msg .time { font-size: 0.7rem; color: var(--muted); display: block; margin-top: 4px; }
.chat-form { display: flex; gap: 10px; }
.chat-form input {
  flex: 1;
  padding: 13px 16px;
  border-radius: 999px;
  background: #13151b;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font: inherit;
}
.chat-form input:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-soft); }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: 0.9rem; }
.site-footer p { margin: 4px 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text-dim); }

@media (max-width: 560px) {
  .nav-links { gap: 12px; font-size: 0.9rem; }
  main.container { padding-top: 24px; }
}

/* ---- Amber embers (repurposed from phoenix882.com's ember-rise) ---- */
.embers { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.ember {
  position: absolute;
  bottom: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.5), rgba(217, 139, 74, 0.22) 45%, transparent 70%);
  filter: blur(7px);
  opacity: 0;
  animation-name: ember-rise;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}
@keyframes ember-rise {
  0%   { transform: translateY(0) translateX(0) scale(0.35); opacity: 0; }
  15%  { opacity: 0.7; }
  70%  { opacity: 0.4; }
  100% { transform: translateY(-90vh) translateX(var(--drift, 0)) scale(2.6); opacity: 0; }
}
/* Keep page content above the ember layer (header is already sticky/z-50). */
main, .site-footer { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .ember { display: none; }
}
