/* =====================================================================
   bodhin.solutions — QR Code Generator
   Brand: Premium Gold / Dark
   --------------------------------------------------------------------
   CHANGE BRAND COLORS HERE: edit the CSS variables in :root below.
   ===================================================================== */
:root {
  --bg:           #0E0E12;   /* deep charcoal page background */
  --surface:      #15151D;   /* cards / panels */
  --surface-2:    #1C1C26;   /* inset fields, tabs */
  --border:       #2A2A36;   /* hairline borders */
  --gold:         #D4AF37;   /* primary gold accent */
  --gold-bright:  #E5C76B;   /* lighter gold (gradients, hover) */
  --gold-soft:    rgba(212, 175, 55, 0.12);
  --text:         #F5F5F0;   /* primary off-white */
  --muted:        #A0A0A8;   /* secondary gray */
  --danger:       #E5736B;
  --radius:       14px;
  --radius-sm:    10px;
  --shadow:       0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-sm:    0 4px 18px rgba(0, 0, 0, 0.35);
  --font-head:    "Space Grotesk", "Sora", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;
  --maxw:         1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(900px 480px at 78% -8%, rgba(212, 175, 55, 0.10), transparent 60%),
    radial-gradient(700px 420px at 12% 4%, rgba(212, 175, 55, 0.05), transparent 55%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: var(--gold); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 14, 18, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 19px; font-weight: 600; color: var(--text); }
.brand .mark { width: 26px; height: 26px; flex: none; }
.brand b { font-weight: 600; }
.brand .accent { color: var(--gold); }
.nav-links { display: flex; gap: 26px; font-size: 14.5px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); }
@media (max-width: 620px) { .nav-links { display: none; } }

/* ---------- Ad slots ---------- */
.ad-slot {
  border: 1px dashed rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(212, 175, 55, 0.03);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  overflow: hidden;
}
.ad-slot::before { content: "Advertisement"; opacity: 0.5; }
.ad-top    { min-height: 90px;  margin: 20px auto; max-width: 728px; }
.ad-mid    { min-height: 90px;  margin: 8px auto 36px; max-width: 728px; }
.ad-footer { min-height: 90px;  margin: 28px auto; max-width: 728px; }
.ad-side   { min-height: 250px; width: 300px; flex: none; align-self: flex-start; position: sticky; top: 84px; }
@media (max-width: 1024px) { .ad-side { display: none; } }
.ad-frame { border: 0; display: block; background: transparent; }
.ad-native { width: 100%; max-width: 728px; height: 280px; }
.ad-desktop { display: block; }
.ad-mobile { display: none; }
.ad-slot:has(iframe) { border: none; background: none; padding: 0; }
.ad-slot:has(iframe)::before { content: none; }
@media (max-width: 760px) {
  .ad-desktop { display: none; }
  .ad-mobile { display: block; }
  .ad-footer { display: none; }
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 54px 0 30px; }
.hero .eyebrow {
  display: inline-block; font-size: 12.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; margin-bottom: 20px; background: var(--gold-soft);
}
.hero h1 {
  font-size: clamp(34px, 6vw, 58px); margin: 0 0 16px;
  background: linear-gradient(180deg, #fff 0%, #cfcfca 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { color: var(--muted); font-size: clamp(16px, 2.2vw, 19px); max-width: 620px; margin: 0 auto; }
.trust-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin-top: 26px; }
.trust-item { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.trust-item svg { color: var(--gold); flex: none; }

/* ---------- Tool layout ---------- */
.tool-area { display: flex; gap: 28px; align-items: flex-start; margin-top: 14px; }
.tool-main { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 880px) { .tool-main { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}
.panel h2.panel-title { font-size: 15px; margin: 0 0 16px; color: var(--text); letter-spacing: -0.01em; }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tab {
  appearance: none; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--muted); font-family: var(--font-body); font-size: 13.5px; font-weight: 500;
  padding: 8px 13px; border-radius: 999px; cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
  min-height: 38px;
}
.tab:hover { color: var(--text); transform: translateY(-1px); }
.tab[aria-selected="true"] {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: #1a1505; border-color: transparent; font-weight: 600;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.25);
}

/* Form fields */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.field .hint { font-size: 12px; color: var(--muted); opacity: 0.8; margin-top: 6px; }
input[type="text"], input[type="url"], input[type="email"], input[type="tel"], input[type="password"], textarea, select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 12px 14px; font-family: var(--font-body); font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease; min-height: 46px;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft);
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23A0A0A8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-group[hidden] { display: none; }

/* Customization */
.divider { height: 1px; background: var(--border); margin: 22px 0; }
.color-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.color-pick { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 10px; }
.color-pick input[type="color"] { width: 34px; height: 34px; min-height: 34px; padding: 0; border: none; border-radius: 8px; background: none; cursor: pointer; flex: none; }
.color-pick input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-pick input[type="color"]::-webkit-color-swatch { border: 1px solid var(--border); border-radius: 8px; }
.color-pick .ctext { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.palette-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.swatch {
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer; padding: 0;
  border: 1px solid var(--border); position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--b) 0 50%, var(--a) 50% 100%);
  transition: transform .12s ease, box-shadow .15s ease;
}
.swatch::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 2px rgba(212,175,55,0); transition: box-shadow .15s ease;
}
.swatch:hover { transform: translateY(-2px); }
.swatch[aria-pressed="true"]::after { box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 2px var(--gold); }

.seg { display: flex; gap: 6px; }
.seg button {
  flex: 1; appearance: none; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--muted); font-family: var(--font-body); font-size: 14px; font-weight: 500;
  padding: 9px 0; border-radius: var(--radius-sm); cursor: pointer; min-height: 42px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--gold-soft); color: var(--gold-bright); border-color: var(--gold); }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; transition: .2s; }
.switch .track::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: var(--muted); border-radius: 50%; transition: .2s; }
.switch input:checked + .track { background: var(--gold-soft); border-color: var(--gold); }
.switch input:checked + .track::before { transform: translateX(20px); background: var(--gold); }

.logo-upload { display: flex; align-items: center; gap: 12px; }
.btn-ghost {
  appearance: none; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-family: var(--font-body); font-size: 13.5px; font-weight: 500; padding: 10px 14px;
  border-radius: var(--radius-sm); cursor: pointer; min-height: 42px; transition: border-color .15s ease, transform .12s ease;
}
.btn-ghost:hover { border-color: var(--gold); transform: translateY(-1px); }
.logo-name { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-clear { color: var(--danger); cursor: pointer; font-size: 13px; background: none; border: none; padding: 0; }

/* Preview panel */
.preview-panel { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 880px) { .preview-panel { position: static; } }
.qr-stage {
  background: #ffffff; border-radius: var(--radius); padding: 22px; display: flex;
  align-items: center; justify-content: center; aspect-ratio: 1 / 1; box-shadow: var(--shadow);
}
.qr-stage canvas { width: 100%; height: 100%; image-rendering: auto; border-radius: 4px; }
.qr-empty { color: #9a9a9a; font-size: 14px; text-align: center; font-family: var(--font-body); }
.qr-meta { text-align: center; font-size: 12.5px; color: var(--muted); margin: -4px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

.download-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.btn {
  appearance: none; border: none; cursor: pointer; font-family: var(--font-body); font-weight: 600;
  font-size: 14.5px; padding: 13px 16px; border-radius: var(--radius-sm); min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%); color: #1a1505;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.28);
}
.btn-primary:hover { transform: scale(1.02); filter: brightness(1.05); box-shadow: 0 8px 26px rgba(212, 175, 55, 0.4); }
.btn-outline { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--gold); transform: translateY(-1px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none; }
.copy-btn { width: 100%; }

.privacy-badge {
  display: flex; align-items: center; gap: 10px; background: var(--gold-soft);
  border: 1px solid rgba(212, 175, 55, 0.25); border-radius: var(--radius-sm); padding: 12px 14px;
  font-size: 13px; color: var(--gold-bright);
}
.privacy-badge svg { flex: none; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--surface); border: 1px solid var(--gold); color: var(--text);
  padding: 12px 20px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Content sections ---------- */
.section { padding: 18px 0; }
.section h2 { font-size: clamp(24px, 4vw, 32px); margin: 0 0 18px; }
.section h2 .accent { color: var(--gold); }
.section p { color: #d4d4cf; max-width: 760px; }
.lead { color: var(--muted) !important; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; } }
.steps li {
  counter-increment: step; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 20px 20px 60px; position: relative;
}
.steps li::before {
  content: counter(step); position: absolute; left: 18px; top: 20px; width: 30px; height: 30px;
  border-radius: 50%; background: var(--gold-soft); border: 1px solid var(--gold); color: var(--gold-bright);
  font-family: var(--font-head); font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: center;
}
.steps li b { display: block; font-family: var(--font-head); font-size: 16px; margin-bottom: 4px; }
.steps li span { color: var(--muted); font-size: 14.5px; }

.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 820px) { .type-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .type-grid { grid-template-columns: 1fr; } }
.type-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.type-card b { font-family: var(--font-head); font-size: 15.5px; color: var(--gold-bright); display: block; margin-bottom: 5px; }
.type-card span { font-size: 14px; color: var(--muted); }

.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 20px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 0; font-family: var(--font-head); font-weight: 500;
  font-size: 16.5px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 22px; font-weight: 400; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); font-size: 15px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 32px 0 40px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer .brand { font-size: 17px; }
.footer-links { display: flex; gap: 22px; font-size: 14px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer .disclosure { color: var(--muted); font-size: 12.5px; max-width: 100%; margin-top: 16px; opacity: 0.8; }

/* ---------- 404 ---------- */
.error-page { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; }
.error-page .code { font-family: var(--font-head); font-size: clamp(80px, 18vw, 160px); font-weight: 600; line-height: 1; background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------- Doc page (privacy) ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 40px 0; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); margin: 0 0 8px; }
.doc .updated { color: var(--muted); font-size: 14px; margin-bottom: 30px; }
.doc h2 { font-size: 20px; margin: 30px 0 10px; }
.doc p, .doc li { color: #d0d0cb; font-size: 15.5px; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
