/* ============================================
   DMC Advogados — Shared Styles
   Monocromático + acentos (laranja / azul piscina)
   ============================================ */

:root {
  /* Base mono */
  --ink: oklch(0.18 0.012 250);
  --ink-2: oklch(0.32 0.012 250);
  --ink-3: oklch(0.48 0.010 250);
  --ink-4: oklch(0.65 0.008 250);
  --rule: oklch(0.92 0.004 250);
  --rule-2: oklch(0.96 0.003 250);
  --paper: oklch(0.995 0.002 85);
  --paper-2: oklch(0.985 0.003 85);
  --paper-3: oklch(0.97 0.004 85);

  /* Acentos */
  --orange: oklch(0.72 0.16 55);
  --orange-soft: oklch(0.88 0.08 60);
  --teal: oklch(0.70 0.10 210);
  --teal-soft: oklch(0.90 0.05 210);

  /* Accent active (overridden by Tweaks JS) */
  --accent: var(--orange);
  --accent-soft: var(--orange-soft);

  /* Intensity (overridden by Tweaks) */
  --accent-on-text: 0;        /* 0..1 — tint headlines */
  --accent-on-bg: 0;          /* 0..1 — tinted section bgs */
  --accent-rule: 1;           /* rule/line tinting */

  /* Type scale */
  --f-display: 'Manrope', 'Söhne', 'Neue Haas Grotesk', ui-sans-serif, system-ui, sans-serif;
  --f-body: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;

  /* Spacing */
  --container: 1400px;
  --gutter: 28px;

  /* Transitions */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

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

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--paper); }

/* Custom focus styles — replace browser's default purple/blue outline */
:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.btn:focus-visible,
.tweaks-opt:focus-visible {
  outline-offset: 3px;
  border-radius: 999px;
}

.brand:focus-visible,
.brand__logo:focus-visible {
  outline-offset: 6px;
  border-radius: 2px;
}

/* ============ Layout ============ */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-wide {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============ Typography ============ */

.display {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 0.98;
}

.h-hero {
  font-size: clamp(48px, 7vw, 104px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.96;
}

.h-section {
  font-size: clamp(36px, 4.5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.h-page {
  font-size: clamp(40px, 5.5vw, 84px);
  font-weight: 500;
  letter-spacing: -0.032em;
  line-height: 1.0;
}

.h-feature {
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.h-card {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.eyebrow-num {
  font-family: var(--f-mono);
  font-size: 11px;
  color: color-mix(in oklch, var(--ink-3), var(--accent) calc(var(--accent-rule) * 60%));
}

.body-lg {
  font-size: clamp(18px, 1.3vw, 22px);
  line-height: 1.5;
  color: var(--ink-2);
  font-weight: 400;
}

.body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
}

.body-sm {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-3);
}

.mono {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* ============ Header ============ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: color-mix(in oklch, var(--paper), transparent 8%);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  height: 152px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  transition: height 0.35s var(--ease);
}

.site-header.scrolled .site-header__inner {
  height: 112px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__logo {
  height: 96px;
  width: auto;
  display: block;
  transition: height 0.35s var(--ease);
}

.site-header.scrolled .brand__logo {
  height: 72px;
}

/* When the page has a cinematic hero, header floats over it in light tones */
body:has(.hero--cinematic) .site-header:not(.scrolled) .brand__logo {
  filter: invert(1) brightness(1.1);
}

body:has(.hero--cinematic) .site-header:not(.scrolled) .nav a {
  color: oklch(0.85 0.01 250 / 0.85);
}

body:has(.hero--cinematic) .site-header:not(.scrolled) .nav a:hover {
  color: var(--paper);
}

body:has(.hero--cinematic) .site-header:not(.scrolled) .header-cta__phone {
  color: oklch(0.85 0.01 250 / 0.85);
}

body:has(.hero--cinematic) .site-header:not(.scrolled) .header-cta .btn {
  background: transparent;
  color: var(--paper);
  border-color: oklch(0.85 0.01 250 / 0.4);
}

body:has(.hero--cinematic) .site-header:not(.scrolled) .header-cta .btn:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

body:has(.hero--cinematic) .site-header:not(.scrolled) .hamburger span {
  background: var(--paper);
}

.nav {
  display: flex;
  gap: 4px;
  justify-self: center;
}

.nav a {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  position: relative;
  transition: color 0.2s var(--ease);
  white-space: nowrap;
}

.nav a:hover { color: var(--ink); }

.nav a::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px; bottom: 4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav a:hover::after,
.nav a.active::after { transform: scaleX(1); }

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

.header-cta {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-cta__phone {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-3);
}

/* ============ Buttons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--f-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  background: var(--ink);
  color: var(--paper);
  white-space: nowrap;
}

.btn:hover {
  background: var(--accent);
  color: var(--paper);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--light {
  background: var(--paper);
  color: var(--ink);
}

.btn--light:hover {
  background: var(--accent);
  color: var(--paper);
}

.btn--sm { padding: 10px 16px; font-size: 13px; }

.btn .arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}

.btn:hover .arrow { transform: translateX(4px); }

/* Arrow link (inline) */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.link-arrow:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.link-arrow .arrow { transition: transform 0.3s var(--ease); }
.link-arrow:hover .arrow { transform: translateX(3px); }

/* ============ Section Rails ============ */

.section {
  padding: 120px 0;
}

.section-sm { padding: 80px 0; }

.section-xs { padding: 48px 0; }

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 32px;
}

.section-label__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}

.section-label__line {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ============ Footer ============ */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 96px 0 32px;
}

.site-footer a { color: var(--paper); opacity: 0.75; transition: opacity 0.2s; }
.site-footer a:hover { opacity: 1; color: var(--accent); }

.footer-logo {
  height: 120px;
  width: auto;
  margin-bottom: 28px;
  filter: invert(1) brightness(1.1);
  opacity: 0.95;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 72px;
  border-bottom: 1px solid oklch(0.25 0.01 250);
}

.footer-col h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(0.65 0.01 250);
  margin-bottom: 20px;
  font-weight: 500;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { font-size: 14px; }

.footer-lead {
  font-family: var(--f-display);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 520px;
  margin-bottom: 32px;
}

.footer-lead span { color: var(--accent); }

.footer-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 28px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: oklch(0.55 0.01 250);
  letter-spacing: 0.02em;
}

.footer-meta a:hover { color: var(--accent); }

/* ============ Utility ============ */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

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

.hr { height: 1px; background: var(--rule); border: 0; }

.caps { text-transform: uppercase; letter-spacing: 0.06em; }

.accent { color: var(--accent); }

/* Page transitions */
.page {
  animation: pageIn 0.5s var(--ease);
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Placeholders */
.placeholder {
  background:
    repeating-linear-gradient(
      135deg,
      var(--paper-2) 0 10px,
      var(--paper-3) 10px 20px
    );
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
}

.placeholder--dark {
  background:
    repeating-linear-gradient(
      135deg,
      oklch(0.22 0.012 250) 0 10px,
      oklch(0.26 0.012 250) 10px 20px
    );
  color: oklch(0.6 0.01 250);
  border: 1px solid oklch(0.3 0.01 250);
}

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 18px;
  box-shadow: 0 30px 80px -20px oklch(0.1 0 0 / 0.25),
              0 10px 30px -10px oklch(0.1 0 0 / 0.15);
  padding: 20px;
  z-index: 200;
  font-size: 13px;
  display: none;
}

.tweaks-panel.open { display: block; animation: pageIn 0.3s var(--ease); }

.tweaks-panel h3 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tweaks-row { margin-bottom: 18px; }
.tweaks-row:last-child { margin-bottom: 0; }

.tweaks-label {
  display: block;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.tweaks-opts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tweaks-opt {
  padding: 7px 11px;
  font-family: var(--f-display);
  font-size: 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
  background: var(--paper);
  color: var(--ink-2);
  transition: all 0.2s;
}

.tweaks-opt.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.tweaks-opt--swatch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tweaks-swatch {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid oklch(0 0 0 / 0.1);
}

/* ============ Hamburger ============ */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: 8px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============ Mobile nav overlay ============ */

.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--ink);
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 48px var(--gutter);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.mobile-nav.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.mobile-nav__link {
  font-family: var(--f-display);
  font-size: clamp(32px, 9vw, 52px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--paper);
  padding: 12px 0;
  border-bottom: 1px solid oklch(0.28 0.01 250);
  display: block;
  transition: color 0.2s var(--ease), padding-left 0.3s var(--ease);
}

.mobile-nav__link:hover {
  color: var(--accent);
  padding-left: 12px;
}

.mobile-nav__cta {
  margin-top: 48px;
}

.mobile-nav__meta {
  margin-top: 24px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: oklch(0.55 0.01 250);
  text-transform: uppercase;
}

/* WhatsApp button */
.btn--wa {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
  gap: 10px;
}
.btn--wa:hover {
  background: #1ebe5d;
  border-color: #1ebe5d;
  color: #fff;
}

@media (max-width: 900px) {
  .hamburger { display: flex; }
  .site-header__inner { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .header-cta__phone { display: none; }
  .header-cta > .btn--sm { display: none; }
}

/* Responsive (non-mobile-nav rules) */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .section { padding: 80px 0; }
  .tweaks-panel { left: 16px; right: 16px; width: auto; bottom: 16px; }
}
