/* ==========================================================================
   FLOWERCODE — LIGHT EDITORIAL DESIGN SYSTEM
   Estética limpia, humana y comercial. Sin dependencias externas.
   ========================================================================== */

:root {
  /* Warm Light Surfaces */
  --bg-page: #fafaf8;
  --bg-surface: #ffffff;
  --bg-muted: #f3f2ee;
  --bg-tint: #f8fafc;

  /* Ink */
  --ink-primary: #14161a;
  --ink-secondary: #4b5563;
  --ink-muted: #6b7280;

  /* Borders */
  --border: #e5e7eb;
  --border-strong: #cbd5e1;

  /* Calm Executive Accent (Deep Signal Blue) */
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-soft: #eff6ff;
  --accent-border: #bfdbfe;

  /* Semantic Status */
  --ok: #15803d;
  --ok-soft: #f0fdf4;
  --ok-border: #bbf7d0;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --warn-border: #fde68a;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --header-height: 74px;
  --container-max: 1160px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Shadows */
  --shadow-sm: 0 2px 8px -2px rgba(20, 22, 26, 0.05);
  --shadow-md: 0 12px 32px -12px rgba(20, 22, 26, 0.09);

  /* Layers */
  --z-content: 10;
  --z-header: 100;
  --z-drawer: 150;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  overflow-x: clip;
  background-color: var(--bg-page);
  color-scheme: light;
}

body {
  min-height: 100%;
  overflow-x: clip;
  background-color: var(--bg-page);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--ink-primary);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

p {
  color: var(--ink-secondary);
}

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

ul, ol {
  list-style: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

/* ---- SKIP LINK ---- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 999;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

/* ---- CONTAINER & TYPOGRAPHY ---- */
.container {
  width: min(100% - 2rem, var(--container-max));
  margin-inline: auto;
}

@media (min-width: 768px) {
  .container {
    width: min(100% - 4rem, var(--container-max));
  }
}

.section-kicker {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header {
  max-width: 720px;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3.1vw, 2.55rem);
  margin-bottom: 14px;
  text-wrap: balance;
}

.section-header p {
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  line-height: 1.65;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgba(29, 78, 216, 0.45);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--ink-primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--ink-primary);
  background: var(--bg-tint);
}

.btn-ghost {
  background: var(--bg-surface);
  color: var(--ink-secondary);
  border-color: var(--border);
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-ghost:hover {
  color: var(--ink-primary);
  border-color: var(--border-strong);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.86rem;
}

/* ---- STICKY HEADER ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: var(--z-header);
  background: rgba(250, 250, 248, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--border);
}

.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  pointer-events: none;
  transition: width 0.08s linear;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  flex-shrink: 0;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.brand-accent {
  color: var(--accent);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: color 0.2s ease;
  padding: 6px 0;
}

.nav-links a:hover {
  color: var(--ink-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-cta {
  display: none;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--ink-primary);
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }

  .header-cta {
    display: inline-flex;
  }

  .menu-toggle {
    display: none;
  }
}

/* ---- MOBILE DRAWER ---- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 26, 0.35);
  backdrop-filter: blur(2px);
  z-index: calc(var(--z-drawer) - 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(85vw, 330px);
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  z-index: var(--z-drawer);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0.25s;
}

.mobile-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.drawer-close {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-secondary);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-nav a {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-secondary);
}

.drawer-nav a:hover {
  background: var(--bg-muted);
  color: var(--ink-primary);
}

.drawer-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
    gap: 28px;
  }
}

.footer-brand p {
  margin-top: 12px;
  font-size: 0.92rem;
  max-width: 320px;
}

.footer-location {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.footer-col h2 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-primary);
  margin-bottom: 14px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---- SCROLL REVEAL ---- */
html.js-ready .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

html.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html.js-ready .reveal {
    opacity: 1;
    transform: none;
  }
}
