@layer reset, base, components, utilities;

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

  * {
    margin: 0;
  }

  input,
  button {
    font: inherit;
  }
}

@layer base {
  :root {
    --bg: #0b111a;
    --panel: #111b2a;
    --text: #edf2fa;
    --text-muted: #a6b5cb;
    --line: #26384f;
    --accent: #ff6b1a;
    --accent-2: #ffad43;
    --ok: #21cf84;
    --error: #ff7d7d;
    --radius: 18px;
    --container: min(1120px, 92vw);
    --space-1: 0.35rem;
    --space-2: 0.6rem;
    --space-3: 0.9rem;
    --space-4: 1.25rem;
    --hero-bg-desktop: url("wide dobra 1 (1).webp");
    --hero-bg-mobile: url("mobile.webp");
  }

  html {
    scroll-behavior: smooth;
  }

  body {
    font-family: "Outfit", "Trebuchet MS", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: clip;
  }

  h1,
  h2,
  h3,
  .brand {
    font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
    text-wrap: balance;
    letter-spacing: -0.02em;
  }

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

@layer components {
  .backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--hero-bg-desktop) center top / cover no-repeat;
  }

  .top-ribbon {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: linear-gradient(130deg, #ff6b1a 0%, #ff9030 55%, #ffb84d 100%);
    color: #1d0f03;
    text-align: center;
    padding: 0.72rem 0.9rem;
    font-size: clamp(0.94rem, 1.4vw, 1.08rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.15;
    border-bottom: 1px solid rgba(255, 225, 174, 0.5);
    box-shadow: 0 10px 26px rgba(255, 107, 26, 0.28);
  }

  .container {
    width: var(--container);
    margin-inline: auto;
  }

  .hero {
    min-height: calc(100vh - 84px);
    padding: 4.1rem 0 2.4rem;
    display: flex;
    align-items: center;
  }

  .topbar {
    margin-bottom: clamp(1.3rem, 2.6vw, 2.1rem);
  }

  .brand {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.04em;
  }

  .brand-logo {
    width: min(90px, 54vw);
    height: auto;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2.8vw, 2rem);
    align-items: start;
  }

  .hero-copy {
    max-width: 74ch;
    display: grid;
    gap: var(--space-4);
  }

  .badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
  }

  .badge {
    border: 1px solid rgba(255, 173, 67, 0.75);
    color: #ffe2b4;
    background: rgba(255, 173, 67, 0.12);
    border-radius: 999px;
    padding: 0.38rem 0.66rem;
    font-size: 0.84rem;
    font-weight: 700;
  }

  .hero-copy h1 {
    font-size: clamp(2rem, 5.2vw, 4rem);
    line-height: 1.06;
    max-width: 16ch;
  }

  .hero-copy h2 {
    font-size: clamp(1.04rem, 2.15vw, 1.34rem);
    font-weight: 500;
    color: #d4e0f0;
    max-width: 58ch;
    line-height: 1.44;
  }

  .desktop-cta {
    display: inline-flex;
    margin-top: var(--space-2);
    align-self: start;
    justify-self: start;
    width: fit-content;
    max-width: 100%;
  }

  .lead-form {
    border: 1px solid #3a5270;
    border-radius: var(--radius);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    padding: 1.15rem;
    display: grid;
    gap: var(--space-4);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
  }

  .field {
    display: grid;
    gap: var(--space-2);
  }

  .lead-form label {
    font-size: 0.88rem;
    color: #d6e3f5;
    font-weight: 600;
  }

  .lead-form input {
    width: 100%;
    border: 1px solid #4f6990;
    border-radius: 12px;
    padding: 0.78rem 0.86rem;
    background: #111f31;
    color: var(--text);
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
  }

  .lead-form input:focus {
    border-color: color-mix(in oklab, var(--accent-2) 78%, white 8%);
    box-shadow: 0 0 0 3px rgba(255, 173, 67, 0.2);
  }

  .btn {
    margin-top: 0;
    border: none;
    border-radius: 12px;
    padding: 0.88rem 1.02rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-align: center;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  }

  .btn:hover {
    transform: translateY(-1px);
  }

  .btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
  }

  .btn-primary {
    margin-top: 0;
    color: #1f1105;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 24px rgba(255, 107, 26, 0.3);
  }

  .btn-ghost {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    padding-inline: 1.1rem;
  }

  .form-msg {
    min-height: 1.24em;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: var(--space-2);
    line-height: 1.45;
  }

  .form-msg.success {
    color: var(--ok);
  }

  .form-msg.error {
    color: var(--error);
  }

  .footer {
    background: #000;
    border-top: 1px solid #171717;
    color: #b9b9b9;
    font-size: 0.88rem;
    padding: 4rem 0 0.78rem;
  }

  .footer .container {
    width: min(1120px, 92vw);
  }

  .footer-wrap {
    display: grid;
    gap: 0.62rem;
  }

  .footer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #1b1b1b;
  }

  .footer-company {
    max-width: 58ch;
  }

  .footer-title {
    color: #f0f0f0;
    font-size: clamp(0.9rem, 1.2vw, 1.02rem);
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    max-width: 52ch;
  }

  .footer-cnpj {
    margin-top: 0.35rem;
    color: #9d9d9d;
    font-size: clamp(0.82rem, 0.95vw, 0.9rem);
    font-weight: 500;
  }

  .footer-seal {
    width: min(205px, 34vw);
    max-height: none;
    object-fit: contain;
    flex-shrink: 0;
  }

  .footer-links {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #1b1b1b;
    font-size: clamp(0.84rem, 0.95vw, 0.92rem);
  }

  .footer-links a {
    color: #dddddd;
  }

  .footer-links a:hover {
    color: #ffffff;
  }

  .footer-legal {
    border: 1px solid #171717;
    border-radius: 10px;
    padding: 0.62rem 0.7rem;
    background: #050505;
  }

  .footer-legal h3 {
    font-size: clamp(0.86rem, 1vw, 0.94rem);
    color: #efefef;
    margin-bottom: 0.35rem;
    line-height: 1.2;
  }

  .footer-legal p {
    color: #8e8e8e;
    font-size: clamp(0.77rem, 0.88vw, 0.84rem);
    line-height: 1.35;
  }

  .footer-copy {
    text-align: center;
    color: #6f6f6f;
    font-size: 0.78rem;
    margin-top: 0.14rem;
  }

  .modal[hidden] {
    display: none;
  }

  .modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 1rem;
  }

  .modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 10, 16, 0.72);
    backdrop-filter: blur(3px);
  }

  .modal__dialog {
    position: relative;
    width: min(520px, 96vw);
    border-radius: 18px;
    border: 1px solid #3b5270;
    background: linear-gradient(160deg, #101b2a, #0d1725);
    padding: 1.2rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  }

  .modal__dialog h3 {
    font-size: clamp(1.2rem, 2.6vw, 1.5rem);
    margin-bottom: 0.9rem;
    max-width: 28ch;
  }

  .modal__close {
    position: absolute;
    top: 0.44rem;
    right: 0.44rem;
    border: 1px solid #334b69;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #0f1b2b;
    color: #cddcf1;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
  }

  .lead-form--modal {
    border: none;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
}

@layer utilities {
  .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 440ms ease, transform 440ms ease;
  }

  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  @media (max-width: 980px) {
    .hero {
      min-height: auto;
      padding: 4rem 0 1.6rem;
    }

    .hero-grid {
      grid-template-columns: 1fr;
    }

    .top-ribbon {
      font-size: 0.88rem;
      padding: 0.62rem 0.68rem;
    }
  }

  @media (max-width: 760px) {
    .backdrop {
      background: var(--hero-bg-mobile) center top / cover no-repeat;
    }

    .hero {
      padding-top: 11rem;
      padding-bottom: 2rem;
    }

    .hero-copy {
      text-align: left;
      justify-items: start;
    }

    .hero-copy h1,
    .hero-copy h2 {
      text-align: left;
    }

    .desktop-cta {
      justify-self: center;
      align-self: center;
      width: min(420px, 100%);
      text-align: center;
      justify-content: center;
      align-items: center;
    }

    .footer {
      padding: 2rem 0 0.6rem;
    }

    .footer .container {
      width: min(1100px, 93vw);
    }

    .footer-wrap {
      gap: 0.54rem;
    }

    .footer-top {
      align-items: flex-start;
      gap: 0.45rem;
      flex-direction: column;
      padding-bottom: 0.45rem;
    }

    .footer-seal {
      width: min(220px, 68vw);
      max-height: none;
      align-self: center;
    }

    .footer-links {
      flex-wrap: wrap;
      row-gap: 0.16rem;
      font-size: 0.79rem;
      padding-bottom: 0.42rem;
      gap: 0.36rem;
    }

    .footer-title {
      font-size: 0.9rem;
      max-width: 100%;
    }

    .footer-cnpj {
      margin-top: 0.22rem;
      font-size: 0.8rem;
    }

    .footer-legal {
      padding: 0.48rem 0.56rem;
      border-radius: 8px;
    }

    .footer-legal h3 {
      font-size: 0.8rem;
      margin-bottom: 0.28rem;
    }

    .footer-legal p {
      font-size: 0.73rem;
      line-height: 1.33;
    }

    .footer-copy {
      font-size: 0.68rem;
      margin-top: 0.06rem;
    }
  }

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

    .reveal,
    .btn,
    .modal__close {
      transition: none;
      transform: none;
      animation: none;
    }
  }
}

body.modal-open {
  overflow: hidden;
}
