/* ============================================
   Surf Clips TV - Theme
   ============================================ */

:root {
  --bg: #050a12;
  --bg-raised: #0c1220;
  --surface: #121d2e;
  --surface-hover: #18263a;
  --border: #1a2940;
  --text: #eaf0f7;
  --text-secondary: #8ba3c0;
  --text-muted: #5a7393;
  --accent: #ff0033;
  --accent-glow: rgba(255, 0, 51, 0.15);
  --accent-hover: #ff3355;
  --yt-red: #ff0033;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1100px;
  --header-h: 60px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---- Header ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 10, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.logo-text {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.site-nav a:hover { color: var(--text); }

.nav-yt:hover { color: var(--yt-red); }

.nav-merch {
  background: var(--accent);
  color: #fff !important;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.15s, transform 0.15s;
}

.nav-merch:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  color: #fff !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
}

/* ---- Hero Top 10 ---- */

.hero-top10 {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0;
}

.hero-top10-link {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 0;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.3s, transform 0.2s;
}

.hero-top10-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.hero-top10-thumb {
  position: relative;
  overflow: hidden;
}

.hero-top10-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.hero-top10-link:hover .hero-top10-img {
  transform: scale(1.04);
}

.hero-top10-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
}

.badge {
  display: inline-block;
  width: fit-content;
  background: var(--accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.hero-top10-info h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.hero-top10-info time {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: background 0.2s, transform 0.2s;
  backdrop-filter: blur(4px);
}

.play-btn svg { margin-left: 3px; }

.hero-top10-link:hover .play-btn {
  background: var(--accent);
  transform: translate(-50%, -50%) scale(1.1);
}

/* ---- Sections ---- */

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 0;
}

.section-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
}

.section-link:hover { color: var(--accent); }

/* ---- Shorts Rail ---- */

.shorts-rail {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.75rem;
  margin: 0 -1.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  scrollbar-width: none;
}

.shorts-rail::-webkit-scrollbar { display: none; }

.short-card {
  flex: 0 0 180px;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
}

.short-thumb {
  width: 180px;
  height: 102px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  position: relative;
}

.short-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.short-card:hover .short-thumb img {
  transform: scale(1.05);
}

.short-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
  margin-top: 0.4rem;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.short-card:hover .short-title { color: var(--text); }

/* ---- Home Split Layout ---- */

.home-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.home-split .section { padding: 1.5rem 0 0; display: flex; flex-direction: column; }

.wilbur-grid {
  flex: 1;
}

/* ---- Merch Grid (homepage sidebar) ---- */

.merch-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.merch-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.merch-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.merch-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  flex-shrink: 0;
}

.merch-card-info {
  padding: 0.5rem 0.75rem 0.5rem 0;
}

.merch-card-info h3 {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}

.merch-price {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

/* ---- Wilbur Grid (homepage sidebar) ---- */

.wilbur-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  align-content: start;
}

.wilbur-grid .clip-card img {
  aspect-ratio: 16/9;
  object-fit: cover;
}

.wilbur-grid .clip-card-body h3 {
  font-size: 0.8rem;
}

/* ---- Bottom Merch Row ---- */

.merch-bottom-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* ---- Top 10s Grid ---- */

.top10s-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.top10-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.2s, box-shadow 0.2s;
}

.top10-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.top10-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.3s;
}

.top10-card:hover img { transform: scale(1.04); }

.top10-card-info {
  padding: 0.75rem 0.875rem;
}

.top10-card-info h3 {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.top10-card-info time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ---- Clips Grid ---- */

.clips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.clip-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.2s, box-shadow 0.2s;
}

.clip-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.clip-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.3s;
}

.clip-card:hover img { transform: scale(1.04); }

.clip-card-body {
  padding: 0.75rem 0.875rem;
}

.clip-card-body h3 {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.clip-card-body time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ---- Subscribe CTA ---- */

.subscribe-cta {
  text-align: center;
  padding: 3.5rem 1.25rem;
  margin-top: 1rem;
}

.subscribe-cta h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.subscribe-cta p {
  color: var(--text-secondary);
  margin: 0.5rem auto 1.5rem;
  max-width: 420px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s, transform 0.15s;
  cursor: pointer;
  border: none;
}

.btn-subscribe {
  background: var(--yt-red);
  color: white;
}

.btn-subscribe:hover {
  background: #e6002e;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.55rem 1.2rem;
  font-size: 0.85rem;
}

/* ---- Email Form ---- */

.email-form {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  max-width: 420px;
  margin: 0 auto;
}

.email-input {
  flex: 1;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}

.email-input:focus {
  border-color: var(--accent);
}

.email-input::placeholder {
  color: var(--text-muted);
}

.email-msg {
  font-size: 0.85rem;
  margin-top: 0.75rem;
  min-height: 1.25em;
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

.email-success { color: #4caf50; }
.email-error { color: var(--accent); }

.footer-email-form {
  max-width: 360px;
  width: 100%;
}

/* ---- Clip Single Page ---- */

.clip-page {
  background: var(--bg-raised);
}

.clip-page-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
}

.clip-player {
  margin: 0 -1.25rem;
}

.clip-player .video-embed {
  margin: 0;
  border-radius: 0;
}

.clip-player lite-youtube {
  border-radius: 0;
  max-width: 100%;
}

.clip-description .video-embed {
  display: none;
}

.clip-meta {
  padding-top: 1.5rem;
}

.clip-meta h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.clip-meta-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.clip-meta-row time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.yt-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.yt-link:hover { color: var(--yt-red); }

.clip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.clip-tags a {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--surface);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: border-color 0.15s, color 0.15s;
}

.clip-tags a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.surfer-list {
  margin-top: 1.25rem;
}

.surfer-list-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.surfer-entries {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.surfer-entries li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.surfer-name {
  font-weight: 600;
  color: var(--text);
}

.surfer-source {
  font-size: 0.8rem;
  color: var(--accent);
  transition: opacity 0.15s;
}

.surfer-source:hover {
  opacity: 0.8;
}

.related-section {
  padding-bottom: 2rem;
}

/* ---- Video Embed ---- */

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ---- Page Titles ---- */

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.archive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.archive-subtitle {
  color: var(--text-muted);
  margin: 0;
}

.archive-filters {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.top10-views {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.archive-grid {
  grid-template-columns: repeat(4, 1fr);
}

.page-section {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* ---- Tag list page ---- */

.post-card {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.post-card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.post-card a:hover h2 { color: var(--accent); }

.post-card time {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-card h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.15rem;
  transition: color 0.15s;
}

/* ---- Shop ---- */

.shop-section {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.shop-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.product-card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.product-img {
  overflow: hidden;
  background: #1a1a2e;
  position: relative;
}

.product-img img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-img img {
  transform: scale(1.04);
}

.product-cta {
  display: inline-block;
  margin-top: 0.65rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 1.2rem;
  border-radius: 6px;
  transition: background 0.15s;
}

.product-card:hover .product-cta {
  background: var(--accent-hover);
}

.product-info {
  padding: 0.875rem 1rem;
}

.product-info h3 {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.product-desc {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.product-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

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

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.25rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-logo {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--accent); }

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

/* ---- Top 10 entry (for editorial posts) ---- */

.top10-entry {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.top10-rank {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--accent);
  min-width: 2.5rem;
  line-height: 1;
}

.top10-content h3 {
  font-size: 1rem;
  font-weight: 600;
}

.top10-content h3 a {
  color: var(--text);
  transition: color 0.15s;
}

.top10-content h3 a:hover { color: var(--accent); }

.top10-note {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ---- Editorial callout ---- */

.editorial {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .hero-top10 { padding: 1rem 1rem 0; }

  .hero-top10-link {
    grid-template-columns: 1fr;
  }

  .hero-top10-thumb {
    aspect-ratio: 16 / 9;
  }

  .hero-top10-info {
    padding: 1.25rem;
  }

  .hero-top10-info h1 { font-size: 1.15rem; }

  .play-btn {
    width: 48px;
    height: 48px;
  }

  .play-btn svg { width: 32px; height: 32px; }

  .home-split { grid-template-columns: 1fr; }
  .top10s-grid { grid-template-columns: repeat(2, 1fr); }
  .clips-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .merch-bottom-grid { grid-template-columns: repeat(2, 1fr); }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    gap: 1rem;
  }

  .nav-toggle { display: block; }
}

@media (max-width: 480px) {
  .hero-top10-info h1 { font-size: 1rem; }
  .top10s-grid { grid-template-columns: repeat(2, 1fr); }
  .clips-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .short-card { flex: 0 0 150px; }
  .short-thumb { width: 150px; height: 85px; }
  .subscribe-cta h2 { font-size: 1.35rem; }
}
