/*
 * DV Digital - Base CSS
 * Pure B&W Premium Aesthetic
 */

:root {
  /* DARK MODE (Default per requirement) */
  --bg-color: #000000;
  --bg-secondary: #0a0a0a;
  --text-color: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --border-color: rgba(255, 255, 255, 0.15);
  --border-light: rgba(255, 255, 255, 0.05);

  --btn-bg: #ffffff;
  --btn-text: #000000;
  --btn-hover-bg: rgba(255, 255, 255, 0.9);

  --shadow-color: rgba(255, 255, 255, 0.05);
  --glow-color: rgba(255, 255, 255, 0.1);
  
  --overlay-bg: rgba(0, 0, 0, 0.85);
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-hover-bg: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
  /* LIGHT MODE */
  --bg-color: #ffffff;
  --bg-secondary: #f5f5f5;
  --text-color: #000000;
  --text-muted: rgba(0, 0, 0, 0.7);
  --border-color: rgba(0, 0, 0, 0.15);
  --border-light: rgba(0, 0, 0, 0.05);

  --btn-bg: #000000;
  --btn-text: #ffffff;
  --btn-hover-bg: rgba(0, 0, 0, 0.85);

  --shadow-color: rgba(0, 0, 0, 0.08);
  --glow-color: rgba(0, 0, 0, 0.1);
  
  --overlay-bg: rgba(255, 255, 255, 0.85);
  --card-bg: #ffffff; 
  --card-hover-bg: rgba(0, 0, 0, 0.02);
}

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

html {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(3rem, 5vw, 5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
  font-size: 1.75rem;
}

p {
  font-size: 1.125rem;
  color: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

ul {
  list-style: none;
}

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

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px; /* Minimal border radius */
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: 0 4px 14px var(--shadow-color);
}

.btn-primary:hover {
  background-color: var(--btn-hover-bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--glow-color);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background-color: var(--text-color);
  color: var(--bg-color);
  transform: translateY(-2px);
}

/* Header & Nav */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--bg-color); /* solid initially */
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
  padding: 20px 0;
}

.header.scrolled {
  background-color: var(--overlay-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap; /* Prevent logo and menu from wrapping wrongly */
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 40px; /* Increased height for better visibility */
  width: auto;
}

.logo-light, .logo-dark {
  display: none;
}

[data-theme="dark"] .logo-dark {
  display: block;
}

[data-theme="light"] .logo-light {
  display: block;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Theme Toggle Button */
/* Redesigned Animated Theme Toggle (Switch) */
.theme-toggle {
  background: var(--bg-color);
  border: 1.5px solid var(--text-color);
  color: var(--text-color);
  width: 75px;
  height: 34px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  padding: 2px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.toggle-knob {
  width: 28px;
  height: 28px;
  background-color: var(--text-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 2;
}

/* OFF State (Dark Mode - Default) */
[data-theme="dark"] .toggle-knob {
  transform: translateX(0);
}

[data-theme="dark"] .toggle-knob::after {
  content: 'OFF';
  font-size: 8px;
  font-weight: 800;
  color: var(--bg-color);
}

/* ON State (Light Mode) */
[data-theme="light"] .toggle-knob {
  transform: translateX(41px);
}

[data-theme="light"] .toggle-knob::after {
  content: 'ON';
  font-size: 9px;
  font-weight: 800;
  color: var(--bg-color);
}

/* Hover effects */
.theme-toggle:hover {
  box-shadow: 0 0 10px rgba(128, 128, 128, 0.3);
}

[data-theme="light"] .theme-toggle:hover {
  background-color: #f0f0f0;
}

[data-theme="dark"] .theme-toggle:hover {
  background-color: #1a1a1a;
}

/* Icons */
.icon-moon, .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: block; }

/* Hero Specifics */
.hero-bg {
  position: relative;
  margin-top: 80px; /* Shift below the fixed header (aprox 80px) */
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  padding-top: 40px; /* Small padding for inner content balance */
  background-image: url('../../banner/webp/desktop-modo-escuro.webp');
  background-size: cover;
  background-position: right 20%; /* Pushes the head down slightly */
  background-repeat: no-repeat;
  overflow: hidden;
  box-shadow: inset 0 0 150px rgba(0,0,0,0.4); /* Subtle vignette to hide image edge color anomalies */
}

/* Linear-gradient overlay: Drastically restricted to the left to avoid touching the person */
.hero-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 25%, rgba(0,0,0,0) 55%); /* Slightly wider for safety */
  z-index: 1;
}

[data-theme="light"] .hero-bg {
  background-image: url('../../banner/webp/desktop-modo-claro.webp');
}

[data-theme="light"] .hero-bg::before {
  background: linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.6) 25%, rgba(255,255,255,0) 55%);
}

.hero-bg .container {
  position: relative;
  z-index: 2;
}

.hero-title {
  max-width: 900px;
  margin-bottom: 24px;
}

.hero-description {
  font-size: 1.25rem;
  max-width: 650px;
  margin-bottom: 40px;
}

.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Media Queries for Responsiveness (Basic) */



/* Global Animations */
.js-enabled .fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.21, 0.6, 0.35, 1), 
              transform 0.6s cubic-bezier(0.21, 0.6, 0.35, 1);
  will-change: opacity, transform;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Cards Base */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 32px;
  transition: all 0.3s ease;
}

.card:hover {
  background-color: var(--card-hover-bg);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow-color);
  border-color: var(--text-muted);
}

/* Sub-Footer */
.sub-footer {
  height: 50px;
  background-color: var(--text-color);
  color: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sub-footer p {
  color: var(--bg-color);
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sub-logo-light, .sub-logo-dark {
  display: none;
  height: 24px;
  width: auto;
  transform: translateY(-3px);
}
[data-theme="light"] .sub-logo-light {
  display: block;
}
[data-theme="dark"] .sub-logo-dark {
  display: block;
}

/* Footer Grid Overrides for Desktop Alignment */
.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 48px;
  margin-bottom: 60px;
}
@media (min-width: 900px) {
  .footer-links-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .footer-nav-col {
    justify-self: center;
  }
  .footer-contact-col {
    justify-self: end;
  }
}

/* Portfolio */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 40px;
}

.portfolio-card {
  position: relative;
  overflow: visible;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: 0 18px 50px var(--shadow-color);
}

.portfolio-card-link {
  display: block;
  color: inherit;
}

.portfolio-card-link:hover {
  opacity: 1;
}

[data-theme="light"] .portfolio-card:hover {
  border-color: rgba(0, 0, 0, 0.18);
}

.portfolio-url-badge {
  position: absolute;
  top: 17px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: max-content;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-color);
  z-index: 10;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .portfolio-url-badge {
  background-color: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

.portfolio-card:hover .portfolio-url-badge {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
}

[data-theme="light"] .portfolio-card:hover .portfolio-url-badge {
  background-color: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.2);
}

.portfolio-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  background: linear-gradient(180deg, #111111, #0a0a0a);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.portfolio-card--landscape .portfolio-visual {
  min-height: 278px;
  padding: 56px 104px 42px 24px;
  overflow: visible;
  background:
    radial-gradient(circle at left top, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent);
}

.portfolio-browser {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-right: auto;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background-color: #0b0b0b;
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

[data-theme="light"] .portfolio-browser {
  background-color: #f6f6f6;
}

.portfolio-browser-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 46px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-light);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .portfolio-browser-bar {
  background-color: rgba(0, 0, 0, 0.03);
}

.portfolio-browser-dots {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.portfolio-browser-dots span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.35);
}

[data-theme="light"] .portfolio-browser-dots span {
  background-color: rgba(0, 0, 0, 0.18);
}



.portfolio-browser-screen {
  padding: 2px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 42%),
    #080808;
}

.portfolio-desktop-shot {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  margin-right: auto;
  background-color: #080808;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.portfolio-mobile-frame {
  position: absolute;
  right: 20px;
  bottom: 30px;
  z-index: 2;
  width: clamp(92px, 24%, 124px);
  padding: 3px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #161616, #060606);
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.45),
    0 12px 24px rgba(0, 0, 0, 0.25),
    -8px 8px 30px rgba(0, 0, 0, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.portfolio-mobile-notch {
  display: block;
  width: 40%;
  height: 9px;
  margin: 0 auto 10px;
  border-radius: 0 0 10px 10px;
  background-color: #060606;
}

.portfolio-mobile-screen {
  overflow: hidden;
  border-radius: 9px 9px 24px 24px;
  aspect-ratio: 9 / 19.5;
  background-color: #000000;
}

.portfolio-mobile-shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.portfolio-card--landscape .portfolio-desktop-shot {
  aspect-ratio: auto;
}

.portfolio-card--portrait .portfolio-visual {
  min-height: 392px;
  padding-right: 84px;
  overflow: hidden;
  border-radius: inherit;
  isolation: isolate;
}

.portfolio-card--portrait .portfolio-browser {
  max-width: min(82%, 336px);
}

.portfolio-card--portrait .portfolio-desktop-shot {
  aspect-ratio: auto;
}

.portfolio-card--portrait .portfolio-browser-bar {
  min-height: 54px;
}

.portfolio-card--portrait .portfolio-browser-label {
  font-size: 0.58rem;
  line-height: 1.2;
}

.portfolio-card--portrait .portfolio-mobile-frame {
  right: 12px;
  bottom: 14px;
  width: clamp(76px, 19%, 98px);
}

.portfolio-card--portrait {
  overflow: hidden;
}

.portfolio-card--portrait .portfolio-browser,
.portfolio-card--portrait .portfolio-browser-screen,
.portfolio-card--portrait .portfolio-mobile-frame {
  border-radius: inherit;
}

.portfolio-card--portrait .portfolio-url-badge {
  right: 84px;
}

.portfolio-card--portrait .portfolio-mobile-screen {
  border-radius: 8px 8px 20px 20px;
}

.portfolio-content {
  padding: 28px 24px 24px;
}

.portfolio-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.portfolio-category {
  margin-bottom: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portfolio-title {
  font-size: 1.35rem;
  white-space: nowrap;
}

.portfolio-badge {
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

[data-theme="light"] .portfolio-badge {
  background-color: rgba(0, 0, 0, 0.03);
}

.portfolio-description {
  margin-bottom: 22px;
  font-size: 0.98rem;
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Services */
.service-img-container {
  aspect-ratio: 5 / 3.5;
  background-color: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.service-img-container:hover {
  transform: translateY(-5px);
  border-color: var(--text-muted);
  box-shadow: 0 15px 35px var(--shadow-color);
}

.service-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.service-img-container:hover img {
  transform: scale(1.05);
}

/* === Form Validation === */
.form-control.is-invalid {
  border-color: var(--text-color) !important;
  opacity: 0.7;
}

.error-message {
  color: var(--text-color);
  font-size: 0.85rem;
  margin-top: 4px;
  opacity: 0.7;
  animation: fadeInError 0.3s ease;
}

@keyframes fadeInError {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
