/* Base: tokens de design, elementos HTML, utilitários e animações de entrada. */

/* Tokens de design */

:root {
  --color-primary: #fa5929;
  --color-primary-hover: #e94a1b;
  --color-primary-strong: #c73e14;
  --color-primary-soft: rgba(250, 89, 41, 0.14);
  --color-ink: #281010;
  --color-text: #3b3b3b;
  --color-muted: #6b6262;
  --color-white: #ffffff;
  --color-cream: #f8f3ec;
  --color-peach: #fbe1ce;
  --color-mint: #c4dac8;
  --color-lavender: #e1e3f6;
  --color-yellow: #febf03;
  --color-border: rgba(70, 72, 77, 0.1);
  --color-border-strong: rgba(40, 16, 16, 0.16);
  --color-dashed: rgba(40, 16, 16, 0.22);
  --color-overlay: rgba(28, 14, 10, 0.6);
  --color-success: #2f7a4a;
  --color-danger: #c4321b;

  --font-display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-heading: "Geist", "Segoe UI", system-ui, sans-serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --font-button: "Barlow", "Segoe UI", system-ui, sans-serif;

  --fs-display: clamp(2rem, 3.3vw, 3rem);
  --fs-h2: clamp(1.75rem, 2.9vw, 2.625rem);
  --fs-h3: clamp(1.375rem, 1.9vw, 1.75rem);
  --fs-title-lg: 1.5rem;
  --fs-title: 1.25rem;
  --fs-subtitle: 1.125rem;
  --fs-lead: 1.125rem;
  --fs-body: 1rem;
  --fs-body-sm: 0.9375rem;
  --fs-small: 0.875rem;
  --fs-xs: 0.8125rem;
  --fs-label: 0.75rem;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3rem;
  --space-9: 4rem;
  --space-10: 5rem;
  --section-space: clamp(4rem, 8vw, 6.25rem);

  --container: 1320px;
  --gutter: clamp(1rem, 4.2vw, 3.75rem);
  --header-h: 76px;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(40, 16, 16, 0.06);
  --shadow-md: 0 18px 40px -22px rgba(40, 16, 16, 0.3);
  --shadow-lg: 0 30px 70px -30px rgba(40, 16, 16, 0.45);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --duration: 0.3s;
}

/* Elementos base */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 48px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.has-drawer {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--color-ink);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

img {
  height: auto;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

::selection {
  background: var(--color-peach);
  color: var(--color-ink);
}

/* Utilitários */

.icon {
  flex-shrink: 0;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  background: var(--color-ink);
  color: var(--color-white);
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform var(--duration) var(--ease);
}

.skip-link:focus {
  transform: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.focus-right {
  object-position: 72% 40%;
}

.focus-top {
  object-position: 50% 20%;
}

.list-reset {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-space);
}

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

.section--flush-top {
  padding-top: 0;
}

/* Cabeçalhos de secção */

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.lead {
  font-size: var(--fs-lead);
}

.eyebrow {
  display: block;
  margin-bottom: var(--space-4);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-primary-strong);
}

.eyebrow--light {
  color: rgba(255, 255, 255, 0.72);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: end;
  gap: var(--space-6) var(--space-9);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head__aside {
  display: grid;
  justify-items: start;
  gap: var(--space-5);
  max-width: 460px;
  justify-self: end;
}

.section-head__aside p,
.section-head > p {
  max-width: 460px;
  justify-self: end;
  font-size: var(--fs-lead);
}

/* Animações de entrada */

[data-reveal] {
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}

[data-reveal].is-pending {
  opacity: 0;
  transform: translateY(28px);
}

[data-reveal-stagger] > [data-reveal]:nth-child(2) {
  transition-delay: 0.08s;
}

[data-reveal-stagger] > [data-reveal]:nth-child(3) {
  transition-delay: 0.16s;
}

[data-reveal-stagger] > [data-reveal]:nth-child(4) {
  transition-delay: 0.24s;
}

[data-reveal-stagger] > [data-reveal]:nth-child(5) {
  transition-delay: 0.32s;
}

[data-reveal-stagger] > [data-reveal]:nth-child(6) {
  transition-delay: 0.4s;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

[data-reveal="media"] {
  overflow: hidden;
  clip-path: inset(0 0 0 0 round var(--radius-lg));
  transition:
    clip-path 1.2s var(--ease),
    opacity 0.6s var(--ease);
}

[data-reveal="media"].is-pending {
  opacity: 1;
  transform: none;
  clip-path: inset(16% 0 0 0 round var(--radius-lg));
}

[data-reveal="media"] img {
  transition: transform 1.6s var(--ease);
}

[data-reveal="media"].is-pending img {
  transform: scale(1.14);
}

[data-parallax] {
  will-change: transform;
}

/* Responsivo */

@media (max-width: 900px) {
  .section-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .section-head__aside,
  .section-head__aside p,
  .section-head > p {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 64px;
  }

  body {
    font-size: var(--fs-body-sm);
  }
}
