/* style.css — Design tokens + component styles para embutidosfrescos.com */

/* === DESIGN TOKENS === */
:root, [data-theme="light"] {
  /* Fluid type scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Palette — cálida y gastronómica: rojos y cremas evocando embutidos artesanos */
  --color-bg:              #fdf8f3;
  --color-surface:         #fff9f4;
  --color-surface-2:       #fffcfa;
  --color-surface-offset:  #f5ede3;
  --color-surface-offset-2:#eddfd2;
  --color-surface-dynamic: #e8d8c8;
  --color-divider:         #ddd0c4;
  --color-border:          #d0bfb2;

  /* Text */
  --color-text:            #2c1a10;
  --color-text-muted:      #7a6055;
  --color-text-faint:      #b8a89e;
  --color-text-inverse:    #fdf8f3;

  /* Primary accent — rojo vino / jamón */
  --color-primary:         #8b1a1a;
  --color-primary-hover:   #6e1212;
  --color-primary-active:  #500d0d;
  --color-primary-highlight: #f0d0cc;

  /* Secondary gold — madera, ahumado */
  --color-gold:            #a0720a;
  --color-gold-hover:      #7d5808;
  --color-gold-highlight:  #f5e8c8;

  /* Success / Warning / Error */
  --color-success:         #3b6e2a;
  --color-success-highlight: #d4e8cc;
  --color-error:           #b02020;
  --color-error-highlight: #f0d0cc;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(44, 26, 16, 0.06);
  --shadow-md: 0 4px 12px rgba(44, 26, 16, 0.09);
  --shadow-lg: 0 12px 32px rgba(44, 26, 16, 0.13);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Fonts */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
}

/* DARK MODE */
[data-theme="dark"] {
  --color-bg:              #1a100a;
  --color-surface:         #201410;
  --color-surface-2:       #261812;
  --color-surface-offset:  #1e1309;
  --color-surface-offset-2:#231708;
  --color-surface-dynamic: #2e1e14;
  --color-divider:         #382618;
  --color-border:          #4a3428;
  --color-text:            #e8d8cc;
  --color-text-muted:      #8a7a70;
  --color-text-faint:      #5a4a40;
  --color-text-inverse:    #2c1a10;
  --color-primary:         #e06060;
  --color-primary-hover:   #c84040;
  --color-primary-active:  #a82020;
  --color-primary-highlight: #4a2020;
  --color-gold:            #d4a030;
  --color-gold-hover:      #c08010;
  --color-gold-highlight:  #3a2e14;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:              #1a100a;
    --color-surface:         #201410;
    --color-surface-2:       #261812;
    --color-surface-offset:  #1e1309;
    --color-surface-offset-2:#231708;
    --color-surface-dynamic: #2e1e14;
    --color-divider:         #382618;
    --color-border:          #4a3428;
    --color-text:            #e8d8cc;
    --color-text-muted:      #8a7a70;
    --color-text-faint:      #5a4a40;
    --color-text-inverse:    #2c1a10;
    --color-primary:         #e06060;
    --color-primary-hover:   #c84040;
    --color-primary-active:  #a82020;
    --color-primary-highlight: #4a2020;
    --color-gold:            #d4a030;
    --color-gold-hover:      #c08010;
    --color-gold-highlight:  #3a2e14;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.25);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.35);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.45);
  }
}

/* === LAYOUT === */
.container {
  width: 100%;
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 5vw, var(--space-12));
}

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

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

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition-interactive);
}

.site-header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}

.logo-tagline {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.3;
  max-width: 180px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .hero-cta.header-cta {
    display: none;
  }
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
}

.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-offset-2);
}

/* === HERO === */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(var(--space-16), 10vw, var(--space-32));
  background: var(--color-surface-offset);
  border-bottom: 1px solid var(--color-border);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 60% at 70% 50%, color-mix(in oklab, var(--color-primary) 12%, transparent) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 20% 80%, color-mix(in oklab, var(--color-gold) 10%, transparent) 0%, transparent 60%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  border: 1px solid color-mix(in oklab, var(--color-primary) 30%, transparent);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-5);
  line-height: 1.1;
}

.hero-title span {
  color: var(--color-primary);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  max-width: 52ch;
}

.hero-domain {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-10);
  box-shadow: var(--shadow-md);
}

.hero-domain-text {
  font-family: 'Courier New', Courier, monospace;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

.hero-domain-ext {
  color: var(--color-text-muted);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.stat-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-base);
  font-weight: 600;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-lg);
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

.hero-cta:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

/* === WHY SECTION === */
.section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

.section-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-5);
  line-height: 1.15;
}

.section-lead {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 56ch;
  margin-bottom: var(--space-10);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-interactive), transform var(--transition-interactive);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary-highlight);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  color: var(--color-primary);
}

.feature-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.feature-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* === VALUATION SECTION === */
.valuation-section {
  background: var(--color-surface-offset);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.valuation-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (max-width: 700px) {
  .valuation-inner { grid-template-columns: 1fr; }
}

.valuation-price-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-8);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.valuation-price-badge::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-gold));
}

.val-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.val-price {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.val-currency {
  font-size: var(--text-xl);
  vertical-align: top;
  margin-top: var(--space-2);
}

.val-source {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.val-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.val-bullets li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: none;
}

.val-bullets li::before {
  content: '';
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  margin-top: 6px;
}

/* === FORM SECTION === */
.form-section {
  background: var(--color-bg);
}

.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-8), 5vw, var(--space-12));
  box-shadow: var(--shadow-lg);
  max-width: 640px;
  margin-inline: auto;
}

.form-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.form-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.form-label span {
  color: var(--color-primary);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  color: var(--color-text);
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 15%, transparent);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-faint);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 520px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.form-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.form-consent-text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.form-consent-text a {
  color: var(--color-primary);
  text-decoration: underline;
}

.btn-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-base);
  font-weight: 600;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.btn-submit:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  display: none;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  margin-top: var(--space-4);
}

.form-status.success {
  display: block;
  background: var(--color-success-highlight);
  color: var(--color-success);
  border: 1px solid color-mix(in oklab, var(--color-success) 30%, transparent);
}

.form-status.error {
  display: block;
  background: var(--color-error-highlight);
  color: var(--color-error);
  border: 1px solid color-mix(in oklab, var(--color-error) 30%, transparent);
}

/* === SECTOR SECTION === */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.sector-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  transition: box-shadow var(--transition-interactive), border-color var(--transition-interactive);
}

.sector-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-primary);
}

.sector-icon {
  font-size: 2rem;
  margin-bottom: var(--space-3);
}

.sector-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

/* === FOOTER === */
.site-footer {
  background: var(--color-surface-offset);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-10);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

@media (max-width: 680px) {
  .footer-inner { grid-template-columns: 1fr; gap: var(--space-6); }
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.footer-brand-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.55;
}

.footer-col-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

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

.footer-divider {
  border: none;
  border-top: 1px solid var(--color-divider);
  margin-bottom: var(--space-6);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.footer-pplx a {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-decoration: none;
}

.footer-pplx a:hover {
  color: var(--color-text-muted);
}

/* === COOKIE BANNER === */
#cookie-banner {
  position: fixed;
  bottom: var(--space-5);
  left: var(--space-5);
  right: var(--space-5);
  max-width: 740px;
  margin-inline: auto;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-8);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

#cookie-banner.hidden {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}

.cookie-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  flex: 1;
  min-width: 200px;
}

.cookie-text a {
  color: var(--color-primary);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
}

.btn-cookie-accept {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
}

.btn-cookie-accept:hover {
  background: var(--color-primary-hover);
}

.btn-cookie-reject {
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  cursor: pointer;
}

.btn-cookie-reject:hover {
  border-color: var(--color-text-muted);
  color: var(--color-text);
}

/* === LEGAL PAGES === */
.legal-hero {
  padding-block: clamp(var(--space-12), 6vw, var(--space-20));
  background: var(--color-surface-offset);
  border-bottom: 1px solid var(--color-border);
}

.legal-content {
  padding-block: var(--space-12);
}

.legal-content h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}

.legal-content h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.legal-content p,
.legal-content li {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4);
  max-width: 72ch;
}

.legal-content ul {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.legal-content a {
  color: var(--color-primary);
  text-decoration: underline;
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
}

.legal-content th,
.legal-content td {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  text-align: left;
  color: var(--color-text-muted);
}

.legal-content th {
  background: var(--color-surface-offset);
  font-weight: 700;
  color: var(--color-text);
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.fade-in-up-delay-1 { animation-delay: 0.1s; }
.fade-in-up-delay-2 { animation-delay: 0.2s; }
.fade-in-up-delay-3 { animation-delay: 0.3s; }

/* === UTILITIES === */
.text-center { text-align: center; }
.text-center .section-lead { margin-inline: auto; }

.divider {
  border: none;
  border-top: 1px solid var(--color-divider);
  margin-block: var(--space-8);
}

.tag {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-gold-highlight);
  color: var(--color-gold);
  border: 1px solid color-mix(in oklab, var(--color-gold) 25%, transparent);
}
