/* ============================================================
   GRUBEL WATCHFACES — styles.css
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0a0a0f;
  --bg-surface:  #111118;
  --bg-card:     #16161f;
  --bg-card-h:   #1d1d28;
  --border:      rgba(255,255,255,.07);
  --border-h:    rgba(255,255,255,.14);
  --accent:      #6c63ff;
  --accent-2:    #a78bfa;
  --accent-glow: rgba(108,99,255,.35);
  --text:        #f0f0f8;
  --text-muted:  #8888aa;
  --text-dim:    #55556a;
  --radius:      16px;
  --radius-sm:   10px;
  --shadow-card: 0 4px 24px rgba(0,0,0,.5);
  --transition:  .2s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; }
select { font: inherit; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-card-h); border-radius: 999px; }

/* ── Typography Utilities ─────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2), #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: .75rem;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.4rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--accent-2);
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.4rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-h);
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-ghost:hover {
  border-color: var(--accent-2);
  background: rgba(108,99,255,.1);
  transform: translateY(-1px);
}

.btn-lg { padding: .85rem 2rem; font-size: 1rem; }

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, .85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  height: 102px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* legacy text fallback — kept for safety */
.logo-icon { font-size: 1.4rem; }
.logo strong { font-weight: 700; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-nav a:not(.btn-primary) {
  color: var(--text-muted);
  font-weight: 500;
  font-size: .9rem;
  transition: color var(--transition);
}
.header-nav a:not(.btn-primary):hover { color: var(--text); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Mobile Nav ───────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 65px; left: 0; right: 0;
  z-index: 99;
  background: rgba(10, 10, 15, .97);
  backdrop-filter: blur(20px);
  flex-direction: column;
  padding: 1rem 2rem 1.5rem;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  transform: translateY(-110%);
  transition: transform .25s ease;
}
.mobile-nav.open {
  transform: translateY(0);
  display: flex;
}
.mobile-nav a {
  font-size: 1.1rem;
  font-weight: 500;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(108,99,255,.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(167,139,250,.1) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  z-index: 1;
}


.hero-logo {
  display: none;
}

.hero-content h1 {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 1.5rem;
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 54ch;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat { text-align: left; }
.stat span { display: block; font-size: 1.4rem; font-weight: 700; color: var(--text); }
.stat small { font-size: .8rem; color: var(--text-muted); }

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border-h);
}

/* Decorative rings / hero visual */
.hero-visual {
  position: absolute;
  right: 3%;
  top: 50%;
  transform: translateY(-50%);
  width: 44vw;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-visual-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 60px rgba(108,99,255,.35)) drop-shadow(0 0 120px rgba(108,99,255,.15));
}


/* ── Filter Bar ───────────────────────────────────────────── */
.filter-bar {
  position: sticky;
  top: 65px;
  z-index: 50;
  background: rgba(10, 10, 15, .9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
}

.filter-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.search-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

#search-input {
  width: 100%;
  padding: .65rem .9rem .65rem 2.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: .9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
#search-input::placeholder { color: var(--text-dim); }
#search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Grid ─────────────────────────────────────────────────── */
.grid-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 2rem 5rem;
}

.grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.grid-count {
  font-size: .9rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: normal;
}

.sort-select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238888aa' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right .8rem center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: .5rem 2.2rem .5rem .9rem;
  font-size: .85rem;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.sort-select-wrapper select:focus { border-color: var(--accent); }

.watchface-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.5rem;
}

/* ── Card ─────────────────────────────────────────────────── */
.wf-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  animation: fadeIn .35s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wf-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 16px 48px rgba(0,0,0,.6), 0 0 0 1px var(--accent), 0 0 32px var(--accent-glow);
  border-color: var(--accent);
}

.wf-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-surface);
  overflow: hidden;
}

.wf-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.wf-card:hover .wf-card-img img {
  transform: scale(1.06);
}

.wf-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
}
.wf-card:hover .wf-card-overlay { opacity: 1; }

.wf-card-overlay-text {
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.wf-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  color: var(--text-dim);
  font-size: .8rem;
}
.wf-card-placeholder svg { opacity: .4; }

.wf-card-body {
  padding: .85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  flex: 1;
}

.wf-card-name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

/* ── About Section ────────────────────────────────────────── */
.about-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6rem 2rem;
}

.about-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
}

.about-text h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -.02em;
}

.about-text p {
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 55ch;
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}
.social-links a svg { width: 16px; height: 16px; }
.social-links a:hover {
  border-color: var(--accent-2);
  color: var(--text);
  background: rgba(108,99,255,.1);
}

.cta-card {
  background: linear-gradient(135deg, rgba(108,99,255,.2), rgba(167,139,250,.1));
  border: 1px solid rgba(108,99,255,.3);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  min-width: 260px;
}

.cta-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.cta-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: .75rem;
}

.cta-card p {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  padding: 3rem 2rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .5rem;
}

.footer-logo-img {
  height: 64px;
  width: auto;
  object-fit: contain;
  display: block;
}

.footer-copy { font-size: .85rem; color: var(--text-muted); }
.footer-note { font-size: .8rem; color: var(--text-dim); }

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 10, .9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-content {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-h);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 32px 80px rgba(0,0,0,.8);
  animation: popIn .2s ease;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(.93); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 2;
  width: 32px;
  height: 32px;
  background: rgba(0,0,0,.5);
  border: 1px solid var(--border-h);
  border-radius: 50%;
  color: var(--text);
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.lightbox-close:hover { background: rgba(255,255,255,.1); }

.lightbox-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.lightbox-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

#lightbox-title {
  font-size: 1rem;
  font-weight: 700;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-inner {
    grid-template-columns: 1fr;
  }
  .about-cta { display: flex; justify-content: center; }
  .hero-visual { display: none; }
}

@media (max-width: 640px) {
  body { padding-top: 66px; }

  .header-nav { display: none; }
  .hamburger { display: flex; }

  .logo-img { height: 38px; }
  .site-header { min-height: 66px; }
  .header-inner { padding: .875rem 1.25rem; }
  .mobile-nav {
    top: 66px;
    max-height: calc(100vh - 66px);
    overflow-y: auto;
  }

  .hero {
    padding: 2.5rem 1.25rem 3rem;
  }
  .hero-content h1 { font-size: 2.6rem; }

  .hero-stats { gap: 1.25rem; }
  .stat span { font-size: 1.1rem; }

  .filter-bar {
    top: 66px;
    padding: .75rem 1.25rem;
  }
  .filter-inner { gap: .75rem; }
  .search-wrapper { max-width: 100%; }

  .grid-section { padding: 1.5rem 1.25rem 4rem; }
  .watchface-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }

  .about-section { padding: 4rem 1.25rem; }
}

@media (max-width: 360px) {
  .watchface-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Loading shimmer ──────────────────────────────────────── */
.shimmer {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-h) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.skeleton-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-card-h);
}
.skeleton-body {
  padding: .85rem 1rem;
}
.skeleton-line {
  height: 12px;
  border-radius: 6px;
  margin-bottom: .5rem;
}
.skeleton-line.short { width: 50%; }
