/* ---------------------------------------------------------
   Half Comunicação — tela de espera
   Fonts: Funnel Display (Google Fonts) for display type,
          Satoshi (Fontshare) for body/UI text.
--------------------------------------------------------- */

@font-face {
  font-family: "Funnel Display";
  src: url("../fonts/FunnelDisplay-Variable.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/Satoshi-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/Satoshi-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/Satoshi-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f8f7f3;
  --ink: #141414;
  --ink-soft: rgba(20, 20, 20, 0.62);
  --ink-faint: rgba(20, 20, 20, 0.4);
  --line: rgba(20, 20, 20, 0.12);
  --radius-pill: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* palette sampled from the brand's gradient art */
  --mesh-orange: #f7975c;
  --mesh-coral: #ef6f86;
  --mesh-magenta: #b23f97;
  --mesh-blue: #4f7fc9;
  --mesh-indigo: #17539e;
  --mesh-cyan: #bfe6f2;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

/* ---------- grain overlay ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- page shell ---------- */

.page {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 4rem);
}

/* ---------- animated gradient mesh ---------- */

.mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--paper);
}

.blob {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  border-radius: 50%;
  background: radial-gradient(circle, var(--color) 0%, transparent 70%);
  opacity: var(--o);
  filter: blur(80px);
}

.blob--a {
  --x: 25%;
  --y: 20%;
  --size: 50vmax;
  --color: var(--mesh-orange);
  --o: 0.39;
}
.blob--b {
  --x: 65%;
  --y: 15%;
  --size: 40vmax;
  --color: var(--mesh-coral);
  --o: 0.35;
}
.blob--c {
  --x: 45%;
  --y: 50%;
  --size: 58vmax;
  --color: var(--mesh-magenta);
  --o: 0.29;
}
.blob--d {
  --x: 20%;
  --y: 75%;
  --size: 46vmax;
  --color: var(--mesh-blue);
  --o: 0.35;
}
.blob--e {
  --x: 70%;
  --y: 78%;
  --size: 40vmax;
  --color: var(--mesh-indigo);
  --o: 0.34;
}
.blob--f {
  --x: 82%;
  --y: 35%;
  --size: 42vmax;
  --color: var(--mesh-cyan);
  --o: 0.39;
}

@media (prefers-reduced-motion: no-preference) {
  .blob--a {
    animation: drift-a 22s ease-in-out infinite;
  }
  .blob--b {
    animation: drift-b 26s ease-in-out infinite;
    animation-delay: -7s;
  }
  .blob--c {
    animation: drift-c 30s ease-in-out infinite;
    animation-delay: -14s;
  }
  .blob--d {
    animation: drift-d 19s ease-in-out infinite;
    animation-delay: -4s;
  }
  .blob--e {
    animation: drift-e 24s ease-in-out infinite;
    animation-delay: -17s;
  }
  .blob--f {
    animation: drift-f 17s ease-in-out infinite;
    animation-delay: -9s;
  }

  /* wide, uneven travel so each orb sweeps well past its neighbours
     and the colors actually cross and blend, not just wobble in place */
  @keyframes drift-a {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(18vw, 10vh) scale(1.15); }
    50% { transform: translate(6vw, 24vh) scale(0.9); }
    75% { transform: translate(-15vw, 9vh) scale(1.05); }
  }
  @keyframes drift-b {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-17vw, 15vh) scale(0.88); }
    50% { transform: translate(-4vw, -11vh) scale(1.12); }
    75% { transform: translate(13vw, 6vh) scale(0.96); }
  }
  @keyframes drift-c {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(15vw, -17vh) scale(1.1); }
    50% { transform: translate(-11vw, -8vh) scale(0.92); }
    75% { transform: translate(-17vw, 11vh) scale(1.06); }
  }
  @keyframes drift-d {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(21vw, -11vh) scale(1.08); }
    50% { transform: translate(10vw, -23vh) scale(0.9); }
    75% { transform: translate(-9vw, -7vh) scale(1.1); }
  }
  @keyframes drift-e {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-19vw, -13vh) scale(0.92); }
    50% { transform: translate(-7vw, -25vh) scale(1.14); }
    75% { transform: translate(11vw, -9vh) scale(0.95); }
  }
  @keyframes drift-f {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-21vw, 13vh) scale(1.12); }
    50% { transform: translate(-9vw, -15vh) scale(0.88); }
    75% { transform: translate(-19vw, 5vh) scale(1.05); }
  }
}

/* ---------- header ---------- */

.header {
  display: flex;
  align-items: center;
  padding-top: clamp(1.5rem, 3vh, 2.5rem);
  height: 4.5rem;
}

.logo img {
  height: 30px;
  width: auto;
}

/* ---------- hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem 0;
}

.hero h1 {
  font-family: "Funnel Display", "Satoshi", sans-serif;
  font-weight: 600;
  font-size: clamp(2.75rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}

.hero p {
  font-family: "Funnel Display", "Satoshi", sans-serif;
  font-size: clamp(1.25rem, 1.3vw, 1.15rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34ch;
  margin: 0 auto 2.5rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  white-space: nowrap;
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  font-family: "Funnel Display", "Satoshi", sans-serif;
  font-weight: 500;
  font-size: 1rem;
  height: 3.25rem;
  padding: 0 1.6rem;
  border-radius: 0;
  text-decoration: none;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease),
    color 0.3s var(--ease);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

/* ---------- footer ---------- */

.footer {
  padding-bottom: clamp(1.5rem, 3vh, 2.25rem);
  font-size: 0.8rem;
  color: var(--ink-faint);
  text-align: center;
}

/* ---------- entrance motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .header,
  .hero h1,
  .hero p,
  .cta-row,
  .footer {
    animation: rise 0.8s var(--ease) both;
  }
  .header {
    animation-delay: 0s;
  }
  .hero h1 {
    animation-delay: 0.08s;
  }
  .hero p {
    animation-delay: 0.18s;
  }
  .cta-row {
    animation-delay: 0.28s;
  }
  .footer {
    animation-delay: 0.4s;
  }

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

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .header {
    justify-content: center;
  }

  .page {
    grid-template-rows: auto 1fr auto;
  }

  .hero {
    max-width: 100%;
    padding: 2rem 0;
  }

  .hero p {
    max-width: 42ch;
  }
}

@media (max-width: 480px) {
  .cta-row {
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
