/* ==========================================================================
   CRITICAL CSS - Lulu Citrus Caviar
   Carregado inline ou como primeiro stylesheet.
   Contem: @property, color-scheme, variaveis CSS, tipografia base, layout critico.
   ========================================================================== */

/* @property registrations for animatable custom properties */
@property --clr-primary {
  syntax: "<color>";
  inherits: true;
  initial-value: #718469;
}

@property --clr-secondary {
  syntax: "<color>";
  inherits: true;
  initial-value: #b7bda2;
}

@property --clr-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #faf8f3;
}

@property --clr-surface {
  syntax: "<color>";
  inherits: true;
  initial-value: #f2ede4;
}

@property --clr-text {
  syntax: "<color>";
  inherits: true;
  initial-value: #1a1c14;
}

@property --clr-text-muted {
  syntax: "<color>";
  inherits: true;
  initial-value: #5c5f52;
}

@property --clr-border {
  syntax: "<color>";
  inherits: true;
  initial-value: #d4d0c8;
}

@property --hero-overlay {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(26, 28, 20, 0.55);
}

/* ---- Color Scheme ---- */
:root {
  color-scheme: light dark;

  /* Primary palette */
  --clr-primary: #718469;
  --clr-primary-light: color-mix(in oklch, var(--clr-primary), white 30%);
  --clr-primary-dark: color-mix(in oklch, var(--clr-primary), black 20%);
  --clr-primary-subtle: color-mix(in oklch, var(--clr-primary), white 85%);

  /* Secondary palette */
  --clr-secondary: #b7bda2;
  --clr-secondary-light: color-mix(in oklch, var(--clr-secondary), white 30%);
  --clr-secondary-dark: color-mix(in oklch, var(--clr-secondary), black 20%);
  --clr-secondary-subtle: color-mix(in oklch, var(--clr-secondary), white 80%);

  /* Backgrounds & Surfaces */
  --clr-bg: #faf8f3;
  --clr-surface: #f2ede4;
  --clr-surface-elevated: #ffffff;

  /* Text */
  --clr-text: #1a1c14;
  --clr-text-muted: #5c5f52;
  --clr-text-inverse: #faf8f3;

  /* Borders & Dividers */
  --clr-border: #d4d0c8;
  --clr-border-light: color-mix(in oklch, var(--clr-border), white 40%);

  /* Hero overlay */
  --hero-overlay: rgba(26, 28, 20, 0.55);

  /* Functional */
  --clr-success: #3a7d2c;
  --clr-error: #b5332e;
  --clr-focus: var(--clr-secondary);

  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-section: clamp(3rem, 8vw, 7rem);

  /* Typography scale (fluid) */
  --fs-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
  --fs-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
  --fs-base: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  --fs-md: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  --fs-lg: clamp(1.25rem, 1.1rem + 0.75vw, 1.6rem);
  --fs-xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.2rem);
  --fs-2xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  --fs-3xl: clamp(2.5rem, 1.8rem + 3.5vw, 4rem);
  --fs-display: clamp(3rem, 2rem + 5vw, 5.5rem);

  /* Font families */
  --ff-heading: "Playfair Display", Georgia, "Times New Roman", serif;
  --ff-body:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Line heights */
  --lh-tight: 1.15;
  --lh-heading: 1.25;
  --lh-body: 1.6;

  /* Letter spacing */
  --ls-tight: -0.02em;
  --ls-normal: 0;
  --ls-wide: 0.05em;
  --ls-wider: 0.1em;

  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(26, 28, 20, 0.06);
  --shadow-md: 0 4px 12px rgba(26, 28, 20, 0.08);
  --shadow-lg: 0 8px 30px rgba(26, 28, 20, 0.12);
  --shadow-xl: 0 16px 50px rgba(26, 28, 20, 0.16);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-theme: 500ms ease;

  /* Container widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-max: 1400px;

  /* Header height */
  --header-h: 72px;

  /* Allow height interpolation for animations */
  interpolate-size: allow-keywords;
}

/* ---- Dark Mode ---- */
html.dark {
  --clr-primary: #718469;
  --clr-primary-light: color-mix(in oklch, #718469, white 25%);
  --clr-primary-dark: color-mix(in oklch, #718469, black 15%);
  --clr-primary-subtle: color-mix(in oklch, #718469, black 75%);

  --clr-secondary: #b7bda2;
  --clr-secondary-light: color-mix(in oklch, #b7bda2, white 20%);
  --clr-secondary-dark: color-mix(in oklch, #b7bda2, black 15%);
  --clr-secondary-subtle: color-mix(in oklch, #b7bda2, black 70%);

  --clr-bg: #111310;
  --clr-surface: #1a1c14;
  --clr-surface-elevated: #222518;

  --clr-text: #e8e6df;
  --clr-text-muted: #9a9d90;
  --clr-text-inverse: #1a1c14;

  --clr-border: #2e3124;
  --clr-border-light: color-mix(in oklch, #2e3124, black 30%);

  --hero-overlay: rgba(17, 19, 16, 0.65);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 16px 50px rgba(0, 0, 0, 0.5);
}

/* ---- Box Sizing Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---- Base ---- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  hanging-punctuation: first last;
}

body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--clr-text);
  background-color: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  transition:
    background-color var(--transition-theme),
    color var(--transition-theme);
}

/* ---- Typography ---- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--ff-heading);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
  color: var(--clr-text);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-3xl);
  font-weight: 700;
}
h2 {
  font-size: var(--fs-2xl);
  font-weight: 600;
}
h3 {
  font-size: var(--fs-xl);
  font-weight: 600;
}
h4 {
  font-size: var(--fs-lg);
  font-weight: 600;
}
h5 {
  font-size: var(--fs-md);
  font-weight: 600;
}
h6 {
  font-size: var(--fs-base);
  font-weight: 600;
}

p {
  text-wrap: pretty;
  max-width: 72ch;
}

a {
  color: var(--clr-secondary-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--clr-secondary);
}

a:focus-visible {
  outline: 2px solid var(--clr-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

/* ---- Utility Classes ---- */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.container--narrow {
  max-width: var(--container-md);
}

.container--wide {
  max-width: var(--container-max);
}

.section {
  padding-block: var(--space-section);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-center {
  text-align: center;
}
.text-muted {
  color: var(--clr-text-muted);
}
.text-primary {
  color: var(--clr-primary);
}
.text-secondary {
  color: var(--clr-secondary);
}

.subtitle {
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--clr-secondary);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75em 1.75em;
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid var(--clr-focus);
  outline-offset: 3px;
}

.btn--primary {
  background-color: var(--clr-primary);
  color: var(--clr-text-inverse);
  border-color: var(--clr-primary);
}

.btn--primary:hover {
  background-color: var(--clr-primary-dark);
  border-color: var(--clr-primary-dark);
  color: var(--clr-text-inverse);
}

.btn--secondary {
  background-color: var(--clr-secondary);
  color: #1a1c14;
  border-color: var(--clr-secondary);
}

.btn--secondary:hover {
  background-color: var(--clr-secondary-dark);
  border-color: var(--clr-secondary-dark);
  color: #1a1c14;
}

.btn--outline {
  background-color: transparent;
  color: var(--clr-text);
  border-color: var(--clr-border);
}

.btn--outline:hover {
  background-color: var(--clr-surface);
  border-color: var(--clr-primary);
  color: var(--clr-primary);
}

.btn--ghost {
  background-color: transparent;
  color: var(--clr-text);
  border-color: transparent;
}

.btn--ghost:hover {
  background-color: var(--clr-surface);
  color: var(--clr-primary);
}

/* Button sizes */
.btn--sm {
  padding: 0.5em 1.25em;
  font-size: var(--fs-xs);
}

.btn--lg {
  padding: 1em 2.5em;
  font-size: var(--fs-base);
}

.logo-white {
  display: none;
}

.logo-dark {
  display: block;
}

.dark {
  .logo-dark {
    display: none;
  }

  .logo-white {
    display: block;
  }
}

.iperform-development {
  img {
    height: 35px;
    filter: invert(1);
  }
}

.dark {
  .iperform-development {
    img {
      filter: invert(0);
    }
  }
}

a.whatsapp {
  width: 50px;
  height: 50px;
  padding: 10px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  bottom: 90px;
  right: 30px;
  background-color: #45ca5b;
  color: #fff;
  z-index: 99999;
  box-shadow: 0 0 5px 5px rgba(3, 60, 45, 0.1);
  transition: 400ms ease-in-out;
}

a.whatsapp:hover {
  background-color: rgba(3, 60, 45, 1);
  box-shadow: 0 0 5px 9px rgba(3, 60, 45, 0.1);
}

a.whatsapp svg {
  color: #fff;
  font-size: 28px;
  width: 24px;
  height: 24px;
  transition: 400ms ease-in-out;
}

a.whatsapp:hover svg {
  color: #45ca5b;
  filter: inherit;
}

@media (max-width: 768px) {
  a.whatsapp {
    width: 40px;
    height: 40px;
    bottom: 70px;
    right: 20px;
  }
}

.lang-list {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  a {
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    img {
      width: 20px;
      height: 20px;
    }
  }
}
