/* =========================================================
   Baftiuware — styles.css
   Palette : deep petrol + cool paper + ultramarine
   Type    : Archivo (wide, headings/UI) + Newsreader (serif body)
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --paper:      #EFF1EE;
  --paper-warm: #E7EAE6;
  --white:      #FFFFFF;
  --ink:        #16262E;
  --ink-2:      #1E3540;
  --ink-soft:   #4E656F;
  --rule:       #D2D8D3;
  --rule-dark:  #2C4551;
  --blue:       #1F3BE0;
  --blue-deep:  #16299B;
  --amber:      #F2B705;

  --font-ui:   "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Newsreader", Georgia, "Times New Roman", serif;

  --wrap:  1180px;
  --gutter: 24px;
  --header-h: 70px;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, .nav__link, .btn, label, input, select, textarea,
.wordmark, .logo, .project__meta, .facts dt, .status, .lang__btn, .footer__nav {
  font-family: var(--font-ui);
}

h1, h2, h3, h4 {
  font-weight: 600;
  font-stretch: 116%;      /* Archivo variable width axis */
  letter-spacing: -0.018em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.05em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { scroll-margin-top: calc(var(--header-h) + 8px); }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--white);
  padding: 12px 18px; font-family: var(--font-ui); font-size: .9rem;
}
.skip-link:focus { left: 12px; top: 12px; }

.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ---------- 3. Section heads ---------- */
.section-title {
  font-size: clamp(1.85rem, 3.4vw, 2.85rem);
}
.section-title--light { color: var(--white); }

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(38px, 5vw, 60px);
}
.section-note {
  margin: .8em 0 0;
  color: var(--ink-soft);
  font-size: 1.075rem;
}

/* ---------- 4. Buttons ---------- */
.btn {
  --btn-bg: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: 14px 26px;
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  font-size: .975rem;
  font-weight: 600;
  font-stretch: 108%;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn--solid { background: var(--btn-bg); color: var(--white); }
.btn--solid:hover { background: var(--blue-deep); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.btn--sm { padding: 9px 18px; font-size: .875rem; }
.btn--block { width: 100%; }

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(239, 241, 238, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--rule); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 700;
  font-stretch: 112%;
  font-size: 1.075rem;
  letter-spacing: -0.03em;
  margin-right: auto;
}
.wordmark__mark {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--paper);
}

.nav__list { display: flex; gap: 26px; }
.nav__link {
  position: relative;
  text-decoration: none;
  font-size: .925rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 6px 0;
  transition: color .18s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link.is-current { color: var(--ink); }
.nav__link.is-current::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--blue);
}

.header-actions { display: flex; align-items: center; gap: 14px; }

/* Language switch */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--white);
}
.lang__btn {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: .78rem;
  font-weight: 600;
  font-stretch: 108%;
  letter-spacing: .04em;
  padding: 5px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.lang__btn:hover { color: var(--ink); }
.lang__btn.is-active { background: var(--ink); color: var(--white); }
.lang__sep { width: 1px; height: 14px; background: var(--rule); }

/* Burger */
.burger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--white);
  cursor: pointer;
  padding: 0;
  place-items: center;
  align-content: center;
  justify-items: center;
  gap: 5px;
}
.burger span {
  display: block;
  width: 17px; height: 1.8px;
  background: var(--ink);
  transition: transform .22s var(--ease), opacity .22s var(--ease);
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child  { transform: translateY(-3.4px) rotate(-45deg); }

.mobile-nav {
  border-top: 1px solid var(--rule);
  background: var(--paper);
  padding: 18px var(--gutter) 26px;
}
.mobile-nav ul { display: grid; gap: 2px; margin-bottom: 18px; }
.mobile-nav a {
  display: block;
  font-family: var(--font-ui);
  font-size: 1.15rem;
  font-weight: 500;
  text-decoration: none;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
}

/* ---------- 6. Hero ---------- */
.hero {
  padding: clamp(52px, 8vw, 104px) 0 clamp(60px, 9vw, 112px);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(40px, 6vw, 78px);
  align-items: center;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 6px 15px 6px 12px;
}
.status__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(242, 183, 5, .22);
}

.hero__title {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  font-stretch: 112%;
  letter-spacing: -0.032em;
  margin-bottom: .5em;
}

.lead {
  font-size: clamp(1.1rem, 1.5vw, 1.24rem);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 34em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* Hero device composition */
.hero__visual {
  position: relative;
  min-height: 360px;
  padding-bottom: 46px;
}

.device { background: var(--white); }

.device--browser {
  border-radius: var(--r-md);
  border: 1px solid var(--rule);
  box-shadow: 0 24px 60px -32px rgba(22, 38, 46, .45);
  overflow: hidden;
  margin-left: auto;
  width: 100%;
  max-width: 420px;
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  background: var(--ink);
}
.browser__dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.28); }
.browser__url {
  margin-left: 10px;
  flex: 1;
  font-family: var(--font-ui);
  font-size: .72rem;
  color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.08);
  border-radius: 100px;
  padding: 3px 12px;
  text-align: center;
}
.browser__body { padding: 22px 20px 26px; }

.ui-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.ui-line { display: block; height: 8px; border-radius: 100px; background: var(--rule); }
.ui-line--title { height: 12px; width: 42%; background: var(--ink); opacity: .82; }
.ui-pill { width: 62px; height: 22px; border-radius: 100px; background: var(--blue); opacity: .92; }

.chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 108px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 18px;
}
.chart__bar {
  flex: 1;
  height: var(--h);
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--blue), #4a63ef);
  transform-origin: bottom;
  transform: scaleY(0);
  animation: growBar .7s var(--ease) forwards;
}
.chart__bar:nth-child(1) { animation-delay: .25s; }
.chart__bar:nth-child(2) { animation-delay: .33s; }
.chart__bar:nth-child(3) { animation-delay: .41s; }
.chart__bar:nth-child(4) { animation-delay: .49s; }
.chart__bar:nth-child(5) { animation-delay: .57s; }
.chart__bar:nth-child(6) { animation-delay: .65s; }
@keyframes growBar { to { transform: scaleY(1); } }

.ui-list { display: grid; gap: 13px; }
.ui-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.w-15 { width: 15%; } .w-20 { width: 20%; } .w-25 { width: 25%; }
.w-40 { width: 40%; } .w-45 { width: 45%; } .w-50 { width: 50%; }
.w-60 { width: 60%; } .w-65 { width: 65%; } .w-70 { width: 70%; } .w-80 { width: 80%; }

.device--phone {
  position: absolute;
  left: -38px;
  bottom: 0;
  width: 160px;
  border-radius: 26px;
  border: 1px solid var(--rule);
  padding: 8px;
  box-shadow: 0 26px 50px -26px rgba(22, 38, 46, .5);
  animation: rise .8s var(--ease) .5s backwards;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.phone__notch {
  width: 46px; height: 5px;
  border-radius: 100px;
  background: var(--rule);
  margin: 3px auto 12px;
}
.phone__body { display: grid; gap: 10px; padding: 0 8px 10px; }
.phone__card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--paper);
}
.phone__cta { height: 32px; border-radius: var(--r-sm); background: var(--ink); margin-top: 4px; }

/* ---------- 7. Services ---------- */
.services {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(64px, 8vw, 108px) 0;
}
.services .section-title { color: var(--white); }
.services .section-note { color: rgba(239, 241, 238, .66); }

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule-dark);
  border: 1px solid var(--rule-dark);
  border-radius: var(--r-md);
  overflow: hidden;
}
.service {
  background: var(--ink);
  padding: clamp(28px, 3.4vw, 44px);
}
.service__icon { color: var(--blue); margin-bottom: 22px; }
.service__icon svg { stroke: #6f86ff; }
.service__title { font-size: 1.5rem; color: var(--white); margin-bottom: .55em; }
.service__text { color: rgba(239, 241, 238, .78); margin-bottom: 1.4em; }

.service__list { display: grid; gap: 11px; }
.service__list li {
  position: relative;
  padding-left: 22px;
  font-family: var(--font-ui);
  font-size: .92rem;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(239, 241, 238, .9);
}
.service__list li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 9px; height: 2px;
  background: #6f86ff;
}

/* ---------- 8. About ---------- */
.about { padding: clamp(64px, 8vw, 108px) 0; }
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(38px, 5vw, 72px);
  align-items: start;
}
.about__intro p { color: var(--ink-2); }
.about__intro .section-title { margin-bottom: .7em; }

.facts { margin: 34px 0 0; display: grid; gap: 0; }
.fact {
  display: grid;
  grid-template-columns: minmax(0, 12.5rem) minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--rule);
}
.fact:last-child { border-bottom: 1px solid var(--rule); }
.facts dt {
  margin: 0;
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.facts dd { margin: 0; font-size: .99rem; }

.about__process {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: clamp(26px, 3vw, 38px);
}
.process__title {
  font-size: 1.28rem;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.steps { display: grid; gap: 24px; }
.step { display: grid; grid-template-columns: 34px 1fr; gap: 16px; }
.step__num {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--paper-warm);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: .9rem;
  font-weight: 600;
}
.step h4 { font-size: 1.055rem; margin-bottom: .35em; }
.step p { font-size: .985rem; line-height: 1.6; color: var(--ink-soft); margin: 0; }

/* ---------- 9. Projects ---------- */
.projects {
  padding: clamp(64px, 8vw, 108px) 0;
  background: var(--paper-warm);
}
.project-list { border-top: 1px solid var(--rule); }
.project {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
  padding: clamp(26px, 3.2vw, 38px) 0;
  border-bottom: 1px solid var(--rule);
}
.project__name { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin-bottom: .45em; }
.project__desc { color: var(--ink-soft); margin: 0; font-size: 1.02rem; }
.project__meta { padding-top: .35em; }
.project__role {
  margin: 0 0 .35em;
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink);
}
.project__year {
  margin: 0;
  font-family: var(--font-ui);
  font-size: .875rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------- 10. Clients ---------- */
.clients { padding: clamp(64px, 8vw, 108px) 0; }
.logo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
}
.logo {
  display: grid;
  place-items: center;
  background: var(--white);
  padding: 30px 18px;
  font-size: 1.02rem;
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
  text-align: center;
}

.quote {
  margin: clamp(38px, 5vw, 56px) 0 0;
  max-width: 44rem;
}
.quote blockquote {
  margin: 0 0 18px;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.5;
  font-weight: 300;
  color: var(--ink);
  border-left: 3px solid var(--blue);
  padding-left: clamp(18px, 2.5vw, 28px);
}
.quote figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding-left: clamp(21px, 2.7vw, 31px);
  font-family: var(--font-ui);
  font-size: .89rem;
}
.quote__name { font-weight: 600; }
.quote__role { color: var(--ink-soft); }

/* ---------- 11. Contact ---------- */
.contact {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(64px, 8vw, 108px) 0;
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 76px);
  align-items: start;
}
.contact__lead {
  margin-top: 1.1em;
  color: rgba(239, 241, 238, .78);
  font-size: 1.1rem;
}
.contact__details { margin-top: 34px; display: grid; gap: 0; }
.contact__details li {
  display: grid;
  grid-template-columns: minmax(0, 7rem) minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--rule-dark);
  font-size: 1rem;
}
.contact__details li:last-child { border-bottom: 1px solid var(--rule-dark); }
.contact__label {
  font-family: var(--font-ui);
  font-size: .875rem;
  font-weight: 500;
  color: rgba(239, 241, 238, .55);
}
.contact__details a { color: var(--white); text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 3px; }
.contact__details a:hover { text-decoration-color: var(--white); }

.form {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 36px);
  display: grid;
  gap: 18px;
}
.field { display: grid; gap: 7px; }
.field label {
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  transition: border-color .16s var(--ease), background-color .16s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue);
  background: var(--white);
  outline: none;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid rgba(31, 59, 224, .25);
  outline-offset: 1px;
}
.field .is-invalid { border-color: #C43D2E; }

.form__status {
  margin: 0;
  font-family: var(--font-ui);
  font-size: .9rem;
  min-height: 1.4em;
}
.form__status.is-ok { color: #1D6B45; }
.form__status.is-error { color: #C43D2E; }

/* ---------- 12. Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(239, 241, 238, .6);
  border-top: 1px solid var(--rule-dark);
  padding: 30px 0;
  font-family: var(--font-ui);
  font-size: .875rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}
.footer__brand {
  margin: 0;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.03em;
  color: var(--white);
  font-size: 1rem;
}
.footer__nav { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.footer__nav a { text-decoration: none; }
.footer__nav a:hover { color: var(--white); }
.footer__copy { margin: 0; font-variant-numeric: tabular-nums; }

/* ---------- 13. Responsive ---------- */
@media (max-width: 980px) {
  .nav, .header-cta { display: none; }
  .burger { display: grid; }

  .hero__grid,
  .about__grid,
  .contact__grid { grid-template-columns: minmax(0, 1fr); }

  .hero__visual { min-height: 0; padding-bottom: 0; margin-top: 8px; }
  .device--browser { max-width: 100%; }
  .device--phone { position: relative; left: auto; margin: -46px 8px 0 auto; }

  .project { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .project__meta { display: flex; gap: 18px; padding-top: 0; }
  .project__role, .project__year { margin: 0; }
}

@media (max-width: 720px) {
  body { font-size: 1.02rem; }
  .services__grid { grid-template-columns: minmax(0, 1fr); }
  .logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .contact__details li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .footer__nav { margin-left: 0; }
}

@media (max-width: 420px) {
  :root { --gutter: 18px; }
  .hero__actions .btn { width: 100%; }
}

/* ---------- 14. Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
  }
  .chart__bar { transform: scaleY(1); }
}
