/*
Theme Name: Framecraft Portfolio
Theme URI: https://example.com/framecraft-portfolio
Author: Framecraft Studio
Description: A fast, dark-studio WordPress portfolio theme built for Graphic Designers, Video Editors, Motion Graphics Designers, and 2D Animators. Includes a built-in Showreel Lightbox, filterable 4-pillar Portfolio CPT, Case Study breakdowns, and Customizer controls with zero required plugins.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: framecraft
*/

:root {
  --bg: #0b0c10;
  --surface: #13161f;
  --surface-2: #1b202d;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f3f5f9;
  --muted: #9aa3b2;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --radius: 14px;
  --max-w: 1200px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 12, 16, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.site-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #061018;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  padding: 76px 0 64px;
  background:
    radial-gradient(circle at 18% 10%, rgba(56, 189, 248, 0.14), transparent 42%),
    radial-gradient(circle at 82% 20%, rgba(129, 140, 248, 0.12), transparent 40%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.status-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

.hero p.hero-sub {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 540px;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.pillar-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

/* Showreel Card */
.reel-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #161b29, #0e111a);
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.reel-card video,
.reel-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.reel-card:hover video,
.reel-card:hover img {
  transform: scale(1.04);
  opacity: 0.8;
}

.reel-overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
}

.play-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.92);
  color: #061018;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 0 0 12px rgba(56, 189, 248, 0.16);
  transition: transform 0.25s ease;
}

.reel-card:hover .play-btn {
  transform: scale(1.08);
}

.reel-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.reel-meta {
  font-size: 0.82rem;
  color: #cbd5e1;
}

/* Sections */
.section {
  padding: 76px 0;
  border-top: 1px solid var(--border);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.section-desc {
  color: var(--muted);
  margin: 0;
  max-width: 560px;
}

/* Filter Tabs */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

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

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
}

.project-card.is-hidden {
  display: none;
}

.project-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #1b2234, #111521);
  overflow: hidden;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.project-play-trigger {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(11, 12, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.project-play-trigger:hover {
  background: var(--accent);
  color: #061018;
  transform: scale(1.08);
}

.project-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tag-chip {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  padding: 3px 9px;
  border-radius: 6px;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 6px;
  line-height: 1.3;
}

.project-role {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0 0 14px;
}

.project-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--muted);
}

.project-link {
  color: var(--text);
  font-weight: 600;
}

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

/* About & Pipeline */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 44px;
  align-items: start;
}

.tools-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 28px;
}

.tool-badge {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
}

.pillars-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.pillar-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.pillar-box h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  margin: 0 0 6px;
}

.pillar-box p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Contact CTA */
.contact-box {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(129, 140, 248, 0.08));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 52px 36px;
  text-align: center;
}

.contact-box h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  margin: 0 0 12px;
}

.contact-box p {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 28px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
}

.social-links a {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}

.social-links a:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* Single Case Study */
.case-hero {
  padding: 56px 0 36px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

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

.case-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 36px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.meta-item span {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}

.meta-item strong {
  font-size: 0.95rem;
}

.video-embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  margin-bottom: 36px;
}

.video-embed-wrap iframe,
.video-embed-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.case-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.case-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.case-panel h3 {
  font-family: var(--font-display);
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.entry-content {
  max-width: 820px;
  color: #d6dbe6;
  font-size: 1.02rem;
}

.entry-content img {
  border-radius: 12px;
  margin: 24px 0;
}

/* Modal Lightbox */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(5, 7, 11, 0.9);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.video-modal.is-open {
  display: flex;
}

.video-modal-inner {
  width: 100%;
  max-width: 980px;
  position: relative;
}

.video-modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.88rem;
}

.video-modal-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.video-modal-frame iframe,
.video-modal-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .about-grid,
  .case-panel-grid {
    grid-template-columns: 1fr;
  }
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .case-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .nav-toggle {
    display: inline-block;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: #0f121a;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
  }
  .nav-menu.is-open {
    display: flex;
  }
  .portfolio-grid,
  .pillars-list {
    grid-template-columns: 1fr;
  }
}
