/* =============================================
   AGILE COOKING — Design System
   Versión 2.0 · Editorial de Alto Impacto
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

:root {
  --bg:           #E8E6DF;
  --bg-dark:      #1C1917;
  --bg-surface:   #DDDBD3;
  --text:         #1C1917;
  --text-light:   #E8E6DF;
  --muted:        rgba(28,25,23,0.50);
  --muted-light:  rgba(232,230,223,0.50);
  --border:       rgba(28,25,23,0.10);
  --border-light: rgba(232,230,223,0.10);
  --coral:        #D4614A;
  --violet:       #7B4F8E;
  --teal:         #3A8C8A;
  --f-display:    'Fraunces', serif;
  --f-body:       'DM Sans', sans-serif;
  --radius-sm:    3px;
  --radius-md:    8px;
  --pad-x:        clamp(24px, 6vw, 80px);
  --pad-y:        clamp(72px, 10vw, 140px);
}

body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- TYPOGRAPHY ---- */
.display {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.display-xl  { font-size: clamp(64px, 9vw, 120px); }
.display-lg  { font-size: clamp(48px, 6vw, 80px); }
.display-md  { font-size: clamp(36px, 4vw, 56px); }
.display-sm  { font-size: clamp(24px, 3vw, 36px); }
em { font-style: italic; color: var(--coral); }

.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.body-lg { font-size: 18px; line-height: 1.65; }
.body-md { font-size: 16px; line-height: 1.65; }
.body-sm { font-size: 14px; line-height: 1.65; }
.muted    { color: var(--muted); }
.muted-light { color: var(--muted-light); }

/* ---- LAYOUT ---- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.section { padding: var(--pad-y) var(--pad-x); }
.section-dark { background: var(--bg-dark); color: var(--text-light); }
.section-surface { background: var(--bg-surface); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); }

/* ---- NAV ---- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad-x);
  background: rgba(232, 230, 223, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: padding 0.3s ease, border-color 0.3s ease;
}
nav.scrolled { padding: 14px var(--pad-x); border-bottom-color: var(--border); }
nav.dark-nav {
  background: rgba(28, 25, 23, 0.95);
}
nav.dark-nav .nav-links a { color: var(--text-light); }
nav.dark-nav .nav-cta { color: var(--text-light); border-color: rgba(232,230,223,0.4); }
nav.dark-nav .nav-cta:hover { background: var(--text-light); color: var(--text); }
nav.dark-nav .logo { color: var(--text-light); }

.logo {
  font-family: var(--f-display);
  font-size: 18px; font-weight: 700;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -0.02em;
}
.logo-marks { display: flex; gap: 3px; align-items: flex-end; }
.logo-marks span { width: 5px; border-radius: 3px 3px 1px 1px; }
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text);
  text-decoration: none; opacity: 0.55; transition: opacity 0.2s;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; }
.nav-cta {
  font-size: 13px; font-weight: 600; color: var(--text);
  border: 1.5px solid var(--text); padding: 9px 20px;
  text-decoration: none; border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
  letter-spacing: 0.01em;
}
.nav-cta:hover { background: var(--text); color: var(--text-light); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-body); font-weight: 600;
  text-decoration: none; border: none; cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, gap 0.2s;
  border-radius: var(--radius-sm);
}
.btn-primary {
  background: var(--text); color: var(--text-light);
  padding: 14px 28px; font-size: 14px;
}
.btn-primary:hover { opacity: 0.85; }
.btn-coral {
  background: var(--coral); color: white;
  padding: 14px 28px; font-size: 14px;
}
.btn-coral:hover { opacity: 0.88; }
.btn-ghost {
  background: transparent; color: var(--coral);
  font-size: 14px; padding: 0; border: none;
}
.btn-ghost:hover { gap: 14px; }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border);
  padding: 12px 24px; font-size: 13px;
}
.btn-outline:hover { border-color: var(--text); }

/* ---- SECTION HEADER ---- */
.sec-header { margin-bottom: clamp(40px, 5vw, 72px); }
.sec-header .label { margin-bottom: 16px; color: var(--muted); }
.sec-header .label.coral { color: var(--coral); }
.sec-header .label.teal { color: var(--teal); }

/* ---- REVEAL ANIMATIONS ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1),
              transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }
.d4 { transition-delay: 0.32s; }
.d5 { transition-delay: 0.40s; }

/* ---- BADGE / PILL ---- */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid; padding: 7px 14px; border-radius: 40px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase;
}
.badge-teal  { border-color: var(--teal); color: var(--teal); }
.badge-coral { border-color: var(--coral); color: var(--coral); }
.badge::before { content: "●"; font-size: 7px; }

/* ---- CHEF WIDGET ---- */
.chef-widget { position: fixed; bottom: 28px; right: 28px; z-index: 999; display: flex; align-items: center; gap: 10px; }
.chef-tip {
  background: var(--bg-dark); color: var(--text-light);
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  opacity: 0; transform: translateX(6px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none; white-space: nowrap;
}
.chef-widget:hover .chef-tip { opacity: 1; transform: translateX(0); }
.chef-fab {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--bg-dark); border: 1px solid rgba(232,230,223,0.15);
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: 20px;
  transition: transform 0.2s;
}
.chef-fab:hover { transform: scale(1.08); }
.chef-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 400px;
  background: var(--bg-dark); border-left: 1px solid var(--border-light);
  z-index: 998; transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
}
.chef-drawer.open { transform: translateX(0); }
.drawer-head {
  padding: 20px 24px; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 12px;
}
.drawer-title { font-family: var(--f-display); font-size: 18px; font-weight: 700; color: var(--text-light); }
.drawer-sub { font-size: 12px; color: var(--muted-light); margin-top: 2px; }
.drawer-close { margin-left: auto; background: none; border: none; color: var(--muted-light); font-size: 22px; cursor: pointer; }
.drawer-close:hover { color: var(--text-light); }
.drawer-body { flex: 1; padding: 24px; overflow-y: auto; }
.drawer-bubble {
  background: rgba(212,97,74,0.12); border: 1px solid rgba(212,97,74,0.2);
  border-radius: 2px 8px 8px 8px;
  padding: 16px 18px; color: var(--text-light);
  font-size: 15px; line-height: 1.6; margin-bottom: 16px;
}
.drawer-note { text-align: center; padding: 8px 24px 12px; font-size: 11px; color: rgba(232,230,223,0.25); }
.drawer-foot { padding: 16px 24px; border-top: 1px solid var(--border-light); }
.drawer-input-row { display: flex; gap: 8px; }
.drawer-input {
  flex: 1; background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  padding: 10px 14px; font-family: var(--f-body);
  font-size: 14px; color: var(--text-light); outline: none;
}
.drawer-input:focus { border-color: var(--coral); }
.drawer-input::placeholder { color: var(--muted-light); }
.drawer-send { background: var(--coral); color: white; border: none; border-radius: var(--radius-sm); padding: 10px 18px; font-family: var(--f-body); font-size: 14px; font-weight: 600; cursor: pointer; }
.drawer-user-bubble {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px 2px 8px 8px; padding: 10px 14px;
  color: var(--text-light); font-size: 15px; line-height: 1.6;
  margin-bottom: 16px; margin-left: auto; max-width: 85%;
}
.drawer-typing { display: flex; gap: 5px; align-items: center; padding: 14px 16px; }
.drawer-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--coral); opacity: 0.6;
  animation: chef-blink 1.2s infinite ease-in-out;
}
.drawer-typing span:nth-child(2) { animation-delay: 0.2s; }
.drawer-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chef-blink {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-light);
  text-align: center; padding: 20px var(--pad-x);
  font-size: 13px; color: rgba(232,230,223,0.28);
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--muted-light); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; gap: 40px; }
  .grid-4 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .display-xl { font-size: clamp(48px, 13vw, 72px); }
}

/* ---- CHEF DRAWER ---- */
.drawer-user-bubble {
  background: rgba(232,230,223,0.08);
  border-radius: 12px 2px 12px 12px;
  padding: 12px 16px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
  text-align: right;
}
.drawer-typing span {
  display: inline-block; width: 6px; height: 6px;
  background: var(--muted-light); border-radius: 50%;
  margin: 0 2px; animation: typing 1.2s infinite;
}
.drawer-typing span:nth-child(2) { animation-delay: 0.2s; }
.drawer-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%,60%,100%{opacity:0.3} 30%{opacity:1} }
