/* PhotoRestore AI — "golden archive" design system
   Warm paper + espresso ink + bronze accents. Fraunces (display) / Outfit (UI). */

:root {
  --background: #FAF6EF;
  --foreground: #221C15;
  --ink: #1C1610;
  --ink-2: #2B2318;
  --card: #FFFDF8;
  --secondary: #F2EBDF;
  --muted: #E8DFD0;
  --muted-foreground: #71685A;
  --border: #E8E0D1;
  --gold: #A8763E;
  --gold-2: #C79B62;
  --gold-tint: rgba(168, 118, 62, 0.10);
  --destructive: #993333;
  --success: #3E5C4A;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(43, 32, 18, 0.05), 0 2px 8px rgba(43, 32, 18, 0.04);
  --shadow-md: 0 6px 18px rgba(43, 32, 18, 0.08), 0 2px 6px rgba(43, 32, 18, 0.05);
  --shadow-lg: 0 24px 60px rgba(43, 32, 18, 0.18), 0 8px 20px rgba(43, 32, 18, 0.08);
  --ease: cubic-bezier(0.22, 0.61, 0.24, 1);
}

* { box-sizing: border-box; border-color: var(--border); }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, .font-display {
  font-family: 'Fraunces', 'Playfair Display', serif;
  font-weight: 420;
  font-variation-settings: 'opsz' 72, 'SOFT' 40;
  margin: 0;
  letter-spacing: -0.01em;
}
a { color: inherit; }
img { max-width: 100%; }
section[id] { scroll-margin-top: 5rem; }
code { background: var(--secondary); padding: 1px 6px; border-radius: 5px; font-size: 0.9em; }
::selection { background: rgba(199, 155, 98, 0.35); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted-foreground); }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }

.eyebrow {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin: 0 0 10px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--gold-2); opacity: 0.8; flex: none; }
.eyebrow.center { justify-content: center; text-align: center; }
.eyebrow.center::after { content: ''; width: 22px; height: 1px; background: var(--gold-2); opacity: 0.8; flex: none; }
.eyebrow.inverse { color: var(--gold-2); }
.eyebrow.dim { color: var(--gold-2); }
.eyebrow.bare::before, .eyebrow.bare::after { display: none; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 500;
  padding: 10px 20px; border-radius: 10px; border: 1px solid transparent;
  background: linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 100%);
  color: #F7F1E6;
  cursor: pointer; text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(28, 22, 16, 0.25);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(28, 22, 16, 0.22); color: #fff; }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 100%); color: #F7F1E6; }
.btn.outline {
  background: transparent; color: var(--foreground);
  border-color: rgba(34, 28, 21, 0.35); box-shadow: none;
}
.btn.outline:hover { background: var(--card); border-color: var(--foreground); color: var(--foreground); box-shadow: var(--shadow-sm); }
.btn.ghost { background: transparent; color: var(--foreground); box-shadow: none; }
.btn.ghost:hover { background: var(--secondary); color: var(--foreground); transform: none; box-shadow: none; }
.btn.inverse { background: var(--background); color: var(--foreground); }
.btn.inverse:hover { background: #fff; color: var(--ink); }
.btn.gold {
  background: linear-gradient(180deg, #C79B62 0%, #A8763E 100%);
  color: #FFF9EE; border-color: rgba(168, 118, 62, 0.4);
}
.btn.gold:hover { box-shadow: 0 8px 22px rgba(168, 118, 62, 0.4); color: #fff; }
.btn.danger { background: var(--destructive); color: #fff; }
.btn.danger:hover { background: #7a2626; color: #fff; }
.btn.pill { border-radius: 999px; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.lg { padding: 14px 30px; font-size: 15px; letter-spacing: 0.01em; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Header / nav ---------- */
.glass-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  background: rgba(250, 246, 239, 0.82);
  border-bottom: 1px solid rgba(232, 224, 209, 0.8);
  transition: box-shadow 0.3s var(--ease);
}
.glass-header.scrolled { box-shadow: 0 8px 30px rgba(43, 32, 18, 0.08); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 12px; }
.nav-logo {
  font-family: 'Fraunces', serif; font-size: 20px; font-weight: 480;
  text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px;
}
.nav-logo .logo-mark, .logo-mark { color: var(--gold); }
.nav-links { display: flex; gap: 30px; font-size: 14px; }
.nav-links a { position: relative; text-decoration: none; padding: 4px 0; transition: color 0.2s; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1.5px;
  background: var(--gold); transition: right 0.28s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }
.nav-right { display: flex; align-items: center; gap: 6px; }
.nav-auth { display: flex; align-items: center; gap: 6px; }
.mobile-only { display: none; }

.lang-menu { position: relative; }
.lang-btn span { font-size: 11px; letter-spacing: 0.15em; }
.lang-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 185px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 60;
}
.lang-dropdown.open { display: block; animation: pop-in 0.18s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.lang-dropdown a {
  display: flex; gap: 8px; align-items: center; padding: 9px 11px;
  border-radius: 8px; text-decoration: none; font-size: 14px;
}
.lang-dropdown a:hover, .lang-dropdown a.active { background: var(--secondary); }

.mobile-sheet {
  display: none; border-top: 1px solid var(--border);
  background: rgba(250, 246, 239, 0.98); padding: 16px 24px;
}
.mobile-sheet.open { display: block; }
.mobile-sheet a { display: block; padding: 11px 0; text-decoration: none; font-size: 15px; }
.sheet-divider { border-top: 1px solid var(--border); margin: 10px 0; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 15% 12%, rgba(214, 182, 133, 0.35) 0%, transparent 62%),
    radial-gradient(ellipse 50% 50% at 88% 18%, rgba(199, 155, 98, 0.22) 0%, transparent 58%),
    radial-gradient(ellipse 75% 60% at 50% 105%, rgba(240, 231, 214, 0.9) 0%, transparent 62%),
    linear-gradient(180deg, #F6EFE2 0%, var(--background) 88%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0; opacity: 0.5; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
  padding-top: 92px; padding-bottom: 100px;
}
.hero-title {
  font-size: clamp(2.4rem, 5.2vw, 4.1rem); font-weight: 380;
  letter-spacing: -0.02em; line-height: 1.04;
}
.hero-title em {
  font-style: italic; font-weight: 440;
  background: linear-gradient(115deg, #8C5E2C 5%, #C79B62 55%, #8C5E2C 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-subtitle { margin-top: 24px; font-size: 17px; color: var(--muted-foreground); max-width: 540px; line-height: 1.7; }
.hero-ctas { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { margin-top: 34px; font-size: 13px; color: var(--muted-foreground); display: flex; align-items: center; gap: 8px; }

/* Carousel framed like an archive print: white matte + soft tilt + stacked shadow */
.hero-visual { position: relative; }
.hero-carousel {
  position: relative; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden;
  background: var(--muted);
  border: 12px solid #FFFDF8;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(43, 32, 18, 0.07);
  transform: rotate(-1.4deg);
  transition: transform 0.5s var(--ease);
}
.hero-carousel:hover { transform: rotate(0deg) scale(1.005); }
.hero-visual::before {
  content: ''; position: absolute; inset: 6% -3% -3% 6%; z-index: -1;
  background: #EFE6D6; border-radius: 8px; transform: rotate(2deg);
  box-shadow: var(--shadow-md);
}
.hero-placeholder { display: flex; align-items: center; justify-content: center; transform: none; }
.placeholder-note { text-align: center; color: var(--muted-foreground); }
.placeholder-note span { font-size: 30px; display: block; margin-bottom: 8px; color: var(--gold); }
/* Fade-over: the incoming slide fades in ON TOP of the still-opaque outgoing
   slide, so the blend never dips to the background colour mid-transition. */
.carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s var(--ease); pointer-events: none; z-index: 0; }
.carousel-slide.active { opacity: 1; pointer-events: auto; z-index: 2; }
.carousel-slide.leaving { opacity: 1; z-index: 1; transition: none; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 30;
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid rgba(43, 32, 18, 0.1);
  background: rgba(255, 253, 248, 0.92); font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s; box-shadow: var(--shadow-sm);
}
.carousel-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }
.carousel-dots {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 30;
}
.carousel-dots button {
  height: 6px; width: 6px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.55); transition: all 0.25s var(--ease); padding: 0;
}
.carousel-dots button:hover { background: rgba(255, 255, 255, 0.8); }
.carousel-dots button.active { width: 26px; background: #fff; }

/* ---------- Before/after slider ---------- */
.ba-slider {
  position: relative; overflow: hidden; border-radius: 16px;
  user-select: none; -webkit-user-select: none; cursor: ew-resize;
  background: var(--muted); aspect-ratio: 1 / 1; touch-action: none;
}
.ba-slider.fill { border-radius: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.ba-slider img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none;
}
.ba-label {
  position: absolute; top: 14px; z-index: 10; padding: 4px 12px; border-radius: 999px;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; font-family: 'Outfit', sans-serif;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ba-label.before { left: 14px; background: rgba(20, 16, 11, 0.62); color: #F3EDE2; }
.ba-label.after { right: 14px; background: rgba(255, 253, 248, 0.88); color: var(--ink); }
.ba-divider {
  position: absolute; top: 0; bottom: 0; width: 1.5px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); z-index: 10; pointer-events: none;
}
.ba-handle {
  position: absolute; top: 50%; z-index: 20; width: 44px; height: 44px;
  transform: translate(-50%, -50%); border-radius: 999px;
  background: #FFFDF8; border: 1.5px solid var(--gold-2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--gold); cursor: ew-resize;
  transition: transform 0.15s var(--ease), box-shadow 0.15s;
}
.ba-handle:hover { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26); }

/* ---------- Sections / cards / grids ---------- */
.section { padding: 96px 0; }
.section.bordered { border-top: 1px solid var(--border); }
.section.tinted {
  background:
    radial-gradient(ellipse 70% 90% at 50% 0%, rgba(232, 223, 208, 0.5) 0%, transparent 70%),
    rgba(242, 235, 223, 0.5);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.section-title {
  font-size: clamp(1.9rem, 3.8vw, 3rem); font-weight: 380;
  letter-spacing: -0.015em; max-width: 680px; line-height: 1.12;
}
.section-title.center { margin: 0 auto; }

/* Dark cinematic band (final CTA) */
.section.dark-band {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 55% 70% at 50% 0%, rgba(199, 155, 98, 0.16) 0%, transparent 65%),
    linear-gradient(180deg, #241D14 0%, var(--ink) 100%);
  color: #F3EDE0;
}
.section.dark-band::after {
  content: ''; position: absolute; inset: 0; opacity: 0.4; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.section.dark-band .container { position: relative; z-index: 1; }
.section.dark-band .section-title { color: #F7F1E4; }
.section.dark-band .band-star { color: var(--gold-2); font-size: 26px; }
.section.dark-band .btn.primary {
  background: linear-gradient(180deg, #C79B62 0%, #A8763E 100%);
  color: #FFF9EE; box-shadow: 0 10px 30px rgba(168, 118, 62, 0.35);
}
.section.dark-band .btn.primary:hover { box-shadow: 0 14px 40px rgba(168, 118, 62, 0.5); color: #fff; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}
.card h3 { font-size: 22px; margin-bottom: 8px; }
.section .grid-3 .card:hover, .section .grid-4 .card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-md);
  border-color: rgba(199, 155, 98, 0.45);
}

/* Steps: numbered archive cards */
.grid-4 { counter-reset: step; }
.step-card { position: relative; overflow: hidden; }
.step-card::before {
  counter-increment: step; content: '0' counter(step);
  position: absolute; top: 10px; right: 18px;
  font-family: 'Fraunces', serif; font-size: 64px; font-weight: 380; line-height: 1;
  color: var(--gold); opacity: 0.13; pointer-events: none;
}
.step-icon {
  width: 46px; height: 46px; border-radius: 999px; margin-bottom: 20px;
  background: var(--gold-tint); color: var(--gold);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}

.pkg-card { display: flex; flex-direction: column; }
.pkg-card.featured {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(199, 155, 98, 0.22) 0%, transparent 60%),
    linear-gradient(180deg, #292116 0%, var(--ink) 100%);
  color: #F3EDE0; border-color: rgba(168, 118, 62, 0.5);
  box-shadow: 0 18px 44px rgba(28, 22, 16, 0.28);
}
.pkg-card.featured .muted, .pkg-card.featured .pkg-credits, .pkg-card.featured .pkg-desc { color: rgba(243, 237, 224, 0.68); }
.pkg-card.featured .pkg-price {
  background: linear-gradient(115deg, #E5C393 0%, #C79B62 60%, #B48450 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pkg-card.featured .btn {
  background: linear-gradient(180deg, #C79B62 0%, #A8763E 100%);
  color: #FFF9EE; border-color: transparent;
}
.pkg-card.featured .btn:hover { box-shadow: 0 10px 26px rgba(168, 118, 62, 0.45); color: #fff; }
.pkg-price { font-size: 40px; margin-top: 14px; font-weight: 440; }
.pkg-original { font-size: 17px; text-decoration: line-through; opacity: 0.5; margin-top: 12px; }
.pkg-credits { font-size: 13px; margin-top: 4px; color: var(--muted-foreground); }
.pkg-desc { font-size: 14px; margin-top: 18px; flex: 1; color: var(--muted-foreground); }
.pkg-features { list-style: none; margin: 18px 0 0; padding: 0; font-size: 14px; }
.pkg-features li { padding: 4px 0; display: flex; align-items: center; gap: 8px; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 4px 22px; box-shadow: var(--shadow-sm);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.faq-item:hover { border-color: rgba(199, 155, 98, 0.45); }
.faq-item[open] { box-shadow: var(--shadow-md); }
.faq-item summary {
  cursor: pointer; padding: 16px 0; font-size: 16px; font-weight: 500; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; flex: none; width: 26px; height: 26px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-tint); color: var(--gold); font-size: 17px;
  transition: transform 0.25s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 0 18px; color: var(--muted-foreground); }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.gallery-card { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.gallery-card .ba-slider { border-radius: 12px; }
.gallery-title { font-size: 18px; padding: 0 6px 4px; }

.site-footer {
  border-top: 1px solid var(--border); padding: 44px 24px; text-align: center;
  font-size: 13px; color: var(--muted-foreground);
}

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 14px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="datetime-local"], input[type="file"], select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 13px;
  font: inherit; font-size: 14px; color: var(--foreground);
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(168, 118, 62, 0.16);
}
input:disabled { background: var(--secondary); color: var(--muted-foreground); }
textarea { resize: vertical; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row > label { flex: 1; min-width: 140px; }
.form-row.checks { gap: 18px; align-items: center; }
.form-row.checks label, .checks { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; font-weight: 400; }
.form-row.checks input, .checks input { width: auto; margin: 0; }
.form-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: calc(100vh - 66px); display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card {
  position: relative; width: 100%; max-width: 420px; background: var(--card);
  border: 1px solid var(--border); border-radius: 20px; padding: 40px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.auth-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--gold-2) 30%, var(--gold) 70%, transparent 100%);
}
.auth-card h1 { font-size: 30px; }
.auth-card .muted { margin: 8px 0 24px; }
.auth-alt { font-size: 14px; margin-top: 20px; text-align: center; }
.alert { border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; }
.alert.error { background: #F8E9E7; color: var(--destructive); border: 1px solid #EACCC8; }
.alert.success { background: #E9F0EA; color: var(--success); border: 1px solid #CCDCD0; }

/* ---------- Generic page ---------- */
.page-pad { padding-top: 60px; padding-bottom: 96px; }
.page-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 380; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tab {
  padding: 10px 18px; text-decoration: none; font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted-foreground);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.2s;
}
.tab.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 600; }
.tab:hover { color: var(--foreground); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted-foreground); font-weight: 600; padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover { background: rgba(242, 235, 223, 0.45); }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
  background: var(--muted); color: var(--foreground);
}
.badge.good { background: #E3EDE5; color: var(--success); }
.badge.warn { background: #F5EBD2; color: #8A6D1A; }
.badge.bad { background: #F8E9E7; color: var(--destructive); }
.badge.gold { background: var(--gold-tint); color: var(--gold); }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Promo bar / modal ---------- */
.promo-bar {
  display: flex; align-items: center; gap: 14px; max-width: 560px;
  background: var(--card); border: 1px solid rgba(199, 155, 98, 0.4);
  border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.promo-icon {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 999px;
  background: linear-gradient(180deg, #C79B62 0%, #A8763E 100%); color: #FFF9EE;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.promo-input-row { display: flex; gap: 10px; flex: 1; }
.promo-input-row input { margin: 0; text-transform: uppercase; }
.promo-applied-row { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 10px; }
.promo-applied-row .font-display { font-size: 18px; }

.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(24, 19, 13, 0.55); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay[hidden] { display: none; }
.promo-card {
  width: 100%; max-width: 430px; background: var(--background);
  border-radius: 22px; overflow: hidden; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
  animation: modal-in 0.35s var(--ease);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.promo-hero {
  position: relative;
  background:
    radial-gradient(ellipse 70% 60% at 50% -10%, rgba(199, 155, 98, 0.28) 0%, transparent 65%),
    linear-gradient(180deg, #292116 0%, var(--ink) 100%);
  color: #F3EDE0; padding: 42px 32px 34px; text-align: center;
}
.promo-badge {
  width: 50px; height: 50px; margin: 0 auto 14px; border-radius: 999px;
  background: rgba(199, 155, 98, 0.2); border: 1px solid rgba(199, 155, 98, 0.5);
  color: var(--gold-2);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.promo-value {
  font-family: 'Fraunces', serif; font-size: 56px; line-height: 1; margin-top: 8px; font-weight: 440;
  background: linear-gradient(115deg, #E5C393 0%, #C79B62 60%, #B48450 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.promo-off { font-size: 14px; opacity: 0.8; margin-top: 8px; }
.promo-body { padding: 30px 32px 32px; text-align: center; }
.promo-body h2 { font-size: 24px; }
.promo-body p { font-size: 14px; color: var(--muted-foreground); }
.promo-body .btn { width: 100%; margin-top: 10px; }
.promo-use { margin-top: 16px !important; }
.gift-redeem {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--gold-tint); border: 1px dashed var(--gold-2);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 18px;
}
.gift-redeem input { flex: 1; min-width: 170px; margin: 0; }

.gift-bar {
  max-width: 560px; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow-sm);
}
.gift-fields { display: flex; gap: 10px; margin-top: 12px; }
.gift-fields input { margin: 0; flex: 1; }
@media (max-width: 560px) { .gift-fields { flex-direction: column; } }
.gen-delete { align-self: flex-start; color: var(--muted-foreground); }

.promo-nl { display: flex; gap: 8px; margin: 18px 0 4px; }
.promo-nl input { flex: 1; margin: 0; }
.promo-nl .btn { flex: none; }
@media (max-width: 480px) { .promo-nl { flex-direction: column; } }
.promo-code {
  display: inline-block; margin: 8px auto 2px;
  font-family: 'Outfit', monospace; font-size: 24px; font-weight: 700; letter-spacing: 0.12em;
  color: var(--gold); background: var(--gold-tint);
  border: 1.5px dashed var(--gold-2); border-radius: 10px;
  padding: 10px 22px;
}
.fine-print { font-size: 11px !important; margin-top: 14px; }

/* ---------- Dashboard ---------- */
.dash-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 38px; }
.dash-header-right { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.credits-chip {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 10px 18px; box-shadow: var(--shadow-sm);
}
.credits-chip .coin { font-size: 20px; color: var(--gold); }
.credits-chip .font-display { font-size: 20px; }

.dash-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 26px; align-items: start; }

.upload-zone {
  border: 2px dashed rgba(168, 118, 62, 0.4); border-radius: 20px;
  background: var(--card); padding: 48px 24px; text-align: center;
  cursor: pointer; transition: all 0.25s var(--ease);
}
.upload-zone:hover, .upload-zone.dragover {
  background: #FFF; border-color: var(--gold);
  box-shadow: 0 0 0 5px rgba(168, 118, 62, 0.08);
}
.upload-icon { font-size: 26px; color: var(--gold); margin-bottom: 12px; }
.upload-title { font-size: 24px; margin-bottom: 6px; }
#upload-preview { max-height: 300px; border-radius: 12px; margin-bottom: 12px; box-shadow: var(--shadow-md); }

.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.type-card {
  text-align: left; padding: 16px 18px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--card);
  cursor: pointer; font: inherit; transition: all 0.2s var(--ease);
}
.type-card:hover { border-color: rgba(199, 155, 98, 0.55); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.type-card.selected {
  background: linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 100%);
  color: #F3EDE0; border-color: var(--ink);
  box-shadow: inset 3px 0 0 var(--gold), var(--shadow-md);
}
.type-card .font-display { font-size: 17px; }
.type-cost { font-size: 12px; margin-top: 3px; color: var(--muted-foreground); }
.type-card.selected .type-cost { color: var(--gold-2); }

.dash-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

.history-title { font-size: 22px; margin-bottom: 18px; }
.history-list { max-height: 640px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.gen-card { border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: var(--card); box-shadow: var(--shadow-sm); }
.gen-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.gen-card-head .font-display { font-size: 16px; }
.gen-meta { font-size: 12px; color: var(--muted-foreground); margin-bottom: 10px; }
.gen-failed { background: #F8E9E7; border: 1px solid #EACCC8; border-radius: 10px; padding: 10px 12px; font-size: 12px; color: var(--destructive); }
.gen-failed strong { display: block; margin-bottom: 3px; }
.gen-card .ba-slider { margin-bottom: 10px; }
.gen-card .btn { width: 100%; }
.gen-actions { display: flex; flex-direction: column; gap: 8px; }
.view-full-btn {
  position: absolute; bottom: 10px; right: 10px; z-index: 25;
  font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 600;
  background: rgba(255, 253, 248, 0.94); color: var(--ink);
  border: 0; border-radius: 999px; padding: 7px 12px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); transition: transform 0.15s;
}
.view-full-btn:hover { transform: translateY(-1px); }

.progress-panel {
  background: linear-gradient(180deg, rgba(242, 235, 223, 0.7) 0%, rgba(242, 235, 223, 0.4) 100%);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; margin-top: 6px;
}
.progress-stage { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; margin-bottom: 10px; }
.pulse-dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--gold);
  animation: dot-pulse 1.2s ease-in-out infinite; margin-left: auto;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}
.progress-indeterminate {
  position: relative; overflow: hidden; background: var(--muted);
  border-radius: 999px; height: 4px;
}
.progress-indeterminate::after {
  content: ''; position: absolute; top: 0; left: 0; height: 100%; width: 40%;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  border-radius: 999px; animation: progress-sweep 1.6s ease-in-out infinite;
}
@keyframes progress-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}
.progress-meta {
  display: flex; justify-content: space-between; margin-top: 9px;
  font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted-foreground);
}
.progress-tip { font-size: 12px; color: var(--muted-foreground); margin-top: 8px; }

/* Lightbox */
.lightbox-card {
  width: min(95vw, 1000px); max-height: 92vh; display: flex; flex-direction: column;
  background: var(--background); border-radius: 20px; overflow: hidden;
  animation: modal-in 0.3s var(--ease);
}
.lightbox-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 24px 12px; }
.lightbox-head h3 { font-size: 24px; }
.lightbox-body { padding: 0 24px; overflow: auto; }
.lightbox-body img { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: rgba(28, 22, 16, 0.05); border-radius: 12px; }
.lightbox-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 24px 20px; }

.spinner {
  width: 34px; height: 34px; margin: 0 auto; border-radius: 999px;
  border: 3px solid var(--muted); border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.big-check { font-size: 44px; color: var(--success); margin-bottom: 14px; }
.balance-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--ink); color: #F3EDE0; border-radius: 12px;
  box-shadow: 0 14px 38px rgba(20, 15, 10, 0.35);
  padding: 12px 16px; font-size: 14px; min-width: 220px; max-width: 360px;
  animation: toast-in 0.3s var(--ease);
}
.toast.success { box-shadow: inset 3px 0 0 #6FA283, 0 14px 38px rgba(20, 15, 10, 0.35); }
.toast.error { box-shadow: inset 3px 0 0 #C96B5D, 0 14px 38px rgba(20, 15, 10, 0.35); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------- Admin ---------- */
.admin-body { background: var(--background); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 236px; flex-shrink: 0;
  background: linear-gradient(180deg, #241D14 0%, var(--ink) 100%);
  border-right: 1px solid rgba(199, 155, 98, 0.15); padding: 24px 14px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  color: #D8CFC0;
}
.admin-logo { font-size: 19px; text-decoration: none; padding: 0 10px 20px; display: block; color: #F3EDE0; }
.admin-logo .logo-mark { color: var(--gold-2); }
.admin-sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.admin-sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  font-size: 14px; text-decoration: none; border-radius: 9px; color: #A99E8C;
  transition: background 0.18s, color 0.18s;
}
.admin-sidebar nav a .icon { width: 18px; text-align: center; }
.admin-sidebar nav a:hover { background: rgba(199, 155, 98, 0.12); color: #F3EDE0; }
.admin-sidebar nav a.active { background: rgba(199, 155, 98, 0.2); color: #F7F1E4; box-shadow: inset 2px 0 0 var(--gold-2); }
.admin-side-foot { padding: 14px 10px 0; border-top: 1px solid rgba(199, 155, 98, 0.18); }
.admin-side-foot .btn.ghost { color: #D8CFC0; }
.admin-side-foot .btn.ghost:hover { background: rgba(199, 155, 98, 0.14); color: #fff; }
.admin-side-foot .btn.outline { color: #F3EDE0; border-color: rgba(216, 207, 192, 0.4); }
.admin-side-foot .btn.outline:hover { background: rgba(199, 155, 98, 0.14); color: #fff; border-color: var(--gold-2); }
.admin-side-foot .muted { color: #8B8172; }
.admin-main { flex: 1; padding: 30px 34px 64px; min-width: 0; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.admin-head h1 { font-size: 30px; }
.admin-cols { display: grid; grid-template-columns: 5fr 7fr; gap: 22px; align-items: start; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { padding: 20px; border-top: 2px solid var(--gold-2); }
.stat-value { font-size: 32px; margin-top: 4px; }
.searchbar { display: flex; gap: 10px; max-width: 420px; }
.searchbar input { margin: 0; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 2px 4px 2px 0; }
.inline-form input { margin: 0; padding: 6px 8px; font-size: 13px; }
.actions-cell { white-space: normal; }
.pair-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pair-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair-thumbs img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.content-row { display: block; }
.content-key { display: block; font-size: 12px; color: var(--muted-foreground); }
.content-key em { font-style: normal; font-size: 11px; }
.going-live { font-size: 14px; line-height: 1.8; padding-left: 20px; }
.going-live li { margin-bottom: 6px; }

/* Admin mini-charts (pure CSS bars) */
.chart-bars { display: flex; align-items: flex-end; gap: 5px; height: 130px; margin-top: 16px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.chart-bar { width: 100%; background: var(--ink-2); border-radius: 4px 4px 0 0; transition: opacity 0.15s; }
.chart-bar.gold { background: linear-gradient(180deg, var(--gold-2) 0%, var(--gold) 100%); }
.chart-col:hover .chart-bar { opacity: 0.75; }
.chart-label { font-size: 9px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; max-width: 100%; }

/* ---------- Scroll reveal (added by app.js; no-JS pages stay visible) ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .admin-cols { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .pair-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .desktop-only { display: none; }
  .mobile-only { display: inline-flex; }
  .hero-grid { grid-template-columns: 1fr; padding-top: 52px; padding-bottom: 60px; gap: 40px; }
  .hero-carousel { transform: none; }
  .dash-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .admin-sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .admin-side-foot { border: 0; padding: 0 10px; }
  .admin-main { padding: 20px 16px 48px; }
}
@media (max-width: 560px) {
  .grid-4, .grid-3, .type-grid, .pair-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
