/* ═══════════════════════════════════════════
   YIRAFA LABS — style.css
   Bricolage Grotesque · Near-white · Amber accent
   ═══════════════════════════════════════════ */

/* ── Reset ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { text-decoration: none; }
ul { list-style: none; }

/* ── Design tokens ──────────────────────── */
:root {
  --bg:            #F7F7FB;
  --surface:       #FFFFFF;
  --surface-muted: #F0F0F8;
  --ink:           #0F0F1E;
  --ink-muted:     #68687F;
  --ink-soft:      #ABABBE;
  --accent:        #C87E28;
  --accent-hover:  #A86820;
  --accent-soft:   #F6ECD8;
  --border:        #DCDCE8;
  --border-strong: #C4C4D8;

  --font:  'Bricolage Grotesque', system-ui, sans-serif;
  --max-w: 1120px;
  --pad-x: clamp(1.25rem, 6vw, 2.5rem);
  --ease:  cubic-bezier(0.16, 1, 0.3, 1);
}

@supports (color: oklch(0 0 0)) {
  :root {
    --bg:            oklch(0.98 0.004 280);
    --surface:       oklch(1 0 0);
    --surface-muted: oklch(0.95 0.007 280);
    --ink:           oklch(0.13 0.025 280);
    --ink-muted:     oklch(0.45 0.018 280);
    --ink-soft:      oklch(0.70 0.008 280);
    --accent:        oklch(0.66 0.145 52);
    --accent-hover:  oklch(0.58 0.145 52);
    --accent-soft:   oklch(0.95 0.038 52);
    --border:        oklch(0.88 0.008 280);
    --border-strong: oklch(0.78 0.012 280);
  }
}

/* ── Base ───────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}

/* ── Container ──────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ── Focus ──────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}


/* ══════════════════════════════════════════
   NAV
   ══════════════════════════════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid transparent;
  transition: background 220ms var(--ease), border-color 220ms var(--ease);
}

.nav.scrolled {
  background: rgba(247, 247, 251, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.025em;
  flex-shrink: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 140ms ease-out;
}

.nav-links a:hover { color: var(--accent); }

/* Lang toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  padding: 2px 0;
}

.lang-opt {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 120ms ease;
  letter-spacing: 0.02em;
}

.lang-opt.active {
  color: var(--ink);
  font-weight: 650;
}

.lang-sep {
  font-size: 0.8125rem;
  color: var(--border-strong);
  user-select: none;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px 2px;
  width: 28px;
  height: 32px;
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 220ms var(--ease), opacity 220ms ease;
}

.nav-hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile menu panel */
.nav-mobile-menu {
  position: fixed;
  inset: 56px 0 0 0;
  background: var(--bg);
  z-index: 199;
  padding: 2.5rem var(--pad-x) 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  border-top: 1px solid var(--border);
  overflow-y: auto;
}

.nav-mobile-menu[hidden] { display: none; }

.nav-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-mobile-links a {
  font-size: 1.375rem;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -0.025em;
  padding: 0.6rem 0;
  transition: color 140ms ease-out;
  border-bottom: 1px solid var(--border);
}

.nav-mobile-links a:last-child { border-bottom: none; }
.nav-mobile-links a:hover { color: var(--accent); }

.lang-toggle--mobile { align-self: flex-start; }
.lang-toggle--mobile .lang-opt { font-size: 1rem; font-weight: 500; }


/* ══════════════════════════════════════════
   HERO — with dot grid background
   ══════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(4rem, 10vh, 6rem) var(--pad-x);
  overflow: hidden;
}

/* Subtle dot grid */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

/* Fade the grid toward the bottom */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--bg) 100%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.hero-headline {
  font-size: clamp(2.3rem, 4.8vw, 3.9rem);
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
  margin-bottom: 1.25rem;
  max-width: 20ch;
}

.hero-tagline {
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  font-weight: 400;
  color: var(--ink-muted);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.hero-visual {
  width: clamp(110px, 15vw, 200px);
  flex-shrink: 0;
}

.giraffe-svg {
  width: 100%;
  height: auto;
  color: var(--ink);
}


/* ══════════════════════════════════════════
   SHARED SECTION STYLES
   ══════════════════════════════════════════ */
.section {
  padding: clamp(5rem, 10vw, 8.5rem) var(--pad-x);
  scroll-margin-top: calc(56px + 1.5rem);
}

.section-heading {
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}

.section-body {
  font-size: 1.0625rem;
  color: var(--ink-muted);
  line-height: 1.72;
  margin-top: 1.125rem;
  max-width: 60ch;
}


/* ══════════════════════════════════════════
   SERVICIOS
   ══════════════════════════════════════════ */
.services {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.services-header {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.services-intro {
  font-size: 1.0625rem;
  color: var(--ink-muted);
  line-height: 1.7;
  padding-bottom: 0.2rem;
}

/* Capabilities editorial list */
.capabilities {
  border-top: 1px solid var(--border);
}

.capabilities li {
  display: grid;
  grid-template-columns: 44px 1fr 1.15fr;
  gap: 0 clamp(1rem, 3vw, 2rem);
  padding: 1.375rem 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

/* Service icon */
.cap-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.cap-icon svg {
  width: 20px;
  height: 20px;
}

.cap-name {
  font-size: clamp(1.025rem, 1.8vw, 1.175rem);
  font-weight: 575;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.cap-desc {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  line-height: 1.5;
}


/* ══════════════════════════════════════════
   TRABAJO — Lulla showcase
   ══════════════════════════════════════════ */
.work { background: var(--bg); }

.work .section-heading {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.project-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: clamp(2rem, 4vw, 3rem);
  transition: border-color 220ms var(--ease);
}

.project-card:hover { border-color: var(--border-strong); }

.project-category {
  display: block;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.875rem;
}

.project-name {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.project-desc {
  font-size: 1.0625rem;
  color: var(--ink-muted);
  line-height: 1.7;
  max-width: 50ch;
  margin-bottom: 1.75rem;
}

.project-status {
  font-size: 0.875rem;
  color: var(--ink-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.project-status::before {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  opacity: 0.65;
}

/* Phone mockup */
.project-mockup {
  width: clamp(110px, 13vw, 160px);
  flex-shrink: 0;
}

.phone-mockup {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(15,15,30,.07));
}


/* ══════════════════════════════════════════
   CÓMO TRABAJAMOS
   ══════════════════════════════════════════ */
.process {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.process .section-heading {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.process-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 clamp(3rem, 6vw, 5rem);
}

.process-item {
  padding: clamp(1.5rem, 3vw, 2rem) 0;
  border-top: 1.5px solid var(--border);
}

/* Accent marker before each step title */
.process-title {
  font-size: 1.0625rem;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: 0.625rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.process-title::before {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.process-desc {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  line-height: 1.65;
  padding-left: calc(7px + 0.625rem);
}


/* ══════════════════════════════════════════
   NOSOTROS
   ══════════════════════════════════════════ */
.about { background: var(--bg); }

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(3rem, 7vw, 6rem);
  align-items: start;
}

/* Focus tags */
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  list-style: none;
}

.about-tags li {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-muted);
  border: 1.5px solid var(--border);
  border-radius: 5px;
  padding: 0.375rem 0.75rem;
  letter-spacing: 0.01em;
  transition: border-color 140ms ease, color 140ms ease;
}

.about-tags li:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Pull quote */
.about-pull {
  display: flex;
  align-items: flex-start;
  padding-top: 0.5rem;
}

.about-quote {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.025em;
  color: var(--ink);
  border: none;
  padding: 0;
  margin: 0;
  text-wrap: balance;
  position: relative;
  padding-top: 1.25rem;
}

.about-quote::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}


/* ══════════════════════════════════════════
   CONTACTO
   ══════════════════════════════════════════ */
.contact {
  background: var(--accent-soft);
  text-align: center;
  border-top: 1px solid var(--border);
}

.contact-inner { max-width: 640px; }

.contact-heading {
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
  margin-bottom: 0.75rem;
  max-width: 20ch;
}

.contact-sub {
  font-size: 1.0625rem;
  color: var(--ink-muted);
  margin-bottom: 2.25rem;
  line-height: 1.65;
}

.contact-email {
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  font-weight: 650;
  color: var(--accent);
  letter-spacing: -0.025em;
  transition: color 140ms ease-out;
  display: inline-block;
}

.contact-email:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
.footer {
  background: var(--surface-muted);
  border-top: 1px solid var(--border);
  padding: 1.5rem var(--pad-x);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-copy { font-size: 0.8125rem; color: var(--ink-muted); }

.footer-links { display: flex; gap: 1.5rem; }

.footer-links a {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  transition: color 140ms ease-out;
}

.footer-links a:hover { color: var(--accent); }


/* ══════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  transition: background 140ms ease-out, transform 140ms ease-out;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}


/* ══════════════════════════════════════════
   LEGAL PAGES
   ══════════════════════════════════════════ */
.legal-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 8vw, 6rem) var(--pad-x) clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--border);
}

/* Dot grid — same feel as main hero */
.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.65;
  pointer-events: none;
  z-index: 0;
}

/* Fade toward bottom */
.legal-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 20%, var(--bg) 100%);
  pointer-events: none;
  z-index: 0;
}

.legal-hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Breadcrumb */
.legal-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 550;
  color: var(--ink-muted);
  margin-bottom: 1.75rem;
  transition: color 140ms ease;
  letter-spacing: 0.01em;
}

.legal-breadcrumb::before {
  content: '←';
  font-size: 0.875em;
}

.legal-breadcrumb:hover { color: var(--accent); }

/* Amber accent bar above title */
.legal-title-accent {
  display: block;
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  margin-bottom: 1rem;
}

.legal-title {
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--ink);
}

.legal-updated {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-weight: 450;
  margin-top: 0.75rem;
  display: block;
}

/* Body layout */
.legal-body {
  padding: clamp(3.5rem, 7vw, 5.5rem) var(--pad-x);
}

.legal-body-inner { max-width: 740px; margin: 0 auto; }

/* Intro paragraph — slightly larger and separated */
.legal-body-inner > p:first-child {
  font-size: 1.0625rem;
  color: var(--ink-muted);
  line-height: 1.78;
  margin-bottom: 0;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

/* Section headings with amber marker */
.legal-body h2 {
  font-size: 1.125rem;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  margin-bottom: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.legal-body h2::before {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.legal-body p {
  font-size: 0.9875rem;
  color: var(--ink-muted);
  line-height: 1.78;
  margin-bottom: 1rem;
  padding-left: calc(7px + 0.625rem);
}

.legal-body ul {
  list-style: none;
  padding: 0;
  padding-left: calc(7px + 0.625rem);
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.legal-body li {
  font-size: 0.9875rem;
  color: var(--ink-muted);
  line-height: 1.72;
  padding-left: 1.1rem;
  position: relative;
}

.legal-body li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--ink-soft);
}

.legal-body strong { color: var(--ink); font-weight: 600; }

.legal-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-body a:hover { color: var(--accent-hover); }
[data-lang-section][hidden] { display: none; }


/* ══════════════════════════════════════════
   REVEAL ANIMATION
   Content is visible by default; .js class
   (added by main.js) enables the animation
   so content never hides if JS fails.
   ══════════════════════════════════════════ */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 380ms var(--ease),
    transform 380ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 900px) {
  .project-card {
    grid-template-columns: 1fr;
  }
  .project-mockup { display: none; }
}

@media (max-width: 768px) {
  .nav-links     { display: none; }
  .nav-hamburger { display: flex; }

  .hero-inner    { grid-template-columns: 1fr; }
  .hero-headline { max-width: none; }
  .hero-visual   { display: none; }

  .services-header { grid-template-columns: 1fr; gap: 0.75rem; }

  .capabilities li { grid-template-columns: 44px 1fr; }
  .cap-desc { grid-column: 2; }

  .process-grid  { grid-template-columns: 1fr; }

  .about-grid    { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-pull    { display: none; }

  .footer-inner  { flex-direction: column; text-align: center; gap: 0.75rem; }
}

@media (max-width: 480px) {
  .hero-headline   { font-size: 2.1rem; }
  .contact-heading { font-size: 1.75rem; }

  .capabilities li {
    grid-template-columns: 1fr;
  }
  .cap-icon { margin-bottom: 0.25rem; }
  .cap-desc { grid-column: 1; }
}


/* ══════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .reveal { opacity: 1; transform: none; transition: none; }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
