@import url('fonts.css');

:root {
  --ink: #111827;
  --gold: #7C3AED;
  --gold-hi: #6D28D9;
  --wine: #a855f7;
  --wine-hi: #9333ea;
  --on-accent: #ffffff;
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #f6f3fb;
  --pink-50: #FDF2F8;
  --violet-50: #F5F3FF;
  --line: rgba(17, 24, 39, 0.08);
  --text: #111827;
  --text-dim: #6B7280;
  --text-faint: #9CA3AF;
  --danger: #dc2626;
  --radius: 10px;
  --radius-input: 18px;
  --radius-card: 26px;
  --radius-hero-img: 32px;
  --serif: 'Fraunces', ui-serif, Georgia, serif;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 20px 45px -18px rgba(124, 58, 237, 0.35);
  --shadow-card: 0 12px 35px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 25px 60px rgba(0, 0, 0, 0.14);
}

:root[data-theme="dark"] {
  --ink: #f1ecfb;
  --gold: #a78bfa;
  --gold-hi: #c4b5fd;
  --wine: #d8b4fe;
  --wine-hi: #e9d5ff;
  --bg: #150f24;
  --panel: #1e1735;
  --panel-2: #251d40;
  --line: rgba(241, 236, 251, 0.12);
  --text: #ece6f7;
  --text-dim: #b3a8c7;
  --text-faint: #837797;
  --danger: #f87171;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 20px 45px -18px rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f1ecfb;
    --gold: #a78bfa;
    --gold-hi: #c4b5fd;
    --wine: #d8b4fe;
    --wine-hi: #e9d5ff;
    --bg: #150f24;
    --panel: #1e1735;
    --panel-2: #251d40;
    --line: rgba(241, 236, 251, 0.12);
    --text: #ece6f7;
    --text-dim: #b3a8c7;
    --text-faint: #837797;
    --danger: #f87171;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 20px 45px -18px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button { font-family: inherit; }
::selection { background: var(--gold); color: var(--on-accent); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.wrap-narrow { max-width: 640px; margin: 0 auto; padding: 0 1.5rem; }
.container { max-width: 1440px; margin: 0 auto; padding: 0 32px; }
.container-content { max-width: 1280px; margin: 0 auto; }

body.has-top-gradient {
  background: linear-gradient(180deg, #ffffff 0%, var(--violet-50) 100%) no-repeat;
  background-size: 100% 860px;
}
:root[data-theme="dark"] body.has-top-gradient { background: var(--bg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.has-top-gradient { background: var(--bg); }
}

/* ---------- Top nav ---------- */
.topnav {
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 40;
  height: 80px;
  display: flex;
  align-items: center;
}
:root[data-theme="dark"] .topnav { background: rgba(21, 15, 36, 0.85); border-bottom-color: rgba(241, 236, 251, 0.08); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .topnav { background: rgba(21, 15, 36, 0.85); border-bottom-color: rgba(241, 236, 251, 0.08); }
}
.topnav-inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.brand-mark { width: 22px; height: 22px; flex-shrink: 0; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-dim);
}
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 0.8rem; }

.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-dim);
}
.theme-toggle:hover { border-color: var(--gold); color: var(--gold); }
.nav-name { font-size: 0.86rem; font-weight: 600; color: var(--text); }
.theme-toggle svg { width: 16px; height: 16px; }

/* Notification bell + dropdown */
.nav-icon-btn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--text-dim);
}
.nav-icon-btn:hover { border-color: var(--gold); color: var(--gold); }
.nav-icon-btn svg { width: 16px; height: 16px; }
.nav-dropdown-wrap { position: relative; }
.nav-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 220px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 0.6rem;
  display: none;
  z-index: 50;
}
.nav-dropdown.open { display: block; }
.nav-dropdown-empty { padding: 1rem 0.8rem; font-size: 0.85rem; color: var(--text-faint); text-align: center; }
.nav-dropdown a, .nav-dropdown button {
  display: flex; align-items: center; width: 100%;
  padding: 0.6rem 0.8rem; border-radius: 8px;
  font-size: 0.86rem; font-weight: 500; color: var(--text);
  background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--sans);
}
.nav-dropdown a:hover, .nav-dropdown button:hover { background: var(--violet-50); color: var(--gold-hi); }

/* Avatar */
.nav-avatar-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--gold), #EC4899);
  color: #fff; font-family: var(--sans); font-weight: 700; font-size: 0.95rem;
  display: grid; place-items: center;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-hamburger span { width: 16px; height: 1.6px; background: var(--text); border-radius: 1px; transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

.nav-drawer-backdrop {
  /* Must stay below .topnav's z-index (40): .nav-links is a fixed-position
     descendant of .topnav, so its own z-index is scoped to .topnav's
     stacking context, not the root — a backdrop z-index higher than 40
     would render above the drawer in the root context and eat its clicks. */
  position: fixed; inset: 0; z-index: 39;
  background: rgba(13, 15, 20, 0.45);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.nav-drawer-backdrop.open { opacity: 1; pointer-events: auto; }

@media (max-width: 860px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    position: fixed; z-index: 59;
    top: 0; right: 0; height: 100vh;
    width: min(78vw, 320px);
    background: var(--panel);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 104px 28px 28px;
    box-shadow: -20px 0 50px rgba(0,0,0,0.18);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(.2,.8,.3,1);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { width: 100%; padding: 0.85rem 0.2rem; font-size: 1rem; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .topnav-inner { padding: 0 16px; gap: 0.6rem; }
  .nav-right { gap: 0.35rem; }
  .theme-toggle, .nav-icon-btn { width: 32px; height: 32px; }
  .theme-toggle svg, .nav-icon-btn svg { width: 15px; height: 15px; }
  [data-nav-auth] .btn { padding: 0.55rem 0.9rem; font-size: 0.8rem; }
}
@media (max-width: 400px) {
  .brand-text { display: none; }
  .brand-mark { width: 26px; height: 26px; }
  .nav-right { gap: 0.25rem; }
  [data-nav-auth] .btn { padding: 0.5rem 0.7rem; font-size: 0.76rem; }
}

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: filter 0.15s ease, transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn-primary { background: var(--gold); color: var(--on-accent); position: relative; overflow: hidden; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ripple {
  position: absolute; border-radius: 50%; background: rgba(255,255,255,0.5);
  transform: scale(0); pointer-events: none;
  animation: btnRipple 0.6s ease-out forwards;
}
@keyframes btnRipple { to { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .btn-ripple { display: none; } }
.btn-gold { background: var(--gold); color: var(--on-accent); }
.btn-gold:hover { filter: brightness(1.08); }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn-danger-ghost { background: transparent; border: 1px solid var(--line); color: var(--danger); }
.btn-danger-ghost:hover { border-color: var(--danger); background: rgba(168, 50, 50, 0.06); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Panels / cards ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.panel-pad { padding: 1.75rem; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-hi);
}

.display {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 560;
}

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.field input,
.field select,
.field textarea {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(169, 120, 47, 0.15);
}
.field textarea { resize: vertical; min-height: 80px; }
.field-hint { font-size: 0.78rem; color: var(--text-faint); }
.photo-preview-wrap { display: flex; align-items: center; gap: 0.9rem; margin-top: 0.7rem; }
.photo-preview-wrap img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.field-error { font-size: 0.78rem; color: var(--danger); min-height: 1em; }
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

.choice-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.choice-pill {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-dim);
}
.choice-pill.active {
  border-color: var(--gold);
  color: var(--gold-hi);
  background: rgba(169, 120, 47, 0.08);
  font-weight: 600;
}

.tpl-locked-badge {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem;
  border: 1px solid var(--gold); border-radius: 999px;
  background: rgba(169, 120, 47, 0.08);
  padding: 0.7rem 1.2rem;
  font-size: 0.9rem; font-weight: 600; color: var(--gold-hi);
}
.tpl-locked-badge a { font-size: 0.8rem; font-weight: 600; color: var(--text-dim); text-decoration: underline; }
.tpl-locked-badge a:hover { color: var(--gold-hi); }

/* ---------- Auth pages ---------- */
.auth-shell {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}
.auth-card { width: 100%; max-width: 400px; }
.auth-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 560;
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
}
.auth-sub { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 1.6rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-switch { margin-top: 1.4rem; font-size: 0.86rem; color: var(--text-dim); text-align: center; }
.auth-switch a { color: var(--gold-hi); font-weight: 600; }
.auth-hint { margin-top: 0.5rem; font-size: 0.82rem; color: var(--text-dim); }
.auth-hint a { color: var(--gold-hi); font-weight: 600; }

.btn-google {
  appearance: none;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.72rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-google:hover { border-color: var(--gold); background: var(--bg); }
.btn-google svg { width: 18px; height: 18px; flex-shrink: 0; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.3rem 0;
  color: var(--text-faint);
  font-size: 0.78rem;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-notice {
  font-size: 0.82rem;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 1.2rem;
  background: rgba(168, 50, 50, 0.08);
  color: var(--danger);
  border: 1px solid rgba(168, 50, 50, 0.2);
}

/* ---------- Landing ---------- */
.hero {
  min-height: 720px;
  display: flex;
  align-items: center;
  padding: calc(80px + clamp(2rem, 5vw, 3rem)) 32px 3rem;
}
.hero-inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}
.hero-copy, .hero-visual { min-width: 0; }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
}
.hero-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(2.2rem, 4.6vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ink);
}
@media (min-width: 1280px) { .hero-title { line-height: 72px; } }
.grad-text {
  background: linear-gradient(135deg, var(--gold), #EC4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin-top: 1.2rem;
  font-size: 24px;
  line-height: 1.5;
  color: var(--text-dim);
  max-width: 46ch;
}
.hero-cta { display: flex; gap: 0.9rem; margin-top: 1.8rem; flex-wrap: wrap; }

.hero-search {
  display: flex; gap: 0.8rem; margin-top: 2.2rem; flex-wrap: wrap;
}
.hero-search input {
  width: 560px; max-width: 100%; height: 64px;
  border-radius: var(--radius-input);
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 0 1.4rem;
  font-family: var(--sans); font-size: 1rem; color: var(--text);
}
.hero-search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--violet-50); }
.hero-search button {
  width: 170px; height: 64px; flex-shrink: 0;
  border-radius: var(--radius-input);
  border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--gold), var(--gold-hi));
  color: #fff; font-family: var(--sans); font-weight: 700; font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 30px -12px rgba(124, 58, 237, 0.5);
}
.hero-search button:hover { transform: translateY(-1px); box-shadow: 0 18px 36px -12px rgba(124, 58, 237, 0.6); }

.hero-visual {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
  animation: heroBlobDrift 10s ease-in-out infinite;
}
.hero-blob.b1 { width: 55%; height: 55%; top: -5%; left: -5%; background: rgba(124, 58, 237, 0.28); }
.hero-blob.b2 { width: 45%; height: 45%; bottom: -8%; right: -5%; background: rgba(236, 72, 153, 0.24); animation-delay: -4s; }
@keyframes heroBlobDrift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(3%, -4%) scale(1.06); } }

.hero-phone {
  position: absolute; z-index: 4;
  width: 30%; height: 36%;
  top: 30%; left: 35%;
  border-radius: var(--radius-hero-img);
  border: 4px solid #ffffff;
  background: #fff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: heroFloat 7s ease-in-out infinite;
}
.hero-phone img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-phone .glass-reflect {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 26%, rgba(255,255,255,0) 74%, rgba(255,255,255,0.25) 100%);
  pointer-events: none;
}

.photo-card {
  position: absolute;
  width: 30%;
  height: 36%;
  border-radius: var(--radius-hero-img);
  border: 4px solid #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: grid;
  place-items: center;
  animation: heroFloat 8s ease-in-out infinite;
}
.photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-card.pc-1 {
  top: 6%; left: 6%;
  transform: rotate(-8deg);
  z-index: 3;
  animation-delay: -1s;
}
.photo-card.pc-2 {
  top: 54%; left: 62%;
  transform: rotate(9deg);
  z-index: 3;
  animation-delay: -3s;
}
.photo-card.pc-3 {
  top: 58%; left: 8%;
  transform: rotate(-6deg);
  z-index: 1;
  animation-delay: -5s;
}
.photo-card.pc-4 { display: none; }
@keyframes heroFloat { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-14px) rotate(var(--r, 0deg)); } }

.hero-deco { position: absolute; z-index: 4; pointer-events: none; }
.hero-deco.flowers { top: 2%; right: 14%; width: 60px; height: 60px; animation: heroFloat 9s ease-in-out infinite; animation-delay: -2s; }
.hero-deco.sparkle-a { top: 26%; left: 2%; width: 20px; height: 20px; animation: heroFloat 5s ease-in-out infinite; }
.hero-deco.sparkle-b { bottom: 22%; right: 4%; width: 16px; height: 16px; animation: heroFloat 6.5s ease-in-out infinite; animation-delay: -2.5s; }
.hero-deco.gift { bottom: 6%; left: 26%; width: 38px; height: 38px; animation: heroFloat 7.5s ease-in-out infinite; animation-delay: -1.5s; }
.hero-deco.confetti { top: 42%; right: 10%; width: 48px; height: 48px; animation: heroFloat 6s ease-in-out infinite; animation-delay: -3.5s; }

@media (max-width: 640px) {
  .hero-deco.sparkle-a, .hero-deco.sparkle-b, .hero-deco.confetti { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-blob, .hero-phone, .photo-card, .hero-deco { animation: none; }
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
  padding: 0 0 3rem;
}
@media (max-width: 900px) { .feature-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .feature-strip { grid-template-columns: 1fr; } }
.feature-card {
  height: 120px;
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow-card);
  padding: 1.2rem 1.4rem;
  display: flex; flex-direction: column; justify-content: center; gap: 0.3rem;
}
.feature-icon { font-size: 1.5rem; display: inline-block; transition: transform 0.3s ease; }
.feature-card:hover .feature-icon { transform: rotate(-12deg) scale(1.1); }
.feature-title { font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.feature-desc { font-size: 0.8rem; color: var(--text-dim); }

.section-head { max-width: 620px; margin: 0 auto 2.4rem; text-align: center; display: flex; flex-direction: column; gap: 0.6rem; }
.section-title { font-family: var(--sans); font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -0.01em; text-wrap: balance; color: var(--ink); }
.section-sub { color: var(--text-dim); font-size: 1rem; }

.landing-section { padding-block: 100px; padding-inline: 32px; }
.landing-section.alt { background: var(--panel-2); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(.2,.7,.3,1), transform 0.7s cubic-bezier(.2,.7,.3,1); }
.reveal.reveal-visible, .reveal-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { transition: none; opacity: 1; transform: none; } }

/* Template gallery */
.tpl-filter-selects {
  max-width: 1280px;
  margin: 0 auto 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.tpl-filter-selects .field { width: 220px; max-width: 100%; }
.tpl-filter-selects select {
  height: 48px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--sans); font-size: 0.86rem; font-weight: 600;
  padding: 0 20px;
  cursor: pointer;
}
.tpl-filter-selects select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--violet-50); }

.template-grid {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 1080px) { .template-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .template-grid { grid-template-columns: 1fr; } }
.tpl-card {
  position: relative;
  background: var(--panel);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s cubic-bezier(.2,.7,.3,1), box-shadow 0.35s cubic-bezier(.2,.7,.3,1);
}
.tpl-card:hover { transform: translateY(-12px); box-shadow: var(--shadow-card-hover); }
.tpl-badge {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  font-family: var(--sans); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em;
  color: #fff; padding: 0.35rem 0.8rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #EC4899);
  box-shadow: 0 6px 16px -4px rgba(124, 58, 237, 0.5);
}
.tpl-preview {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.tpl-preview:hover { filter: brightness(1.08); }
.tpl-preview::after {
  content: "Ko'rish uchun bosing";
  position: absolute; inset: auto 0 0 0;
  padding: 0.5rem 0.7rem;
  font-family: var(--sans); font-size: 0.68rem; font-weight: 600; color: #fff;
  background: linear-gradient(0deg, rgba(0,0,0,0.55), transparent);
  text-align: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.tpl-preview:hover::after { opacity: 1; }
.tpl-media-bg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.tpl-photo-frame {
  position: absolute; z-index: 1;
  top: 50%; left: 50%;
  transform: translate(-50%, -46%) rotate(-4deg);
  width: 58%; aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 6px solid #fff;
  border-radius: 6px;
  box-shadow: 0 16px 34px -10px rgba(0, 0, 0, 0.5);
}
.tpl-cat-badge {
  position: relative; z-index: 2;
  font-family: var(--sans); font-size: 0.78rem; font-weight: 700;
  color: #fff; padding: 0.4rem 0.9rem; border-radius: 999px;
  background: rgba(20, 12, 30, 0.55); backdrop-filter: blur(2px);
}
.tpl-body { padding: 1.1rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; }
.tpl-name { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.15rem; }
.tpl-name small { font-family: var(--sans); font-style: normal; font-weight: 500; font-size: 0.75rem; color: var(--text-faint); }
.tpl-desc { font-size: 0.85rem; color: var(--text-dim); }

/* Per-layout mini mockups used inside .tpl-preview */
.tpl-mock { width: 100%; height: 100%; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; position: relative; }
.tm-eyebrow { font-family: var(--sans); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.tm-name { font-family: var(--serif); font-style: italic; font-size: 1.05rem; text-align: center; padding: 0 0.6rem; }

.tpl-mock-nafis { background: var(--mi); }
.tpl-mock-nafis .tm-eyebrow { color: var(--mg); }
.tpl-mock-nafis .tm-name { color: #f7edd7; }

.tpl-mock-klassik { background: var(--mp); border: 1px solid var(--mg); }
.tmk-corner { position: absolute; width: 14px; height: 14px; }
.tmk-corner.tl { top: 8px; left: 8px; border-top: 2px solid var(--mg); border-left: 2px solid var(--mg); }
.tmk-corner.br { bottom: 8px; right: 8px; border-bottom: 2px solid var(--mg); border-right: 2px solid var(--mg); }

.tpl-mock-zamonaviy { background: var(--mi); align-items: flex-start; justify-content: center; padding: 1.1rem; gap: 0.6rem; }
.tmz-tag { font-family: var(--sans); font-size: 0.56rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; background: var(--mg); color: var(--mi); padding: 0.18rem 0.55rem; border-radius: 999px; }
.tmz-name { font-family: var(--sans); font-weight: 800; text-transform: uppercase; color: #f3ede0; font-size: 1.15rem; line-height: 1.08; }

/* How it works */
.steps-row {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.6rem;
}
.step-card { display: flex; flex-direction: column; gap: 0.6rem; }
.step-num { font-family: var(--serif); font-style: italic; font-size: 1.9rem; color: var(--gold-hi); }
.step-title { font-weight: 600; font-size: 1.02rem; }
.step-desc { color: var(--text-dim); font-size: 0.9rem; }

.pricing-card {
  max-width: 420px; margin: 0 auto; text-align: center;
  background: var(--panel); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 2.4rem 2rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.6rem;
}
.pricing-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; width: 100%; }
.pricing-list li {
  font-size: 0.92rem; color: var(--text); text-align: left;
  padding-left: 1.6rem; position: relative;
}
.pricing-list li::before {
  content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700;
}

.final-cta { text-align: center; padding: clamp(3rem, 7vw, 5rem) 1.5rem; }

footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.footer-contact { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; justify-content: center; }
.footer-tg { display: inline-flex; align-items: center; color: var(--text-dim); }
.footer-tg:hover { color: #229ED9; }
.tg-icon { width: 26px; height: 26px; flex-shrink: 0; }

/* ---------- Dashboard ---------- */
.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.2rem 0 1.6rem;
  flex-wrap: wrap;
}
.dash-title { font-family: var(--serif); font-weight: 600; font-size: 1.7rem; }
.dash-count { color: var(--text-faint); font-size: 0.9rem; }

.inv-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1rem;
}
.inv-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.inv-names { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.25rem; }
.inv-meta { font-size: 0.82rem; color: var(--text-faint); margin-top: 0.15rem; }
.inv-badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text-dim);
}
.inv-stats { display: flex; gap: clamp(1.2rem, 4vw, 2.4rem); flex-wrap: wrap; }
.inv-stat { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; min-width: 64px; }
.inv-stat b { font-family: var(--serif); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.inv-stat span { font-size: 0.68rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.inv-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 1rem; }

.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.premium-page-gate {
  text-align: center;
  padding: 5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  max-width: 420px;
  margin: 0 auto;
}
.premium-page-gate-icon { font-size: 2.4rem; }
.premium-page-gate-title { font-family: var(--serif); font-style: italic; font-size: 1.25rem; margin: 0; color: var(--text); }
.premium-page-gate-sub { color: var(--text-dim); font-size: 0.92rem; margin: 0 0 0.4rem; }

/* ---------- Create/edit wizard ---------- */
.wizard-shell { max-width: 640px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.wizard-progress { display: flex; gap: 0.4rem; margin-bottom: 1.6rem; }
.wizard-progress span {
  flex: 1;
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.wizard-progress span.done, .wizard-progress span.active { background: var(--gold); }
.wizard-step-label { font-size: 0.78rem; color: var(--text-faint); margin-bottom: 0.3rem; }
.wizard-title { font-family: var(--serif); font-weight: 600; font-size: 1.6rem; margin-bottom: 1.8rem; }
.wizard-form { display: flex; flex-direction: column; gap: 1.3rem; }
.wizard-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: var(--bg);
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }

.skeleton-loading { text-align: center; padding: 4rem 1.5rem; color: var(--text-faint); }

/* ---------- Admin ---------- */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.admin-stat-card {
  padding: 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.admin-stat-num { font-family: var(--serif); font-weight: 640; font-size: 1.9rem; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.admin-stat-label { font-size: 0.78rem; color: var(--text-faint); }

.admin-tabs { display: flex; gap: 0.6rem; margin-bottom: 1.2rem; }

.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th {
  text-align: left;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table .cell-primary { font-weight: 600; color: var(--text); }
.data-table .cell-sub { font-size: 0.78rem; color: var(--text-faint); }
.admin-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--on-accent);
}

.qr-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 10, 15, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.qr-modal-card { position: relative; width: min(100%, 320px); text-align: center; }
.qr-modal-close {
  position: absolute; top: 0.6rem; right: 0.8rem;
  appearance: none; border: none; background: none; cursor: pointer;
  font-size: 1.4rem; line-height: 1; color: var(--text-dim);
}

/* ---------- Gallery (admin + public) ---------- */
.gallery-admin-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem;
}
.gallery-admin-item {
  position: relative; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); aspect-ratio: 1;
}
.gallery-admin-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-admin-item .btn {
  position: absolute; bottom: 0.5rem; left: 0.5rem; right: 0.5rem;
  opacity: 0; transition: opacity 0.2s ease;
}
.gallery-admin-item:hover .btn { opacity: 1; }

#gallery { padding-inline: 0; }
#gallery .section-head, #gallery .tpl-filter-selects { padding-inline: 32px; }
.gallery-grid {
  max-width: none; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
}
@media (max-width: 720px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-item {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5;
  transition: filter 0.25s ease;
}
.gallery-item:hover { filter: brightness(1.06); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.gallery-item-dl {
  position: absolute; bottom: 0.8rem; right: 0.8rem;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(6px);
  display: grid; place-items: center; color: var(--gold);
  box-shadow: 0 6px 16px -4px rgba(0,0,0,0.25);
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.gallery-item:hover .gallery-item-dl { opacity: 1; transform: translateY(0); }
.gallery-item-dl svg { width: 18px; height: 18px; }
.gallery-more-wrap { text-align: center; margin-top: 1.6rem; padding-inline: 32px; }
.gallery-loading-hint { color: var(--text-faint); font-size: 0.85rem; }

#site-lightbox {
  position: fixed; inset: 0; z-index: 1000; background: #0A080E;
  display: none; align-items: center; justify-content: center;
  overflow: hidden;
  height: 100vh; height: 100dvh;
}
#site-lightbox.open { display: flex; }
#site-lightbox .lightbox-bg {
  position: absolute; inset: -20px;
  width: calc(100% + 40px); height: calc(100% + 40px);
  object-fit: cover;
  filter: blur(38px) brightness(0.55) saturate(1.1);
  transform: scale(1.1);
  z-index: 0;
  user-select: none; pointer-events: none;
}
#site-lightbox .lightbox-img {
  position: relative; z-index: 1;
  max-width: min(94vw, 1100px); max-height: 92vh; object-fit: contain;
  border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); user-select: none;
}
@media (max-width: 600px) {
  #site-lightbox .lightbox-img { max-width: 96vw; max-height: 90vh; border-radius: 6px; }
}
#site-lightbox .lightbox-close {
  position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.12); color: #fff; border: none; font-size: 1.6rem; line-height: 1;
  cursor: pointer; z-index: 3;
}
#site-lightbox .lightbox-close:hover { background: rgba(255,255,255,0.22); }
#site-lightbox .lightbox-zone {
  position: absolute; top: 0; bottom: 0; width: 30%; border: none; background: transparent;
  color: rgba(255,255,255,0.7); font-size: 2.4rem; cursor: pointer;
  display: flex; align-items: center; z-index: 2; transition: color 0.2s ease;
}
#site-lightbox .lightbox-zone:hover { color: #fff; }
#site-lightbox .lightbox-prev { left: 0; justify-content: flex-start; padding-left: 1rem; }
#site-lightbox .lightbox-next { right: 0; justify-content: flex-end; padding-right: 1rem; }
@media (max-width: 600px) {
  #site-lightbox .lightbox-zone { font-size: 1.8rem; width: 35%; }
}
.gallery-empty { text-align: center; color: var(--text-faint); padding: 2rem; grid-column: 1 / -1; }

.pwa-install-banner {
  position: fixed; left: 50%; bottom: 16px;
  transform: translate(-50%, 130%);
  width: min(94vw, 460px);
  display: flex; align-items: center; gap: 0.8rem;
  background: #0D1B3D;
  color: #F5F0E6;
  border-radius: 16px;
  padding: 0.9rem 1rem;
  box-shadow: 0 18px 40px -14px rgba(13, 27, 61, 0.55);
  z-index: 200;
  transition: transform 0.4s cubic-bezier(.2,.8,.3,1);
}
.pwa-install-banner.visible { transform: translate(-50%, 0); }
.pib-icon { font-size: 1.6rem; flex-shrink: 0; }
.pib-text { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; min-width: 0; }
.pib-text strong { font-family: var(--sans); font-size: 0.92rem; }
.pib-text span { font-size: 0.78rem; color: rgba(245, 240, 230, 0.75); line-height: 1.35; }
.pib-install {
  flex-shrink: 0; appearance: none; border: none; cursor: pointer;
  background: #D4AF37; color: #0D1B3D; font-weight: 700; font-family: var(--sans);
  font-size: 0.82rem; padding: 0.55rem 0.9rem; border-radius: 999px;
}
.pib-close {
  flex-shrink: 0; appearance: none; border: none; cursor: pointer; background: none;
  color: rgba(245, 240, 230, 0.6); font-size: 1.3rem; line-height: 1; padding: 0.2rem 0.3rem;
}
.pib-close:hover { color: #F5F0E6; }
@media (prefers-reduced-motion: reduce) {
  .pwa-install-banner { transition: none; }
}

