/* ==========================================================================
   Sileasy LLC — styles
   Palette: white, cool greys, dark graphite, logo red-orange as accent.
   Type: Archivo (condensed, echoes the logo) + Source Sans 3 for reading.
   ========================================================================== */

:root {
  --white: #FFFFFF;
  --tint: #F2F3F4;
  --line: #DFE2E5;
  --muted: #5E666F;
  --graphite: #3A4148;
  --ink: #1D2125;
  --accent: #F04F36;        /* logo color, decorative use */
  --accent-strong: #C93A24; /* text/button use, passes contrast on white */

  --font-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-strong); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-stretch: 78%;
  color: var(--ink);
  line-height: 1.04;
  margin: 0 0 .5em;
  letter-spacing: -.005em;
}
h2 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 800; max-width: 18ch; }
h3 { font-size: 22px; font-weight: 700; font-stretch: 85%; line-height: 1.2; margin-bottom: .4em; }
p { margin: 0 0 1em; max-width: 62ch; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px;
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px;
  background: var(--accent-strong); color: #fff;
  font-family: var(--font-display); font-stretch: 90%; font-weight: 700; font-size: 17px;
  text-decoration: none; border: 2px solid var(--accent-strong); border-radius: var(--radius);
  cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-wide { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { width: 132px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) {
  color: var(--graphite); text-decoration: none; font-size: 16px; font-weight: 600;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a:not(.btn):hover { color: var(--ink); border-bottom-color: var(--accent); }
.nav-toggle { display: none; }

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 44px; height: 44px; padding: 0 10px; background: none; border: 0; cursor: pointer;
  }
  .nav-toggle .bar { display: block; height: 2px; background: var(--ink); transition: transform .25s var(--ease); }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(2) { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn):hover { border-bottom-color: var(--line); }
  .nav .btn { margin-top: 16px; min-height: 48px; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 104px) 0 0; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 6vw, 88px); align-items: center;
}
.hero-place {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; color: var(--muted); font-size: 16px; margin-bottom: 22px;
}
.hero-place::before { content: ""; width: 28px; height: 3px; background: var(--accent); }
.hero-title {
  font-size: clamp(46px, 7.4vw, 96px);
  font-weight: 850; font-stretch: 70%;
  line-height: .96; letter-spacing: -.012em;
  max-width: 13ch; margin-bottom: 28px;
}
.hero-lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--graphite); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Flow diagram: the signature element */
.flow {
  margin: 0; padding: 28px; background: var(--ink); color: #C9CED3;
  border-radius: var(--radius); display: flex; flex-direction: column; align-items: stretch;
}
.flow-node {
  border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius);
  padding: 16px 18px; background: rgba(255,255,255,.03);
}
.flow-node strong {
  display: block; color: #fff; font-family: var(--font-display); font-stretch: 85%;
  font-weight: 700; font-size: 19px; line-height: 1.2;
}
.flow-kicker { display: block; font-size: 14px; color: #9AA3AC; margin-bottom: 4px; }
.flow-node-core { background: #fff; border-color: #fff; text-align: center; padding: 22px 18px; }
.flow-node-core img { width: 128px; margin: 0 auto 10px; }
.flow-node-core strong { color: var(--ink); }
.flow-sub { display: block; font-size: 14px; color: var(--muted); margin-top: 4px; }
.flow-node-future { border-style: dashed; border-color: rgba(240,79,54,.7); background: transparent; }
.flow-node-future .flow-kicker { color: var(--accent); }
.flow-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.flow-link { height: 34px; display: flex; justify-content: center; }
.flow-link span {
  width: 2px; height: 100%;
  background: linear-gradient(to bottom, var(--accent) 50%, transparent 0) 0 0 / 2px 8px repeat-y;
  animation: flowDash 1.1s linear infinite;
}
@keyframes flowDash { to { background-position: 0 16px; } }

/* Facts strip */
.facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: clamp(56px, 8vw, 96px) 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.facts > div { padding: 22px 20px 22px 0; }
.facts > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 600; color: var(--ink); font-size: 17px; }
.facts a { color: var(--ink); text-decoration: none; }
.facts a:hover { color: var(--accent-strong); }

/* Hero load sequence (only orchestrated motion on the page) */
.js .hero-copy > *, .js .flow { opacity: 0; transform: translateY(14px); }
.js.is-loaded .hero-copy > *, .js.is-loaded .flow {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js.is-loaded .hero-copy > :nth-child(2) { transition-delay: .08s; }
.js.is-loaded .hero-copy > :nth-child(3) { transition-delay: .16s; }
.js.is-loaded .hero-copy > :nth-child(4) { transition-delay: .24s; }
.js.is-loaded .flow { transition-delay: .3s; }
/* Safety net: if JS stalls, content shows anyway */
@keyframes forceShow { to { opacity: 1; transform: none; } }
.js .hero-copy > *, .js .flow { animation: forceShow .01s 3s forwards; }

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section-tint { background: var(--tint); }
.section-dark { background: var(--ink); color: #C9CED3; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--graphite); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 104px); align-items: center; }
.split-text p { color: inherit; }
.section:not(.section-dark) .split-text p { color: var(--graphite); }

/* Photos (filled by OpenAI-generated images; graceful when missing) */
.photo {
  margin: 0; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; position: relative;
  background:
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(29,33,37,.05) 22px 23px),
    var(--tint);
}
.photo img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.photo::after {
  content: ""; position: absolute; left: 32px; bottom: 32px; width: 56px; height: 6px; background: var(--accent);
}
.photo-dark {
  background:
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(255,255,255,.05) 22px 23px),
    #272C31;
}

/* Pillars */
.pillars {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  margin-top: clamp(56px, 7vw, 96px);
}
.pillars article { padding: 28px 32px 0 0; border-top: 3px solid var(--ink); }
.pillars article + article { padding-left: 32px; border-left: 1px solid var(--line); }
.pillars h3 { font-size: 30px; font-stretch: 75%; font-weight: 800; }
.pillars p { color: var(--graphite); margin: 0; }

/* Categories */
.cats {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.cats li {
  padding: 28px 28px 24px; background: var(--white);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  position: relative;
}
.cats li::before {
  content: ""; position: absolute; left: 0; top: 0; width: 0; height: 3px; background: var(--accent);
  transition: width .35s var(--ease);
}
.cats li:hover::before { width: 100%; }
.cats h3 { margin-bottom: .3em; }
.cats p { color: var(--muted); font-size: 16px; margin: 0; }

/* Supplier commitments */
.commit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px 48px; }
.commit article { border-top: 1px solid var(--line); padding-top: 22px; }
.commit h3::before {
  content: ""; display: block; width: 10px; height: 10px; background: var(--accent); margin-bottom: 14px;
}
.commit p { color: var(--graphite); margin: 0; font-size: 17px; }

.steps-block {
  margin-top: clamp(64px, 8vw, 104px); background: var(--tint); border-radius: var(--radius);
  padding: clamp(28px, 4vw, 48px);
}
.steps-title { font-size: clamp(26px, 3vw, 34px); font-weight: 800; font-stretch: 75%; margin-bottom: 28px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 6px; }
.steps li::before {
  content: counter(step);
  font-family: var(--font-display); font-stretch: 70%; font-weight: 850; font-size: 44px; line-height: 1;
  color: var(--accent-strong); margin-bottom: 6px;
}
.steps strong { font-family: var(--font-display); font-stretch: 85%; color: var(--ink); font-size: 19px; }
.steps span { color: var(--graphite); font-size: 16px; }

/* Brands (dark) */
.split-rev .photo { order: 0; }
.ticks { list-style: none; margin: 8px 0 32px; padding: 0; }
.ticks li { padding: 12px 0 12px 30px; border-bottom: 1px solid rgba(255,255,255,.12); position: relative; color: #E3E6E9; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 19px; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
.section-dark .btn:hover { background: #fff; border-color: #fff; color: var(--ink); }

/* Latin America route */
.route { margin: 0; max-width: 420px; justify-self: center; width: 100%; }
.route svg { width: 100%; height: auto; }
.route svg { overflow: visible; }
.route-lat { stroke: var(--line); stroke-width: 1; }
.route-eq { stroke-dasharray: 2 6; stroke: #B9BFC6; }
.route-deg { font-family: var(--font-body); font-size: 14px; fill: var(--muted); }
.route-name { font-family: var(--font-display); font-stretch: 85%; font-weight: 700; font-size: 18px; fill: var(--ink); }
.route-sub { font-family: var(--font-body); font-size: 14px; fill: var(--muted); }
.route-line {
  fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 8 9;
}
.route-dot { fill: var(--ink); }
.route-end { fill: var(--accent); }
.js .route-line { stroke-dashoffset: 600; }
.js .route.is-drawn .route-line { animation: routeDraw 2.2s var(--ease) forwards; }
@keyframes routeDraw { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.contact-info p { color: var(--graphite); }
.contact-list { margin: 32px 0 0; }
.contact-list > div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.contact-list dt { color: var(--muted); font-size: 15px; padding-top: 2px; }
.contact-list dd { margin: 0; color: var(--ink); font-weight: 600; }
.contact-list a { color: var(--ink); }
.contact-list a:hover { color: var(--accent-strong); }

.form { background: var(--white); padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); border: 1px solid var(--line); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: block; margin-bottom: 18px; }
.field span { display: block; font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field em { font-weight: 400; color: var(--muted); font-style: normal; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink);
  background: var(--white); border: 1px solid #C5CAD0; border-radius: var(--radius);
  padding: 12px 14px; min-height: 50px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(240,79,54,.25);
}
.field.has-error input, .field.has-error textarea { border-color: var(--accent-strong); }
.cf-turnstile { margin: 4px 0 16px; min-height: 65px; }
.form-status { margin: 14px 0 0; font-weight: 600; min-height: 1.6em; }
.form-status.ok { color: #1F7A4D; }
.form-status.err { color: var(--accent-strong); }
.form-note { font-size: 14px; color: var(--muted); margin: 6px 0 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #A9B0B7; padding: 64px 0 28px; font-size: 16px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-logo { width: 140px; margin-bottom: 16px; }
.footer-base {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); font-size: 14px;
}
.footer-base p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .flow { max-width: 560px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .section-head, .split, .contact { grid-template-columns: 1fr; }
  .section-head { gap: 16px; }
  .split .photo { max-height: 520px; aspect-ratio: 4 / 3; }
  .split-rev .photo { order: 2; }
  .route { order: 2; max-width: 340px; }
  .pillars, .commit { grid-template-columns: 1fr; }
  .pillars article, .pillars article + article { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .commit { gap: 28px; }
  .cats { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .cats, .steps, .field-row { grid-template-columns: 1fr; }
  .field-row { gap: 0; }
  .cats li { padding: 22px 20px; }
  .flow { padding: 18px; }
  .flow-split { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .contact-list > div { grid-template-columns: 1fr; gap: 2px; }
  .brand img { width: 116px; }
}

/* Only intrusive loops are gated (Windows often enables reduced motion) */
@media (prefers-reduced-motion: reduce) {
  .flow-link span { animation: none; }
}
