/*
Theme Name: Artesigner Portfolio
Author: Artesigner Studio
Description: Custom portfolio theme for Artesigner Studio — reels showcase.
Version: 1.0
Text Domain: artesigner-portfolio
*/

/* ============================================================
   RESET
============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================================
   VARIABLES — Pure White Tone
============================================================ */
:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --bg-elev: #ffffff;
  --text: #0a0a0a;
  --text-soft: #4a4a4a;
  --text-muted: #8a8a8a;
  --border: #ececec;
  --border-strong: #d8d8d8;
  --btn-bg: #0a0a0a;
  --btn-text: #ffffff;
  --btn-hover: #2a2a2a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.08);
}

/* ============================================================
   BASE
============================================================ */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--text); color: var(--bg); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   LAYOUT
============================================================ */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
}

main { flex: 1; }

/* ============================================================
   HEADER
============================================================ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}

/* --- LOGO --- */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  flex-shrink: 0;
}

.logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo-fallback {
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-fallback .logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.05em;
  flex-shrink: 0;
}

.logo-fallback .logo-text { line-height: 1; }
.logo-fallback .logo-text small {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

.logo.no-img img { display: none; }
.logo.no-img .logo-fallback { display: flex; }

/* --- HEADER ACTION --- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: var(--btn-bg);
}

.btn-primary:hover {
  background: var(--btn-hover);
  border-color: var(--btn-hover);
  transform: translateY(-1px);
}

.btn svg { width: 15px; height: 15px; }

/* ============================================================
   INTRO / HERO
============================================================ */
.intro {
  padding: 90px 0 60px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  opacity: 0.55;
  pointer-events: none;
}

.intro .container { position: relative; z-index: 1; }

.intro-content {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 22px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg);
}

.intro h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
  color: var(--text);
}

.intro h1 em {
  font-style: normal;
  display: inline-block;
  padding: 0 8px;
  background: var(--text);
  color: var(--bg);
}

.intro p {
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  color: var(--text-soft);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ============================================================
   CATEGORY FILTER BAR
============================================================ */
.filter-bar {
  position: sticky;
  top: 76px;
  z-index: 90;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.filter-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}

.filter-scroll::-webkit-scrollbar { display: none; }

.filter-btn {
  flex-shrink: 0;
  padding: 9px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.filter-btn.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  font-weight: 600;
}

.filter-btn .count {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.72rem;
  opacity: 0.6;
}

/* ============================================================
   PORTFOLIO SECTION
============================================================ */
.portfolio {
  padding: 60px 0 120px;
}

.portfolio-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.portfolio-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text);
}

.portfolio-head .count {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ============================================================
   REELS GRID
============================================================ */
.reels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
}

.reel-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.4s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.reel-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.reel-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #f0f0f0;
  overflow: hidden;
  display: block;
  cursor: pointer;
}

.reel-frame img,
.reel-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reel-frame video {
  background: #000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.reel-frame.playing video { opacity: 1; }

.reel-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  color: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, opacity 0.25s ease, background 0.3s ease;
  z-index: 2;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
}

.reel-play svg {
  width: 18px;
  height: 18px;
  margin-left: 3px;
}

.reel-card:hover .reel-play {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
}

.reel-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.15), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.reel-card:hover .reel-frame::after { opacity: 1; }

.reel-info {
  padding: 18px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.reel-tag {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.reel-info h4 {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text);
}

.reel-info p {
  font-size: 0.84rem;
  color: var(--text-soft);
  line-height: 1.5;
  flex-grow: 1;
}

.reel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--btn-bg);
  color: var(--btn-text);
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background 0.2s ease, transform 0.2s ease;
}

.reel-btn:hover {
  background: var(--btn-hover);
  transform: translateY(-1px);
}

.reel-btn svg { width: 13px; height: 13px; }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============================================================
   FOOTER
============================================================ */
footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-brand .logo-mark {
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
  border-radius: 7px;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.footer-brand strong {
  color: var(--text);
  font-weight: 700;
}

.socials {
  display: flex;
  gap: 8px;
  align-items: center;
}

.socials a {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  transition: all 0.2s ease;
}

.socials a:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  transform: translateY(-2px);
}

.socials svg { width: 15px; height: 15px; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 860px) {
  .intro { padding: 70px 0 50px; }
  .filter-bar { top: 68px; }
  .portfolio { padding: 50px 0 90px; }

  .portfolio-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 32px;
  }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .header-inner { height: 68px; }

  .logo img { height: 32px; }

  .reels-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .reel-info { padding: 14px 12px; }
  .reel-tag { font-size: 0.6rem; }
  .reel-info h4 { font-size: 0.88rem; }
  .reel-info p { font-size: 0.76rem; }
  .reel-btn { font-size: 0.72rem; padding: 9px 10px; gap: 5px; }
  .reel-btn svg { width: 11px; height: 11px; }
  .reel-play { width: 46px; height: 46px; }
  .reel-play svg { width: 14px; height: 14px; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 380px) {
  .reels-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   REDUCED MOTION
============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
}