/* ==========================================================================
   WEBNIVRA — DESIGN SYSTEM MINIMALISTA & PROFISSIONAL
   Slogan: "Sua marca merece estar online"
   ========================================================================== */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/dm-sans-latin.woff2') format('woff2');
}

:root {
  --bg-page: #ffffff;
  --bg-surface: #f8fafc;
  --bg-subtle: #f1f5f9;
  --bg-card: #ffffff;
  --ink-primary: #0b1b36;
  --ink-secondary: #334155;
  --ink-muted: #64748b;
  --brand-navy: #0b1b36;
  --brand-blue: #1d4ed8;
  --brand-cyan: #0284c7;
  --brand-violet: #6d28d9;
  --brand-gradient: linear-gradient(135deg, #0ea5e9 0%, #2563eb 52%, #7c3aed 100%);
  --border-hairline: #e2e8f0;
  --border-strong: #cbd5e1;
  --error-ink: #b91c1c;
  --error-bg: #fef2f2;
  --success-ink: #047857;
  --success-bg: #ecfdf5;
  --focus-ring: #2563eb;
  --shadow-sm: 0 1px 3px rgba(11, 27, 54, 0.05), 0 1px 2px rgba(11, 27, 54, 0.04);
  --shadow-md: 0 12px 32px -8px rgba(11, 27, 54, 0.08), 0 2px 6px rgba(11, 27, 54, 0.04);
  --shadow-cta: 0 8px 20px -6px rgba(37, 99, 235, 0.4);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

html[data-contrast='high'] {
  --bg-page: #000000;
  --bg-surface: #050a14;
  --bg-subtle: #0b1322;
  --bg-card: #09111b;
  --ink-primary: #ffffff;
  --ink-secondary: #e2e8f0;
  --ink-muted: #cbd5e1;
  --brand-blue: #38bdf8;
  --brand-cyan: #5ce1ff;
  --border-hairline: #38bdf8;
  --border-strong: #ffffff;
  --error-ink: #fca5a5;
  --error-bg: #2a0a0a;
  --focus-ring: #facc15;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-cta: none;
}

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

html {
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--bg-page);
  color: var(--ink-primary);
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-page);
  color: var(--ink-primary);
  overflow-x: clip;
}

h1, h2, h3, h4 {
  font-family: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  color: var(--ink-primary);
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 32px;
  }
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  background: var(--brand-navy);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid var(--focus-ring) !important;
  outline-offset: 3px !important;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-hairline);
}

html[data-contrast='high'] .site-header {
  background: #000000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-img {
  height: 46px;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
  padding: 2px;
}

.brand-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

.brand-name-accent {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-slogan {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 28px;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-link {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink-secondary);
  text-decoration: none;
  padding: 8px 4px;
  transition: color 0.16s ease;
}

.nav-link:hover {
  color: var(--brand-blue);
}

.nav-mobile-bar {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--border-hairline);
  padding: 6px 0;
}

@media (min-width: 768px) {
  .nav-mobile-bar {
    display: none;
  }
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  background: var(--brand-navy);
  color: #ffffff;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.96rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.btn-primary:hover {
  background: var(--brand-blue);
  transform: translateY(-1px);
  box-shadow: var(--shadow-cta);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

html[data-contrast='high'] .btn-primary {
  background: #ffffff;
  color: #000000;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--ink-primary);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.btn-secondary:hover {
  border-color: var(--brand-blue);
  background: var(--bg-surface);
}

.btn-sm {
  min-height: 42px;
  padding: 8px 16px;
  font-size: 0.88rem;
}

/* Badges & Eyebrows */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  color: var(--brand-blue);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gradient-underline {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Typography Scale */
.heading-hero {
  font-size: clamp(2.1rem, 3.5vw + 1rem, 3.45rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.heading-section {
  font-size: clamp(1.65rem, 2.2vw + 0.85rem, 2.45rem);
  line-height: 1.14;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.heading-card {
  font-size: clamp(1.18rem, 1vw + 0.85rem, 1.4rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 700;
}

.text-muted {
  color: var(--ink-muted);
}

.text-secondary {
  color: var(--ink-secondary);
}

/* Sections & Grids */
.section-pad {
  padding: 56px 0;
  border-bottom: 1px solid var(--border-hairline);
}

@media (min-width: 768px) {
  .section-pad {
    padding: 84px 0;
  }
}

.section-surface {
  background-color: var(--bg-surface);
}

.hero-section {
  background-color: var(--bg-surface);
  background-image:
    radial-gradient(circle at 82% 18%, rgba(14, 165, 233, 0.08), transparent 44%),
    radial-gradient(circle at 12% 85%, rgba(124, 58, 237, 0.06), transparent 40%),
    linear-gradient(to right, rgba(203, 213, 225, 0.25) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(203, 213, 225, 0.25) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  border-bottom: 1px solid var(--border-hairline);
  padding: 48px 0 64px;
}

@media (min-width: 1024px) {
  .hero-section {
    padding: 72px 0 88px;
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Cards & Frames */
.card-clean {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.card-clean:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.offer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.offer-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-gradient);
}

/* Browser Window Frame for Showcase & Portfolio */
.browser-frame {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.browser-bar {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-hairline);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.browser-media {
  aspect-ratio: 16 / 10;
  background: var(--bg-subtle);
  overflow: hidden;
  border-bottom: 1px solid var(--border-hairline);
}

.browser-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* Portfolio Tabs & Bento Grid */
.showcase-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.showcase-tab {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.showcase-tab.active,
.showcase-tab:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: var(--bg-subtle);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(12, 1fr);
  }
  .portfolio-item {
    grid-column: span 4;
  }
  .portfolio-item.featured {
    grid-column: span 6;
  }
}

/* Comparison Table */
.table-wrap {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.comp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.comp-table th,
.comp-table td {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-hairline);
  vertical-align: top;
}

.comp-table thead th {
  background: var(--bg-surface);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 0.96rem;
}

.comp-table tr:last-child td,
.comp-table tr:last-child th {
  border-bottom: none;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.16s ease;
}

.faq-item[open] {
  border-color: var(--brand-blue);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-answer {
  padding: 0 24px 20px;
  color: var(--ink-secondary);
  border-top: 1px solid var(--border-hairline);
  padding-top: 16px;
  font-size: 0.96rem;
}

/* Form Elements */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .form-card {
    padding: 36px;
  }
}

.form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-gradient);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--ink-primary);
}

.form-field {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--ink-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-field:focus {
  border-color: var(--brand-blue);
  background: var(--bg-page);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.form-field[aria-invalid='true'] {
  border-color: var(--error-ink);
  background: var(--error-bg);
}

.field-error {
  color: var(--error-ink);
  font-size: 0.86rem;
  font-weight: 600;
}

.alert-error {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--error-bg);
  border: 1px solid var(--error-ink);
  color: var(--error-ink);
  font-size: 0.92rem;
}

.hidden {
  display: none !important;
}

/* Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-hairline);
  padding: 56px 0 36px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

.footer-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.footer-links a:hover {
  color: var(--brand-blue);
}
