/* ============================================================
   CAPESSA STUDIOS — style.css
   Design system + Header + Hero + Base layout
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Variables (Dark Theme default) ───────────────────── */
:root {
  /* Brand */
  --gold:       #D4AF37;
  --gold-light: #E8CC6A;
  --gold-dim:   #9A7D22;
  --red:        #C0392B;
  --blue:       #2471A3;

  /* Dark palette */
  --bg:         #0A0D14;
  --bg-2:       #111827;
  --bg-3:       #1A2235;
  --surface:    rgba(255,255,255,0.04);
  --surface-h:  rgba(255,255,255,0.08);
  --border:     rgba(212,175,55,0.15);
  --border-h:   rgba(212,175,55,0.4);

  /* Text */
  --text:       #F0F0F0;
  --text-2:     #A0AABF;
  --text-3:     #5A6478;

  /* UI */
  --radius:     12px;
  --radius-lg:  20px;
  --shadow:     0 4px 24px rgba(0,0,0,0.5);
  --shadow-gold:0 0 32px rgba(212,175,55,0.12);

  /* Fonts */
  --font-display: 'Orbitron', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Nav height */
  --nav-h: 68px;
}

/* ── Light Theme ──────────────────────────────────────────── */
[data-theme="light"] {
  --bg:         #F5F7FA;
  --bg-2:       #FFFFFF;
  --bg-3:       #EEF1F7;
  --surface:    rgba(0,0,0,0.04);
  --surface-h:  rgba(0,0,0,0.07);
  --border:     rgba(212,175,55,0.25);
  --border-h:   rgba(212,175,55,0.6);
  --text:       #0D1117;
  --text-2:     #445066;
  --text-3:     #8894A8;
  --shadow:     0 4px 24px rgba(0,0,0,0.12);
  --shadow-gold:0 0 32px rgba(212,175,55,0.18);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.35s ease, color 0.35s ease;
  overflow-x: hidden;
}

body > main {
  flex: 1 0 auto;
}

body > footer {
  flex-shrink: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* ── Utility ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 48px);
}

.gold { color: var(--gold); }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(212,175,55,0.1);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 12px;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 99px; }

/* ============================================================
   NAVIGATION
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
  background: rgba(10,13,20,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border), 0 8px 32px rgba(0,0,0,0.4);
}

[data-theme="light"] #navbar.scrolled {
  background: rgba(245,247,250,0.88);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  gap: 32px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--text);
  line-height: 1.1;
}
.logo-text span {
  display: block;
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.2em;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--surface-h);
}

.nav-links a.active { color: var(--gold); }

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.nav-btn:hover {
  background: var(--surface-h);
  border-color: var(--border-h);
  color: var(--gold);
}

/* Search bar */
.nav-search {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-search input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 8px 14px 8px 36px;
  width: clamp(180px, 14vw, 260px);
  outline: none;
  transition: all 0.25s;
}
.nav-search input::placeholder { color: var(--text-3); }
.nav-search input:focus {
  border-color: var(--border-h);
  background: var(--surface-h);
  width: clamp(220px, 18vw, 320px);
}
.nav-search .search-icon {
  position: absolute; left: 11px;
  color: var(--text-3);
  font-size: 0.78rem;
  pointer-events: none;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 38px; height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.hamburger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text-2);
  border-radius: 99px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 10px 14px;
  border-radius: 10px;
  transition: all 0.2s;
}
.mobile-menu a:hover { color: var(--gold); background: var(--surface); }
.mobile-menu .mobile-search {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.mobile-menu .mobile-search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 10px 16px;
  outline: none;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

/* Ambient background */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -20%; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 900px;
  background: radial-gradient(ellipse, rgba(212,175,55,0.07) 0%, transparent 65%);
  pointer-events: none;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}

/* Grid lines */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212,175,55,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,175,55,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 30%, transparent 80%);
}

/* Floating orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.4;
}
.orb-1 {
  width: 400px; height: 400px;
  top: 10%; left: -10%;
  background: radial-gradient(circle, rgba(36,113,163,0.3), transparent);
}
.orb-2 {
  width: 350px; height: 350px;
  top: 20%; right: -8%;
  background: radial-gradient(circle, rgba(192,57,43,0.2), transparent);
}
.orb-3 {
  width: 250px; height: 250px;
  bottom: 20%; left: 30%;
  background: radial-gradient(circle, rgba(212,175,55,0.15), transparent);
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
  padding: 0 24px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.hero-eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text);
}

.hero-title-accent {
  display: block;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold-dim) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.hero-title-accent::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 50%;
  transform: translateX(-50%);
  width: 60%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero-studio {
  display: block;
  font-size: 0.38em;
  font-weight: 400;
  letter-spacing: 0.4em;
  color: var(--text-2);
  margin-bottom: 12px;
}

.hero-tagline {
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: var(--text-2);
  font-weight: 300;
  line-height: 1.6;
  margin: 28px auto 0;
  max-width: 520px;
  letter-spacing: 0.01em;
}

/* Stats strip */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin: 40px 0;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.02em;
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.7rem;
  color: var(--text-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 4px;
  font-family: var(--font-mono);
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
}

/* CTA buttons */
.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  padding: 13px 28px;
  border-radius: var(--radius);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #0A0D14;
  box-shadow: 0 4px 20px rgba(212,175,55,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212,175,55,0.45);
  filter: brightness(1.05);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background: var(--surface-h);
  border-color: var(--border-h);
  color: var(--gold);
  transform: translateY(-2px);
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 0.65rem;
  font-family: var(--font-mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 1;
}
.scroll-mouse {
  width: 20px; height: 32px;
  border: 1.5px solid var(--text-3);
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 5px;
}
.scroll-mouse::before {
  content: '';
  width: 3px; height: 8px;
  background: var(--gold);
  border-radius: 99px;
  animation: scrollDot 1.6s ease-in-out infinite;
}

/* ============================================================
   SECTION COMMON
   ============================================================ */
.section {
  padding: 96px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-eyebrow {
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 14px;
}

.section-desc {
  color: var(--text-2);
  font-size: 0.95rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================================
   FEATURED PROJECTS (placeholder for Part 2)
   ============================================================ */
#featured {
  background: var(--bg-2);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* Project card */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.project-card:hover {
  border-color: var(--border-h);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold), var(--shadow);
}

.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-3);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image-placeholder {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: var(--gold);
  opacity: 0.2;
  letter-spacing: -0.05em;
}

.card-image-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.card-body {
  padding: 20px 22px 22px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.card-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--bg-3);
  padding: 3px 8px;
  border-radius: 6px;
}

.card-badge.released {
  color: #4ADE80;
  background: rgba(74,222,128,0.08);
}

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--text);
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-platforms {
  display: flex;
  gap: 6px;
}

.platform-chip {
  font-size: 0.68rem;
  color: var(--text-3);
  background: var(--bg-3);
  border-radius: 6px;
  padding: 3px 8px;
}

.card-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.2s;
}
.card-link:hover { gap: 9px; }

/* ============================================================
   UPDATES FEED (placeholder for Part 2)
   ============================================================ */
#updates .section-inner {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 60px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 280px 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.footer-brand {}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-tagline {
  font-size: 0.82rem;
  color: var(--text-3);
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 220px;
}

.footer-social {
  display: flex;
  gap: 8px;
}
.social-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.social-btn:hover {
  background: var(--surface-h);
  color: var(--gold);
  border-color: var(--border-h);
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  font-size: 0.83rem;
  color: var(--text-3);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

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

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

.footer-copy span { color: var(--gold); }

.footer-legal {
  display: flex;
  gap: 20px;
}
.footer-legal a {
  font-size: 0.75rem;
  color: var(--text-3);
  transition: color 0.2s;
}
.footer-legal a:hover { color: var(--text); }

/* ============================================================
   RESPONSIVE
   Media queries movidas para css/responsive.css (carregado a
   seguir a este ficheiro em todas as páginas).
   ============================================================ */


/* ============================================================
   TRANSIÇÕES SUAVES ENTRE SECÇÕES
   Em vez de um corte seco (e uma linha) onde duas cores se
   encontram, cada secção "mistura-se" com a vizinha num degradê.
   !important para vencer os estilos inline e a ordem dos CSS.
   ============================================================ */
section[style*="--bg-2"] {
  background: linear-gradient(to bottom,
    var(--bg) 0,
    var(--bg-2) 120px,
    var(--bg-2) calc(100% - 120px),
    var(--bg) 100%) !important;
}
.page-hero,
.project-hero {
  background: linear-gradient(to bottom,
    var(--bg-2) 0,
    var(--bg-2) calc(100% - 100px),
    var(--bg) 100%) !important;
  border-bottom: 0 !important;
}
footer {
  background: linear-gradient(to bottom, var(--bg) 0, var(--bg-2) 90px) !important;
  border-top: 0 !important;
}
@media (max-width: 640px) {
  section[style*="--bg-2"] {
    background: linear-gradient(to bottom,
      var(--bg) 0,
      var(--bg-2) 70px,
      var(--bg-2) calc(100% - 70px),
      var(--bg) 100%) !important;
  }
}

/* ============================================================
   DESCRIÇÕES LONGAS — "Ler mais / Ler menos"
   (js/readmore.js)
   ============================================================ */
.rm-box { position: relative; overflow: hidden; transition: max-height .35s ease; }
/* o texto esbate-se a si próprio (máscara) — funciona sobre qualquer fundo,
   incluindo o banner desfocado, sem faixa de cor */
.rm-box.rm-collapsed {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 1.9em), transparent 100%);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 1.9em), transparent 100%);
}
.rm-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  margin: -10px 0 24px; padding: 6px 2px;
  background: none; border: 0; cursor: pointer;
  font: inherit; font-size: .85rem; font-weight: 700;
  color: var(--gold); letter-spacing: .3px;
}
.rm-toggle:hover { text-decoration: underline; }
.rm-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.rm-toggle i { font-size: .75em; transition: transform .25s ease; }
.rm-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) {
  .rm-box, .rm-toggle i { transition: none; }
}


/* ============================================================
   CAPAS MAIS VIVAS NOS CARTÕES
   (a inclinação 3D e o brilho do rato já vêm de main.js / animations.css)
   ============================================================ */
.card-image { isolation: isolate; }
.card-image-photo {
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), filter .4s ease;
}
.project-card:hover .card-image-photo { transform: scale(1.08); filter: saturate(1.15) contrast(1.03); }

/* sombra suave em baixo para dar profundidade à capa */
.card-image::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .38), transparent 55%);
  opacity: .75; transition: opacity .3s ease;
}
.project-card:hover .card-image::after { opacity: .45; }

/* risco de luz que atravessa a capa ao passar o rato */
.card-image::before {
  content: ''; position: absolute; top: 0; left: -70%; width: 40%; height: 100%; z-index: 2;
  pointer-events: none; transform: skewX(-20deg);
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent);
}
.project-card:hover .card-image::before { animation: card-shine .9s ease; }
@keyframes card-shine { to { left: 140%; } }

/* ============================================================
   BANNER NAS PÁGINAS DE PROJETO
   A capa do projeto aparece desfocada e a derivar devagar por
   trás do título (a variável --hero-img é definida em loader.js).
   ============================================================ */
.project-hero { isolation: isolate; }
.project-hero[style*="--hero-img"]::after {
  content: ''; position: absolute; inset: -40px; z-index: -1; pointer-events: none;
  background-image: var(--hero-img);
  background-size: cover; background-position: center;
  filter: blur(26px) saturate(1.35);
  opacity: .38;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  animation: hero-drift 26s ease-in-out infinite alternate;
}
[data-theme="light"] .project-hero[style*="--hero-img"]::after { opacity: .25; }
@keyframes hero-drift {
  from { transform: scale(1.08) translate(0, 0); }
  to   { transform: scale(1.18) translate(-1.5%, 1.2%); }
}
@media (prefers-reduced-motion: reduce) {
  .project-card:hover .card-image::before,
  .project-hero[style*="--hero-img"]::after { animation: none; }
  .card-image-photo { transition: none; }
}


/* ============================================================
   CARROSSEL DE PROJETOS NO TOPO DA PÁGINA INICIAL
   (preenchido por loadHeroShowcase() em loader.js)
   ============================================================ */
.hero-showcase {
  width: 100%; max-width: 760px; margin: 48px auto 0;
  animation: fadeUp .7s ease both; animation-delay: .75s;
}
.hero-showcase[hidden] { display: none; }
.hs-frame {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius-lg, 18px);
  border: 1px solid var(--border-h, var(--border));
  background: var(--bg-3);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45), 0 0 60px rgba(212, 175, 55, .08);
  touch-action: pan-y;
}
.hs-slide {
  position: absolute; inset: 0; display: block; color: inherit; text-decoration: none;
  opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s;
}
.hs-slide.active { opacity: 1; visibility: visible; z-index: 1; }
.hs-slide img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.02); transition: transform 6s ease-out;
}
.hs-slide.active img { transform: scale(1.09); }
.hs-slide::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(5, 7, 12, .82) 0%, rgba(5, 7, 12, 0) 52%);
}
.hs-cap {
  position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 2;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; text-align: left;
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
}
.hs-cap small {
  font-family: var(--font-mono); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); font-weight: 500;
}
.hs-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(10, 13, 20, .55); border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s, background .2s, border-color .2s;
}
.hs-frame:hover .hs-nav, .hs-nav:focus-visible { opacity: 1; }
.hs-nav:hover { background: rgba(212, 175, 55, .3); border-color: var(--gold); }
.hs-prev { left: 12px; } .hs-next { right: 12px; }
.hs-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.hs-dot {
  width: 8px; height: 8px; padding: 0; border-radius: 99px; cursor: pointer;
  background: var(--text-3); opacity: .5; border: 0; transition: width .3s, background .3s, opacity .3s;
}
.hs-dot.active { width: 26px; background: var(--gold); opacity: 1; }
@media (hover: none) { .hs-nav { display: none; } }
@media (max-width: 640px) {
  .hero-showcase { margin-top: 36px; }
  .hs-cap { font-size: 1rem; left: 14px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hs-slide, .hs-slide img { transition: none; }
  .hs-slide.active img { transform: none; }
}


/* ============================================================
   AVALIAÇÕES NA PÁGINA INICIAL  (loadTestimonials em loader.js)
   ============================================================ */
#testimonials[hidden] { display: none; }
#tm-summary { display: inline-flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap; }
#tm-summary .rv-stars { color: var(--gold); display: inline-flex; gap: 2px; font-size: .9rem; }
#tm-summary .rv-stars i.off { color: var(--text-3); opacity: .45; }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.tm-card {
  position: relative; margin: 0; padding: 26px 24px 22px; overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg, 18px);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
  animation: tm-in .6s ease both;
}
.tm-card:hover { transform: translateY(-4px); border-color: var(--border-h, var(--gold)); box-shadow: var(--shadow-gold, 0 0 30px rgba(212,175,55,.12)); }
.tm-quote { position: absolute; top: 18px; right: 20px; font-size: 2rem; color: var(--gold); opacity: .12; }
.tm-card .rv-stars { color: var(--gold); display: inline-flex; gap: 2px; font-size: .85rem; }
.tm-card .rv-stars i.off { color: var(--text-3); opacity: .45; }
.tm-text {
  margin: 0; color: var(--text-2); font-size: .95rem; line-height: 1.7; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.tm-who { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.tm-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem; color: #1a1a1a; background: var(--gold);
}
.tm-name { display: block; font-weight: 700; color: var(--text); font-size: .92rem; }
.tm-proj { display: block; font-size: .78rem; color: var(--gold); text-decoration: none; }
.tm-proj:hover { text-decoration: underline; }
@keyframes tm-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .tm-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding: 4px 2px 14px; -webkit-overflow-scrolling: touch; }
  .tm-card { flex: 0 0 84%; scroll-snap-align: center; }
}
@media (prefers-reduced-motion: reduce) { .tm-card { animation: none; } }


/* ============================================================
   PARTILHAR PROJETO (js/share.js) + VOLTAR AO TOPO (js/main.js)
   ============================================================ */
.share-btn {
  margin-left: auto; align-self: flex-start; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 99px; cursor: pointer;
  font: inherit; font-size: .82rem; font-weight: 700; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}
.share-btn:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.share-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 640px) { .share-btn span { display: none; } .share-btn { padding: 10px 12px; } }

.cs-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 10001;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 11px 20px; border-radius: 99px; font-size: .88rem; font-weight: 600;
  color: #fff; background: rgba(10, 13, 20, .92); border: 1px solid var(--gold);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .4);
  transition: opacity .25s ease, transform .25s ease;
}
.cs-toast.show { opacity: 1; transform: translate(-50%, 0); }

.back-to-top {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 900;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); background: var(--surface); border: 1px solid var(--border-h, var(--gold));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .3);
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s, background .2s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--gold); color: #1a1a1a; }
.back-to-top:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .back-to-top, .cs-toast { transition: none; } }


/* ============================================================
   ETIQUETA "NOVO" (projetos com data de lançamento nos últimos 30 dias)
   ============================================================ */
.card-badge.new {
  display: inline-flex; align-items: center; gap: 5px;
  color: #1a1a1a; background: linear-gradient(135deg, #F5D76E, var(--gold, #D4AF37));
  font-weight: 700;
  animation: badge-pulse 2.4s ease-in-out infinite;
}
.card-badge.new i { font-size: .8em; }
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, .55); }
  50%      { box-shadow: 0 0 0 7px rgba(212, 175, 55, 0); }
}
@media (prefers-reduced-motion: reduce) { .card-badge.new { animation: none; } }


/* ============================================================
   PRÉ-VISUALIZAÇÃO EM MOVIMENTO NOS CARTÕES (vídeo / GIF)
   ============================================================ */
.card-preview-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; pointer-events: none;
  transition: opacity .45s ease;
}
.card-preview-video.is-playing { opacity: 1; }
