/* Heartless Dragon — design tokens
   Change the brand here; everything below reads from these. */
:root {
  --bg: #0d0b0a;            /* near-black, warm */
  --surface: #171311;       /* card background */
  --border: #2a2320;
  --text: #f2ece6;
  --muted: #a89d94;
  --accent: #e2552b;        /* ember */
  --accent-soft: rgba(226, 85, 43, 0.14);

  --font-display: "Cinzel", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --max: 1080px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ember glow behind the hero */
.glow {
  position: fixed;
  inset: -20vh -10vw auto;
  height: 80vh;
  background: radial-gradient(ellipse at 50% 0%, rgba(226, 85, 43, 0.22), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.site-header, main, .site-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark { width: 36px; height: 36px; color: var(--accent); flex-shrink: 0; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(226, 85, 43, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(226, 85, 43, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(226, 85, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 85, 43, 0); }
}

/* Hero */
main { flex: 1; }

.hero {
  padding: clamp(48px, 12vh, 120px) 0 clamp(40px, 8vh, 80px);
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 5rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.accent { color: var(--accent); }

.lede {
  margin: 0;
  max-width: 560px;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--muted);
}

/* Signup */
.signup { margin-top: 36px; max-width: 520px; }

.signup-row { display: flex; gap: 10px; }

.signup input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.signup input::placeholder { color: #6f655e; }

.signup input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.signup button {
  padding: 14px 22px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.signup button:hover { background: #c94721; }
.signup button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.signup button:disabled { opacity: 0.6; cursor: wait; }

.signup-msg { margin: 10px 0 0; font-size: 0.875rem; color: var(--muted); min-height: 1.4em; }
.signup-msg.is-error { color: #ff8a6b; }
.signup-msg.is-info { color: var(--text); }
.signup-msg.is-success { color: #8fd18a; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Services */
.services { padding-bottom: clamp(56px, 10vh, 96px); }

.section-label {
  margin: 0 0 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.service-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 28px;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover { border-color: rgba(226, 85, 43, 0.5); transform: translateY(-2px); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.card-cta {
  margin-top: auto;
  padding-top: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.card-icon {
  width: 44px; height: 44px;
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 10px;
  background: var(--accent-soft);
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Footer */
.site-footer {
  padding-top: 24px;
  padding-bottom: 32px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-footer p { margin: 0; }

.site-footer a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
.site-footer a:hover { color: var(--accent); border-color: var(--accent); }

/* Service sub-pages */
.back-link {
  display: block;
  width: fit-content;
  margin-bottom: 32px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover { color: var(--accent); }
.back-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.page-icon {
  display: block;
  width: 56px; height: 56px;
  padding: 13px;
  margin-bottom: 24px;
  border-radius: 12px;
  background: var(--accent-soft);
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-hero h1 { font-size: clamp(2.2rem, 6vw, 3.75rem); }

/* Placeholder for sections not built yet — remove when real content lands */
.placeholder {
  margin-bottom: clamp(56px, 10vh, 96px);
  padding: clamp(40px, 8vh, 72px) 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.placeholder p { margin: 0; }

/* Product showcase */
.product {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
  margin-bottom: clamp(56px, 10vh, 96px);
}

@media (min-width: 860px) {
  .product { grid-template-columns: 1fr 1fr; }
  .product-media { position: sticky; top: 24px; }
}

.product [hidden] { display: none !important; }

.product-image {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 8%;
  background: radial-gradient(circle at 50% 35%, #231b17, var(--surface) 70%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.product-image-tag {
  position: absolute;
  top: 14px; left: 14px;
  padding: 4px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 999px;
}

/* The "piece" stands in for the product until real photos exist */
.piece {
  width: 76%;            /* 4:5 piece inside a square frame: 76% wide keeps it fully in view */
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 12%;
  background: linear-gradient(160deg, #3a2a20, #24180f 55%, #1b120c);
  border: 1px solid #4a3528;
  border-radius: 8px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
}

.engrave-logo {
  max-width: 55%;
  max-height: 35%;
  object-fit: contain;
  filter: grayscale(1) sepia(0.6) brightness(1.15) opacity(0.85);
}

.engrave-text {
  margin: 0;
  max-width: 100%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 2.6vw, 1.5rem);
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: #e6cfb4;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.08), 0 -1px 1px rgba(0, 0, 0, 0.7);
  overflow-wrap: anywhere;
  transition: opacity 0.2s ease;
}

.engrave-text.is-empty { opacity: 0.35; }

.media-note { margin: 12px 0 0; font-size: 0.8rem; color: var(--muted); }

.product-name {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.product-price {
  margin: 0 0 18px;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
}

/* Remove from the pages once real pricing is set */
.price-disclaimer { margin: -10px 0 18px; font-size: 0.8rem; font-style: italic; color: var(--muted); }

.product-desc { margin: 0 0 22px; color: var(--muted); }

.spec-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  border-top: 1px solid var(--border);
}

.spec-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 12px 0;
  font-size: 0.9rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.spec-list span { color: var(--text); font-weight: 500; }

.order-form { display: grid; gap: 22px; }

.field { display: grid; gap: 8px; }

.field-head { display: flex; justify-content: space-between; align-items: baseline; }

.field label, .field-label { font-size: 0.9rem; font-weight: 500; }

.optional { color: var(--muted); font-weight: 400; }

.counter { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.is-full { color: var(--accent); }

.text-input, .qty-select {
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-input { width: 100%; }
.text-input::placeholder { color: #6f655e; }

.text-input:focus, .qty-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.upload-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }

.btn-secondary {
  display: inline-block;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.upload-row:has(input:focus-visible) .btn-secondary { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.file-name { font-size: 0.85rem; color: var(--muted); overflow-wrap: anywhere; min-width: 0; }
.file-name.has-file { color: var(--text); }

.file-remove {
  width: 28px; height: 28px;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
}

.file-remove:hover { color: var(--accent); border-color: var(--accent); }

.buy-row { display: flex; gap: 10px; }

.qty-select { width: 84px; cursor: pointer; }

.btn-primary {
  flex: 1;
  padding: 14px 22px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-primary:hover { background: #c94721; }
.btn-primary:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.form-msg { margin: 0; min-height: 1.4em; font-size: 0.875rem; color: var(--muted); }
.form-msg.is-error { color: #ff8a6b; }
.form-msg.is-info { color: var(--text); }
.form-msg.is-success { color: #8fd18a; }

.price-note { font-size: 0.85rem; font-weight: 400; color: var(--muted); }

/* Option pickers: package cards and format chips */
.choice-group { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; min-width: 0; }
.choice-group legend { padding: 0; margin-bottom: 8px; font-size: 0.9rem; font-weight: 500; }

.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.choice, .chip { position: relative; }
.choice input, .chip input { position: absolute; opacity: 0; pointer-events: none; }

/* Custom radio / checkbox indicator */
.choice::before {
  content: "";
  flex-shrink: 0;
  width: 18px; height: 18px;
  border: 1.5px solid #6a5a50;
  border-radius: 50%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.choice:has(input[type="checkbox"])::before { border-radius: 5px; }
.choice:hover { border-color: rgba(226, 85, 43, 0.5); }
.choice:has(input:checked) { border-color: var(--accent); background: rgba(226, 85, 43, 0.06); }
.choice:has(input[type="radio"]:checked)::before { border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--surface); background: var(--accent); }
.choice:has(input[type="checkbox"]:checked)::before { border-color: var(--accent); background: var(--accent); }
.choice:has(input:focus-visible), .chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.choice-body { flex: 1; display: grid; gap: 2px; min-width: 0; }
.choice-title { font-weight: 600; font-size: 0.95rem; }
.choice-meta { font-size: 0.82rem; color: var(--muted); }
.choice-price { font-weight: 600; font-size: 0.95rem; white-space: nowrap; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.chip span {
  display: inline-block;
  padding: 9px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.chip:hover span { border-color: rgba(226, 85, 43, 0.5); }
.chip:has(input:checked) span { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }


/* Video frame: shape follows the selected aspect */
.video-frame {
  container-type: inline-size;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6%;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.55)),
    radial-gradient(circle at 30% 20%, rgba(226, 85, 43, 0.35), transparent 60%),
    linear-gradient(135deg, #2b1d16, #120d0b);
  border: 1px solid #4a3528;
  border-radius: 8px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
}

[data-sel-aspect="vertical"] .video-frame { width: 50%; aspect-ratio: 9 / 16; }
[data-sel-aspect="square"] .video-frame { width: 80%; aspect-ratio: 1 / 1; }

.play-icon {
  width: clamp(36px, 16cqi, 64px);
  height: clamp(36px, 16cqi, 64px);
  margin-bottom: 6px;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.2;
}

.play-icon path { fill: var(--text); stroke: none; }

.frame-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 8cqi, 1.6rem);
  letter-spacing: 0.04em;
}

.frame-meta { margin: 0; font-size: clamp(0.72rem, 4.5cqi, 0.9rem); color: var(--accent); font-weight: 600; }
.frame-addons { margin: 0; font-size: clamp(0.68rem, 4cqi, 0.82rem); color: var(--muted); }

/* Ad mockup: layout follows the selected format */
.ad-mock {
  container-type: inline-size;
  width: 80%;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 9%;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 10%, rgba(226, 85, 43, 0.55), transparent 55%),
    linear-gradient(160deg, #24170f, #0f0b09);
  border: 1px solid #4a3528;
  border-radius: 8px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
}

[data-sel-format="banner"] .ad-mock {
  width: 100%;
  aspect-ratio: 4 / 1;
  flex-direction: row;
  align-items: center;
  gap: 4%;
  padding: 3% 4%;
}

[data-sel-format="flyer"] .ad-mock { width: 62%; aspect-ratio: 17 / 22; padding: 10% 9%; }

.ad-copy { display: grid; gap: 4cqi; min-width: 0; }
[data-sel-format="banner"] .ad-copy { flex: 1; gap: 1cqi; }

.ad-brand {
  margin: 0;
  font-size: max(10px, 5cqi);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  overflow-wrap: anywhere;
}

.ad-headline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 9cqi;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

/* Banners are short: brand gets one line, headline two, the rest truncates with … like real banner ads */
[data-sel-format="banner"] .ad-brand { font-size: max(9px, 2.6cqi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-sel-format="banner"] .ad-headline { font-size: max(12px, 4.2cqi); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
[data-sel-format="flyer"] .ad-headline { font-size: 11cqi; }

.ad-brand.is-empty, .ad-headline.is-empty { opacity: 0.45; }

.ad-cta {
  align-self: flex-start;
  padding: 2.4cqi 4.5cqi;
  font-size: max(11px, 4cqi);
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 1.6cqi;
  white-space: nowrap;
}

[data-sel-format="banner"] .ad-cta { align-self: center; padding: 1.2cqi 2.4cqi; font-size: max(10px, 2.4cqi); border-radius: 0.8cqi; }

/* Small screens */
@media (max-width: 480px) {
  .brand-name { font-size: 0.9rem; letter-spacing: 0.08em; }
  .status-pill { font-size: 0.72rem; padding: 5px 10px; }
  .card { padding: 22px; }
  .signup-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
  .card { transition: none; }
}

/* 404 page */
.not-found-actions { margin-top: 36px; }
.not-found-actions .btn-primary { display: inline-block; text-decoration: none; }

.not-found-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }

.not-found-links a {
  display: inline-block;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.not-found-links a:hover { border-color: var(--accent); color: var(--accent); }
.not-found-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
