/* ==========================================================================
   UpRetina Editorial Design System - Reusable Landing CSS
   Based on DESIGN_SYSTEM.md from upretina-astro-v2
   No build step required. Pure CSS with custom properties.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS (Custom Properties)
   -------------------------------------------------------------------------- */
:root {
  /* --- Colors: Brand --- */
  --color-primary: #4DB2E6;
  --color-primary-action: #1A8FD1;
  --color-primary-dark: #0A6CA8;
  --color-primary-deepest: #0C2E4A;
  --color-primary-light: #B8DCEF;
  --color-primary-lightest: #E8F4FD;

  /* --- Colors: Accent --- */
  --color-brand-accent: #67BED9;
  --color-brand-accent-soft: #DDF1F7;
  --color-brand-accent-strong: #3EA9C8;

  /* --- Colors: Secondary --- */
  --color-secondary: #00A878;
  --color-secondary-dark: #008060;

  /* --- Colors: Vertical Accents --- */
  --color-accent-optica: #2BA8D4;
  --color-accent-optica-soft: #78a9be;
  --color-accent-empresa: #00A878;
  --color-accent-partner: #7C6BBF;

  /* --- Colors: Surfaces --- */
  --color-surface-soft: #fcfaf7;
  --color-surface-muted: #f3efe8;
  --color-surface-ink: #183246;
  --color-brand-gray: #F8FAFC;

  /* --- Colors: Text --- */
  --color-ink-soft: #52606d;

  /* --- Colors: Borders --- */
  --color-border-soft: #d9d2c6;

  /* --- Typography --- */
  --font-heading: "Plus Jakarta Sans", "Geist Sans", system-ui, -apple-system, sans-serif;
  --font-editorial: "Plus Jakarta Sans", "Geist Sans", system-ui, -apple-system, sans-serif;
  --font-sans: "Geist Sans", system-ui, -apple-system, sans-serif;

  /* --- Border Radius --- */
  --radius-pill: 9999px;
  --radius-btn: 0.75rem;
  --radius-card: 1.5rem;
  --radius-shell: 2rem;
  --radius-img-inner: 1.5rem;
  --radius-note: 1.5rem;

  /* --- Shadows (navy-tinted, low-opacity, large-blur, negative-spread) --- */
  --shadow-card: 0 20px 48px -38px rgba(24, 50, 70, 0.28);
  --shadow-shell: 0 24px 60px -42px rgba(24, 50, 70, 0.28);
  --shadow-media: 0 24px 60px -36px rgba(24, 50, 70, 0.28);
  --shadow-note: 0 18px 44px -34px rgba(24, 50, 70, 0.28);
  --shadow-btn-primary: 0 18px 34px -24px rgba(12, 46, 74, 0.5);
  --shadow-btn-primary-hover: 0 16px 30px -20px rgba(12, 46, 74, 0.45);
  --shadow-btn-secondary-hover: 0 14px 30px -24px rgba(103, 190, 217, 0.7);

  /* --- Spacing --- */
  --section-py: 6rem;
  --section-py-lg: 7rem;
  --hero-pt: 10rem;
  --hero-pb: 6rem;
  --container-px: 1rem;
  --container-px-sm: 1.5rem;
  --container-px-lg: 2rem;
  --container-max: 80rem;

  /* --- Transitions --- */
  --transition-fast: 300ms ease;
  --transition-medium: 500ms ease-out;
  --transition-slow: 700ms ease-out;
}


/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body.landing-editorial {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-ink-soft);
  background-color: var(--color-surface-soft);
  overflow-x: hidden;
}

body.landing-editorial img {
  max-width: 100%;
  height: auto;
  display: block;
}

body.landing-editorial a {
  color: var(--color-primary-action);
  text-decoration: none;
  transition: color var(--transition-fast);
}

body.landing-editorial a:hover {
  color: var(--color-brand-accent-strong);
}


/* --------------------------------------------------------------------------
   3. CONTAINER
   -------------------------------------------------------------------------- */
.le-container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

@media (min-width: 640px) {
  .le-container {
    padding-left: var(--container-px-sm);
    padding-right: var(--container-px-sm);
  }
}

@media (min-width: 1024px) {
  .le-container {
    padding-left: var(--container-px-lg);
    padding-right: var(--container-px-lg);
  }
}


/* --------------------------------------------------------------------------
   4. TYPOGRAPHY
   -------------------------------------------------------------------------- */
.editorial-title {
  font-family: var(--font-editorial);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.045em;
  color: var(--color-primary-deepest);
}

.editorial-title--hero {
  font-size: clamp(2.6rem, 5vw + 1rem, 4.6rem);
}

.editorial-title--section {
  font-size: clamp(2.2rem, 4vw + 0.8rem, 4rem);
}

.editorial-stat-value {
  font-family: var(--font-editorial);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.05em;
  color: var(--color-primary-deepest);
  font-size: clamp(2.8rem, 4vw + 0.5rem, 4.2rem);
}

.editorial-eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  text-shadow: 0 0 20px rgba(75, 178, 230, 0.15);
}

.editorial-kicker {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-primary-dark);
}

.editorial-body {
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.7;
  color: var(--color-ink-soft);
}

.editorial-heading-card {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.5vw, 1.45rem);
  line-height: 1.3;
  color: var(--color-primary-deepest);
}


/* --------------------------------------------------------------------------
   5. SECTIONS (Background layering - "No-Line" rule)
   -------------------------------------------------------------------------- */
.le-section {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
  position: relative;
}

@media (min-width: 1024px) {
  .le-section {
    padding-top: var(--section-py-lg);
    padding-bottom: var(--section-py-lg);
  }
}

/* Level 0: White */
.le-section--white {
  background-color: #fff;
}

/* Level 1: Warm off-white with ambient radial glow */
.le-section--soft {
  background-color: var(--color-surface-soft);
  background-image:
    radial-gradient(ellipse 70% 50% at 10% 20%, rgba(103, 190, 217, 0.14), transparent),
    linear-gradient(180deg, var(--color-surface-soft) 0%, #fff 100%);
}

/* Level 2: Warm beige */
.le-section--muted {
  background-color: var(--color-surface-muted);
}

/* Level 3: Dark navy CTA endcap */
.le-section--dark {
  background: linear-gradient(180deg, #183246 0%, #112838 100%);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.le-section--dark .editorial-title {
  color: #fff;
}

.le-section--dark .editorial-body {
  color: rgba(255, 255, 255, 0.76);
}

.le-section--dark .editorial-eyebrow {
  color: rgba(255, 255, 255, 0.58);
}

/* Vertical-tinted glow for dark sections */
.le-section--dark.le-section--glow-optica {
  background-image:
    radial-gradient(ellipse 60% 60% at 50% 0%, rgba(43, 168, 212, 0.18), transparent),
    linear-gradient(180deg, #183246 0%, #112838 100%);
}

.le-section--dark.le-section--glow-empresa {
  background-image:
    radial-gradient(ellipse 60% 60% at 50% 0%, rgba(0, 168, 120, 0.18), transparent),
    linear-gradient(180deg, #183246 0%, #112838 100%);
}

.le-section--dark.le-section--glow-partner {
  background-image:
    radial-gradient(ellipse 60% 60% at 50% 0%, rgba(124, 107, 191, 0.18), transparent),
    linear-gradient(180deg, #183246 0%, #112838 100%);
}


/* --------------------------------------------------------------------------
   6. GRID HELPERS
   -------------------------------------------------------------------------- */
.le-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .le-grid {
    gap: 1.75rem;
  }
}

.le-grid--2 {
  grid-template-columns: 1fr;
}

.le-grid--3 {
  grid-template-columns: 1fr;
}

.le-grid--4 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .le-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .le-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .le-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1280px) {
  .le-grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Hero 2-column asymmetric */
.le-grid--hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .le-grid--hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3.5rem;
  }
}

/* Bento 2x2 asymmetric */
.le-grid--bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .le-grid--bento {
    grid-template-columns: repeat(12, 1fr);
    gap: 1.75rem;
  }
  .le-grid--bento > :nth-child(1) { grid-column: span 7; }
  .le-grid--bento > :nth-child(2) { grid-column: span 5; }
  .le-grid--bento > :nth-child(3) { grid-column: span 5; }
  .le-grid--bento > :nth-child(4) { grid-column: span 7; }
}


/* --------------------------------------------------------------------------
   7. BUTTONS
   -------------------------------------------------------------------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
  background-color: var(--color-primary-deepest);
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  box-shadow:
    var(--shadow-btn-primary),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: #0a2a40;
  box-shadow:
    var(--shadow-btn-primary-hover),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
  color: #fff;
}

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

.btn-primary:disabled,
.btn-primary[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-primary-deepest);
  background-color: transparent;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  text-decoration: none;
  white-space: nowrap;
}

.btn-secondary:hover {
  background-color: #fff;
  box-shadow:
    var(--shadow-btn-secondary-hover),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  border-color: transparent;
  color: var(--color-primary-deepest);
}

/* Dark section button variants */
.le-section--dark .btn-primary {
  background-color: #fff;
  color: var(--color-primary-deepest);
  box-shadow: 0 18px 34px -24px rgba(0, 0, 0, 0.35);
}

.le-section--dark .btn-primary:hover {
  background-color: #f0f0f0;
}

.le-section--dark .btn-secondary {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  background-color: transparent;
}

.le-section--dark .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}


/* --------------------------------------------------------------------------
   8. CARDS
   -------------------------------------------------------------------------- */
.editorial-card {
  background-color: #fff;
  border-radius: var(--radius-card);
  border: 1px solid color-mix(in srgb, var(--color-border-soft) 70%, white 30%);
  box-shadow: var(--shadow-card);
  padding: 2rem;
  transition: box-shadow var(--transition-fast);
}

.editorial-card-soft {
  background-color: color-mix(in srgb, var(--color-surface-muted) 72%, white 28%);
  border-radius: var(--radius-card);
  border: none;
  box-shadow: none;
  padding: 2rem;
}


/* --------------------------------------------------------------------------
   9. SHELLS (Large Containers)
   -------------------------------------------------------------------------- */
.editorial-shell {
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-shell);
  border: 1px solid color-mix(in srgb, var(--color-border-soft) 70%, white 30%);
  box-shadow: var(--shadow-shell);
  padding: 2.5rem;
}

.editorial-shell-muted {
  background-color: color-mix(in srgb, var(--color-surface-muted) 82%, white 18%);
  border-radius: var(--radius-shell);
  box-shadow: 0 20px 48px -38px rgba(24, 50, 70, 0.18);
  padding: 2.5rem;
}


/* --------------------------------------------------------------------------
   10. CHIPS & LABELS
   -------------------------------------------------------------------------- */
.editorial-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-primary-dark);
  background-color: color-mix(in srgb, var(--color-brand-accent-soft) 60%, white 40%);
  border-radius: var(--radius-pill);
  box-shadow:
    0 4px 12px -6px rgba(103, 190, 217, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  white-space: nowrap;
}


/* --------------------------------------------------------------------------
   11. MEDIA FRAMES
   -------------------------------------------------------------------------- */
.editorial-media-frame {
  border-radius: var(--radius-shell);
  background-color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-media);
  padding: 0.75rem;
}

.editorial-media-frame img {
  border-radius: var(--radius-img-inner);
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.editorial-media-frame:hover img {
  transform: scale(1.03);
}


/* --------------------------------------------------------------------------
   12. NOTES (Floating overlays)
   -------------------------------------------------------------------------- */
.editorial-note {
  border-radius: var(--radius-note);
  background-color: rgba(255, 255, 255, 0.9);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%),
    radial-gradient(ellipse at 50% 0%, rgba(103, 190, 217, 0.12), transparent 70%);
  border: 1px solid color-mix(in srgb, var(--color-border-soft) 60%, white 40%);
  box-shadow: var(--shadow-note);
  padding: 1.25rem 1.5rem;
}


/* --------------------------------------------------------------------------
   13. FORMS
   -------------------------------------------------------------------------- */
.le-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.le-form-group + .le-form-group {
  margin-top: 1rem;
}

.le-form-label {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary-deepest);
}

.le-form-input {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  padding: 0.75rem 1rem;
  color: var(--color-primary-deepest);
  background-color: #fff;
  border: 1px solid color-mix(in srgb, var(--color-border-soft) 80%, white 20%);
  border-radius: var(--radius-btn);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  width: 100%;
}

.le-form-input::placeholder {
  color: var(--color-ink-soft);
  opacity: 0.5;
}

.le-form-input:focus {
  border-color: var(--color-primary-action);
  box-shadow: 0 0 0 3px rgba(26, 143, 209, 0.12);
}

.le-form-input.has-error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.le-form-error {
  font-size: 0.8125rem;
  color: #e74c3c;
  display: none;
}

.le-form-error.visible {
  display: block;
}

.le-form-hint {
  font-size: 0.8125rem;
  color: var(--color-ink-soft);
}

/* Checkbox */
.le-form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--color-ink-soft);
}

.le-form-checkbox input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.125rem;
  accent-color: var(--color-primary-action);
  cursor: pointer;
  flex-shrink: 0;
}


/* --------------------------------------------------------------------------
   14. GLASSMORPHISM
   -------------------------------------------------------------------------- */
.glass-nav {
  background-color: rgba(252, 250, 247, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}


/* --------------------------------------------------------------------------
   15. UTILITY CLASSES
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-left { text-align: left; }

.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }

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


/* --------------------------------------------------------------------------
   16. NAVBAR (Landing variant)
   -------------------------------------------------------------------------- */
.le-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
}

.le-navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.le-navbar__logo img {
  height: 2.5rem;
  width: auto;
}

.le-navbar__cta {
  display: none;
}

@media (min-width: 640px) {
  .le-navbar__cta {
    display: inline-flex;
  }
}


/* --------------------------------------------------------------------------
   17. FOOTER (Landing variant)
   -------------------------------------------------------------------------- */
.le-footer {
  padding: 2rem 0;
  background: #112838;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8125rem;
  text-align: center;
}

.le-footer a {
  color: rgba(255, 255, 255, 0.65);
}

.le-footer a:hover {
  color: #fff;
}


/* --------------------------------------------------------------------------
   18. ANIMATIONS & MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .le-fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .le-fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .le-fade-in {
    opacity: 1;
    transform: none;
  }
}


/* --------------------------------------------------------------------------
   19. RESPONSIVE IMAGE UTILITIES
   -------------------------------------------------------------------------- */
.le-aspect-4-3 {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.le-aspect-16-9 {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
