/* ============================================================
   Orenji Landing — Design System
   Paleta: Laranja Orenji #FF7A00 · Verde Folha · Creme · Neutros cinza
   Tipografia: Poppins (self-hosted)
   ============================================================ */

/* ---------- Tipografia ---------- */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/poppins-400.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/poppins-500.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/poppins-600.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/poppins-700.woff2") format("woff2");
}

/* ---------- Tokens (claro) ---------- */
:root {
  color-scheme: light dark;

  /* Cores Principais */
  --orange: #ff7a00;
  --orange-strong: #e96a00;
  --leaf: #43836a;
  --cream: #fff3e3;
  --white: #ffffff;

  /* Cores Neutras */
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;

  /* Cores de Estado */
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  --highlight: #a855f7;

  /* Semânticos */
  --page: var(--cream);
  --surface: var(--white);
  --ink: var(--gray-900);
  --muted: var(--gray-500);
  --line: var(--gray-300);
  --line-soft: rgba(209, 213, 219, 0.55);
  --header-bg: rgba(255, 243, 227, 0.85);
  --header-border: rgba(209, 213, 219, 0.65);
  /* Texto escuro sobre laranja para AA (2.61:1 era sub-AA per Codex review):
     claro→#111827 (6.79:1) · escuro→#0f1319 (7.13:1) · hover ≥5.5:1 */
  --button-text: var(--gray-900);
  --shadow: 0 20px 44px rgba(17, 24, 39, 0.08);
  --shadow-lift: 0 16px 30px rgba(255, 122, 0, 0.18);
  --focus: rgba(255, 122, 0, 0.45);

  --radius-card: 24px;
  --radius-tile: 26%;
  font-family: "Poppins", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- Tokens (escuro) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --leaf: #4caf50;
    --cream: #ffdb83;

    --gray-900: #0f1319;
    --gray-700: #1a1f28;
    --gray-500: #6b7280;
    --gray-300: #9ca3af;
    --gray-100: #e5e7eb;

    --page: var(--gray-900);
    --surface: var(--gray-700);
    --ink: #e5e7eb;
    --muted: var(--gray-300);
    --line: #2a2f37;
    --line-soft: rgba(42, 47, 55, 0.9);
    --header-bg: rgba(15, 19, 25, 0.85);
    --header-border: rgba(42, 47, 55, 0.9);
    --shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
    --shadow-lift: 0 16px 30px rgba(0, 0, 0, 0.35);
    --focus: rgba(255, 122, 0, 0.5);
  }
}

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
  scroll-padding-top: 6.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-size: 1rem;
  line-height: 1.5;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

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

[hidden] {
  display: none !important;
}

/* ---------- Acessibilidade ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 30;
  padding: 0.6rem 1rem;
  border-radius: 0 0 12px 12px;
  background: var(--orange);
  color: var(--button-text);
  font-weight: 600;
  text-decoration: none;
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 0;
}

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  min-height: 5.2rem;
  padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--header-border);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: auto;
  height: 3.2rem;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  line-height: 1;
  font-weight: 700;
  font-size: 1.15rem;
}

.brand small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.78rem;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.8rem, 2vw, 1.4rem);
  margin-left: auto;
}

.site-header nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 140ms ease;
}

.site-header nav a:hover {
  color: var(--orange);
}

.site-header nav a[data-current] {
  color: var(--ink);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  min-width: 2rem;
  justify-content: center;
  margin-left: 0.4rem;
  padding: 0.25rem 0.7rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--ink) !important;
  font-weight: 700;
}

.lang-switch:hover {
  border-color: var(--orange);
  color: var(--orange) !important;
}

/* ---------- Layout ---------- */
main {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 4rem;
}

.content-section {
  padding: clamp(2rem, 6vw, 4rem) 0;
  text-align: center;
}

.content-section > p:not(.eyebrow),
.section-heading > p {
  max-width: 42rem;
  margin-inline: auto;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.content-section h2 {
  max-width: 20ch;
  margin: 0 auto 0.9rem;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.1;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
}

.section-heading > p {
  margin: 0;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(1.4rem, 3vw, 2.2rem);
  padding: clamp(1.6rem, 5vw, 3rem) 0 clamp(1.4rem, 4vw, 2.4rem);
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes hero-in {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .hero-copy,
  .hero-banner {
    animation: hero-in 480ms ease both;
  }

  .hero-banner {
    animation-delay: 90ms;
  }
}

.hero-copy p {
  margin: 0;
}

.hero-copy .hero-lead {
  max-width: 34rem;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 400;
  line-height: 1.6;
}

.hero-copy h1 {
  max-width: 17ch;
  margin: 0 auto;
  font-size: clamp(2.3rem, 6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.05;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.primary-button {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  padding: 0 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: var(--button-text);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.primary-button:hover {
  background: var(--orange-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.ghost-button {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  padding: 0 1.3rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.ghost-button:hover {
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-2px);
}

.hero-banner {
  width: min(100%, 62rem);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

/* ---------- Ecossistema: tiles de apps ---------- */
.apps-section {
  padding-top: 1.5rem;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 1rem;
}

.app-tile {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: 1.5rem 0.75rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: inherit;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.app-tile:hover {
  border-color: var(--tile-accent);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lift);
}

.app-tile:active {
  transform: translateY(-1px);
}

.tile-icon {
  display: grid;
  width: min(5.6rem, 70%);
  aspect-ratio: 1;
  place-items: center;
  border-radius: var(--radius-tile);
  background: color-mix(in srgb, var(--tile-accent) 14%, var(--surface));
}

.tile-icon img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.app-tile strong {
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
}

/* ---------- Modal / diálogo ---------- */
.modal {
  border: 0;
  padding: 0;
  outline: none;
  background: transparent;
  max-width: none;
  max-height: none;
}

.modal::backdrop {
  background: rgba(15, 19, 25, 0.5);
  backdrop-filter: blur(6px);
}

@media (prefers-reduced-motion: no-preference) {
  .modal[open] {
    animation: modal-in 220ms ease;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  width: min(23rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 2.2rem 1.7rem 1.9rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  color: var(--ink);
  overflow: auto;
  box-shadow: var(--shadow);
  text-align: center;
}

.modal-card::before {
  position: absolute;
  top: -1.5rem;
  left: 50%;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tile-accent) 16%, transparent);
  filter: blur(40px);
  content: "";
  pointer-events: none;
}

.modal-icon {
  width: 6.5rem;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(17, 24, 39, 0.16));
}

.modal-card strong[data-modal-title] {
  margin-top: 0.6rem;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
}

.modal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.3rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tile-accent) 14%, var(--surface));
  color: var(--tile-accent);
  font-size: 0.8rem;
  font-weight: 600;
}

.status-chip::before {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--muted);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.modal-close:hover {
  background: color-mix(in srgb, var(--tile-accent) 16%, transparent);
  color: var(--tile-accent);
}

.modal-link {
  margin-top: 0.7rem;
  text-decoration: none;
}

/* ---------- Novidades e rodapé ---------- */
.news-section {
  padding-bottom: 4.5rem;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 1.3rem clamp(1rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.85rem;
}

footer .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

footer .footer-brand img {
  height: 1.5rem;
  width: auto;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  transition: color 140ms ease;
}

.footer-links a:hover {
  color: var(--orange);
}

.footer-links svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
  stroke: none;
}

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

footer a:hover {
  color: var(--orange);
}

/* ---------- Responsivo ---------- */
@media (max-width: 560px) {
  html {
    scroll-padding-top: 8rem;
  }

  main {
    width: min(100% - 1.2rem, 1120px);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 0;
    padding-top: 0.95rem;
  }

  .site-header nav {
    margin-left: 0;
    overflow-x: auto;
    width: 100%;
  }

  .apps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }

  .app-tile {
    padding: 1.15rem 0.6rem 1rem;
  }

  .modal-card {
    padding: 1.9rem 1.3rem 1.6rem;
  }
}
