/* ==========================================================================
   TSEL STUDIO — Minimalist Luxury Cinematic AI Portfolio
   Clean, Authoritative, Editorial Canvas for US & Global Market
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600&family=Syne:wght@400;500;700;800&display=swap');

/* Decorative brand relief; keeps the existing content and palette intact. */
.tech-intro {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
  align-items: center;
  gap: 48px;
}
.brand-sculpture {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  perspective: 900px;
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 45%, #ffffff08, transparent 68%);
}
.brand-sculpture::after {
  content: '';
  position: absolute;
  width: 65%;
  height: 9%;
  bottom: 4%;
  left: 18%;
  border-radius: 50%;
  background: #000;
  filter: blur(12px);
  opacity: .6;
}
.brand-sculpture-object {
  position: absolute;
  inset: 5%;
  transform-style: preserve-3d;
  transform: rotateX(var(--brand-rx, 12deg)) rotateY(var(--brand-ry, -18deg));
  transition: transform 650ms cubic-bezier(.16, 1, .3, 1);
}
.brand-sculpture-face, .brand-sculpture-layer {
  position: absolute;
  inset: 0;
  -webkit-mask: url('../assets/tsel-symbol-black.png') center / contain no-repeat;
  mask: url('../assets/tsel-symbol-black.png') center / contain no-repeat;
}
.brand-sculpture-layer {
  background: linear-gradient(135deg, #737377, #171719 40%, #525255 72%, #a2a2a5);
  transform: translateZ(var(--layer-z));
}
.brand-sculpture-face {
  transform: translateZ(14px);
  background:
    radial-gradient(ellipse at var(--brand-lx, 28%) var(--brand-ly, 20%), #ffffff90, transparent 52%),
    linear-gradient(135deg, #b0b0b3 0%, #444447 23%, #19191c 48%, #626267 74%, #bcbcbf 100%);
}
@media (max-width: 767px) {
  .tech-intro { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .brand-sculpture { width: 180px; justify-self: center; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-sculpture-object { transition: none; }
}

:root {
  --bg: #FFFFFF;
  --text: #050505;
  --text-muted: #71717A;
  --border-light: #E4E4E7;
  --border-dark: #18181B;
  --font-display: 'Syne', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Grotesk', monospace;
  --font-editorial: 'Instrument Serif', Georgia, serif;
  --ease-cinema: cubic-bezier(0.16, 1, 0.3, 1);
  --lime: #d4ff00;
}

.font-editorial {
  font-family: 'Instrument Serif', Georgia, serif;
}

.btn-neon-lime {
  background-color: #d4ff00;
  color: #000000;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px -4px rgba(212, 255, 0, 0.35);
}

.btn-neon-lime:hover {
  background-color: #e2ff3b;
  transform: translateY(-1px);
  box-shadow: 0 6px 25px 0 rgba(212, 255, 0, 0.45);
}

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

html {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  position: relative;
}

/* Subtle Film Texture */
.cinema-grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Typography Hierarchy */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.0;
  color: var(--text);
}

/* Responsive Hero Title */
.hero-title-responsive {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.96;
  font-size: clamp(2.5rem, 6.5vw, 5.5rem);
  text-wrap: balance;
  transition: font-size 0.25s ease, line-height 0.25s ease;
}

/* Specific calibration when switched to Portuguese (prevents stretched/huge layout) */
html[lang="pt"] .hero-title-responsive,
body.lang-pt .hero-title-responsive {
  font-size: clamp(1.85rem, 4.4vw, 3.85rem) !important;
  line-height: 1.05 !important;
  letter-spacing: -0.025em !important;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

/* Balanced chapter titles in Portuguese */
html[lang="pt"] .project-chapter h2,
body.lang-pt .project-chapter h2 {
  font-size: clamp(1.85rem, 4.2vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

/* Balanced section titles in Portuguese */
html[lang="pt"] #studio h2,
body.lang-pt #studio h2,
html[lang="pt"] #technology h2,
body.lang-pt #technology h2 {
  font-size: clamp(1.85rem, 3.8vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.font-mono-tag {
  font-family: var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

/* Selection */
::selection {
  background: #000000;
  color: #FFFFFF;
}

/* Minimalist Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: #FFFFFF;
}
::-webkit-scrollbar-thumb {
  background: #E4E4E7;
}
::-webkit-scrollbar-thumb:hover {
  background: #000000;
}

/* ==========================================================================
   Surge Animations & Blur Transitions
   ========================================================================== */

/* Hero Big Surge: starts below and blurred, rises up powerfully */
.hero-surge {
  opacity: 0;
  filter: blur(28px);
  transform: translateY(80px) scale(0.96);
  animation: heroSurgeUp 1.4s var(--ease-cinema) forwards;
}

@keyframes heroSurgeUp {
  0% {
    opacity: 0;
    filter: blur(28px);
    transform: translateY(80px) scale(0.96);
  }
  100% {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0) scale(1);
  }
}

/* Scroll Triggered Blur Reveal */
.blur-reveal {
  opacity: 0;
  filter: blur(20px);
  transform: translateY(40px);
  transition: opacity 1s var(--ease-cinema),
              filter 1s var(--ease-cinema),
              transform 1s var(--ease-cinema);
  will-change: opacity, filter, transform;
}

.blur-reveal.revealed {
  opacity: 1;
  filter: blur(0px);
  transform: translateY(0);
}

/* Aspect Ratio Containers */
.aspect-cinema {
  aspect-ratio: 2.39 / 1;
}

/* Widescreen Theater Frame */
.theater-frame {
  position: relative;
  overflow: hidden;
  background: #000000;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.18);
}

.theater-frame video,
.theater-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sound Indicator Pill */
.sound-toggle-btn {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s var(--ease-cinema);
  cursor: pointer;
}

.sound-toggle-btn:hover {
  background: #FFFFFF;
  color: #000000;
  border-color: #000000;
}

/* Audio Waveform Bars */
.audio-bar {
  display: inline-block;
  width: 2px;
  background: currentColor;
  border-radius: 1px;
  animation: audioWave 1.2s ease-in-out infinite alternate;
}

.audio-bar:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.audio-bar:nth-child(2) { height: 12px; animation-delay: 0.3s; }
.audio-bar:nth-child(3) { height: 16px; animation-delay: 0.2s; }
.audio-bar:nth-child(4) { height: 8px; animation-delay: 0.4s; }

@keyframes audioWave {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

.audio-muted .audio-bar {
  animation: none !important;
  transform: scaleY(0.2) !important;
  opacity: 0.4;
}

/* ==========================================================================
   Composition Stills Interactive 3D Cards
   ========================================================================== */
.composition-card {
  position: relative;
  overflow: hidden;
  background: #000000;
  border: 1px solid #E4E4E7;
  cursor: pointer;
  perspective: 1000px;
  transition: transform 0.4s var(--ease-cinema), box-shadow 0.4s var(--ease-cinema), border-color 0.4s ease;
}

.composition-card:hover {
  border-color: #000000;
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.25);
  z-index: 10;
}

.composition-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-cinema), filter 0.6s ease;
  will-change: transform;
}

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

/* Mouse Hover Specular Glow */
.composition-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.25) 0%, transparent 65%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.composition-card:hover::after {
  opacity: 1;
}

/* High-End Clean Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: #000000;
  color: #FFFFFF;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid #18181b;
  box-shadow: 0 4px 15px -2px rgba(0, 0, 0, 0.2);
  transition: all 0.25s var(--ease-cinema);
  text-decoration: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #18181b;
  color: #FFFFFF;
  border-color: #3f3f46;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: #FFFFFF;
  color: #000000;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid #d4d4d8;
  transition: all 0.25s var(--ease-cinema);
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: #000000;
  background: #f4f4f5;
  color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.08);
}

/* Sound Toggle Button & Animated Audio Bars */
.sound-toggle-btn {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s var(--ease-cinema);
}

.sound-toggle-btn:hover {
  background: #000000;
  border-color: #d4ff00;
  color: #d4ff00;
  transform: translateY(-1px);
}

.sound-toggle-btn .audio-bar {
  display: inline-block;
  width: 2.5px;
  height: 100%;
  background-color: #d4ff00;
  border-radius: 1px;
  animation: soundBarDance 0.8s ease-in-out infinite alternate;
}

.sound-toggle-btn .audio-bar:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.sound-toggle-btn .audio-bar:nth-child(2) { height: 90%; animation-delay: 0.3s; }
.sound-toggle-btn .audio-bar:nth-child(3) { height: 60%; animation-delay: 0.2s; }
.sound-toggle-btn .audio-bar:nth-child(4) { height: 100%; animation-delay: 0.4s; }

.sound-toggle-btn.audio-muted .audio-bar {
  animation: none !important;
  height: 2.5px !important;
  background-color: #71717a !important;
}

.sound-toggle-btn.audio-muted {
  border-color: rgba(255, 255, 255, 0.15);
  color: #d4d4d8;
}

/* Chapter Dedicated Audio Toggle (Crisp, High-Contrast Clickable Button) */
.chapter-sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.35rem;
  padding: 0 0.95rem;
  background: #09090b;
  color: #ffffff;
  border: 1px solid #27272a;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.chapter-sound-btn:hover {
  background: #18181b;
  border-color: #52525b;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.chapter-sound-btn:active {
  transform: scale(0.97);
}

.chapter-sound-btn .audio-bar {
  display: inline-block;
  width: 2.5px;
  background-color: #d4ff00;
  border-radius: 1px;
  animation: soundBarDance 0.7s ease-in-out infinite alternate;
}

.chapter-sound-btn .audio-bar:nth-child(1) { height: 7px; animation-delay: 0.1s; }
.chapter-sound-btn .audio-bar:nth-child(2) { height: 14px; animation-delay: 0.3s; }
.chapter-sound-btn .audio-bar:nth-child(3) { height: 10px; animation-delay: 0.2s; }

.chapter-sound-btn.audio-muted {
  background: #18181b;
  color: #f4f4f5;
  border-color: #3f3f46;
}

.chapter-sound-btn.audio-muted .audio-bar {
  animation: none !important;
  height: 3px !important;
  background-color: #a1a1aa !important;
}

.chapter-sound-btn:not(.audio-muted) {
  background: #000000;
  color: #d4ff00;
  border-color: #d4ff00;
  box-shadow: 0 0 14px rgba(212, 255, 0, 0.25);
}

/* Chapter Behance Button */
.chapter-behance-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 2.35rem;
  padding: 0 0.95rem;
  background: #ffffff;
  color: #09090b;
  border: 1px solid #d4d4d8;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.chapter-behance-btn:hover {
  background: #f4f4f5;
  border-color: #09090b;
  color: #000000;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.chapter-behance-btn:active {
  transform: scale(0.97);
}

@keyframes soundBarDance {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

/* Nav Blur */
.nav-glass {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Lightbox Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-cinema);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: #FFFFFF;
  width: 100%;
  max-width: 1200px;
  max-height: 94vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: translateY(30px) scale(0.98);
  transition: transform 0.4s var(--ease-cinema);
}

.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
}

/* Floating Chat Drawer */
.chat-drawer {
  position: fixed;
  bottom: 5.5rem;
  right: 2rem;
  width: 370px;
  max-width: calc(100vw - 3rem);
  height: 500px;
  max-height: calc(100vh - 8rem);
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  box-shadow: 0 25px 70px -15px rgba(0, 0, 0, 0.2);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s var(--ease-cinema);
}

.chat-drawer.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 640px) {
  .chat-drawer {
    right: 1rem;
    left: 1rem;
    width: auto;
    bottom: 5rem;
  }
}

/* ==========================================================================
   Google Translate Smooth Integration (Zero Layout Shift)
   ========================================================================== */
.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
}

body {
  top: 0px !important;
  position: static !important;
}

.goog-tooltip,
.goog-tooltip:hover {
  display: none !important;
}

.goog-text-highlight {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#google_translate_element {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  overflow: hidden;
}
/* Clear cut-glass relief with moving internal highlights. */
.brand-sculpture{background:radial-gradient(ellipse at 50% 48%,#ffffff0c,transparent 66%)}
.brand-sculpture-layer{background:linear-gradient(135deg,#f0f4f730,#66727c0c 25%,#ffffff70 48%,#b7c5ce16 52%,#ffffff20);opacity:.55}
.brand-sculpture-face{background:radial-gradient(ellipse at var(--brand-lx,28%) var(--brand-ly,20%),#ffffffed 0%,#eff8ff44 12%,transparent 46%),linear-gradient(125deg,#eff7ff88,#ffffff09 24%,#e6f2ff50 25%,#ffffff08 40%,#ffffffc0 41%,#a9bbc530 43%,#ffffff08 65%,#f4faff99 80%,#ffffff12);filter:drop-shadow(0 1px 1px #fff7)}
.brand-sculpture-face::before,.brand-sculpture-face::after{content:'';position:absolute;inset:0;background:linear-gradient(112deg,transparent 30%,#ffffff08 40%,#ffffffd9 42%,#ffffff18 44%,transparent 54%);background-size:210% 160%;background-position:var(--brand-lx,28%) var(--brand-ly,20%);mix-blend-mode:screen;opacity:.8}
.brand-sculpture-face::after{background-image:conic-gradient(from 25deg at var(--brand-lx,28%) var(--brand-ly,20%),transparent 0deg,#fff8 2deg,transparent 9deg,transparent 165deg,#fff5 170deg,transparent 181deg);opacity:.35}
.brand-sculpture-layer{opacity:.035}
.brand-sculpture-layer:first-child{opacity:.35;background:linear-gradient(130deg,#e9f4ff55,#fff04 35%,#ffffffaa 49%,#fff08 52%,#e9f4ff44)}
.brand-sculpture-face{background:radial-gradient(ellipse at var(--brand-lx,28%) var(--brand-ly,20%),#ffffffa0 0%,#eff8ff16 14%,transparent 40%),linear-gradient(125deg,#eff7ff45,#ffffff03 24%,#e6f2ff22 25%,#ffffff03 40%,#ffffff9a 41%,#a9bbc510 43%,#ffffff03 65%,#f4faff44 80%,#ffffff08)}
#chat-drawer [hidden]{display:none!important}#chat-drawer> :not(#chat-messages){flex-shrink:0}#chat-messages{min-height:80px}#chat-form input{min-width:0}#chat-drawer .attachment-controls{padding:8px!important;gap:6px!important}#chat-drawer .attachment-controls button{font-size:11px!important}#chat-drawer{height:570px;overflow:hidden}
/* One compact composer row: emoji, attachment, message, microphone, send. */
#chat-form{gap:4px;padding:9px 10px;align-items:center}#chat-form .composer-icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:36px;flex:0 0 32px;padding:0;border:0;background:transparent;color:#707070;border-radius:7px;cursor:pointer}#chat-form .composer-icon:hover{background:#e9e9e9;color:#111}#chat-form .composer-icon.is-recording{color:#ba2929;background:#fceeee}#chat-input{width:0;min-width:0;flex:1;border-radius:7px}#chat-form>button[type=submit]{display:flex;align-items:center;justify-content:center;width:34px;height:36px;flex:0 0 34px;border-radius:7px}#chat-form .composer-icon:focus-visible{outline:2px solid #555;outline-offset:1px}
