/* ==========================================================================
   S&TADV — Silva & Teixeira Advogados
   Core design tokens: colors, typography, spacing, shadows, layout
   ========================================================================== */

/* Webfonts ----------------------------------------------------------------- */
/* Cormorant Garamond — brand-supplied variable font files (local) */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/CormorantGaramond-VariableFont_wght.ttf") format("truetype-variations"),
       url("fonts/CormorantGaramond-VariableFont_wght.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/CormorantGaramond-Italic-VariableFont_wght.ttf") format("truetype-variations"),
       url("fonts/CormorantGaramond-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
/* Inter — brand-supplied variable font files (local) */
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-VariableFont_opsz%2Cwght.ttf") format("truetype-variations"),
       url("fonts/Inter-VariableFont_opsz%2Cwght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Italic-VariableFont_opsz%2Cwght.ttf") format("truetype-variations"),
       url("fonts/Inter-Italic-VariableFont_opsz%2Cwght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* === Color tokens =================================================== */
  /* Surfaces */
  --bg: #f5efe6;              /* primary background — warm bone */
  --bg-2: #ece4d4;            /* secondary background — sand */
  --paper: #faf6ee;           /* premium card / hero surface */

  /* Ink (text) */
  --ink: #0d0a08;             /* near-black, primary text */
  --ink-soft: #2a221c;        /* secondary text */
  --muted: #6b5e51;           /* tertiary / supporting text */

  /* Rules (dividers) */
  --rule: rgba(13, 10, 8, 0.14);
  --rule-strong: rgba(13, 10, 8, 0.32);

  /* Gold accents */
  --gold: #a37a3d;            /* primary accent */
  --gold-soft: #c9a86a;       /* soft accent */
  --gold-deep: #7d5a26;       /* deep / hover accent */

  /* Wood (dark surfaces) */
  --wood: #1f150d;            /* nearly-black gilded brown */
  --wood-2: #2a1d11;          /* wood variant */

  /* === Shadows ======================================================== */
  --shadow-sm: 0 1px 2px rgba(13, 10, 8, 0.06);
  --shadow-md: 0 8px 24px -12px rgba(13, 10, 8, 0.18);
  --shadow-lg: 0 24px 60px -24px rgba(13, 10, 8, 0.32);

  /* === Typography ===================================================== */
  --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* === Layout ========================================================= */
  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 56px);

  /* === Motion ========================================================= */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 220ms;
}

/* ==========================================================================
   Base
   ========================================================================== */
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ==========================================================================
   Type scale — use as semantic classes OR map to h1..h3 directly
   ========================================================================== */
.h1, h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.h2, h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.h3, h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.2;
  color: var(--ink);
}

.lede {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 1.6vw, 24px);
  line-height: 1.4;
  color: var(--ink-soft);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

p, .body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.small {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 0;             /* deliberately square */
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-primary:hover {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
}

.btn-gold {
  background: var(--gold);
  color: var(--paper);
  border-color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  cursor: pointer;
}
.btn-link::after {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: currentColor;
  transition: width var(--dur) var(--ease);
}
.btn-link:hover::after {
  width: 44px;
}

/* ==========================================================================
   Header (fixed, scroll-aware)
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  padding: 18px 0;
  transition: background-color var(--dur) var(--ease),
              backdrop-filter var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(245, 239, 230, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--rule);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}
.brand__name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.brand__sub {
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.nav {
  display: inline-flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color var(--dur) var(--ease);
}
.nav a:hover,
.nav a.active {
  color: var(--gold);
}

.header__cta {
  justify-self: end;
}
.header__cta .btn {
  padding: 10px 18px;
  font-size: 11px;
  letter-spacing: 0.18em;
}
