/* =========================================================
   Agrosacos — hoja de estilos
   Manufactura mexicana de sacos y costales de polipropileno
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@600;700;800&family=Work+Sans:wght@400;500;600&display=swap');

:root {
  --paper: #EDE6D6;
  --paper-dim: #E2D9C6;
  --ink: #211F1A;
  --ink-soft: #4A4638;
  --field: #3B5738;
  --field-dark: #2A3F27;
  --grain: #C79A3E;
  --rust: #9C4A28;
  --thread: #B8AE96;

  --display: 'Big Shoulders Display', sans-serif;
  --body: 'Work Sans', sans-serif;

  --wrap: 1180px;
  --edge: 6vw;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 0.98;
  margin: 0;
  color: var(--ink);
}

h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); letter-spacing: 0.3px; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); font-weight: 600; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--field);
  font-weight: 600;
  margin-bottom: 0.6em;
}

/* stitched seam divider — a nod to the cord/jareta stitching on the bags */
.seam {
  border: none;
  border-top: 2px dashed var(--thread);
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  background: var(--field);
  color: var(--paper);
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.98rem;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn:hover { background: var(--field-dark); }
.btn:focus-visible { outline: 3px solid var(--grain); outline-offset: 2px; }

.btn.outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn.outline:hover { background: var(--ink); color: var(--paper); }

/* ---------------- header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 2px dashed var(--thread);
  transition: box-shadow 0.25s ease;
}
.site-header.scrolled {
  box-shadow: 0 6px 18px rgba(33,31,26,0.08);
}

.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1em var(--edge);
  transition: padding 0.25s ease;
}
.site-header.scrolled .bar { padding-top: 0.7em; padding-bottom: 0.7em; }

.logo img { height: 40px; width: auto; transition: height 0.25s ease; }
.site-header.scrolled .logo img { height: 32px; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2.2em;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-size: 0.98rem;
  font-weight: 500;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  border-bottom-color: var(--rust);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4em;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ink);
  margin: 6px 0;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 2px dashed var(--thread);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.open { max-height: 320px; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5em var(--edge) 1.2em;
  }
  .main-nav li { border-top: 1px solid var(--paper-dim); }
  .main-nav li:first-child { border-top: none; }
  .main-nav a { display: block; padding: 0.9em 0; }
}

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: var(--paper);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(33,31,26,0.15) 0%, rgba(33,31,26,0.85) 100%);
}
.hero .wrap { position: relative; padding-top: 4em; padding-bottom: 3.4em; }
.hero .eyebrow { color: var(--grain); }
.hero h1 { color: var(--paper); max-width: 14ch; }
.hero .lede { max-width: 46ch; font-size: 1.1rem; margin-top: 0.9em; color: var(--paper-dim); }
.hero .btn { margin-top: 1.4em; }

.hero.small { min-height: 46vh; }

/* ---------------- sections ---------------- */

section { padding: 5.5em 0; }
section + section { border-top: 2px dashed var(--thread); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4em;
  align-items: center;
}
@media (max-width: 780px) {
  .grid-2 { grid-template-columns: 1fr; gap: 2em; }
}

.grid-2 figure { margin: 0; }
.grid-2 figure img { border-radius: 2px; }

.copy-block { max-width: 52ch; }
.copy-block h2 { margin-bottom: 0.6em; }

.lead-line {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--field-dark);
}

/* clients list */
.client-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 2.4em;
  border-top: 2px dashed var(--thread);
  border-left: 2px dashed var(--thread);
}
.client-grid div {
  padding: 1.6em 1.4em;
  border-right: 2px dashed var(--thread);
  border-bottom: 2px dashed var(--thread);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  min-height: 110px;
}
@media (max-width: 900px) {
  .client-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .client-grid { grid-template-columns: 1fr; }
}

/* values */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.6em;
  margin-top: 2em;
}
@media (max-width: 780px) {
  .values-grid { grid-template-columns: 1fr; gap: 2em; }
}
.value-item .num {
  font-family: var(--display);
  font-size: 0.95rem;
  color: var(--rust);
  font-weight: 700;
  margin-bottom: 0.4em;
}
.value-item h3 { margin-bottom: 0.4em; }
.value-item p { color: var(--ink-soft); }

/* mission / vision */
.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3em;
  margin-top: 1em;
}
@media (max-width: 780px) {
  .mv-grid { grid-template-columns: 1fr; }
}
.mv-item {
  border-left: 3px solid var(--field);
  padding-left: 1.4em;
}
.mv-item h3 { color: var(--field-dark); margin-bottom: 0.5em; }

/* specs list */
.specs-list {
  list-style: none;
  margin: 1.6em 0 0;
  padding: 0;
}
.specs-list li {
  display: flex;
  gap: 0.9em;
  padding: 1em 0;
  border-top: 1px solid var(--paper-dim);
}
.specs-list li::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: 0.5em;
  background: var(--grain);
  border-radius: 50%;
}

/* image trio */
.image-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1em;
  margin-top: 3.5em;
}
.image-trio img {
  border-radius: 2px;
  height: 220px;
  width: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}
.image-trio img:hover { transform: scale(1.03); filter: brightness(1.05); }
@media (max-width: 780px) {
  .image-trio { grid-template-columns: 1fr; }
  .image-trio img { height: 200px; }
}

/* product lines */
.product-list {
  margin-top: 2em;
  border-top: 2px dashed var(--thread);
}
.product-row {
  border-bottom: 2px dashed var(--thread);
}
.product-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2em;
  width: 100%;
  padding: 1.8em 0;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.product-row-head h3 { color: var(--field-dark); }
.product-row-head .hint {
  flex: none;
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0.6em;
}
.product-row-head .plus {
  flex: none;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--rust);
  border-radius: 50%;
  position: relative;
}
.product-row-head .plus::before,
.product-row-head .plus::after {
  content: "";
  position: absolute;
  background: var(--rust);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.product-row-head .plus::before { width: 12px; height: 2px; }
.product-row-head .plus::after { width: 2px; height: 12px; transition: transform 0.2s ease, opacity 0.2s ease; }
.product-row.open .product-row-head .plus::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }

.product-row-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.product-row.open .product-row-body { max-height: 400px; }
.product-row-body-inner { padding: 0 0 1.8em; }

.variant-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5em;
}
.variant-list li {
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding-left: 1.6em;
  position: relative;
}
.variant-list li::before {
  content: attr(data-n);
  position: absolute;
  left: 0;
  font-family: var(--display);
  font-weight: 700;
  color: var(--rust);
  font-size: 0.85rem;
}
.variant-note {
  margin-top: 0.8em;
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 4em;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 2.5em; }
}
.contact-features {
  list-style: none;
  margin: 2em 0 0;
  padding: 0;
  display: grid;
  gap: 1.4em;
}
.contact-features li {
  padding-left: 1.6em;
  position: relative;
  color: var(--ink-soft);
}
.contact-features li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--rust);
  font-weight: 700;
}

form.quote-form {
  display: grid;
  gap: 1.3em;
  background: var(--paper-dim);
  padding: 2.4em;
  border-radius: 2px;
}
.field { display: grid; gap: 0.5em; }
.field label { font-size: 0.92rem; font-weight: 600; color: var(--ink-soft); }
.field input,
.field textarea {
  font-family: var(--body);
  font-size: 1rem;
  padding: 0.8em 0.9em;
  border: 1.5px solid var(--thread);
  background: var(--paper);
  color: var(--ink);
  border-radius: 2px;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--field);
}
.quote-form .btn { justify-self: start; margin-top: 0.4em; }
.form-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: -0.4em;
}
.form-status {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--field-dark);
  display: none;
}
.form-status.visible { display: block; }

/* ---------------- scroll reveal ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------- floating language toggle ---------------- */

.lang-toggle {
  position: fixed;
  right: 1.6em;
  bottom: 1.6em;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.7em 1.1em;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 999px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(33,31,26,0.28);
  transition: transform 0.2s ease, background 0.2s ease;
}
.lang-toggle:hover { transform: translateY(-2px); background: var(--field-dark); }
.lang-toggle:focus-visible { outline: 3px solid var(--grain); outline-offset: 3px; }
.lang-toggle .lang-current { color: var(--grain); }
.lang-toggle .lang-sep { opacity: 0.5; }
.lang-toggle .lang-next { opacity: 0.75; }

@media (max-width: 560px) {
  .lang-toggle { right: 1em; bottom: 1em; padding: 0.6em 0.9em; font-size: 0.82rem; }
}

/* ---------------- video section ---------------- */

.video-frame {
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 16 / 9;
}
.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8em;
  background: rgba(33,31,26,0.35);
  border: none;
  cursor: pointer;
  color: var(--paper);
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
}
.video-play .disc {
  flex: none;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--grain);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.video-play:hover .disc { transform: scale(1.08); }
.video-play .disc::after {
  content: "";
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--ink);
  margin-left: 4px;
}
.video-frame.playing .video-play { display: none; }

/* ---------------- lightbox ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(33,31,26,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4em 2em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: min(90vw, 900px);
  max-height: 82vh;
  border-radius: 2px;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 1.4em;
  right: 1.6em;
  background: none;
  border: none;
  color: var(--paper);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

[data-lightbox] { cursor: zoom-in; }

/* ---------------- footer ---------------- */

footer.site-footer {
  background: var(--ink);
  color: var(--paper-dim);
  padding: 4.5em 0 2em;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 3em;
  padding-bottom: 3em;
  border-bottom: 1px solid rgba(237,230,214,0.15);
}
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2.4em; }
}
.footer-grid h4 {
  font-family: var(--display);
  color: var(--paper);
  font-size: 1.6rem;
  margin-bottom: 0.2em;
}
.footer-grid .tag { color: var(--grain); font-size: 0.95rem; margin-bottom: 1.4em; }
.footer-grid h5 {
  font-family: var(--body);
  font-size: 0.85rem;
  color: var(--thread);
  margin: 0 0 1em;
  font-weight: 600;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7em; }
.footer-grid ul a:hover { color: var(--paper); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1em;
  padding-top: 1.8em;
  font-size: 0.85rem;
  color: var(--thread);
}
