/* Naura Music AI - base styles. Brand colours come from /brand.css (admin-editable). */
:root {
  --primary: #7C3AED;
  --accent: #22D3EE;
  --bg: #ffffff;
  --bg-soft: #f6f5fb;
  --surface: #ffffff;
  --text: #16151d;
  --muted: #6b6880;
  --border: #e6e3f0;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 16, 40, .06), 0 8px 24px rgba(20, 16, 40, .06);
  --dark: #0f1117;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .7em 1.2em;
  border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none !important; transition: transform .05s, box-shadow .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 35%, transparent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-google { background: #fff; color: #1f1f1f; border-color: #dadce0; width: 100%; padding: .8em 1em; }
.btn-google:hover { background: #f8f9fa; }
.btn-sm { padding: .4em .8em; font-size: .9em; }
.btn-block { width: 100%; }

/* ---------- site header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: grid;
  place-items: center; font-weight: 700; font-size: .9rem; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- hero ---------- */
.hero { background: radial-gradient(1200px 500px at 70% -10%, color-mix(in srgb, var(--accent) 35%, transparent), transparent),
  radial-gradient(900px 500px at 10% 0%, color-mix(in srgb, var(--primary) 45%, transparent), transparent), var(--dark);
  color: #fff; padding: 96px 0 88px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); max-width: 16ch; }
.hero p { color: #c9c6dc; font-size: 1.15rem; max-width: 52ch; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .25); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.badge { display: inline-block; padding: .25em .7em; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); margin-bottom: 16px; }

/* ---------- cards / sections ---------- */
.section { padding: 64px 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.muted { color: var(--muted); }
.center { text-align: center; }

.auth-wrap { min-height: calc(100vh - 64px - 80px); display: grid; place-items: center; padding: 40px 16px; background: var(--bg-soft); }
.auth-card { width: 100%; max-width: 400px; text-align: center; }
.auth-card img.mark { width: 56px; height: 56px; margin: 0 auto 16px; }

.flash { margin: 16px auto 0; max-width: 1120px; padding: 12px 16px; border-radius: 10px; background: #ecfdf5;
  color: #065f46; border: 1px solid #a7f3d0; }

.form-row { display: grid; gap: 6px; margin-bottom: 14px; text-align: left; }
label { font-weight: 600; font-size: .9rem; }
input[type=text], input[type=email], input[type=number], input[type=password], select, textarea {
  width: 100%; padding: .65em .8em; border: 1px solid var(--border); border-radius: 10px; font: inherit; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 40%, transparent); border-color: var(--primary); }

.site-footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: .9rem; }
.site-footer .container { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }

/* ---------- admin ---------- */
.admin { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: var(--bg-soft); }
.sidebar { background: var(--dark); color: #cfcde0; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { color: #fff; margin: 0 6px 24px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: #cfcde0; font-weight: 500; font-size: .95rem; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .06); text-decoration: none; color: #fff; }
.sidebar nav a.active { background: color-mix(in srgb, var(--primary) 30%, transparent); color: #fff; }
.sidebar nav a.soon { opacity: .45; pointer-events: none; }
.sidebar nav .group { margin: 18px 12px 6px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #7f7c94; }
.admin-main { padding: 28px clamp(16px, 3vw, 36px); min-width: 0; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.stat .label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.stat .value { font-size: 1.8rem; font-weight: 800; margin-top: 4px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.menu-toggle { display: none; }

@media (max-width: 860px) {
  .nav .hide-sm { display: none; }
  .admin { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
}
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.flash-admin { margin: 0 0 16px; max-width: none; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; }
.section > .container + p { margin-top: 24px; }

/* ---------- admin components ---------- */
.admin-main > .card, .admin-main > .grid { margin-bottom: 16px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.toolbar input[type=text] { flex: 1 1 260px; width: auto; }
.toolbar select { width: auto; }
.toolbar label { display: grid; gap: 4px; font-size: .85rem; }
.toolbar input[type=number] { width: 120px; }
.table-wrap { overflow-x: auto; }
.pager { margin-top: 12px; }
.pill { display: inline-block; padding: .15em .65em; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: var(--bg-soft); color: var(--muted); }
.pill-active { background: #dcfce7; color: #166534; }
.pill-blocked { background: #fee2e2; color: #991b1b; }
.stat .value-sm { font-size: 1.05rem; word-break: break-all; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.card-warn { border-color: #fcd34d; background: #fffbeb; }
textarea.keys { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 1rem; letter-spacing: .04em; }
.form-narrow { max-width: 460px; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .92em; }

/* ---------- account ---------- */
.narrow { max-width: 820px; }
.narrow > .card { margin-bottom: 16px; }
.spread { justify-content: space-between; }
.keybox { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 1.25rem; letter-spacing: .08em;
  text-align: center; padding: .7em; background: var(--bg-soft); margin: 8px 0 16px; }
.facts .label { color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.danger-zone { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.danger-zone summary { cursor: pointer; color: var(--muted); font-weight: 600; }

/* ================= public website (stage 5) ================= */
.small { font-size: .85rem; }
.lead { font-size: 1.15rem; }
.btn-lg { padding: .85em 1.5em; font-size: 1.02rem; }
.nav a.current { color: var(--text); font-weight: 600; }
.switch { display: inline-flex; gap: 4px; }
.switch a { padding: .25em .55em; border: 1px solid var(--border); border-radius: 8px; font-size: .85rem; font-weight: 600; }
.switch a:hover { text-decoration: none; background: var(--bg-soft); }
.navtoggle, .burger { display: none; }

.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero .lead { color: #c9c6dc; }
.hero-art .stems { display: grid; gap: 12px; }
.stem { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 10px; color: #cfd3da; font-size: .85rem; }
.stem i { height: 38px; border-radius: 10px; background:
  repeating-linear-gradient(90deg, currentColor 0 3px, transparent 3px 7px); opacity: .9;
  -webkit-mask: linear-gradient(90deg, #0000, #000 8%, #000 92%, #0000); mask: linear-gradient(90deg, #0000, #000 8%, #000 92%, #0000); }
.stem.s1 i { color: #ba68c8; } .stem.s2 i { color: #4fc3f7; } .stem.s3 i { color: #ff8a65; } .stem.s4 i { color: #aed581; }
.stem.s2 i { height: 30px; } .stem.s3 i { height: 22px; }

.soft { background: var(--bg-soft); }
.section h2.center { margin-bottom: 28px; }
.feature h3 { font-size: 1.1rem; }
.feature-img { width: 48px; height: 48px; margin-bottom: 10px; }
.steps .step { padding: 8px 4px; }
.quote blockquote { margin: 0 0 12px; font-size: 1.02rem; }
.cta { background: var(--dark); color: #fff; padding: 64px 0; }
.cta p { color: #c9c6dc; }

.page-head { padding: 56px 0 8px; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

.pricing-wrap { display: grid; place-items: center; }
.price-card { width: 100%; max-width: 460px; text-align: center; border: 2px solid color-mix(in srgb, var(--primary) 35%, var(--border)); }
.price { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; justify-content: center; margin: 8px 0 12px; }
.price strong { font-size: 2.6rem; letter-spacing: -.02em; }
.price s { font-size: 1.1rem; }
.currency-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.currency-switch a { padding: .35em .9em; font-weight: 600; color: var(--muted); }
.currency-switch a.on { background: var(--primary); color: #fff; }
.currency-switch a:hover { text-decoration: none; }
.included { text-align: left; margin: 8px 0 18px; }
.included ul { padding-left: 1.2em; margin: 0; }
.included li { margin: 6px 0; }

details.faq { border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; background: var(--surface); }
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq[open] summary { margin-bottom: 8px; }

.features-list { display: grid; gap: 28px; }
.feature-row { display: grid; grid-template-columns: 1fr; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.feature-row:has(img) { grid-template-columns: 1fr 1fr; align-items: center; }
.feature-shot { border-radius: var(--radius); box-shadow: var(--shadow); }

.prose { line-height: 1.7; }
.prose h2 { margin-top: 1.6em; font-size: 1.3rem; }
.prose blockquote { margin: 0 0 1.2em; padding: 10px 16px; border-left: 4px solid var(--warning); background: #fffbeb; border-radius: 8px; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }

.contact-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; align-items: start; }
.alert { padding: 10px 14px; border-radius: 10px; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; margin-bottom: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.release { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hash { font-size: .72rem; word-break: break-all; }

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.footer-grid h4 { margin: 0 0 10px; font-size: .9rem; color: var(--text); }
.footer-grid > div > a:not(.brand) { display: block; color: var(--muted); margin: 6px 0; }
.social { display: flex; flex-wrap: wrap; gap: 12px; }
.copyright { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.site-footer .container { display: grid; }
.site-footer .footer-grid { display: grid; }

/* admin extras */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
td.clip { max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.input-sm { width: 90px !important; }
label.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; }
.form-actions { margin-top: 14px; }
.form-delete { margin-top: 18px; }
.message.done { opacity: .55; }
.pre { white-space: pre-wrap; margin: 10px 0 0; }
.count { background: var(--danger); color: #fff; border-radius: 999px; padding: 0 .5em; font-size: .75rem; margin-left: auto; }
label.color { display: inline-flex; gap: 8px; align-items: center; }
label.color input { width: 48px; height: 32px; padding: 0; border: none; background: none; }
.brand-preview img { width: 48px; height: 48px; border-radius: 10px; }
.brand-preview img.fav { width: 24px; height: 24px; }
.upload { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 14px 0 6px; }
.upload label { display: grid; gap: 4px; font-size: .85rem; }

@media (max-width: 960px) {
  .burger { display: block; margin-left: auto; cursor: pointer; width: 28px; height: 20px; position: relative; }
  .burger span, .burger::before, .burger::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--text); border-radius: 2px; }
  .burger span { top: 9px; } .burger::before { top: 0; } .burger::after { bottom: 0; }
  .site-header .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); flex-direction: column;
    align-items: stretch; padding: 12px 16px 18px; gap: 12px; border-bottom: 1px solid var(--border); margin: 0; }
  .navtoggle:checked ~ .nav { display: flex; }
  .hero-grid, .contact-grid, .footer-grid, .feature-row:has(img) { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .release { flex-direction: column; align-items: flex-start; }
}

form.inline { display: inline; margin: 0; }

/* ---------- payments ---------- */
.pill-paid { background: #dcfce7; color: #166534; }
.pill-pending { background: #fef3c7; color: #92400e; }
.pill-failed { background: #fee2e2; color: #991b1b; }
.pill-expired { background: var(--bg-soft); color: var(--muted); }
.pill-on { background: #dcfce7; color: #166534; }
.pay-options { display: grid; gap: 10px; margin: 12px 0 18px; }
.pay-option { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--border);
  border-radius: 12px; cursor: pointer; font-weight: 500; }
.pay-option:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 25%, transparent); }
.pay-option input { margin-top: 4px; }
.pay-option .muted { display: block; font-weight: 400; font-size: .88rem; }
.gw-card h3 { display: flex; gap: 10px; align-items: center; }
.gw-methods { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 8px; }
input.copy { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9rem; }
.event-payload { max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-all; font-size: .8rem;
  background: var(--bg-soft); padding: 8px; border-radius: 8px; }
.text-left { text-align: left; }
.mt { margin-top: 14px; }
.form-wide { max-width: 640px; }
.redirect-card { text-align: center; }

/* ---------- AI music credit packs ---------- */
.pack-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
  justify-content: center; margin: 18px 0; text-align: left; }
.pack-facts { list-style: none; padding: 0; margin: 12px 0 18px; display: grid; gap: 6px; }
.credits-box { margin: 18px 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; }
.credits-num { font-size: 1.6rem; }
.card-ok { border-color: #86efac; background: #f0fdf4; margin: 10px 0; }
.other-price { margin: -6px 0 6px; font-size: .95rem; }
#credits .currency-switch { justify-content: center; margin: 4px 0 6px; }

/* "Buy credits" stands out in the header */
.btn-credits, .nav a.btn-credits { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff !important;
  font-weight: 700; box-shadow: 0 4px 14px rgba(249, 115, 22, .35); }
.btn-credits:hover, .nav a.btn-credits:hover { filter: brightness(1.07); text-decoration: none; }
