/* Esquadro Ads, site v1. Direção e tokens: docs/design-direction.md. Raízes: docs/css-namespaces.md. */
@layer fonts, reset, tokens, base, components;

/* Fontes locais do kit (subset latin com preload; latin-ext só baixa se aparecer o caractere). */
@layer fonts {
  @font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 100 900;
    font-display: optional;
    src: url(../fonts/montserrat/montserrat-100-900-normal-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  }
  @font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(../fonts/montserrat/montserrat-100-900-normal-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
  }
  @font-face {
    font-family: 'Montserrat Fallback';
    src: local('Arial');
    size-adjust: 112.18%;
    ascent-override: 86.29%;
    descent-override: 22.38%;
    line-gap-override: 0%;
  }
  @font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 100 1000;
    font-display: optional;
    src: url(../fonts/dm-sans/dm-sans-100-1000-normal-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  }
  @font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url(../fonts/dm-sans/dm-sans-100-1000-normal-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
  }
  @font-face {
    font-family: 'DM Sans Fallback';
    src: local('Arial');
    size-adjust: 104.38%;
    ascent-override: 95.04%;
    descent-override: 29.70%;
    line-gap-override: 0%;
  }
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
  ul, ol { padding: 0; list-style: none; }
  img, svg { display: block; max-width: 100%; height: auto; }
  a { color: inherit; }
}

@layer tokens {
  :root {
    --paper: #f6f2ea;
    --paper-2: #efe8db;
    --surface: #ffffff;
    --ink: #17140f;
    --muted: #5c554a;
    --line: rgba(23, 20, 15, .12);

    --night: #0d0c0a;
    --night-2: #171511;
    --ink-inv: #f6f2ea;
    --muted-inv: #b9b2a5;
    --line-inv: rgba(246, 242, 234, .14);

    --accent: #f1af1d;
    --accent-hover: #f6c04a;
    --accent-ink: #17140f;
    --accent-deep: #8a5d00;

    --font-display: 'Montserrat', 'Montserrat Fallback', system-ui, sans-serif;
    --font-body: 'DM Sans', 'DM Sans Fallback', system-ui, sans-serif;

    --r-control: 4px;
    --r-card: 6px;
    --wrap: 1180px;
    --gutter: clamp(20px, 5vw, 40px);
    --section: clamp(64px, 10vw, 112px);
    --shadow: 0 1px 2px rgba(23, 20, 15, .06), 0 12px 32px -12px rgba(23, 20, 15, .22);
  }
}

@layer base {
  html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-bottom: 88px;
  }
  body {
    background: var(--paper);
    color: var(--ink);
    font: 400 1.0625rem/1.6 var(--font-body);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }
  h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; }
  p { text-wrap: pretty; }
  a { text-underline-offset: .18em; }
  :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
  .is-dark { background: var(--night); color: var(--ink-inv); }
  .wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
  .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .h2 {
    font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -.03em;
  }
  .lead { font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); color: var(--muted); max-width: 60ch; }
  .is-dark .lead { color: var(--muted-inv); }

  .nowrap { white-space: nowrap; }
  @media (min-width: 900px) {
    html { scroll-padding-bottom: 0; }
  }
}

@layer components {
  /* pular para o conteúdo */
  .skip {
    position: absolute; left: 12px; top: -60px; z-index: 50;
    background: var(--accent); color: var(--accent-ink); padding: 10px 14px;
    border-radius: var(--r-control); font-weight: 700; text-decoration: none;
  }
  .skip:focus { top: 12px; }

  /* botão: dourado com texto escuro (contraste 9:1) */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; padding: 12px 22px;
    background: var(--accent); color: var(--accent-ink);
    border-radius: var(--r-control);
    font: 700 1rem/1.2 var(--font-body);
    text-decoration: none; text-align: center;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 8px 22px -10px rgba(241, 175, 29, .55);
    transition: background-color .15s ease, transform .15s ease;
  }
  .btn:hover { background: var(--accent-hover); }
  .btn:active { transform: translateY(1px); }
  .btn.is-large { min-height: 56px; padding: 16px 26px; font-size: 1.0625rem; }
  .btn.is-small { min-height: 40px; padding: 8px 14px; font-size: .9375rem; box-shadow: none; }
  .btn__icon { flex: none; }

  /* topo */
  .topbar { border-bottom: 1px solid var(--line-inv); }
  .topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
  .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-inv); }
  .brand__mark { width: 47px; height: auto; }
  .brand__name { font: 800 1.0625rem/1 var(--font-display); letter-spacing: -.02em; }

  /* herói */
  .hero { padding-block: clamp(36px, 7vw, 88px) 0; overflow: hidden; }
  .hero__in { display: grid; gap: 40px; align-items: center; }
  .hero__tag {
    color: var(--accent); font-weight: 700; font-size: .9375rem; letter-spacing: .01em;
    margin-bottom: 14px;
  }
  .hero__title {
    font-size: clamp(2.375rem, 1.4rem + 4.6vw, 4.5rem);
    font-weight: 800; letter-spacing: -.035em; line-height: 1.02;
    max-width: 14ch;
  }
  .hero__lead { margin-top: 20px; font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem); color: var(--muted-inv); max-width: 54ch; }
  .hero__actions { margin-top: 28px; display: grid; gap: 14px; justify-items: start; }
  .hero__note { font-size: .9375rem; color: var(--muted-inv); max-width: 46ch; }
  .hero__note a { color: var(--ink-inv); }

  .hero__figure { justify-self: center; width: min(100%, 440px); margin-top: 8px; }
  .hero__stage { position: relative; aspect-ratio: 440 / 530; }
  .hero__sheet {
    position: absolute; right: 0; top: 0; width: 64%;
    transform: rotate(4deg); transform-origin: top right;
    border-radius: 3px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7);
    outline: 1px solid rgba(255, 255, 255, .1); outline-offset: -1px;
  }
  .hero__phone {
    position: absolute; left: 4%; top: 6%; width: 54%;
    filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .55));
  }
  .hero__caption { margin-top: 14px; font-size: .9375rem; color: var(--muted-inv); text-align: center; }
  .square { /* esquadro: canto em L dourado, o dispositivo da marca */
    position: absolute; z-index: 2; width: 44px; height: 44px;
    border-top: 3px solid var(--accent); border-left: 3px solid var(--accent);
    pointer-events: none;
  }
  .hero__stage .square { left: calc(4% - 12px); top: calc(6% - 12px); }

  .audience {
    display: flex; flex-wrap: wrap; gap: 8px 10px;
    margin-top: 40px; padding-block: 22px 28px;
    border-top: 1px solid var(--line-inv);
  }
  .audience li {
    font-size: .875rem; font-weight: 600; color: var(--ink-inv);
    padding: 6px 12px; border: 1px solid var(--line-inv); border-radius: 999px;
  }

  /* problemas */
  .pains { padding-block: var(--section); }
  .pains__in { display: grid; gap: 40px; }
  .pains__head .lead { margin-top: 14px; }
  .pains__list { border-top: 1px solid var(--line); }
  .pains__item { padding-block: 22px; border-bottom: 1px solid var(--line); }
  .pains__title { font-size: 1.1875rem; font-weight: 700; letter-spacing: -.015em; }
  .pains__item p { margin-top: 6px; color: var(--muted); }
  .pains__art { display: grid; gap: 24px; }
  .art img {
    width: 100%; border-radius: var(--r-card); box-shadow: var(--shadow);
    outline: 1px solid rgba(0, 0, 0, .08); outline-offset: -1px;
  }
  .art figcaption { margin-top: 10px; font-size: .9375rem; color: var(--muted); }

  /* serviços */
  .services { padding-block: var(--section); background: var(--paper-2); }
  .services__head .lead { margin-top: 14px; }
  .services__grid { display: grid; gap: 16px; margin-top: 36px; }
  .service {
    background: var(--surface); border-radius: var(--r-card); padding: 26px 24px;
    border: 1px solid var(--line);
  }
  .service.is-main { background: var(--night-2); color: var(--ink-inv); border-color: var(--night-2); padding: 30px 26px; }
  .service__tag { font-size: .875rem; font-weight: 700; color: var(--accent-deep); margin-bottom: 8px; }
  .service.is-main .service__tag { color: var(--accent); }
  .service__title { font-size: 1.375rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px; }
  .service.is-main .service__title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
  .service p { color: var(--muted); }
  .service.is-main p { color: var(--muted-inv); }
  .service.is-main .service__note { margin-top: 18px; font-size: .9375rem; color: var(--muted-inv); }

  .checks { margin-top: 18px; display: grid; gap: 10px; }
  .checks li { position: relative; padding-left: 30px; }
  .checks li::before { /* esquadro pequeno no lugar do ponto */
    content: ""; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px;
    border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
    transform: rotate(-45deg);
  }

  /* diagnóstico (a oferta, na banda escura) */
  .diag { padding-block: var(--section); }
  .diag__in { display: grid; gap: 44px; align-items: start; }
  .diag__figure { position: relative; max-width: 420px; justify-self: center; width: 100%; }
  .diag__figure img { width: 100%; border-radius: 3px; box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .8); }
  .diag__figure .square { left: -10px; top: -10px; }
  .diag__figure figcaption { margin-top: 12px; font-size: .875rem; color: var(--muted-inv); }
  .diag__copy .lead { margin-top: 14px; }
  .diag__label {
    font: 700 .875rem/1.3 var(--font-body); color: var(--accent);
    margin-top: 32px; margin-bottom: 12px;
  }
  .diag__list { border-top: 1px solid var(--line-inv); }
  .diag__list div { padding-block: 14px; border-bottom: 1px solid var(--line-inv); display: grid; gap: 2px; }
  .diag__list dt { font-weight: 700; color: var(--ink-inv); }
  .diag__list dd { color: var(--muted-inv); }
  .diag__get { display: grid; gap: 0 32px; }
  .diag__get p { color: var(--muted-inv); }
  .diag__copy > .btn { margin-top: 32px; }

  /* como funciona: a régua */
  .steps { padding-block: var(--section); }
  .steps__track { margin-top: 36px; display: grid; gap: 28px; position: relative; padding-left: 52px; counter-reset: passo; }
  .steps__track::before { /* régua vertical no celular */
    content: ""; position: absolute; left: 17px; top: 4px; bottom: 4px; width: 10px;
    background:
      repeating-linear-gradient(to bottom, var(--accent-deep) 0 2px, transparent 2px 40px) left / 10px 100% no-repeat,
      repeating-linear-gradient(to bottom, var(--accent-deep) 0 1px, transparent 1px 8px) left / 5px 100% no-repeat;
    border-left: 2px solid var(--accent-deep);
  }
  .step { position: relative; }
  .step__mark {
    position: absolute; left: -52px; top: -4px;
    width: 36px; height: 36px; display: grid; place-items: center;
    background: var(--night); color: var(--accent);
    font: 800 1rem/1 var(--font-display); border-radius: var(--r-control);
  }
  .step__title { font-size: 1.1875rem; font-weight: 700; letter-spacing: -.015em; }
  .step p { margin-top: 6px; color: var(--muted); }

  .promise {
    margin-top: 48px; padding: 26px 24px; background: var(--surface);
    border: 1px solid var(--line); border-left: 4px solid var(--accent-deep); border-radius: var(--r-card);
  }
  .promise__title { font-size: 1.1875rem; font-weight: 800; letter-spacing: -.015em; }
  .promise__list { margin-top: 14px; display: grid; gap: 10px; }
  .promise__list li { position: relative; padding-left: 22px; color: var(--muted); }
  .promise__list li::before {
    content: ""; position: absolute; left: 1px; top: .5em; width: 8px; height: 8px; background: var(--accent-deep);
  }

  /* quem atende */
  .about { padding-block: var(--section); background: var(--paper-2); }
  .about__in { display: grid; gap: 32px; align-items: center; }
  .about__photo { max-width: 360px; width: 100%; }
  .about__photo img {
    width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%;
    border-radius: var(--r-card); box-shadow: var(--shadow);
    outline: 1px solid rgba(0, 0, 0, .08); outline-offset: -1px;
  }
  .about__quote {
    margin-top: 18px; font: 600 clamp(1.25rem, 1.05rem + .9vw, 1.625rem)/1.4 var(--font-display);
    letter-spacing: -.015em; max-width: 30ch;
  }
  .contact { margin-top: 26px; display: grid; gap: 10px; }
  .contact li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
  .contact__k { font-size: .875rem; font-weight: 700; color: var(--accent-deep); min-width: 84px; }
  .contact a { font-weight: 600; overflow-wrap: anywhere; }

  /* perguntas */
  .faq { padding-block: var(--section); }
  .faq__in { display: grid; gap: 28px; align-items: start; }
  .faq__list { border-top: 1px solid var(--line); }
  .faq details { border-bottom: 1px solid var(--line); }
  .faq summary {
    cursor: pointer; list-style: none; position: relative;
    padding: 20px 44px 20px 0; font-weight: 700; font-size: 1.0625rem;
  }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after {
    content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; margin-top: -9px;
    border-right: 2.5px solid var(--accent-deep); border-bottom: 2.5px solid var(--accent-deep);
    transform: rotate(45deg); transition: transform .15s ease;
  }
  .faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
  .faq details p { padding-bottom: 22px; color: var(--muted); max-width: 64ch; }

  /* fecho e rodapé */
  .footer { padding-top: var(--section); }
  .closing { text-align: center; display: grid; justify-items: center; gap: 18px; padding-bottom: var(--section); }
  .closing__title {
    font-size: clamp(1.875rem, 1.3rem + 2.6vw, 3rem); font-weight: 800; letter-spacing: -.03em; max-width: 20ch;
  }
  .closing__text { color: var(--muted-inv); max-width: 48ch; font-size: 1.125rem; }
  .closing .btn { margin-top: 8px; }
  .closing__alt { font-size: .9375rem; color: var(--muted-inv); }
  .closing__alt a { color: var(--ink-inv); }

  .footer__in {
    display: grid; gap: 16px; padding-block: 32px 36px;
    border-top: 1px solid var(--line-inv); font-size: .9375rem; color: var(--muted-inv);
  }
  .footer__links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
  .footer__links a { color: var(--ink-inv); }
  .footer__copy { font-size: .875rem; padding-bottom: 76px; /* espaço da barra fixa do celular */ }

  /* barra fixa do celular */
  .sticky-cta {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 52px; padding: 12px 16px;
    background: var(--accent); color: var(--accent-ink);
    border-radius: var(--r-control); font-weight: 700; text-decoration: none;
    box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .5);
  }

  .footer__copy.is-plain { padding-bottom: 0; }

  /* política de privacidade */
  .legal { padding-block: clamp(40px, 7vw, 80px) var(--section); }
  .legal__in { max-width: 760px; }
  .legal__back { font-size: .9375rem; margin-bottom: 24px; }
  .legal__title { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); font-weight: 800; letter-spacing: -.03em; }
  .legal__date { margin-top: 10px; color: var(--muted); }
  .legal h2 { font-size: 1.3125rem; font-weight: 800; letter-spacing: -.015em; margin-top: 40px; }
  .legal p { margin-top: 12px; color: var(--ink); }
  .legal a { color: var(--accent-deep); font-weight: 600; }

  /* página não encontrada */
  .notfound { min-height: 100vh; display: grid; place-items: center; padding-block: 64px; }
  .notfound__in { display: grid; justify-items: center; gap: 18px; text-align: center; }
  .notfound__mark { width: 96px; margin-bottom: 8px; }

  @media (min-width: 640px) {
    .services__grid { grid-template-columns: 1fr 1fr; }
    .service.is-main { grid-column: 1 / -1; }
    .pains__art { grid-template-columns: 1fr 1fr; }
    .diag__get { grid-template-columns: 1fr 1fr; }
  }

  @media (min-width: 900px) {
    .sticky-cta { display: none; }
    .footer__copy { padding-bottom: 0; }
    .hero__in { grid-template-columns: 1.1fr .9fr; gap: 56px; }
    .hero__figure { margin-top: 0; }
    .audience { margin-top: 64px; }

    .pains__in { grid-template-columns: 1.2fr .8fr; column-gap: 64px; }
    .pains__head { grid-column: 1 / -1; }
    .pains__art { grid-template-columns: 1fr; align-self: start; position: sticky; top: 24px; }

    .services__grid { grid-template-columns: 1.35fr 1fr; grid-template-rows: auto auto; }
    .service.is-main { grid-column: 1; grid-row: 1 / span 2; padding: 40px 36px; }

    .diag__in { grid-template-columns: .85fr 1.15fr; gap: 72px; }
    .diag__figure { position: sticky; top: 32px; }

    .steps__track { grid-template-columns: repeat(4, 1fr); gap: 28px; padding-left: 0; padding-top: 60px; }
    .steps__track::before { /* régua horizontal no desktop */
      left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 12px;
      background:
        repeating-linear-gradient(to right, var(--accent-deep) 0 2px, transparent 2px 48px) top / 100% 12px no-repeat,
        repeating-linear-gradient(to right, var(--accent-deep) 0 1px, transparent 1px 9.6px) top / 100% 6px no-repeat;
      border-left: 0; border-top: 2px solid var(--accent-deep);
    }
    .step__mark { left: 0; top: -46px; }

    .about__in { grid-template-columns: 360px 1fr; gap: 64px; }

    .faq__in { grid-template-columns: .8fr 1.2fr; gap: 64px; }
    .faq__title { position: sticky; top: 32px; }

    .footer__in { grid-template-columns: auto 1fr; align-items: center; column-gap: 32px; }
    .footer__line { justify-self: end; }
    .footer__links, .footer__copy { grid-column: 1 / -1; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  }
}
