/*
Theme Name: AllTomatos
Theme URI: https://alltomatos.dev.br
Author: AllTomatos
Author URI: https://alltomatos.dev.br
Description: Tema filho do Twenty Twenty-Four para o site institucional e comercial da AllTomatos. Sem build, sem dependencias externas.
Template: twentytwentyfour
Version: 1.5.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alltomatos
Tags: block-theme, one-column, custom-colors, editor-style
*/

/* =========================================================
   1. Tokens
   ========================================================= */
.at-root,
:root {
  --at-ink: #0b0f14;
  --at-ink-soft: #1a222c;
  --at-tomato: #e23d28;
  --at-tomato-dark: #b32a18;
  --at-tomato-soft: #ff6b4a;
  --at-cream: #fff7f2;
  --at-sand: #f4ece4;
  --at-muted: #5b6470;
  --at-line: #e5dcd3;
  --at-radius: 18px;
  --at-radius-sm: 10px;
  --at-shadow: 0 18px 45px -25px rgba(11, 15, 20, 0.45);
  --at-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --at-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --at-max: 1180px;
}

/* =========================================================
   2. Base
   ========================================================= */
body {
  background: var(--at-cream);
  color: var(--at-ink);
  font-family: var(--at-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--at-tomato);
  color: #fff;
}

a {
  color: var(--at-tomato-dark);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--at-tomato);
}

:focus-visible {
  outline: 3px solid var(--at-tomato-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}

p, li {
  text-wrap: pretty;
}

/* =========================================================
   3. Layout helpers
   ========================================================= */
.at-wrap {
  width: 100%;
  max-width: min(var(--at-max), 100vw);
  box-sizing: border-box;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.at-section {
  padding-block: clamp(56px, 8vw, 104px);
}

.at-section--tight {
  padding-block: clamp(36px, 5vw, 64px);
}

.at-section--sand {
  background: var(--at-sand);
}

.at-section--ink {
  background: var(--at-ink);
  color: #f7f3ef;
}

.at-section--ink a {
  color: #ffb3a3;
}

.at-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-family: var(--at-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--at-tomato-dark);
}

.at-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.at-section--ink .at-eyebrow {
  color: var(--at-tomato-soft);
}

.at-lead {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.65;
  color: var(--at-muted);
  max-width: 62ch;
}

.at-section--ink .at-lead {
  color: #c9c2bb;
}

.at-center {
  text-align: center;
}

.at-center .at-lead {
  margin-inline: auto;
}

/* =========================================================
   4. Hero
   ========================================================= */
.at-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(226, 61, 40, 0.30), transparent 70%),
    radial-gradient(700px 420px at 88% 8%, rgba(255, 107, 74, 0.16), transparent 72%),
    var(--at-ink);
  color: #fbf7f4;
  padding-block: clamp(64px, 10vw, 132px);
}

.at-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 20%, transparent 78%);
}

.at-hero > * {
  position: relative;
  z-index: 1;
}

.at-hero__inner {
  max-width: 860px;
  margin-inline: auto;
  text-align: center;
}

.at-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--at-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffd2c7;
}

.at-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--at-tomato-soft);
  box-shadow: 0 0 0 4px rgba(255, 107, 74, 0.18);
}

.at-hero__title {
  margin: 0 0 20px;
  font-size: clamp(34px, 5.4vw, 62px);
  font-weight: 700;
  color: #fff;
}

.at-hero__title em {
  font-style: normal;
  color: var(--at-tomato-soft);
}

.at-hero__sub {
  margin: 0 auto 32px;
  max-width: 62ch;
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.65;
  color: #d8d2cc;
}

.at-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.at-hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 54px auto 0;
  max-width: 780px;
}

.at-stat {
  padding: 18px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--at-radius-sm);
  background: rgba(255, 255, 255, 0.04);
}

.at-stat__value {
  display: block;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.at-stat__label {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: #a9a29b;
}

/* =========================================================
   5. Botoes
   ========================================================= */
.at-btn,
.wp-block-button__link.at-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

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

.at-btn--primary {
  background: var(--at-tomato);
  color: #fff;
}

.at-btn--primary:hover {
  background: var(--at-tomato-dark);
  color: #fff;
}

.at-btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.at-btn--ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.at-btn--dark {
  background: var(--at-ink);
  color: #fff;
}

.at-btn--dark:hover {
  background: var(--at-ink-soft);
  color: #fff;
}

.at-btn--outline {
  background: transparent;
  border-color: var(--at-line);
  color: var(--at-ink);
}

.at-btn--outline:hover {
  border-color: var(--at-ink);
  color: var(--at-ink);
}

/* =========================================================
   6. Grid e cards
   ========================================================= */
.at-grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

.at-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.at-grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.at-grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.at-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  background: #fff;
  box-shadow: 0 1px 0 rgba(11, 15, 20, 0.03);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.at-card:hover {
  transform: translateY(-3px);
  border-color: #d9cec3;
  box-shadow: var(--at-shadow);
}

.at-card__kicker {
  margin: 0;
  font-family: var(--at-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--at-tomato-dark);
}

.at-card__title {
  margin: 0;
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700;
}

.at-card__title a {
  color: inherit;
  text-decoration: none;
}

.at-card__desc {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--at-muted);
  flex: 1;
}

.at-card__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
}

.at-card__foot a {
  text-decoration: none;
}

.at-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.at-tags li {
  padding: 4px 9px;
  border: 1px solid var(--at-line);
  border-radius: 999px;
  background: var(--at-cream);
  font-family: var(--at-mono);
  font-size: 11.5px;
  color: #4b535e;
}

.at-feature {
  padding: 22px;
  border-left: 2px solid var(--at-tomato);
  background: linear-gradient(90deg, rgba(226, 61, 40, 0.05), transparent 70%);
}

.at-feature h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.at-feature p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--at-muted);
}

/* =========================================================
   7. Projeto (pagina interna)
   ========================================================= */
.at-project-hero {
  background:
    radial-gradient(700px 340px at 85% 0%, rgba(226, 61, 40, 0.22), transparent 70%),
    var(--at-ink);
  color: #fbf7f4;
  padding-block: clamp(52px, 8vw, 100px);
}

.at-project-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.6vw, 54px);
  color: #fff;
}

.at-project-hero .at-lead {
  color: #d3ccc6;
}

.at-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 26px;
  font-family: var(--at-mono);
  font-size: 12.5px;
  color: #a9a29b;
}

.at-split {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}

.at-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.at-list li {
  position: relative;
  padding-left: 28px;
  line-height: 1.6;
}

.at-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--at-tomato);
  border-bottom: 2px solid var(--at-tomato);
  transform: rotate(-45deg);
}

.at-steps {
  counter-reset: at-step;
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.at-steps li {
  counter-increment: at-step;
  position: relative;
  padding: 22px 22px 22px 66px;
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius-sm);
  background: #fff;
}

.at-steps li::before {
  content: counter(at-step);
  position: absolute;
  left: 20px;
  top: 20px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--at-ink);
  color: #fff;
  font-family: var(--at-mono);
  font-size: 13px;
  font-weight: 700;
}

.at-code {
  display: block;
  overflow-x: auto;
  padding: 14px 16px;
  border-radius: var(--at-radius-sm);
  background: #11161d;
  color: #ffd2c7;
  font-family: var(--at-mono);
  font-size: 13.5px;
  line-height: 1.6;
}

/* =========================================================
   8. CTA final
   ========================================================= */
.at-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 5vw, 64px);
  border-radius: var(--at-radius);
  background:
    radial-gradient(600px 300px at 10% 0%, rgba(255, 107, 74, 0.28), transparent 70%),
    var(--at-ink);
  color: #fff;
  text-align: center;
}

.at-cta h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 3.4vw, 40px);
  color: #fff;
}

.at-cta p {
  margin: 0 auto 26px;
  max-width: 56ch;
  color: #d3ccc6;
}

.at-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* =========================================================
   9. Formularios
   ========================================================= */
.at-section .fluentform,
.at-section .wpcf7 {
  max-width: 720px;
  margin-inline: auto;
}

.fluentform .ff-el-input--label label,
.at-section label {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--at-ink);
}

.fluentform input[type="text"],
.fluentform input[type="email"],
.fluentform input[type="tel"],
.fluentform select,
.fluentform textarea {
  border: 1px solid var(--at-line) !important;
  border-radius: var(--at-radius-sm) !important;
  background: #fff !important;
  padding: 12px 14px !important;
  font-size: 15.5px !important;
  color: var(--at-ink) !important;
}

.fluentform input:focus,
.fluentform select:focus,
.fluentform textarea:focus {
  border-color: var(--at-tomato) !important;
  box-shadow: 0 0 0 3px rgba(226, 61, 40, 0.12) !important;
  outline: none !important;
}

.fluentform .ff-btn-submit {
  background: var(--at-tomato) !important;
  border-radius: 999px !important;
  padding: 13px 26px !important;
  font-weight: 650 !important;
}

.fluentform .ff-btn-submit:hover {
  background: var(--at-tomato-dark) !important;
}

/* =========================================================
   10. WhatsApp flutuante
   ========================================================= */
.at-wa {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: #1faf54;
  color: #fff;
  font-size: 14.5px;
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.45);
  transition: transform 0.16s ease, background-color 0.16s ease;
}

.at-wa:hover {
  transform: translateY(-2px);
  background: #188f45;
  color: #fff;
}

.at-wa svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.at-wa__label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width 0.2s ease, opacity 0.2s ease;
}

.at-wa:hover .at-wa__label,
.at-wa:focus-visible .at-wa__label {
  max-width: 190px;
  opacity: 1;
}

@media (max-width: 600px) {
  .at-wa {
    right: 14px;
    bottom: 14px;
    padding: 12px;
  }

  .at-wa__label {
    display: none;
  }
}

/* =========================================================
   11. Ajustes finos
   ========================================================= */
.at-hero + .at-section,
.at-project-hero + .at-section {
  padding-top: clamp(48px, 6vw, 76px);
}

.wp-block-post-title {
  text-wrap: balance;
}

.at-hide {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   12. Marca (wordmark sem imagem)
   ========================================================= */
.wp-block-site-title a {
  font-weight: 800;
  letter-spacing: -0.035em;
  text-decoration: none;
  color: var(--at-ink);
}

.wp-block-site-title a::after {
  content: "";
  display: inline-block;
  width: 0.34em;
  height: 0.34em;
  margin-left: 0.1em;
  border-radius: 50%;
  background: var(--at-tomato);
  vertical-align: 0.05em;
}

.wp-block-site-title a:hover {
  color: var(--at-tomato-dark);
}

/* =========================================================
   13. Template de largura total
   ========================================================= */
.at-main,
.at-main > .wp-block-post-content {
  width: 100%;
  max-width: none;
}

.at-main > .wp-block-post-content > .at-hero,
.at-main > .wp-block-post-content > .at-project-hero {
  margin-top: 0;
}

/* =========================================================
   14. Correcoes de layout
   ========================================================= */
html,
body {
  overflow-x: hidden;
}

header.wp-block-template-part .wp-block-button__link {
  padding: 10px 18px;
  font-size: 14px;
}

header.wp-block-template-part .wp-block-navigation-item__content {
  text-decoration: none;
}

header.wp-block-template-part .wp-block-navigation-item__content:hover {
  color: var(--at-tomato-dark);
}
/* Tipografia de hero: evita overflow em telas estreitas */
.at-wrap {
  min-width: 0;
}

.at-project-hero h1,
.at-hero__title {
  max-width: 100%;
  white-space: normal;
  text-wrap: wrap;
  overflow-wrap: break-word;
}
/* Botoes: o wrapper nao deve repetir o padding do link */
.wp-block-button.at-btn,
.wp-block-button.at-btn--primary,
.wp-block-button.at-btn--ghost {
  padding: 0;
  background: none;
  border: 0;
}

/* Headline de projeto com largura de leitura */
.at-project-hero h1 {
  max-width: 640px;
}
/* =========================================================
   16. Rodape
   ========================================================= */
footer.wp-block-template-part .wp-block-column p {
  margin-block: 0 6px;
}

footer.wp-block-template-part .wp-block-column > p:first-child {
  margin-bottom: 10px;
}

footer.wp-block-template-part .wp-block-column {
  min-width: 0;
}

@media (max-width: 781px) {
  footer.wp-block-template-part .wp-block-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 20px;
  }

  footer.wp-block-template-part .wp-block-column {
    flex-basis: auto !important;
    width: 100% !important;
  }

  footer.wp-block-template-part .wp-block-column:first-child {
    grid-column: 1 / -1;
  }
}