﻿/* ============================================================
   NovaWebly Assets Hub  style.css
   ============================================================
   HOW TO EDIT THIS FILE:
   - All design tokens (colors, fonts, spacing) live in :root
   - Change accent colors: edit --grad-start and --grad-end
   - Change background: edit --bg-base
   - Change font: edit --font-main (also update the Google Fonts link in index.html)
   - Grid columns: search for .asset-grid and edit grid-template-columns
   ============================================================ */

/*  HIDDEN ATTRIBUTE OVERRIDE  */
/*
  The HTML `hidden` attribute sets display:none by default, but CSS rules
  like display:flex on .modal-overlay can accidentally override it.
  This rule ensures [hidden] always wins — do not remove it.
*/
[hidden] { display: none !important; }

/*  RESET & BASE  */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/*  DESIGN TOKENS  */
:root {
  /* COLORS  edit these to retheme the entire site */
  --bg-base:        #0b0f1a;   /* main page background */
  --bg-surface:     #111827;   /* cards, modals, inputs */
  --bg-surface-2:   #1a2235;   /* hover states, secondary surfaces */
  --border:         rgba(255,255,255,0.07);
  --border-hover:   rgba(96,165,250,0.35);

  /* GRADIENT  used on buttons, badges, glow effects */
  --grad-start:     #60a5fa;   /* light blue */
  --grad-end:       #a78bfa;   /* light purple */
  --gradient:       linear-gradient(135deg, var(--grad-start), var(--grad-end));

  /* TEXT */
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;

  /* FONT  change here + update Google Fonts link in index.html */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;

  /* SPACING */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-full: 9999px;

  /* TRANSITIONS */
  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/*  UTILITY  */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/*  SCROLLBAR  */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-surface-2); border-radius: var(--radius-full); }

/*  BUTTONS  */
/* Base button  all buttons inherit from this */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-full);  /* Apple-style fully rounded */
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  padding: 10px 22px;
}

/* PRIMARY button  gradient fill with glow on hover */
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(96,165,250,0);
}
.btn-primary:hover {
  /* Glow effect on hover  adjust spread/color here */
  box-shadow: 0 0 24px rgba(96,165,250,0.45), 0 0 48px rgba(167,139,250,0.2);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

/* SECONDARY button  outlined style */
.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-surface-2);
}

/* LARGE size modifier */
.btn-large { padding: 14px 32px; font-size: 1rem; }

/* SMALL size modifier */
.btn-small { padding: 6px 14px; font-size: 0.8rem; }

/* FULL WIDTH modifier */
.btn-full { width: 100%; }

/* LINK-style button (for footer legal links, cookie banner) */
.link-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
  padding: 0;
}
.link-btn:hover { color: var(--text-primary); }

/*  NAVBAR  */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,15,26,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* LOGO  flex row with icon + text */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-text {
  font-size: 1.05rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links { display: flex; align-items: center; gap: 8px; }

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-surface-2); }

/*  HERO SECTION  */
.hero {
  position: relative;
  overflow: hidden;
  padding: 100px 24px 80px;
  text-align: center;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* BADGE above the title  remove in index.html if not needed */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(96,165,250,0.1);
  border: 1px solid rgba(96,165,250,0.25);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--grad-start);
  letter-spacing: 0.02em;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--grad-start);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* MAIN HEADLINE  edit font-size here for different sizes */
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

/* SUBHEADLINE */
.hero-sub {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 480px;
}

/* Message shown when user is already unlocked */
.hero-unlocked-msg {
  font-size: 0.9rem;
  color: var(--grad-start);
  font-weight: 500;
}

/* DECORATIVE GLOW BLOBS  purely visual, no images needed */
/* To reposition: change top/left/transform values */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}
.hero-glow-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(96,165,250,0.12) 0%, transparent 70%);
  top: -100px; left: 50%;
  transform: translateX(-60%);
}
.hero-glow-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(167,139,250,0.1) 0%, transparent 70%);
  top: 0; right: -100px;
}

/*  HUB SECTION (search + grid)  */
.hub-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/*  SEARCH & FILTER CONTROLS  */
.hub-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

/* SEARCH BAR wrapper */
.search-wrap {
  position: relative;
  max-width: 420px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* SEARCH INPUT  edit padding-left if you change icon size */
.search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  padding: 10px 16px 10px 40px;
  outline: none;
  transition: var(--transition);
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  border-color: var(--border-hover);
  box-shadow: 0 0 0 3px rgba(96,165,250,0.1);
}
/* Remove default browser search clear button */
.search-input::-webkit-search-cancel-button { display: none; }

/* FILTER TABS row */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Individual filter tab */
.filter-tab {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 16px;
  cursor: pointer;
  transition: var(--transition);
}
.filter-tab:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}
/* Active/selected tab */
.filter-tab.active {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
}

/*  ASSET GRID  */
/*
  GRID COLUMNS:
  - Desktop (default): 5 columns
  - Tablet (1024px): 3 columns   see @media below
  - Mobile (640px):  2 columns   see @media below
  - Small mobile (400px): 1 column  see @media below

  To change column count: edit repeat(5, 1fr)  repeat(N, 1fr)
*/
.asset-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

/*  ASSET CARD  */
/*
  CARD ANATOMY:
  .asset-card
    .card-thumb-wrap        thumbnail container (aspect ratio set here)
      img.card-thumb        the thumbnail image
      .card-lock-overlay    blur + lock icon (locked state only)
      .card-category        category pill (top-left of thumbnail)
    .card-body              title + download button
      .card-title           asset name
      .card-actions         download button row

  To change thumbnail aspect ratio: edit aspect-ratio in .card-thumb-wrap
  To change card background: edit background in .asset-card
*/
.asset-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: default;

  /* Scroll reveal  cards start invisible and animate in via JS */
  opacity: 0;
  transform: translateY(20px);
}

/* Card hover lift + glow border */
.asset-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 32px rgba(96,165,250,0.12);
}

/* Locked card  cursor shows it's clickable to unlock */
.asset-card.locked { cursor: pointer; }

/* THUMBNAIL CONTAINER */
.card-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;   /* Change this ratio to adjust thumbnail shape */
  overflow: hidden;
  background: var(--bg-surface-2);
}

/* THUMBNAIL IMAGE */
.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;       /* cover = crop to fill; use 'contain' to show full image */
  display: block;
  transition: transform var(--transition);
}
.asset-card:hover .card-thumb { transform: scale(1.04); }

/* CATEGORY PILL  overlaid on thumbnail top-left */
/*
  To change pill position: edit top/left values
  To change pill style: edit background, border-radius, font-size
*/
.card-category {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(11,15,26,0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 3px 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  pointer-events: none;
}

/* FEATURED BADGE  shown on cards with featured: true */
.card-featured-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.75rem;
  background: rgba(11,15,26,0.75);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  padding: 3px 8px;
  pointer-events: none;
}

/* LOCK OVERLAY  covers thumbnail when asset is locked */
.card-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11,15,26,0.55);
  backdrop-filter: blur(6px);   /* blur intensity  increase for stronger blur */
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition);
}

.lock-icon {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
}

/* CARD BODY  title + download button */
.card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* CARD TITLE */
/*
  To change title size: edit font-size
  To allow more lines: change -webkit-line-clamp to 3
*/
.card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;   /* max 2 lines, then ellipsis */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* DOWNLOAD BUTTON inside card */
.card-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  width: 100%;
}
.card-download-btn:hover {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 16px rgba(96,165,250,0.3);
}

/* Disabled download button (locked state) */
.card-download-btn:disabled,
.card-download-btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/*  EMPTY STATE  */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/*  LOAD MORE BUTTON  */
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

/* ── LOCKED NOTICE ────────────────────────────────────────── */
/*
  Banner shown between the filters and the grid when locked.
  Hidden by JS after unlock (id="locked-notice").
  To change style: edit colors, border, padding here.
  To change text: edit index.html #locked-notice.
*/
.locked-notice {
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  background: rgba(96,165,250,0.06);
  border: 1px solid rgba(96,165,250,0.2);
  padding: 14px 18px;
}

.locked-notice-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* The clickable "unlock" link inside the notice */
.notice-unlock-btn {
  color: var(--grad-start);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.notice-unlock-btn:hover {
  color: var(--grad-end);
}

/*  MODAL OVERLAY  */
/*
  All modals share this overlay base.
  To change overlay darkness: edit background rgba alpha value
*/
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;

  /* Animation  fade + scale in */
  animation: modal-in 220ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modal-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* MODAL BOX  the white/dark card inside the overlay */
.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  position: relative;
  text-align: center;

  animation: box-in 220ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes box-in {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* CLOSE BUTTON (X) in modal top-right */
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}
.modal-close:hover { color: var(--text-primary); border-color: var(--border-hover); }

/* MODAL ICON (lock SVG above title) */
.modal-icon { margin-bottom: 8px; }

/* MODAL TITLE */
.modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* MODAL SUBTITLE */
.modal-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* FORM GROUP */
.form-group { margin-bottom: 12px; text-align: left; }

/* EMAIL INPUT */
.form-input {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  padding: 12px 16px;
  outline: none;
  transition: var(--transition);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: var(--border-hover);
  box-shadow: 0 0 0 3px rgba(96,165,250,0.1);
}
.form-input.error { border-color: #f87171; }

/* VALIDATION ERROR TEXT */
.form-error {
  display: block;
  font-size: 0.8rem;
  color: #f87171;
  margin-top: 6px;
}

/* LOADING SPINNER */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* SUCCESS STATE inside modal */
.unlock-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}

.success-icon {
  width: 52px; height: 52px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  animation: pop-in 300ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes pop-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.unlock-success p {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* DISCLAIMER text below form */
.modal-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 14px;
}

/*  LEGAL MODAL VARIANTS  */
.modal-legal-box {
  max-width: 560px;
  text-align: left;
  max-height: 80vh;
  overflow-y: auto;
}

.legal-content {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.legal-content strong { color: var(--text-primary); }
.legal-content a { color: var(--grad-start); }
.legal-content ul { padding-left: 20px; }
.legal-content code {
  background: var(--bg-surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/*  COOKIE BANNER  */
/*
  Fixed to bottom of screen.
  Hidden after user accepts (localStorage: cookieConsent).
  To change position: change bottom to top and adjust styling.
*/
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 520px;
  width: calc(100% - 48px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: slide-up 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slide-up {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.cookie-banner p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex: 1;
}

/*  FOOTER  */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand { display: flex; flex-direction: column; gap: 4px; }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-socials a:hover { color: var(--text-primary); }

/*  SCROLL REVEAL ANIMATION  */
/*
  Cards animate from opacity:0 + translateY(20px) to visible.
  The .visible class is added by the IntersectionObserver in main.js.
  To change animation: edit the transition values here.
  To change stagger delay: edit the JS in main.js  renderCards()
*/
.asset-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 400ms ease, transform 400ms ease,
              border-color var(--transition), box-shadow var(--transition);
}

/*  RESPONSIVE BREAKPOINTS  */

/* TABLET  1024px: 3 columns */
@media (max-width: 1024px) {
  .asset-grid { grid-template-columns: repeat(3, 1fr); }
}

/* LARGE MOBILE  640px: 2 columns */
@media (max-width: 640px) {
  .asset-grid { grid-template-columns: repeat(2, 1fr); }

  .hero { padding: 70px 20px 60px; }

  .modal-box { padding: 32px 24px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }

  .hub-controls { gap: 12px; }
}

/* SMALL MOBILE  400px: 1 column */
@media (max-width: 400px) {
  .asset-grid { grid-template-columns: 1fr; }
}

