/* ============================================================
   IMDAL S.R.L. — design tokens
   Color   ink #14181C · paper #F6F7F8 · steel #4A5560
           steel-line #DDE3E6 · red #C10E1E · red-deep #8C0A16
   Type    display: Space Grotesk · body: IBM Plex Sans · utility: IBM Plex Mono
   Motif   "tine rule": a repeating comb-tooth line pattern used as the
           signature divider — a direct reference to the product itself.
   ============================================================ */

:root{
  --ink: #14181c;
  --paper: #f6f7f8;
  --paper-raised: #ffffff;
  --steel: #4a5560;
  --steel-soft: #6b7580;
  --steel-line: #dde3e6;
  --red: #c10e1e;
  --red-deep: #8c0a16;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --wrap: 1180px;
  --radius: 2px;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *,*::before,*::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3{
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 0.5em;
  letter-spacing: -0.025em;
}

p{ margin: 0 0 1em; color: var(--steel); }

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

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

.wrap{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow{
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 0.9em;
}

.section{ padding: 96px 0; }
.section__head{ max-width: 640px; margin-bottom: 48px; }
.section__head h2{ font-size: clamp(2.3rem, 3.6vw, 3.1rem); }
.section__lead{ font-size: 1.05rem; }

/* buttons */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn--primary{ background: var(--red); color: #fff; }
.btn--primary:hover{ background: var(--red-deep); }
.btn--ghost{ border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover{ background: var(--ink); color: #fff; }
.btn--block{ width: 100%; }

/* ============ tine rule (signature divider) ============ */
.rule{
  display: block;
  width: 100%;
  height: 22px;
  color: var(--steel-line);
}
.rule--dark{ color: rgba(255,255,255,0.14); background: var(--ink); }

/* ============ NAV ============ */
.nav{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246,247,248,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--steel-line);
}
.nav__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 128px;
}

/* wordmark — replaces the low-res raster logo with a crisp, scalable typographic mark */
.wordmark{
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  letter-spacing: -0.03em;
  color: var(--red);
  line-height: 1;
}
.wordmark__suffix{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
}
.wordmark--footer{ font-size: clamp(2.6rem, 6vw, 4.2rem); color: #fff; }
.wordmark--footer .wordmark__suffix{ color: rgba(255,255,255,0.55); }

.nav__links{
  display: flex;
  align-items: center;
  gap: 30px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.nav__links a{ color: var(--ink); }
.nav__links a:hover{ color: var(--red); }
.nav__cta{
  padding: 10px 20px;
  background: var(--ink);
  color: #fff !important;
  border-radius: var(--radius);
}
.nav__cta:hover{ background: var(--red) !important; }
.nav__lang{
  position: relative;
}
.nav__lang-toggle{
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--steel-line);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}
.nav__lang-toggle svg{ transition: transform 0.2s ease; }
.nav__lang-toggle:hover{ border-color: var(--red); color: var(--red); }
.nav__lang.is-open .nav__lang-toggle{ border-color: var(--red); color: var(--red); }
.nav__lang.is-open .nav__lang-toggle svg{ transform: rotate(180deg); }
.nav__lang-menu{
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: var(--paper-raised);
  border: 1px solid var(--steel-line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(20,24,28,0.1);
  overflow: hidden;
  z-index: 50;
}
.nav__lang.is-open .nav__lang-menu{ display: block; }
.nav__lang-menu a{
  display: block;
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
  border-bottom: 1px solid var(--steel-line);
}
.nav__lang-menu a:last-child{ border-bottom: none; }
.nav__lang-menu a:hover{ background: var(--paper); color: var(--red); }
.nav__lang-menu a.is-current{ color: var(--red); font-weight: 600; pointer-events: none; }
.nav__toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span{ width: 22px; height: 2px; background: var(--ink); }

/* ============ HERO ============ */
.hero{
  position: relative;
  padding: 72px 0 0;
  overflow: hidden;
}
.hero__tines{
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    var(--steel-line) 0px, var(--steel-line) 1px,
    transparent 1px, transparent 18px
  );
  mask-image: linear-gradient(to bottom, black, transparent 70%);
  opacity: 0.6;
}
.hero__wordmark{
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(6rem, 19vw, 15rem);
  letter-spacing: -0.04em;
  color: var(--ink);
  opacity: 0.035;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.hero__inner{
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
  padding-bottom: 56px;
}
.hero__copy h1{
  font-size: clamp(2.6rem, 4.8vw, 3.9rem);
  max-width: 15ch;
}
.hero__lead{ font-size: 1.08rem; max-width: 46ch; }
.hero__lead strong{ color: var(--ink); font-weight: 600; }
.hero__actions{ display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero__media{
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--paper-raised);
  border: 1px solid var(--steel-line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.hero__media img{ width: 100%; height: 100%; object-fit: contain; }

/* ============ OFFER ============ */
.offer__grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--steel-line);
  border: 1px solid var(--steel-line);
}
.offer__card{
  background: var(--paper-raised);
  padding: 32px 28px;
}
.offer__icon{ width: 34px; height: 34px; color: var(--red); margin-bottom: 18px; }
.offer__card h3{ font-size: 1.3rem; margin-bottom: 0.4em; }
.offer__card p{ font-size: 0.92rem; margin-bottom: 0; }

/* ============ PRODUCT LINES ============ */
.lines{ background: var(--paper-raised); border-top: 1px solid var(--steel-line); border-bottom: 1px solid var(--steel-line); }
.lines--secondary{ padding: 72px 0; }
.lines--secondary .section__head{ max-width: 720px; }
.lines--secondary .section__head h2{ font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
.lines--secondary .eyebrow{ color: var(--steel-soft); }
.lines__grid{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--steel-line);
  border: 1px solid var(--steel-line);
}
.lines__card{
  background: var(--paper-raised);
  padding: 20px 18px 24px;
}
.lines__photo{
  aspect-ratio: 4 / 3;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 14px;
}
.lines__photo img{ width: 100%; height: 100%; object-fit: contain; transition: transform 0.4s ease; }
.lines__card:hover .lines__photo img{ transform: scale(1.06); }
.lines__card--accent{ background: var(--ink); color: #fff; display: flex; flex-direction: column; justify-content: center; }
.lines__card--accent h3, .lines__card--accent .lines__icon{ color: #fff; }
.lines__card--accent p{ color: rgba(255,255,255,0.68); }
.lines__icon{ width: 30px; height: 30px; color: var(--red); margin-bottom: 14px; }
.lines__card h3{ font-size: 1.05rem; margin-bottom: 0.3em; }
.lines__card p{ font-size: 0.82rem; margin-bottom: 0; }

/* ============ PROCESS (cómo trabajamos) ============ */
.process__grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.process__step{
  padding-top: 20px;
  border-top: 2px solid var(--steel-line);
}
.process__num{
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--red);
  margin-bottom: 14px;
}
.process__step h3{ font-size: 1.15rem; margin-bottom: 0.35em; }
.process__step p{ font-size: 0.92rem; margin-bottom: 0; }

/* ============ PRODUCTS (peines — producto principal) ============ */
.products{
  background:
    linear-gradient(180deg, rgba(193,14,30,0.05), rgba(193,14,30,0) 220px),
    var(--paper);
  position: relative;
}
.products::before{
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
}
.filters{ display: flex; gap: 10px; margin-bottom: 32px; flex-wrap: wrap; }
.filter{
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 9px 16px;
  background: transparent;
  border: 1px solid var(--steel-line);
  border-radius: 100px;
  color: var(--steel);
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter:hover{ border-color: var(--ink); color: var(--ink); }
.filter.is-active{ background: var(--ink); color: #fff; border-color: var(--ink); }

.products__grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.product{ transition: opacity 0.25s ease, transform 0.25s ease; }
.product.is-hidden{ display: none; }
.product__photo{
  aspect-ratio: 1 / 1;
  background: var(--paper-raised);
  border: 1px solid var(--steel-line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.product__photo img{ width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product:hover .product__photo img{ transform: scale(1.05); }
.product h3{ font-size: 1.15rem; margin-bottom: 0.3em; }
.product p{ font-size: 0.88rem; margin-bottom: 0; }

/* ============ STATS ============ */
.stats{
  background: var(--ink);
  color: #fff;
  padding: 80px 0 88px;
}
.stats__lead{
  color: rgba(255,255,255,0.72);
  max-width: 62ch;
  font-size: 1.05rem;
  margin-bottom: 56px;
}
.stats__grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat__num{
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 4vw, 3rem);
  color: var(--red);
  font-weight: 500;
}
.stat__label{
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.72);
}

/* ============ CONTACT ============ */
.contact__inner{
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
}
.contact__details{
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact__map{
  margin-top: 24px;
  border: 1px solid var(--steel-line);
  border-radius: var(--radius);
  overflow: hidden;
  line-height: 0;
  filter: grayscale(0.15);
}
.contact__map iframe{ display: block; }
.contact__details li{
  font-size: 0.95rem;
  color: var(--ink);
  border-top: 1px solid var(--steel-line);
  padding-top: 14px;
}
.contact__details span{
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel-soft);
  margin-bottom: 4px;
}
.contact__details em{
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--steel-soft);
  margin-top: 2px;
}
.contact__form{
  background: var(--paper-raised);
  border: 1px solid var(--steel-line);
  padding: 32px;
  border-radius: var(--radius);
}
.field{ margin-bottom: 18px; }
.field label{
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--steel-soft);
  margin-bottom: 6px;
}
.field input, .field textarea{
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  border: 1px solid var(--steel-line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}
.field input:focus, .field textarea:focus{
  outline: 2px solid var(--red);
  outline-offset: 1px;
}
.contact__note{
  font-size: 0.8rem;
  color: var(--steel-soft);
  margin: 12px 0 0;
  text-align: center;
}

/* ============ FOOTER ============ */
.footer{ background: var(--ink); padding: 48px 0; }
.footer__inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.footer__inner p{ color: rgba(255,255,255,0.6); font-size: 0.9rem; margin: 0; }
.footer__social{ display: flex; gap: 16px; }
.footer__social a{
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
}
.footer__social a:hover{ border-color: var(--red); color: var(--red); }
.footer__legal{ font-size: 0.78rem !important; color: rgba(255,255,255,0.4) !important; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px){
  .hero__inner{ grid-template-columns: 1fr; }
  .hero__media{ order: -1; max-width: 380px; margin: 0 auto; }
  .offer__grid{ grid-template-columns: repeat(2, 1fr); }
  .process__grid{ grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
  .lines__grid{ grid-template-columns: repeat(3, 1fr); }
  .products__grid{ grid-template-columns: repeat(2, 1fr); }
  .stats__grid{ grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .contact__inner{ grid-template-columns: 1fr; }
}

@media (max-width: 640px){
  .nav__inner{ height: 84px; }
  .section{ padding: 64px 0; }
  .nav__toggle{ display: flex; }
  .nav__links{
    position: absolute;
    top: 84px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--steel-line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    display: none;
  }
  .nav__links.is-open{ display: flex; }
  .nav__links a{ padding: 12px 0; border-bottom: 1px solid var(--steel-line); }
  .nav__lang{ border-bottom: 1px solid var(--steel-line); padding: 12px 0; }
  .nav__lang-toggle{ width: 100%; justify-content: space-between; border: none; padding: 0; }
  .nav__lang-menu{ position: static; box-shadow: none; margin-top: 10px; width: 100%; }
  .nav__cta{ text-align: center; margin-top: 12px; }
  .offer__grid{ grid-template-columns: 1fr; }
  .process__grid{ grid-template-columns: 1fr; }
  .lines__grid{ grid-template-columns: repeat(2, 1fr); }
  .products__grid{ grid-template-columns: 1fr 1fr; gap: 16px; }
  .stats__grid{ grid-template-columns: 1fr 1fr; }
}
