/* ==========================================================================
   UploadRally · hoo.be-inspired white theme
   ========================================================================== */

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

:root {
  --bg:          #ffffff;
  --bg-soft:     #f7f7f8;
  --ink:         #0b0b0d;
  --ink-2:       #1a1a1e;
  --muted:       #6b6b73;
  --muted-2:     #a1a1a9;
  --border:      #ececee;
  --border-2:    #dcdce0;
  --card:        #ffffff;
  --card-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 32px rgba(0,0,0,0.06);
  --accent:      #0b0b0d;         /* black CTAs like hoo.be */
  --accent-ink:  #ffffff;
  --brand:       #1c9be9;         /* subtle blue used for verified check + hyperlinks */
  --danger:      #d63d3d;
  --radius-sm:   10px;
  --radius:      16px;
  --radius-lg:   22px;
  --radius-pill: 999px;
  --shadow-sm:   0 1px 2px rgba(0,0,0,.06);
  --shadow-md:   0 4px 16px rgba(0,0,0,.06);
  --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --max:         512px;             /* hoo.be column width */
}

html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-size: 16px;
  min-height: 100vh;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

/* Default: SVGs never exceed 24px unless a container overrides */
svg { max-width: 100%; }

button { font-family: inherit; }

/* ---------- Layout ------------------------------------------------------- */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 80px;
}

.col {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
}

.wide-col {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

/* ---------- Top nav (subtle, like hoo.be marketing) ---------------------- */

.topbar {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 18px;
}

.topbar .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.topbar nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  transition: color .15s;
}
.topbar nav a:hover { color: var(--ink); }

.topbar .cta {
  background: var(--ink);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: transform .15s, background .15s;
}
.topbar .cta svg { width: 14px; height: 14px; }
.topbar .cta:hover { background: #262629; }

@media (max-width: 640px) {
  .topbar nav a:not(.cta) { display: none; }
}

/* ---------- Profile block (avatar + name + socials) ---------------------- */

.profile { text-align: center; padding: 8px 0 4px; }

.avatar {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  position: relative;
}
.avatar > img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.avatar.mark {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
  font-weight: 800;
  font-size: 38px;
  letter-spacing: -0.02em;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.avatar .verified {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 3px white;
  z-index: 2;
}
.avatar .verified svg { width: 16px; height: 16px; }

.profile h1 {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.profile .handle {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 20px;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 6px 0 32px;
  flex-wrap: wrap;
}
.socials a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--ink);
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: transform .15s, background .15s;
}
.socials a:hover { background: var(--border); transform: translateY(-1px); }
.socials a svg { width: 20px; height: 20px; }

/* ---------- Content cards (event/link cards) ----------------------------- */

.stack { display: flex; flex-direction: column; gap: 16px; }

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
  border-color: var(--border-2);
}

.card-media {
  aspect-ratio: 16/9;
  background: #0b0b0d center/cover no-repeat;
  position: relative;
  overflow: hidden;
}
.card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 40%, rgba(0,0,0,0) 70%);
}

.card-media .card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,.95);
  color: var(--ink);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-media .card-title {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  color: white;
  z-index: 2;
}
.card-media .card-title h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.card-media .card-title p {
  margin: 0;
  font-size: 13px;
  color: rgba(255,255,255,.85);
  font-weight: 500;
}

/* Small card body under media */
.card-body {
  padding: 14px 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-body .meta {
  color: var(--muted);
  font-size: 13px;
}
.card-body .arrow {
  color: var(--muted);
}
.card-body .arrow svg { width: 18px; height: 18px; }

/* Simple text card (no media) — used for links */
.card-simple {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.card-simple:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.card-simple .l { display: flex; align-items: center; gap: 14px; }
.card-simple .l .ico {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--bg-soft);
  display: grid; place-items: center;
}
.card-simple .l .ico svg { width: 20px; height: 20px; }
.card-simple > svg { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.card-simple .l h4 { margin: 0 0 2px; font-size: 15px; font-weight: 600; }
.card-simple .l p { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Buttons ------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--ink);
  color: white;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
  line-height: 1;
}
.btn:hover { background: #262629; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.block { width: 100%; }
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.btn.big svg { width: 18px; height: 18px; }

.btn.ghost {
  background: white;
  color: var(--ink);
  border-color: var(--border-2);
}
.btn.ghost:hover { background: var(--bg-soft); }

.btn.big { padding: 15px 24px; font-size: 16px; }
.btn.sm { padding: 9px 16px; font-size: 13px; }

/* ---------- Forms -------------------------------------------------------- */

.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--card-shadow);
}
.form-card > div > svg { width: 22px; height: 22px; }
.form-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}
.form-card .sub {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  margin: 0 0 26px;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink-2);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  background: white;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(11,11,13,.08);
}

.field .hint {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.error {
  background: #fef1f1;
  color: #b32424;
  border: 1px solid #fbd0d0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
}

.notice {
  background: #f0f7ff;
  color: #0b4a8e;
  border: 1px solid #d3e6fb;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
}

.form-footer {
  text-align: center;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}
.form-footer a { color: var(--ink); font-weight: 600; text-decoration: none; }
.form-footer a:hover { text-decoration: underline; }

/* ---------- Footer ------------------------------------------------------- */

.foot {
  margin: 60px auto 0;
  text-align: center;
  color: var(--muted-2);
  font-size: 12px;
  padding: 0 20px;
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---------- Section spacers --------------------------------------------- */

.section-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 32px 0 12px;
  text-align: left;
}

/* ---------- Modal (upload code prompt) ---------------------------------- */

.modal-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11,11,13,.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-bg.open { display: flex; }

.modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal h3 { margin: 0 0 6px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.modal p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.modal .modal-close {
  position: absolute; top: 20px; right: 20px;
  background: none; border: none; color: var(--muted);
  font-size: 22px; cursor: pointer;
}

/* ---------- Uploader (rally page) --------------------------------------- */

.uploader-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.uploader-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.uploader-card p.sub { margin: 0 0 18px; color: var(--muted); font-size: 14px; }

.dropzone {
  display: block;
  border: 2px dashed var(--border-2);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--ink);
  background: var(--bg-soft);
}
.dropzone .dz-ico {
  width: 48px; height: 48px;
  margin: 0 auto 14px;
  background: var(--bg-soft);
  border-radius: 50%;
  display: grid; place-items: center;
}
.dropzone .dz-ico svg { width: 22px; height: 22px; }
.dropzone strong { display: block; font-size: 15px; margin-bottom: 4px; }
.dropzone span { color: var(--muted); font-size: 13px; }
.dropzone input[type="file"] { display: none; }

.progress {
  height: 6px;
  background: var(--bg-soft);
  border-radius: 3px;
  margin-top: 16px;
  overflow: hidden;
  display: none;
}
.progress.on { display: block; }
.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--ink);
  transition: width .2s ease;
}
.progress-text {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  display: none;
}
.progress-text.on { display: block; }

/* ---------- Gallery ----------------------------------------------------- */

.section-title {
  margin: 32px 0 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.section-title h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-title .count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gallery-item {
  background: black;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/5;
  position: relative;
  border: 1px solid var(--border);
}
.gallery-item video, .gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  background: #111;
}
.gallery-item .gi-meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0));
  color: white;
  font-size: 12px;
  font-weight: 500;
}
.gallery-item .gi-meta strong { font-weight: 600; display: block; margin-bottom: 2px; }
.gallery-item .gi-meta span { opacity: .8; }

.gallery-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
}
.gallery-empty svg { width: 40px; height: 40px; margin: 0 auto 8px; color: var(--muted-2); display: block; }

@media (min-width: 640px) {
  .gallery { grid-template-columns: 1fr 1fr 1fr; }
}

/* ---------- Utilities --------------------------------------------------- */

.hidden { display: none !important; }
.spacer-lg { height: 40px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }

/* ---------- Home hero (for uploadrally landing) ------------------------- */

.home-hero {
  text-align: center;
  padding: 12px 0 8px;
}
.home-hero h1 {
  margin: 6px 0 8px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.15;
}
.home-hero .sub {
  color: var(--muted);
  font-size: 15px;
  margin: 0 auto 20px;
  max-width: 400px;
}
