/* =============================================================
   1. Tokens
   Layout: a ruled content board — every section is a cell on a
   hairline grid, like a planned Instagram feed; portfolio pieces
   sit in true-ratio post frames (4:5, 9:16).
   ============================================================= */
:root {
  --paper: #f6f8fc;     /* cool white, lets the logo navy and sky read cleanly */
  --paper-2: #e8eff8;
  --ink: #1a2038;       /* logo navy */
  --muted: #4d5571;
  --accent: #2e4a9a;    /* tagline royal blue: buttons, links, highlights */
  --on-accent: #ffffff;
  --sky: #9dbfe1;       /* logo "click" blue: fills only, never small text on white */
  --on-sky: #1a2038;
  --line: #1a2038;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --display: "Outfit", "Arial Black", system-ui, sans-serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --rule: 1.5px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;   /* deliberate single light look: the logo is navy on light */
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--grain), var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
ul, ol { list-style: none; }
p { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1; letter-spacing: -0.03em; text-wrap: balance; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Language switch: Spanish shows by default, even without JS */
html:not([lang="en"]) [data-l="en"],
html[lang="en"] [data-l="es"] { display: none !important; }

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Components
   ============================================================= */
.kicker {
  font-family: var(--mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.35rem; border: var(--rule) solid var(--line);
  font-weight: 600; font-size: 1rem; line-height: 1;
  transition: background .2s var(--ease-out), color .2s var(--ease-out), transform .2s var(--ease-out);
}
.btn-accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-accent:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }

.logo { display: block; flex: none; }
.logo img { height: 56px; width: auto; }
.logo-sm img { height: 34px; }

/* =============================================================
   4. Nav
   ============================================================= */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem var(--gutter);
  background: var(--paper);
  border-bottom: var(--rule) solid var(--line);
}
.nav-links { display: none; gap: 2rem; font-weight: 500; }
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease-out);
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-right { display: flex; align-items: center; gap: .75rem; }
.nav-cta { display: none; }
.lang { display: flex; border: var(--rule) solid var(--line); }
.lang button {
  font-family: var(--mono); font-size: .78rem; padding: .45rem .6rem; line-height: 1;
}
.lang button + button { border-left: var(--rule) solid var(--line); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* =============================================================
   5. Hero
   ============================================================= */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr);
  border-bottom: var(--rule) solid var(--line);
}
.hero-copy {
  display: flex; flex-direction: column; gap: 1.4rem;
  padding: clamp(2.5rem, 7vw, 6rem) var(--gutter) clamp(2.5rem, 6vw, 5rem);
  min-width: 0;
}
.hero h1 { font-size: clamp(2.9rem, 9vw, 6.6rem); }
.hero h1 em {
  font-style: normal; color: var(--accent);
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 34em; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .4rem; }

.feed {
  border-top: var(--rule) solid var(--line);
  padding: var(--gutter);
  display: flex; flex-direction: column; gap: .8rem;
  background: var(--paper-2);
  min-width: 0;
}
.feed-head {
  display: flex; justify-content: space-between; gap: 1rem;
  font-family: var(--mono); font-size: .78rem; color: var(--muted);
}
.feed-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--rule); background: var(--line); border: var(--rule) solid var(--line);
  max-width: 460px; width: 100%;
}
.tile {
  aspect-ratio: 4 / 5; display: flex; align-items: flex-end;
  padding: .7rem; background: var(--paper);
  font-family: var(--display); font-weight: 800; font-size: clamp(.9rem, 2.4vw, 1.2rem);
  letter-spacing: -0.02em;
  transition: transform .35s var(--ease-out);
}
.t-educar { background: var(--accent); color: var(--on-accent); }
.t-inspirar { background: var(--sky); color: var(--on-sky); }
.t-conectar { background: var(--ink); color: var(--paper); }
.t-convertir { background: var(--paper); color: var(--accent); box-shadow: inset 0 0 0 4px var(--accent); }
.t-star { align-items: center; justify-content: center; font-size: 3rem; color: var(--accent); }
.t-cursor { align-items: center; justify-content: center; color: var(--ink); }
.feed-grid:hover .tile:not(:hover) { transform: scale(.97); }

/* =============================================================
   6. Marquee
   ============================================================= */
.marquee {
  overflow: hidden; border-bottom: var(--rule) solid var(--line);
  background: var(--ink); color: var(--paper);
}
.marquee-track {
  display: flex; width: max-content; gap: 1.4rem; align-items: center;
  padding: .9rem 0; white-space: nowrap;
  font-family: var(--display); font-weight: 800; font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  letter-spacing: -0.02em;
  animation: marquee 32s linear infinite;
}
.marquee-track i { font-style: normal; color: var(--sky); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =============================================================
   7. Sections
   ============================================================= */
.section { border-bottom: var(--rule) solid var(--line); }
.section-head {
  display: grid; gap: 1rem; padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) clamp(1.8rem, 4vw, 2.5rem);
}
.section-head h2 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.section-head p { max-width: 38em; color: var(--muted); font-size: 1.08rem; }

/* Cases */
.cases {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: var(--rule); background: var(--line); border-top: var(--rule) solid var(--line);
}
.case { background: var(--paper); display: grid; grid-template-columns: minmax(0, 1fr); }
.post-frame {
  position: relative; aspect-ratio: 4 / 5; max-width: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1rem; color: var(--muted);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--ink) 7%, transparent) 14px 15px),
    var(--paper-2);
  border-bottom: var(--rule) solid var(--line);
}
.frame-spec { font-family: var(--mono); font-size: .74rem; }
.frame-note { font-family: var(--display); font-weight: 800; font-size: 1.15rem; color: var(--ink); letter-spacing: -0.02em; }
.case-body { display: flex; flex-direction: column; gap: .8rem; padding: 1.4rem var(--gutter) 1.8rem; min-width: 0; }
.case-meta { font-family: var(--mono); font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.case h3 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.case-body > p:not(.case-meta) { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .2rem; }
.tags li {
  font-family: var(--mono); font-size: .72rem; padding: .3rem .55rem;
  border: var(--rule) solid var(--line);
}
.case:hover .post-frame { background-color: var(--accent); }
.case:hover .frame-note, .case:hover .frame-spec { color: var(--on-accent); }

/* Services */
.services {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: var(--rule); background: var(--line); border-top: var(--rule) solid var(--line);
}
.service {
  background: var(--paper); padding: 1.8rem var(--gutter) 2rem;
  display: flex; flex-direction: column; gap: .7rem; min-width: 0;
  transition: background .2s var(--ease-out), color .2s var(--ease-out);
}
.service h3 { font-size: 1.55rem; }
.service p { color: var(--muted); transition: color .2s var(--ease-out); }
.service:hover { background: var(--ink); color: var(--paper); }
.service:hover p { color: color-mix(in srgb, var(--paper) 78%, transparent); }
.service-cta { background: var(--accent); color: var(--on-accent); }
.service-cta p { color: var(--on-accent); }
.service-cta .arrow { font-size: 2rem; line-height: 1; margin-top: auto; transition: transform .25s var(--ease-out); }
.service-cta:hover .arrow { transform: translateX(8px); }

/* Steps */
.steps {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: var(--rule); background: var(--line); border-top: var(--rule) solid var(--line);
}
.step { background: var(--paper); padding: 1.6rem var(--gutter) 2rem; display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.step-n { font-family: var(--mono); font-size: .9rem; color: var(--accent); font-weight: 500; }
.step h3 { font-size: 1.45rem; }
.step p { color: var(--muted); }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1fr); }
.about-photo { border-bottom: var(--rule) solid var(--line); }
.about-copy {
  display: flex; flex-direction: column; gap: 1rem;
  padding: clamp(2rem, 5vw, 4rem) var(--gutter); min-width: 0;
}
.about-copy h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.about-copy p:not(.kicker) { max-width: 36em; color: var(--muted); font-size: 1.08rem; }

.about-nophoto .about-photo { display: none; }
@media (min-width: 960px) { .about-nophoto { grid-template-columns: minmax(0, 1fr); } }

/* Contact */
.contact {
  background: var(--accent); color: var(--on-accent);
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
  display: flex; flex-direction: column; gap: 1.6rem;
  border-bottom: var(--rule) solid var(--line);
}
.contact .kicker { color: var(--on-accent); opacity: .85; }
.contact h2 { font-size: clamp(2.6rem, 8vw, 6rem); max-width: 12em; }
.contact-lines { display: grid; border-top: var(--rule) solid currentColor; }
.contact-line {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: .4rem 1rem; padding: 1rem 0; border-bottom: var(--rule) solid currentColor;
}
.contact-label { grid-column: 1 / -1; font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.contact-value {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(1.3rem, 4.4vw, 2.6rem); overflow-wrap: anywhere; min-width: 0;
  user-select: all;
}
.contact-value:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.copy {
  font-family: var(--mono); font-size: .78rem; padding: .5rem .8rem;
  border: var(--rule) solid currentColor;
}
.copy:hover { background: var(--on-accent); color: var(--accent); }

/* Brief form */
.brief {
  display: grid; gap: 1.4rem; margin-top: 1rem;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  background: var(--paper); color: var(--ink);
  max-width: 900px;
}
.brief-head { display: grid; gap: .5rem; }
.brief-head h3 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.brief-head p { color: var(--muted); }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.field { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .3rem; font-weight: 600; font-size: .95rem; }
.field input, .field textarea { flex-basis: 100%; }
.field input, .field textarea {
  width: 100%; font: inherit; font-weight: 400; color: var(--ink);
  background: #fff; border: var(--rule) solid var(--line); padding: .75rem .85rem;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.group { border: 0; display: grid; gap: .6rem; min-width: 0; }
.group legend { font-weight: 600; font-size: .95rem; margin-bottom: .6rem; }
.req { color: var(--accent); }
.opt, .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice > span {
  display: inline-block; padding: .55rem .85rem; border: var(--rule) solid var(--line);
  font-size: .92rem; background: #fff; transition: background .15s, color .15s;
}
.choice:hover > span { background: var(--paper-2); }
.choice input:checked + span { background: var(--ink); color: var(--paper); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.brief-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.btn-paper { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-paper:hover { background: var(--ink); border-color: var(--ink); }
.brief-status { font-size: .95rem; color: var(--muted); }
@media (min-width: 720px) { .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Footer */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem 2rem;
  padding: 1.4rem var(--gutter);
  font-family: var(--mono); font-size: .78rem; color: var(--muted);
}


/* Work: dark textured band, pieces shown inside phones */
.work {
  background: var(--grain), radial-gradient(120% 80% at 50% 0%, #252c4d 0%, var(--ink) 60%);
  color: var(--paper);
  border-bottom: var(--rule) solid var(--line);
}
.work-head p { color: color-mix(in srgb, var(--paper) 75%, transparent); }
.shows { display: grid; }
.show {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter);
  border-top: 1px solid color-mix(in srgb, var(--paper) 18%, transparent);
}
.show-visual {
  position: relative; display: flex; justify-content: center; align-items: center;
  min-height: 360px; padding-top: 1.5rem;
}
.phone {
  position: relative; width: min(42vw, 190px); aspect-ratio: 9 / 19;
  background: #0b0d18; border-radius: 30px; padding: 8px;
  box-shadow: 0 24px 50px -18px rgba(0,0,0,.6), inset 0 0 0 1.5px #3a4060;
  transition: transform .5s var(--ease-out);
}
.phone::before {
  content: ""; position: absolute; top: 14px; left: 50%; translate: -50% 0;
  width: 34%; height: 14px; border-radius: 10px; background: #0b0d18; z-index: 2;
}
.screen {
  height: 100%; border-radius: 23px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: .2rem; padding: .9rem;
  background:
    repeating-linear-gradient(135deg, transparent 0 12px, rgba(26,32,56,.06) 12px 13px),
    linear-gradient(160deg, var(--paper) 0%, var(--sky) 100%);
  color: var(--ink);
}
.screen-tag { font-family: var(--display); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; }
.screen-spec { font-family: var(--mono); font-size: .66rem; color: var(--muted); }
.ph-a { transform: rotate(-6deg) translateX(14px); z-index: 1; }
.ph-b { transform: rotate(5deg) translate(-14px, 26px); z-index: 2; }
.ph-after .screen { background: linear-gradient(160deg, var(--sky) 0%, var(--accent) 100%); color: var(--on-accent); }
.ph-after .screen-spec { color: color-mix(in srgb, var(--on-accent) 80%, transparent); }
.show:hover .ph-a { transform: rotate(-9deg) translateX(0); }
.show:hover .ph-b { transform: rotate(8deg) translate(0, 18px); }
.sticker {
  position: absolute; top: 0; left: 0; z-index: 3;
  transform: rotate(-4deg);
  background: var(--sky); color: var(--on-sky);
  font-family: var(--display); font-weight: 800; font-size: .95rem; letter-spacing: -0.01em;
  padding: .55rem .9rem; box-shadow: 0 10px 22px -10px rgba(0,0,0,.5);
  max-width: 15rem;
}
.show-copy { display: flex; flex-direction: column; gap: 1rem; min-width: 0; max-width: 34rem; }
.show-copy h3 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.show-copy p { color: color-mix(in srgb, var(--paper) 78%, transparent); font-size: 1.05rem; }
.show .tags li { border-color: color-mix(in srgb, var(--paper) 55%, transparent); }
.status {
  align-self: flex-start; font-family: var(--mono); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--sky);
}
.work-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 2rem var(--gutter); border-top: 1px solid color-mix(in srgb, var(--paper) 18%, transparent);
  font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 2.6vw, 1.9rem); letter-spacing: -0.02em;
}
.btn-sky { background: var(--sky); color: var(--on-sky); border-color: var(--sky); }
.btn-sky:hover { background: var(--paper); border-color: var(--paper); }
@media (min-width: 540px) {
  .sticker { left: 50%; transform: translateX(-120%) rotate(-5deg); }
}
@media (min-width: 960px) {
  .show { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; }
  .show-flip .show-visual { order: 2; }
  .show-visual { min-height: 460px; }
  .phone { width: 210px; }
}

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 720px) {
  .nav-cta { display: inline-flex; }
  .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-line { grid-template-columns: 9rem minmax(0, 1fr) auto; }
  .contact-label { grid-column: auto; }
  .copy-spacer { width: 1px; }
}
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .hero { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .feed { border-top: 0; border-left: var(--rule) solid var(--line); justify-content: center; }
  .section-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: end; gap: 2rem; }
  .services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .about { grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); }
  .about-photo { border-bottom: 0; border-right: var(--rule) solid var(--line); }
  .about-copy { justify-content: center; }
}
@media (min-width: 1280px) {
  .cases { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .case { grid-template-rows: auto 1fr; }
}

/* =============================================================
   9. Reduced motion — only the intrusive loop
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation-duration: 90s; }
}
