/* public/css/main.css — Gallery Curator: Immersive Editorial */
@import url('https://fonts.googleapis.com/css2?family=Medula+One&family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400&display=swap');

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

:root {
  /* Core palette */
  --ink:        #0f0e0d;
  --ink2:       #3d3830;
  --ink3:       #8c8178;
  --cream:      #f8f4ef;
  --cream2:     #ede8e0;
  --white:      #ffffff;

  /* Glass */
  --glass-bg:   rgba(255,255,255,.72);
  --glass-bg2:  rgba(255,255,255,.88);
  --glass-border: rgba(255,255,255,.5);
  --glass-shadow: 0 8px 40px rgba(15,14,13,.18);

  /* Accent */
  --gold:       #b8963e;
  --gold-l:     #d4af6a;
  --gold-dim:   rgba(184,150,62,.18);

  /* States */
  --danger:     #c0392b;
  --green:      #2e7d52;

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;

  /* Font stacks */
  --font-display: 'Medula One', Georgia, serif;
  --font-body:    'Lato', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background: var(--cream);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO BACKGROUND — used on login + dashboard
   ═══════════════════════════════════════════════════════════════════════════ */
.has-hero {
  position: relative;
  min-height: 100vh;
}

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--hero-url, url('/wallpapers/NatGeo01.jpg')) center/cover no-repeat;
  filter: brightness(.72) saturate(1.1);
  transform: scale(1.04);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      160deg,
      rgba(15,14,13,.55) 0%,
      rgba(15,14,13,.25) 40%,
      rgba(15,14,13,.50) 100%
    );
}

/* Everything above the bg — but NOT the full-page overlay which manages its own stacking */
body.has-hero > *:not(.ng-overlay) { position: relative; z-index: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════════════════════════════════ */
.nav {
  display: flex;
  align-items: center;
  padding: 0 32px;
  height: 56px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 200;
  gap: 20px;
}

/* Frosted nav on hero pages */
.has-hero .nav {
  background: rgba(15,14,13,.35);
  border-bottom-color: rgba(255,255,255,.12);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.has-hero .nav-brand { color: var(--white); }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.nav-back {
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: .01em;
  transition: opacity .15s;
}
.nav-back:hover { opacity: .7; }

.nav-link {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink3);
  text-decoration: none;
  transition: color .15s;
}
.nav-link:hover { color: var(--ink); }
.has-hero .nav-link { color: rgba(255,255,255,.6); }
.has-hero .nav-link:hover { color: #fff; }

.nav-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  object-fit: cover;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all .18s cubic-bezier(.25,.46,.45,.94);
  white-space: nowrap;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn-primary {
  background: var(--gold);
  color: var(--white);
  box-shadow: 0 2px 12px rgba(184,150,62,.35);
}
.btn-primary:hover:not(:disabled) {
  background: var(--gold-l);
  box-shadow: 0 4px 20px rgba(184,150,62,.5);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(0,0,0,.15);
}
.btn-outline:hover { background: rgba(0,0,0,.04); }

.btn-glass {
  background: var(--glass-bg);
  color: var(--ink);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}
.btn-glass:hover { background: var(--glass-bg2); transform: translateY(-1px); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a93226; transform: translateY(-1px); }

.btn-sm  { padding: 6px 14px; font-size: 12px; }
.btn-lg  { padding: 14px 32px; font-size: 15px; letter-spacing: .04em; }
.btn-xl  { padding: 16px 40px; font-size: 16px; letter-spacing: .06em; }

/* ═══════════════════════════════════════════════════════════════════════════
   INPUTS
   ═══════════════════════════════════════════════════════════════════════════ */
.input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 14px;
  background: rgba(255,255,255,.9);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
textarea.input { min-height: 80px; resize: vertical; }
.input-color   { width: 48px; height: 36px; padding: 3px; cursor: pointer; border-radius: 6px; }
.input-sm      { padding: 6px 10px; font-size: 13px; }

/* ═══════════════════════════════════════════════════════════════════════════
   LANDING / LOGIN
   ═══════════════════════════════════════════════════════════════════════════ */
.landing {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 56px);
  padding: 40px 24px;
}

.landing-hero {
  text-align: center;
  max-width: 560px;
  /* Glass card */
  background: var(--glass-bg);
  backdrop-filter: blur(32px) saturate(1.6);
  -webkit-backdrop-filter: blur(32px) saturate(1.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 56px 48px;
  box-shadow: var(--glass-shadow);
}

.landing-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(52px, 8vw, 88px);
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.0;
  color: var(--ink);
  margin-bottom: 14px;
}

.landing-hero .tagline {
  font-size: 15px;
  font-weight: 300;
  color: var(--ink2);
  line-height: 1.7;
  margin-bottom: 36px;
  letter-spacing: .01em;
}

.landing-note {
  font-size: 12px;
  color: var(--ink3);
  margin-top: 20px;
  letter-spacing: .02em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════════════════════ */
.container { max-width: 1280px; margin: 0 auto; padding: 40px 32px; }

.page-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 36px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
}

.page-header .count {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,.5);
  letter-spacing: .04em;
}

/* ── Gallery Cards ─────────────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.gallery-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform .28s cubic-bezier(.25,.46,.45,.94),
              box-shadow .28s cubic-bezier(.25,.46,.45,.94),
              border-color .2s;
  box-shadow: 0 4px 24px rgba(15,14,13,.14);
}

.gallery-card:hover {
  transform: translateY(-5px) scale(1.012);
  box-shadow: 0 16px 48px rgba(15,14,13,.28);
  border-color: rgba(255,255,255,.75);
}

.gallery-card-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: rgba(15,14,13,.15);
  position: relative;
}

.gallery-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.25,.46,.45,.94), filter .3s;
  filter: saturate(.9);
}

.gallery-card:hover .gallery-card-thumb img {
  transform: scale(1.06);
  filter: saturate(1.05);
}

.gallery-card-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  opacity: .25;
}

/* Thin gold shimmer on top of thumb */
.gallery-card-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 55%,
    rgba(15,14,13,.45) 100%
  );
  pointer-events: none;
}

.gallery-card-info {
  padding: 16px 18px 18px;
}

.gallery-card-info h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.2;
}

.gallery-card-meta {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink3);
  letter-spacing: .03em;
  margin-bottom: 10px;
}

.gallery-card-badges { display: flex; gap: 6px; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════════════════ */
.badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}
.badge-green { background: rgba(46,125,82,.12); color: var(--green); border: 1px solid rgba(46,125,82,.2); }
.badge-grey  { background: rgba(140,129,120,.1); color: var(--ink3); border: 1px solid rgba(140,129,120,.2); }

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  max-width: 520px;
  margin: 0 auto;
  box-shadow: var(--glass-shadow);
}

.empty-icon { font-size: 52px; margin-bottom: 20px; opacity: .6; }

.empty-state h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 10px;
}

.empty-state p {
  color: var(--ink2);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.tip-box {
  background: rgba(184,150,62,.1);
  border: 1px solid rgba(184,150,62,.25);
  border-radius: var(--r-sm);
  padding: 14px 18px;
  font-size: 13px;
  color: var(--ink2);
  margin-bottom: 24px;
  text-align: left;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EDITOR LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */
.editor-layout {
  display: grid;
  grid-template-columns: 272px 1fr;
  min-height: calc(100vh - 56px);
  background: var(--cream);
}

.editor-sidebar {
  background: var(--white);
  border-right: 1px solid var(--cream2);
  padding: 28px 22px;
  overflow-y: auto;
}

.sidebar-section { margin-bottom: 32px; }
.sidebar-section h3 {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink3);
  margin-bottom: 14px;
}
.sidebar-section .input { margin-bottom: 10px; }
.sidebar-section label {
  font-size: 13px;
  color: var(--ink2);
  display: block;
  margin-bottom: 10px;
}
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.sidebar-danger {
  border-top: 1px solid var(--cream2);
  padding-top: 22px;
}

.editor-main { padding: 32px; overflow-y: auto; }
.editor-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}
.editor-header h2 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
}
.hint { font-size: 12px; color: var(--ink3); margin-left: auto; letter-spacing: .02em; }

/* .editor-grid layout is fully managed by editor.ejs <style> block
   (data-layout + data-size attributes control grid vs masonry) */

.editor-item {
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--cream2);
  border: 1px solid rgba(0,0,0,.07);
  transition: box-shadow .2s;
}
.editor-item:hover { box-shadow: 0 4px 20px rgba(15,14,13,.1); }

.editor-thumb { aspect-ratio: 1; position: relative; overflow: hidden; }
.editor-thumb img { width: 100%; height: 100%; object-fit: cover; }

.editor-item-overlay {
  position: absolute; inset: 0;
  background: rgba(15,14,13,.55);
  display: flex; align-items: flex-end; justify-content: flex-end;
  gap: 6px; padding: 8px;
  opacity: 0; transition: opacity .2s;
}
.editor-thumb:hover .editor-item-overlay { opacity: 1; }

.overlay-btn {
  width: 32px; height: 32px;
  border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.9);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s;
}
.overlay-btn:hover { background: #fff; }
.overlay-btn-danger:hover { background: var(--danger); color: #fff; }

.hero-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--gold);
  color: #fff;
  font-size: 10px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px;
}

.item-caption { font-size: 12px; color: var(--ink3); padding: 6px 10px; }
.sortable-ghost { opacity: .25; }

/* ── Editor empty state (gallery created, no photos yet) ─────────────────── */
.editor-empty {
  position: relative;
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.editor-empty-wallpaper {
  position: absolute; inset: 0;
  background: var(--cream2) center/cover no-repeat;
  transform: scale(1.04);
  filter: brightness(.6) saturate(1.1);
  transition: background-image .5s;
}

.editor-empty-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 20%, rgba(10,8,6,.65) 100%);
}

.editor-empty-card {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,.13);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--r-lg);
  padding: 52px 52px 44px;
  width: min(500px, 90vw);
  text-align: center;
  box-shadow: 0 32px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.25);
}

.editor-empty-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-l);
  margin-bottom: 14px;
}

.editor-empty-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.05;
  margin-bottom: 12px;
}

.editor-empty-sub {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,.6);
  line-height: 1.65;
  margin-bottom: 32px;
  letter-spacing: .01em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHARE PANEL
   ═══════════════════════════════════════════════════════════════════════════ */
.share-url-box { display: flex; gap: 6px; margin-bottom: 10px; }
.share-meta    { font-size: 12px; color: var(--ink3); margin-bottom: 10px; }

/* ═══════════════════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(15,14,13,.6);
  backdrop-filter: blur(8px);
  z-index: 500;
  align-items: center; justify-content: center;
}
.modal.open { display: flex; }
.modal-content {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 36px 40px;
  max-width: 440px; width: 90%;
  box-shadow: 0 24px 80px rgba(15,14,13,.35);
  border: 1px solid var(--cream2);
}
.modal-content h2 {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.modal-content p  { color: var(--ink2); font-size: 14px; margin-bottom: 22px; line-height: 1.6; }
.modal-content .input { margin-bottom: 12px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* ═══════════════════════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════════════════════ */
.alert       { padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 20px; font-size: 13px; }
.alert-error { background: rgba(192,57,43,.08); color: var(--danger); border: 1px solid rgba(192,57,43,.2); }

/* ═══════════════════════════════════════════════════════════════════════════
   PICKER PAGES
   ═══════════════════════════════════════════════════════════════════════════ */
.picker-waiting {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: calc(100vh - 56px);
  padding: 40px;
  text-align: center;
}

.picker-waiting-card {
  background: var(--glass-bg);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 56px 48px;
  max-width: 480px;
  box-shadow: var(--glass-shadow);
}

.picker-waiting-card h2 {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 400;
  color: var(--ink);
  margin-bottom: 12px;
}

.picker-waiting-card p {
  color: var(--ink2); font-size: 14px;
  line-height: 1.7; margin-bottom: 28px;
}

/* Pulse dot */
.pulse-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  margin: 0 auto 24px;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184,150,62,.5); transform: scale(1); }
  50%       { box-shadow: 0 0 0 12px rgba(184,150,62,0); transform: scale(1.1); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PICKER REVIEW GRID
   ═══════════════════════════════════════════════════════════════════════════ */
.picker-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
}
.picker-item {
  aspect-ratio: 1; position: relative; overflow: hidden;
  border-radius: 6px; cursor: pointer;
}
.picker-item img { width: 100%; height: 100%; object-fit: cover; transition: opacity .15s; }
.picker-item:hover img { opacity: .88; }
.picker-check {
  position: absolute; top: 8px; right: 8px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,.3); border: 2px solid rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: 12px; font-weight: 700;
  transition: all .15s;
}
.picker-item.selected .picker-check {
  background: var(--gold); border-color: var(--gold); color: #fff;
}
.picker-item.selected::after {
  content: ''; position: absolute; inset: 0;
  border: 3px solid var(--gold); border-radius: 6px; pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEW GALLERY OVERLAY MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.ng-overlay {
  position: fixed; inset: 0;
  /* Must beat the sticky nav (z-index:200) and any hero layers */
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s cubic-bezier(.4,0,.2,1);
  background: #000; /* fallback while wallpaper loads */
}
.ng-overlay.open {
  pointer-events: all;
  opacity: 1;
}

.ng-wallpaper {
  position: absolute; inset: 0;
  background: center/cover no-repeat;
  transform: scale(1.03);
  /* Brighter — let the photo breathe, card handles its own readability */
  filter: brightness(.72) saturate(1.15);
  transition: background-image .7s ease;
}

.ng-vignette {
  position: absolute; inset: 0;
  /* Lighter touch — just edge darkening, centre stays vivid */
  background:
    linear-gradient(to bottom, rgba(10,8,6,.4) 0%, transparent 15%, transparent 80%, rgba(10,8,6,.5) 100%),
    radial-gradient(ellipse at center, transparent 40%, rgba(10,8,6,.3) 100%);
}

/* Faux nav bar inside the overlay — makes it feel like a real page */
.ng-nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  z-index: 2;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.ng-nav-brand {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  text-decoration: none;
}

.ng-nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.ng-card {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,.11);
  backdrop-filter: blur(48px) saturate(1.5);
  -webkit-backdrop-filter: blur(48px) saturate(1.5);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--r-lg);
  padding: 56px 60px 52px;
  width: min(560px, 88vw);
  text-align: center;
  box-shadow: 0 40px 100px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.2);
  animation: ngCardIn .45s cubic-bezier(.25,.46,.45,.94) both;
  transition: background .25s, backdrop-filter .25s, box-shadow .25s;
}
/* On hover: card becomes more opaque + deeper blur, wallpaper stays vivid behind it */
.ng-card:hover {
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(72px) saturate(1.8);
  -webkit-backdrop-filter: blur(72px) saturate(1.8);
  box-shadow: 0 48px 120px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.28);
}
@keyframes ngCardIn {
  from { transform: translateY(24px) scale(.97); opacity: 0; }
  to   { transform: translateY(0)    scale(1);   opacity: 1; }
}

.ng-close {
  position: absolute; top: 18px; right: 20px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  background: transparent;
  color: rgba(255,255,255,.7);
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s;
}
.ng-close:hover { background: rgba(255,255,255,.15); color: #fff; }

.ng-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-l);
  margin-bottom: 14px;
}

.ng-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
  margin-bottom: 10px;
}

.ng-subtitle {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,.65);
  line-height: 1.65;
  margin-bottom: 32px;
  letter-spacing: .01em;
}

.ng-fields { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; text-align: left; }

.ng-input, .ng-textarea {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--r-sm);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  outline: none;
  transition: border-color .15s, background .15s;
  resize: none;
}
.ng-input::placeholder, .ng-textarea::placeholder { color: rgba(255,255,255,.35); }
.ng-input:focus, .ng-textarea:focus {
  border-color: var(--gold-l);
  background: rgba(255,255,255,.18);
  box-shadow: 0 0 0 3px rgba(184,150,62,.25);
}

.ng-error {
  font-size: 13px;
  color: #ffb3ae;
  background: rgba(192,57,43,.2);
  border: 1px solid rgba(192,57,43,.3);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  text-align: left;
}

.ng-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  padding: 14px 24px;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .18s, transform .18s, box-shadow .18s;
  box-shadow: 0 4px 20px rgba(184,150,62,.4);
}
.ng-btn:hover:not(:disabled) {
  background: var(--gold-l);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(184,150,62,.55);
}
.ng-btn:disabled { opacity: .5; cursor: not-allowed; }

.ng-btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  padding: 12px 24px;
  background: transparent;
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s;
  margin-top: 12px;
}
.ng-btn-outline:hover { background: rgba(255,255,255,.1); color: #fff; }

.ng-note {
  font-size: 12px;
  color: rgba(255,255,255,.35);
  margin-top: 14px;
  letter-spacing: .02em;
  line-height: 1.6;
}

/* Pulse animation for waiting state */
.ng-pulse-ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(184,150,62,.4);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  animation: ngRingPulse 2s ease-in-out infinite;
}
@keyframes ngRingPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184,150,62,.3); }
  50%       { box-shadow: 0 0 0 14px rgba(184,150,62,0); }
}
.ng-pulse-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  animation: ngDotPulse 2s ease-in-out infinite;
}
@keyframes ngDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.2); opacity: .8; }
}

/* Indeterminate progress bar */
.ng-progress-bar {
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,.12);
  border-radius: 1px;
  overflow: hidden;
  margin: 28px 0 20px;
}
.ng-progress-fill {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--gold-l), transparent);
  animation: ngProgress 2.2s ease-in-out infinite;
}
@keyframes ngProgress {
  0%   { transform: translateX(-150%); }
  100% { transform: translateX(350%); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .container { padding: 28px 20px; }
  .editor-layout { grid-template-columns: 1fr; }
  .editor-sidebar { border-right: none; border-bottom: 1px solid var(--cream2); }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
  .landing-hero { padding: 40px 28px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .editor-grid[data-layout="square"]  { grid-template-columns: 1fr 1fr; }
  .page-header h1 { font-size: 30px; }
}
