/* ==========================================================================
   Silva Cred — página de links (mobile-first)
   ========================================================================== */

/* ---------- Fontes (hospedadas localmente, subset latin) ---------- */
@font-face {
  font-family: "Lora";
  src: url("../assets/fonts/lora-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  --navy-950: #0f1626;
  --navy-800: #17233f;
  --navy-600: #243b66;
  --gold-400: #e0b87a;
  --gold-500: #d4a96a;
  --gold-ink: #2b2012;
  --gold-muted: #a67d41;
  --paper: #f6f2ea;
  --text-soft: #d3d9e6;
  --text-muted: #b6bdcb;
  --footer-bg: #181f30;

  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --font-body:
    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --space-page: 1.25rem;
  --radius: 0.375rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* --- Headings --------------------------------------------------- */
  --font-size-24-48: clamp(1.5rem, calc(1.041rem + 2.294vw), 3rem);
  --font-size-22-36: clamp(1.375rem, calc(1.107rem + 1.338vw), 2.25rem);
  --font-size-18-28: clamp(1.125rem, calc(0.934rem + 0.956vw), 1.75rem);
  --font-size-18-24: clamp(1.13rem, calc(1.01rem + 0.574vw), 1.5rem);
  --font-size-16-24: clamp(1rem, calc(0.847rem + 0.765vw), 1.5rem);

  /* --- Body / Parágrafo -------------------------------------------- */
  --font-size-16-18: clamp(1rem, calc(0.962rem + 0.191vw), 1.125rem);
  --font-size-15-24: clamp(0.9375rem, calc(0.765rem + 0.86vw), 1.5rem);
  --font-size-15-18: clamp(0.9375rem, calc(0.88rem + 0.287vw), 1.125rem);
  --font-size-14-18: clamp(0.875rem, calc(0.799rem + 0.382vw), 1.125rem);
  --font-size-14-16: clamp(0.875rem, calc(0.837rem + 0.191vw), 1rem);
  --font-size-11-15: clamp(0.6875rem, calc(0.611rem + 0.382vw), 0.9375rem);

  /* --- Caption / Small text ----------------------------------------- */
  --font-size-13-16: clamp(0.8125rem, calc(0.755rem + 0.287vw), 1rem);
  --font-size-12-18: clamp(0.75rem, calc(0.635rem + 0.574vw), 1.125rem);
  --font-size-12-16: clamp(0.75rem, calc(0.674rem + 0.382vw), 1rem);
  --font-size-12-15: clamp(0.75rem, calc(0.693rem + 0.287vw), 0.9375rem);
  --font-size-12-14: clamp(0.75rem, calc(0.712rem + 0.191vw), 0.875rem);

  /* --- Micro --------------------------------------------------------- */
  --font-size-10-14: clamp(0.625rem, calc(0.549rem + 0.382vw), 0.875rem);
  --font-size-10-12: clamp(0.625rem, calc(0.587rem + 0.191vw), 0.75rem);

  /* --- Base estáticos -------------------------------------------------- */
  --font-size-base: 1rem;
  --font-size-small: 0.75rem;
}

/* ---------- Base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

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

ul,
ol {
  list-style-type: none;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--navy-950);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--paper);
  background-color: var(--navy-950);
  background-image: radial-gradient(
    120% 55% at 50% 36%,
    var(--navy-600) 0%,
    var(--navy-800) 42%,
    var(--navy-950) 82%
  );
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
h1,
p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Acessibilidade ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  padding: 0.625rem 1rem;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--navy-950);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus-visible {
  transform: none;
}

:focus-visible {
  outline: 3px solid var(--paper);
  outline-offset: 3px;
}

/* ---------- Layout ---------- */
.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: 32rem;
  margin-inline: auto;
  padding-top: max(clamp(2.5rem, 11vh, 5.5rem), env(safe-area-inset-top));
  padding-bottom: 2.5rem;
  padding-left: max(var(--space-page), env(safe-area-inset-left));
  padding-right: max(var(--space-page), env(safe-area-inset-right));
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
}

.hero__logo {
  width: clamp(65px, calc(50.927px + 4.398vw), 111px);
  height: auto;
  margin-inline: auto;
  margin-block-end: clamp(2rem, calc(1.694rem + 1.53vw), 3rem);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--font-size-24-48);
  line-height: 1.1;
  text-wrap: balance;
  color: var(--paper);
  margin-block-end: 1rem;
}

.hero__lead {
  margin-block-end: clamp(1.5rem, calc(1.347rem + 0.765vw), 2rem);
  font-size: var(--font-size-12-14);
  /* line-height: 1.5; */
  text-wrap: balance;
  color: var(--text-soft);
}

/* ---------- Botões de link ---------- */
.links {
  display: grid;
  gap: 1rem;
  /* margin-top: 2.25rem; */
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  min-height: 3.5rem;
  padding: clamp(16px, calc(13.553px + 0.765vw), 24px)
    clamp(16px, calc(13.553px + 0.765vw), 24px)
    clamp(16px, calc(13.553px + 0.765vw), 24px)
    clamp(32px, calc(27.105px + 1.53vw), 48px);
  /* border-radius: var(--radius); */
  background: var(--gold-500);
  color: var(--gold-ink);
  font-size: var(--font-size-14-16);
  font-weight: 450;
  line-height: 1.25;
  text-align: center;
  touch-action: manipulation;
  transition:
    background-color 0.18s ease,
    transform 0.18s var(--ease);
}

.btn__icon {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--gold-muted);
}

.btn:active {
  background: var(--gold-400);
  transform: scale(0.985);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    background: var(--gold-400);
  }
}

/* ---------- Redes sociais ---------- */
.social {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

.social li + li {
  border-left: 1px solid rgb(255 255 255 / 0.16);
}

.social__link {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  color: var(--text-soft);
  border-radius: 50%;
  transition: color 0.18s ease;
}

.social__link svg {
  width: 1.75rem;
  height: 1.75rem;
}

@media (hover: hover) and (pointer: fine) {
  .social__link:hover {
    color: var(--gold-500);
  }
}

/* ---------- Rodapé ---------- */
.footer {
  flex: none;
  padding: 1rem max(var(--space-page), env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(var(--space-page), env(safe-area-inset-left));
  background: var(--footer-bg);
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.55;
  text-align: center;
}

.footer p {
  max-width: 30rem;
  margin-inline: auto;
  text-wrap: balance;
}

.footer span {
  white-space: nowrap;
}

/* ---------- Movimento: uma única entrada orquestrada ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero {
    animation: fade-in 0.7s ease both;
  }

  .links li {
    animation: rise 0.6s var(--ease) both;
    animation-delay: calc(0.25s + var(--i, 0) * 0.07s);
  }

  @keyframes fade-in {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(0.5rem);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* ---------- Telas maiores (desktop abre a página centralizada) ---------- */
@media (min-width: 40em) {
  .page {
    padding-top: clamp(3rem, 12vh, 6rem);
  }
  .btn {
    font-size: 1.125rem;
  }
}

/* ---------- Alto contraste do sistema ---------- */
@media (forced-colors: active) {
  .btn {
    border: 1px solid ButtonText;
  }
  .btn__icon {
    color: ButtonText;
  }
}

/* ---------- Impressão ---------- */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  .social,
  .skip-link {
    display: none;
  }
  .btn {
    border: 1px solid #000;
    background: none;
    color: #000;
  }
}
