/* ==========================================================================
   Ledisolutions Perú EIRL — design tokens
   Palette: blanco, rojo bandera y gris carbón (Perú).
   Type: Newsreader (display) / IBM Plex Sans (body) / IBM Plex Mono (data).
   Motif: la "ficha contable" — la empresa como un registro claro y trazable.
   ========================================================================== */

:root{
  --ink:#1A1D21;
  --grey-700:#4B5158;
  --grey-500:#7A8087;
  --grey-300:#DBDCDE;
  --grey-150:#EDEEEE;
  --grey-100:#F5F5F4;
  --charcoal:#17181B;
  --charcoal-2:#212327;
  --white:#FFFFFF;

  --red:#C8102E;
  --red-dark:#960C22;
  --red-tint:#FBE6E9;

  --paper: var(--grey-100);
  --line: var(--grey-300);
  --line-dark: rgba(255,255,255,0.14);

  --radius-sm: 6px;
  --radius: 14px;
  --radius-lg: 22px;

  --font-display: "Newsreader", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 64px);

  --ease: cubic-bezier(.22,.68,0,1);
}

*, *::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; scroll-behavior: auto !important; }
}

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

h1,h2,h3,h4{
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 .5em;
  font-weight: 500;
  letter-spacing: -0.01em;
}

p{ margin: 0 0 1em; color: var(--grey-700); }
a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }
address{ font-style: normal; }
ul,ol{ list-style: none; margin: 0; padding: 0; }

.skip-link{
  position:absolute; left:-999px; top:0; background:var(--ink); color:var(--white);
  padding:12px 18px; z-index:200; border-radius:0 0 8px 0;
}
.skip-link:focus{ left:0; }

:focus-visible{
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.eyebrow{
  display:flex; align-items:center; gap:10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red-dark);
  margin: 0 0 .9em;
}

/* Recurring "flag" device: three thin vertical bars, red / grey / red */
.flag-mark{ display:inline-flex; gap:2px; flex: none; }
.flag-mark span{ display:block; width:3px; height:13px; background: var(--red); border-radius: 1px; }
.flag-mark span:nth-child(2){ background: var(--grey-300); }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn-primary{ background: var(--red); color: var(--white); }
.btn-primary:hover{ background: var(--red-dark); transform: translateY(-1px); }
.btn-ghost{ background: transparent; color: var(--ink); border-color: var(--grey-300); }
.btn-ghost:hover{ border-color: var(--ink); transform: translateY(-1px); }
.btn-sm{ padding: 10px 18px; font-size: 13.5px; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header{
  position: sticky; top:0; z-index: 100;
  background: rgba(245,245,244,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-scrolled{
  border-bottom-color: var(--line);
  background: rgba(245,245,244,0.97);
}
.header-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display:flex; align-items:center; justify-content:space-between;
  gap: 24px;
}
.brand{ display:flex; align-items:center; gap:10px; }
.brand-mark{
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--charcoal); color: var(--red);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display); font-size: 18px; font-weight: 600;
  flex: none;
}
.brand-text{ font-family: var(--font-display); font-size: 17.5px; color: var(--ink); line-height:1; }
.brand-text em{ font-style: normal; color: var(--red); }
.brand-text small{ display:block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; color: var(--grey-500); margin-top: 3px; }

.site-nav ul{ display:flex; gap: 28px; }
.site-nav a{
  font-size: 14.5px; color: var(--grey-700); position: relative; padding: 4px 0;
}
.site-nav a::after{
  content:""; position:absolute; left:0; right:100%; bottom:0; height:1px; background: var(--red);
  transition: right .25s var(--ease);
}
.site-nav a:hover::after{ right:0; }

.header-actions{ display:flex; align-items:center; gap:18px; }
.tel-link{ display:flex; align-items:center; gap:7px; font-family: var(--font-mono); font-size: 13.5px; color: var(--grey-700); }
.tel-link svg{ color: var(--red); }

.nav-toggle{
  display:none; width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--grey-300);
  background: transparent; position: relative; cursor:pointer; flex: none;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content:""; position:absolute; left:9px; right:9px; height:1.4px; background: var(--ink);
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.nav-toggle span{ top:50%; transform: translateY(-50%); }
.nav-toggle span::before{ top:-7px; }
.nav-toggle span::after{ top:7px; }
.nav-toggle[aria-expanded="true"] span{ background: transparent; }
.nav-toggle[aria-expanded="true"] span::before{ top:0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after{ top:0; transform: rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{ padding: clamp(50px,8vw,96px) 0 0; overflow:hidden; }
.hero-inner{
  max-width: var(--container); margin:0 auto; padding: 0 var(--gutter);
  display:grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px,5vw,72px);
  align-items: center;
}
.hero-copy h1{
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.08;
  margin-bottom: .38em;
  max-width: 14ch;
}
.hero-copy .lede{ font-size: 17.5px; max-width: 46ch; margin-bottom: 1.7em; }
.hero-actions{ display:flex; gap: 14px; flex-wrap: wrap; }

.ledger-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 20px;
  box-shadow: 0 30px 60px -30px rgba(23,24,27,0.28);
}
.ledger-head{
  display:flex; align-items:center; justify-content:space-between;
  font-family: var(--font-mono); font-size: 12px; letter-spacing:.08em; text-transform: uppercase;
  color: var(--grey-500);
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px; margin-bottom: 6px;
}
.ledger-tag{
  background: var(--red-tint); color: var(--red-dark);
  padding: 3px 9px; border-radius: 999px; font-size: 10.5px;
}
.ledger-rows li{
  display:flex; align-items: baseline; gap: 8px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}
.ledger-rows li:last-child{ border-bottom: none; }
.ledger-rows .k{ font-size: 13.5px; color: var(--grey-500); flex: none; }
.ledger-rows .dots{
  flex:1; border-bottom: 1px dotted var(--grey-300); transform: translateY(-4px);
  min-width: 12px;
}
.ledger-rows .v{
  font-family: var(--font-mono); font-size: 13.5px; color: var(--ink); font-weight: 500;
  text-align: right; flex: none; max-width: 58%;
}
.ledger-foot{
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--grey-500); text-align:center; letter-spacing: .02em;
}

.principle-strip{
  margin-top: clamp(46px,7vw,84px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  display:flex; gap: 22px; white-space: nowrap;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing:.1em; text-transform: uppercase;
  color: var(--grey-500);
  overflow: hidden;
}
.principle-strip .sep{ color: var(--red); }

/* ==========================================================================
   Services
   ========================================================================== */
.services{ max-width: var(--container); margin: 0 auto; padding: clamp(70px,9vw,120px) var(--gutter); }
.section-head{ max-width: 62ch; margin-bottom: clamp(40px,6vw,64px); }
.section-head h2{ font-size: clamp(28px,3.4vw,42px); }
.section-lede{ font-size: 16.5px; }

.service-groups{ display:grid; grid-template-columns: 1fr 1fr; gap: clamp(28px,4vw,56px); }
.group-label{
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing:.1em; text-transform: uppercase;
  color: var(--red-dark); font-weight: 500; margin-bottom: 20px;
  padding-bottom: 14px; border-bottom: 1px solid var(--grey-300);
}
.service-row{
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.service-row:last-child{ border-bottom: none; }
.service-row h4{ font-size: 18.5px; margin-bottom: .3em; }
.service-row p{ font-size: 14.5px; margin: 0; max-width: 44ch; }

/* ==========================================================================
   Statement band — the one bold red moment
   ========================================================================== */
.statement{
  background: var(--red);
  padding: clamp(64px,10vw,110px) var(--gutter);
}
.statement-text{
  max-width: 850px; margin: 0 auto; text-align:center;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(26px,4vw,44px); line-height: 1.25;
  color: rgba(255,255,255,0.72);
}
.statement-text span{ color: var(--white); }

/* ==========================================================================
   Sectores
   ========================================================================== */
.sectors{ max-width: var(--container); margin: 0 auto; padding: clamp(70px,9vw,120px) var(--gutter); }
.sector-grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.sector-card{
  background: var(--white);
  padding: 30px 26px;
  border-top: 3px solid var(--red);
}
.sector-card h4{ font-size: 17px; margin-bottom: .35em; }
.sector-card p{ font-size: 14px; margin: 0; }

/* ==========================================================================
   Proceso
   ========================================================================== */
.process{ max-width: var(--container); margin: 0 auto; padding: clamp(70px,9vw,120px) var(--gutter); }
.process-list{
  position: relative;
  border-left: 1px solid var(--grey-300);
  margin-left: 10px;
}
.process-step{
  position: relative;
  display:flex; gap: 26px; align-items: flex-start;
  padding: 0 0 clamp(30px,4vw,44px) 34px;
}
.process-step:last-child{ padding-bottom: 0; }
.process-step::before{
  content:""; position:absolute; left:-5px; top: 4px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--red);
}
.step-index{
  font-family: var(--font-mono); font-size: 13px; color: var(--red-dark);
  flex: none; padding-top: 2px;
}
.process-step h4{ font-size: 19px; margin-bottom: .3em; }
.process-step p{ font-size: 14.5px; max-width: 48ch; margin: 0; }

/* ==========================================================================
   About
   ========================================================================== */
.about{ background: var(--charcoal); color: var(--white); }
.about-grid{
  max-width: var(--container); margin: 0 auto; padding: clamp(70px,9vw,120px) var(--gutter);
  display:grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px,5vw,72px);
}
.about-copy h2{ color: var(--white); font-size: clamp(26px,3.2vw,38px); max-width: 16ch; }
.about-copy p{ color: rgba(255,255,255,0.66); max-width: 52ch; font-size: 16px; }
.about .eyebrow{ color: var(--red); }
.about .flag-mark span:nth-child(2){ background: rgba(255,255,255,0.3); }

.principles{ display:flex; flex-direction: column; gap: 0; }
.principles li{ padding: 20px 0; border-bottom: 1px solid var(--line-dark); }
.principles li:first-child{ padding-top: 0; }
.principles li:last-child{ border-bottom: none; }
.p-label{ font-family: var(--font-display); font-size: 21px; color: var(--red); display:block; margin-bottom: .3em; }
.principles p{ color: rgba(255,255,255,0.62); font-size: 14.5px; margin: 0; max-width: 40ch; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq{ max-width: 860px; margin: 0 auto; padding: clamp(70px,9vw,120px) var(--gutter); }
.faq-list{ border-top: 1px solid var(--grey-300); }
.faq-item{ border-bottom: 1px solid var(--grey-300); padding: 6px 0; }
.faq-item summary{
  cursor: pointer; list-style: none;
  display:flex; align-items:center; justify-content:space-between; gap: 20px;
  padding: 16px 2px; font-size: 16.5px; color: var(--ink); font-weight: 500;
}
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item summary::after{
  content:"+"; font-family: var(--font-mono); font-size: 20px; color: var(--red);
  flex: none; transition: transform .25s var(--ease);
}
.faq-item[open] summary::after{ transform: rotate(45deg); }
.faq-item p{ padding: 0 2px 18px; max-width: 58ch; font-size: 15px; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact{ max-width: var(--container); margin: 0 auto; padding: clamp(70px,9vw,120px) var(--gutter); }
.contact-grid{
  display:grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px,5vw,72px); align-items: stretch;
}
.contact-copy h2{ font-size: clamp(28px,3.4vw,40px); max-width: 14ch; }
.contact-copy > p{ max-width: 42ch; margin-bottom: 1.8em; }
.contact-list{ margin-bottom: 2em; display:flex; flex-direction: column; gap: 16px; }
.contact-list li{ display:flex; flex-direction: column; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.contact-list span{ font-family: var(--font-mono); font-size: 11.5px; letter-spacing:.08em; text-transform: uppercase; color: var(--grey-500); }
.contact-list a{ font-size: 16px; color: var(--ink); }
.contact-list a:hover{ color: var(--red-dark); }

.contact-map{
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  min-height: 320px; background: var(--white);
}
.contact-map iframe{ width:100%; height:100%; min-height: 320px; border:0; display:block; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{ background: var(--charcoal); color: rgba(255,255,255,0.7); border-top: 3px solid var(--red); }
.footer-inner{ max-width: var(--container); margin: 0 auto; padding: 56px var(--gutter) 40px; }
.footer-top{ display:flex; align-items:center; justify-content:space-between; flex-wrap: wrap; gap: 20px; }
.footer-brand{ display:flex; align-items:center; gap:10px; font-family: var(--font-display); color: var(--white); font-size: 17px; }
.footer-brand em{ font-style:normal; color: var(--red); }
.footer-brand small{ display:block; font-family: var(--font-mono); font-size: 10px; letter-spacing:.14em; color: rgba(255,255,255,0.45); margin-top: 3px; }
.footer-nav{ display:flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a{ font-size: 14px; color: rgba(255,255,255,0.72); }
.footer-nav a:hover{ color: var(--red); }
.footer-rule{ height:1px; background: var(--line-dark); margin: 32px 0 24px; }
.footer-bottom{ display:flex; align-items:flex-end; justify-content:space-between; flex-wrap: wrap; gap: 16px; }
.footer-bottom address{ font-size: 13.5px; line-height: 1.7; }
.footer-bottom address a{ color: rgba(255,255,255,0.85); font-family: var(--font-mono); }
.footer-legal{ font-size: 12.5px; color: rgba(255,255,255,0.45); margin:0; }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
.reveal{ opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px){
  .hero-inner{ grid-template-columns: 1fr; }
  .hero-copy h1{ max-width: none; }
  .about-grid, .contact-grid{ grid-template-columns: 1fr; }
  .service-groups{ grid-template-columns: 1fr; }
  .sector-grid{ grid-template-columns: repeat(2, 1fr); }
  .site-nav{
    position: fixed; inset: 68px 0 auto 0; background: var(--paper);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .35s var(--ease);
  }
  .site-nav.is-open{ max-height: 360px; }
  .site-nav ul{ flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px; }
  .site-nav a{ display:block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-toggle{ display:block; }
  .tel-link span{ display:none; }
}

@media (max-width: 640px){
  .sector-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 560px){
  .header-actions{ gap: 12px; }
  .btn-sm{ padding: 9px 14px; font-size: 13px; }
  .ledger-rows .v{ max-width: 52%; }
}
