/**
 * Chantell — Design tokens
 *
 * Porta 1:1 de `deploy/bloom-path-global/src/index.css` (SPA de referência),
 * com os `@apply` do Tailwind convertidos pra CSS puro equivalente.
 * Este arquivo é a fonte única de tokens do tema E do editor (add_editor_style).
 * Não colocar CSS de componentes do shell aqui — isso vive em style.css.
 */

/* ───────────────────────── Font faces ───────────────────────── */

@font-face {
  font-family: 'Tentang Nanti';
  src: url('../fonts/tentang-nanti-one.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PP Neue Montreal';
  src: url('../fonts/PPNeueMontreal-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lektorat';
  src: url('../fonts/Lektorat-CondensedExtrabold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ───────────────────────── Tokens (:root) ───────────────────────── */

:root {
  /* Primary palette - light cream theme like Bogdan */
  --background: 36 23% 90%;
  --foreground: 0 0% 0%;

  --card: 0 0% 100%;
  --card-foreground: 0 0% 0%;

  --popover: 0 0% 100%;
  --popover-foreground: 0 0% 0%;

  --primary: 11 87% 57%;
  --primary-foreground: 0 0% 100%;

  --secondary: 30 8% 15%;
  --secondary-foreground: 0 0% 100%;

  --muted: 36 18% 85%;
  --muted-foreground: 0 0% 45%;

  --accent: 11 87% 57%;
  --accent-foreground: 0 0% 100%;

  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 98%;

  --border: 0 0% 0%;
  --input: 36 18% 82%;
  --ring: 11 87% 57%;

  --radius: 0.5rem;

  --sidebar-background: 30 8% 15%;
  --sidebar-foreground: 0 0% 100%;
  --sidebar-primary: 11 87% 57%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 30 8% 20%;
  --sidebar-accent-foreground: 0 0% 100%;
  --sidebar-border: 0 0% 25%;
  --sidebar-ring: 11 87% 57%;

  /* Custom semantic tokens */
  --brand: 11 87% 57%;
  --brand-light: 40 80% 75%;
  --cream: 36 23% 90%;
  --dark: 30 8% 10%;
  --dark-card: 30 8% 15%;
  --text-secondary: 0 0% 45%;

  /* Typography */
  --font-display: 'Lektorat', Impact, sans-serif;
  --font-body: 'PP Neue Montreal', Arial, sans-serif;
  --font-accent: 'Tentang Nanti', 'Palatino Linotype', serif;

  /* Fluid type sizes (matching Bogdan) */
  --text-h0: clamp(6rem, 13vw, 14rem);
  --text-h1: clamp(3rem, 7.125vw, 7.125rem);
  --text-h2: clamp(2.25rem, 4vw, 4rem);
  --text-h3: clamp(1.725rem, 2.5vw, 2.5rem);
  --text-h4: clamp(1.25rem, 1.5vw, 1.5rem);
  --text-body: clamp(1rem, 1.125vw, 1.125rem);
  --text-display: clamp(6.5rem, 20vw, 20rem);

  /* Motion */
  --ease-premium: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);

  /* Spacing */
  --navbar-height: 5.375rem;
}

/* ───────────────────────── Base (preflight enxuto) ─────────────────────────
   A SPA dependia do preflight do Tailwind; aqui portamos só o essencial pra
   manter o mesmo rendering sem carregar o framework. */

*,
*::before,
*::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  /* @apply border-border */
  border-color: hsl(var(--border));
}

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

body {
  margin: 0;
  /* @apply bg-background text-foreground */
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol {
  margin: 0;
}

ul[class], ol[class] {
  padding: 0;
  list-style: none;
}

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

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  background: transparent;
  padding: 0;
  cursor: pointer;
}

::selection {
  background: hsl(var(--brand) / 0.25);
  color: hsl(var(--foreground));
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-transform: uppercase;
}

/* ───────────────────────── Utilidades (components layer) ───────────────────────── */

/* Font utilities */
.font-display {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.font-accent {
  font-family: var(--font-accent);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.font-body {
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0;
}

/* Fluid type sizes */
.text-fluid-h0 { font-size: var(--text-h0); }
.text-fluid-h1 { font-size: var(--text-h1); }
.text-fluid-h2 { font-size: var(--text-h2); }
.text-fluid-h3 { font-size: var(--text-h3); }
.text-fluid-h4 { font-size: var(--text-h4); }
.text-fluid-display { font-size: var(--text-display); }

/* Dark section */
.section-dark {
  background-color: hsl(var(--dark-card));
  color: hsl(0 0% 100%);
}

/* Light section */
.section-light {
  background-color: hsl(var(--cream));
  color: hsl(var(--foreground));
}

/* Brand accent text */
.text-brand {
  color: hsl(var(--brand));
}

/* Background helpers (usados pelo shell do tema e blocos) */
.bg-background { background-color: hsl(var(--background)); }
.bg-muted { background-color: hsl(var(--muted)); }

/* Button styles matching Bogdan */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 1rem 2rem;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  border: 1px solid hsl(var(--foreground));
  transition: all 0.4s var(--ease-premium);
  cursor: pointer;
}

.btn-primary:hover {
  background: transparent;
  color: hsl(var(--foreground));
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 1rem 2rem;
  background: transparent;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--foreground));
  transition: all 0.4s var(--ease-premium);
  cursor: pointer;
}

.btn-outline:hover {
  background: hsl(var(--foreground));
  color: hsl(var(--background));
}

/* White button for dark sections */
.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 1rem 2.5rem;
  background: hsl(0 0% 100%);
  color: hsl(0 0% 0%);
  border: none;
  border-radius: 0.5rem;
  transition: all 0.4s var(--ease-premium);
  cursor: pointer;
}

.btn-white:hover {
  background: hsl(0 0% 95%);
  transform: translateY(-2px);
}

/* Stagger button */
.stagger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 1rem 2.5rem;
  background: hsl(0 0% 100%);
  color: hsl(0 0% 0%);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.4s var(--ease-premium);
}

.stagger-btn:hover {
  background: hsl(0 0% 95%);
}

.stagger-btn__text {
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 1.1em;
  line-height: 1;
}

.stagger-btn__text--clone {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  left: 50%;
  top: 50%;
  overflow: hidden;
  height: 1.1em;
  width: max-content;
  transform: translate(-50%, -50%);
  line-height: 1;
  pointer-events: none;
}

.stagger-btn__char {
  display: inline-block;
  line-height: 1;
  transition: transform 0.4s var(--ease-premium);
}

.stagger-btn__text:first-child .stagger-btn__char {
  transform: translateY(0);
}

.stagger-btn:hover .stagger-btn__text:first-child .stagger-btn__char {
  transform: translateY(-110%);
}

.stagger-btn__text--clone .stagger-btn__char {
  transform: translateY(110%);
}

.stagger-btn:hover .stagger-btn__text--clone .stagger-btn__char {
  transform: translateY(0);
}

/* Loading counter */
.loading-counter {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.8;
}

/* Pillar link style */
.pillar-link {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.6s var(--ease-premium);
}

/* Card accordion items like Bogdan FAQ */
.faq-item {
  background: hsl(0 0% 100%);
  border: none;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.faq-item:hover {
  background: hsl(0 0% 97%);
}

/* ───────────────────────── Custom scrollbar ───────────────────────── */

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: hsl(var(--cream));
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--brand) / 0.4);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--brand) / 0.6);
}
