/* ============================================================
   tarriso.com — Main Stylesheet
   Palette: Light base · Red accent · Dark button
   ============================================================ */

/* --- Tokens --- */
:root {
  --red:        #C0392B;
  --red-dark:   #922B21;
  --red-light:  #FADBD8;
  --red-mid:    #E74C3C;

  --bg:         #F8F7F5;
  --surface:    #FFFFFF;
  --surface-2:  #F2F0ED;
  --border:     #E5E2DC;

  --text:       #1A1A1A;
  --text-2:     #555250;
  --text-3:     #888380;

  --btn-dark:   #1A1A1A;
  --btn-dark-h: #2D2D2D;

  --nav-h:      64px;
  --radius:     8px;
  --radius-lg:  14px;
  --shadow:     0 1px 3px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.10);

  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Sora', 'Inter', sans-serif;
  --transition: .2s cubic-bezier(.4,0,.2,1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 700; letter-spacing: -.015em; }
h3 { font-size: 1.15rem; font-weight: 600; }
em { color: var(--red); font-style: normal; }

/* --- Utility --- */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 600; font-family: var(--font-sans);
  cursor: pointer; border: none; transition: var(--transition);
  white-space: nowrap;
}
.btn-dark {
  background: var(--btn-dark);
  color: #fff;
}
.btn-dark:hover { background: var(--btn-dark-h); transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-red {
  background: var(--red);
  color: #fff;
}
.btn-red:hover { background: var(--red-dark); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--text-3); background: var(--surface-2); }

.btn-ghost {
  background: transparent; color: var(--red);
  border: 1.5px solid var(--red-light);
}
.btn-ghost:hover { background: var(--red-light); }

/* ============================================================
   NAVIGATION
   ============================================================ */
#navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248, 247, 245, .95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  transition: box-shadow var(--transition);
}
#navbar.scrolled { box-shadow: var(--shadow); }

.nav-inner {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
  color: var(--text);
}
.nav-logo .logo-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  display: inline-block;
}
.nav-links {
  display: flex; align-items: center; gap: 4px;
}
.nav-links a {
  padding: 7px 14px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 500; color: var(--text-2);
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--red); }

.nav-right { display: flex; align-items: center; gap: 10px; }

/* Lang switcher */
.lang-switcher {
  display: flex; align-items: center; gap: 3px;
  background: var(--surface-2); border-radius: 6px; padding: 3px;
}
.lang-btn {
  padding: 4px 9px; border-radius: 4px; font-size: .78rem; font-weight: 600;
  cursor: pointer; border: none; background: transparent; color: var(--text-3);
  transition: var(--transition); text-transform: uppercase; letter-spacing: .04em;
}
.lang-btn.active { background: var(--surface); color: var(--red); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.lang-btn:hover:not(.active) { color: var(--text); }

/* Mobile menu toggle */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 6px; border: none; background: none;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text);
  border-radius: 2px; transition: var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.nav-mobile {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px; z-index: 99;
  box-shadow: var(--shadow-lg);
}
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block; padding: 12px 0; font-size: 1rem; font-weight: 500;
  color: var(--text-2); border-bottom: 1px solid var(--border);
}
.nav-mobile a:last-of-type { border-bottom: none; }
.nav-mobile a:hover { color: var(--red); }
.nav-mobile .lang-switcher { margin-top: 16px; }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  padding: 96px 0 80px;
  background:
    radial-gradient(ellipse 60% 50% at 70% 60%, rgba(192,57,43,.07) 0%, transparent 70%),
    var(--bg);
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red-light); color: var(--red-dark);
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 20px; margin-bottom: 24px;
}
.hero-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
.hero-title { margin-bottom: 20px; }
.hero-sub {
  font-size: 1.05rem; color: var(--text-2); max-width: 480px;
  line-height: 1.7; margin-bottom: 36px;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero visual */
.hero-visual {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.hero-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.hero-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.hero-card:first-child { grid-column: 1 / -1; background: var(--btn-dark); color: #fff; }
.hero-card-icon { font-size: 1.5rem; margin-bottom: 10px; }
.hero-card-title { font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.hero-card-desc { font-size: .8rem; color: var(--text-3); }
.hero-card:first-child .hero-card-desc { color: rgba(255,255,255,.6); }
.hero-card-value {
  font-family: var(--font-display); font-size: 1.8rem; font-weight: 700;
  color: var(--red); margin-bottom: 4px;
}

/* ============================================================
   STATS BAR
   ============================================================ */
#stats {
  background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 32px 0;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; text-align: center;
}
.stat-item { padding: 8px 16px; }
.stat-item + .stat-item { border-left: 1px solid var(--border); }
.stat-value {
  font-family: var(--font-display); font-size: 1.9rem; font-weight: 700;
  color: var(--red); line-height: 1;
}
.stat-label { font-size: .82rem; color: var(--text-3); margin-top: 4px; font-weight: 500; }

/* ============================================================
   SERVICES
   ============================================================ */
#servicios { background: var(--bg); }
.section-header { text-align: center; max-width: 560px; margin: 0 auto 56px; }
.section-eyebrow {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--red); margin-bottom: 12px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p { color: var(--text-2); font-size: 1.02rem; }

.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.service-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--red-light); }

.service-icon { font-size: 1.8rem; margin-bottom: 14px; }
.service-card h3 { margin-bottom: 8px; font-size: 1.05rem; }
.service-card p { font-size: .88rem; color: var(--text-2); line-height: 1.65; }

/* ============================================================
   CONTACT
   ============================================================ */
#contacto { background: var(--surface-2); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start; }

.contact-info h2 { margin-bottom: 12px; }
.contact-info .lead { color: var(--text-2); margin-bottom: 32px; font-size: 1.02rem; }

.contact-detail {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 20px;
}
.contact-detail-icon {
  width: 40px; height: 40px; border-radius: var(--radius);
  background: var(--red-light); color: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.contact-detail-text strong { display: block; font-size: .85rem; color: var(--text-3); margin-bottom: 2px; }
.contact-detail-text span { font-size: .95rem; font-weight: 500; }

/* Form */
.contact-form {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: .82rem; font-weight: 600; color: var(--text-2);
  margin-bottom: 6px; letter-spacing: .01em;
}
.form-group input,
.form-group textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-sans); font-size: .9rem; color: var(--text);
  background: var(--bg); transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--red); box-shadow: 0 0 0 3px rgba(192,57,43,.12);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-msg {
  padding: 10px 14px; border-radius: var(--radius);
  font-size: .88rem; font-weight: 500; margin-top: 10px; display: none;
}
.form-msg.success { background: #d4edda; color: #155724; display: block; }
.form-msg.error   { background: #f8d7da; color: #721c24; display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  background: var(--btn-dark); color: rgba(255,255,255,.7);
  padding: 40px 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-logo {
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: #fff;
  display: flex; align-items: center; gap: 8px;
}
.footer-logo .logo-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.footer-tagline { font-size: .85rem; color: rgba(255,255,255,.45); margin-top: 3px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: .88rem; color: rgba(255,255,255,.5); transition: color var(--transition); }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: .8rem; color: rgba(255,255,255,.3); margin-top: 4px; }

/* ============================================================
   SCROLL-TO-TOP
   ============================================================ */
#scroll-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 50;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--btn-dark); color: #fff;
  border: none; cursor: pointer; font-size: 1rem;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  display: flex; align-items: center; justify-content: center;
}
#scroll-top.visible { opacity: 1; pointer-events: auto; }
#scroll-top:hover { transform: translateY(-2px); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-left: 1px solid var(--border); }
  .stat-item:nth-child(3) { border-left: none; border-top: 1px solid var(--border); }
  .stat-item:nth-child(4) { border-left: 1px solid var(--border); border-top: 1px solid var(--border); }
}
@media (max-width: 640px) {
  .nav-links, .nav-right .btn { display: none; }
  .nav-toggle { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  #hero { padding: 64px 0 48px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
