/* Francisco Gallotti, portfolio. Direction: Grafito (dark graphite, sage accent, Geist + Geist Mono).
   Shape rule: media and panels 10px, buttons and controls 8px, avatar round. Mono only for prices, deadlines and data. */

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #111110;
  --surf: #191917;
  --surf-2: #22221F;
  --ink: #EDEBE4;
  --mute: #A3A199;
  --line: #2C2C29;
  --line-2: #3A3A36;
  --acc: #B9CDB0;
  --acc-hover: #CADBC2;
  --on-acc: #111110;
  --shadow: 0 28px 60px -32px rgba(0, 0, 0, .75);

  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --t-sm: .875rem;
  --t-base: 1.0625rem;
  --t-lg: 1.25rem;
  --t-xl: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  --t-2xl: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  --t-hero: clamp(2.25rem, 1.5rem + 1.9vw, 3rem);

  --wrap: 1200px;
  --gutter: 32px;
  --r-media: 10px;
  --r-ctrl: 8px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; scrollbar-color: var(--line-2) var(--bg); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  caret-color: var(--acc);
}
::selection { background: var(--acc); color: var(--on-acc); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
h1, h2, h3 { margin: 0; font-weight: 650; line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 4px; }

/* Language switching: both languages live in the markup */
html[lang="en"] [data-l="es"],
html[lang="es"] [data-l="en"] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; letter-spacing: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--acc); color: var(--on-acc); padding: 10px 14px; border-radius: var(--r-ctrl); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  font: inherit; font-size: 1rem; font-weight: 600; white-space: nowrap;
  color: var(--ink); text-decoration: none;
  border: 1px solid var(--line-2); border-radius: var(--r-ctrl); background: transparent;
  transition: background-color .2s, border-color .2s, color .2s, transform .12s;
  cursor: pointer;
}
.btn:hover { border-color: var(--mute); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.btn-primary:hover { background: var(--acc-hover); border-color: var(--acc-hover); }
.btn-small { min-height: 44px; padding: 0 16px; font-size: var(--t-sm); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) { .top { background: var(--bg); } }
.top .wrap { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.mark { font-weight: 650; letter-spacing: -.01em; text-decoration: none; margin-right: auto; white-space: nowrap; }
.nav { display: flex; gap: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: .9375rem; color: var(--mute); text-decoration: none; border-radius: var(--r-ctrl); transition: color .2s; }
.nav a:hover { color: var(--ink); }

.lang { display: inline-flex; align-items: center; font-family: var(--mono); font-size: .8125rem; }
.lang button {
  font: inherit; color: var(--mute); background: none; border: 0; cursor: pointer;
  min-width: 44px; min-height: 44px; padding: 0 6px; border-radius: var(--r-ctrl);
  transition: color .2s;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--acc); text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* ---------- Sections ---------- */
.sec { padding: 112px 0; border-top: 1px solid var(--line); }
.sec-head { max-width: 62ch; margin-bottom: 56px; }
.sec-head h1, .sec-head h2 { font-size: var(--t-2xl); }
.page-work .sec { border-top: 0; padding-top: 72px; }
.sec-head p { margin-top: 16px; color: var(--mute); font-size: var(--t-lg); line-height: 1.5; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); gap: 56px; align-items: center; padding: 80px 0 96px; }
.who { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.avatar {
  flex: none; width: 56px; height: 56px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: var(--surf-2); border: 1px solid var(--line-2);
  font-weight: 600; font-size: .9375rem; letter-spacing: .02em; color: var(--acc);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.who p { font-size: .9375rem; line-height: 1.4; }
.who span { color: var(--mute); }
.hero h1 { font-size: var(--t-hero); max-width: 22ch; line-height: 1.06; letter-spacing: -.03em; }
.hero-sub { margin-top: 22px; max-width: 42ch; color: var(--mute); font-size: var(--t-lg); line-height: 1.5; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.stack { position: relative; aspect-ratio: 7 / 5.3; }
.stack a { position: absolute; display: block; border-radius: var(--r-media); overflow: hidden; border: 1px solid var(--line-2); background: var(--surf); box-shadow: var(--shadow); }
.stack img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.stack .s1 { left: 0; top: 0; width: 74%; aspect-ratio: 16 / 10; z-index: 1; }
.stack .s2 { right: 0; top: 23%; width: 52%; aspect-ratio: 16 / 10; z-index: 2; }
.stack .s3 { left: 13%; bottom: 0; width: 46%; aspect-ratio: 16 / 10; z-index: 3; }
.stack a:hover { border-color: var(--mute); }
.stack-cap { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; font-size: var(--t-sm); color: var(--mute); }
.stack-cap a { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .stack a { animation: rise .9s var(--ease-out) both; }
  .stack .s1 { animation-delay: .05s; }
  .stack .s2 { animation-delay: .15s; }
  .stack .s3 { animation-delay: .25s; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
}

/* ---------- Work ---------- */
.case {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start;
  padding-bottom: 88px; margin-bottom: 88px; border-bottom: 1px solid var(--line);
}
.case-label { display: inline-block; font-family: var(--mono); font-size: .8125rem; color: var(--acc); }
.case h2, .case h3 { font-size: var(--t-xl); margin-top: 12px; }
.case-text > p { margin-top: 16px; color: var(--mute); max-width: 48ch; }
.case-list { margin-top: 24px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.case-list li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.case-shots { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.case-shots img, .case-panel img { width: 100%; border-radius: var(--r-media); border: 1px solid var(--line-2); }
.case figcaption { margin-top: 10px; font-size: var(--t-sm); color: var(--mute); }
.case-panel { grid-column: 1 / -1; margin-top: 16px; }
.case-stats { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.case-stats div { display: flex; flex-direction: column; justify-content: space-between; }
.case-stats dt { font-size: .8125rem; color: var(--mute); line-height: 1.35; }
.case-stats dd { margin: 6px 0 0; font-size: .9375rem; font-weight: 500; white-space: nowrap; }
.case-note { margin-top: 12px; font-size: .8125rem; color: var(--mute); max-width: 48ch; }
.case-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 20px; color: var(--ink); text-underline-offset: 4px; }
.case-link .arrow { margin-left: 6px; color: var(--acc); transition: transform .25s var(--ease-out); }
.case-link:hover .arrow { transform: translate(3px, -3px); }

.samples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px 40px; }
.sample { position: relative; }
.sample-media { position: relative; padding: 0 9% 7% 0; }
.sample-media .d { border-radius: var(--r-media); border: 1px solid var(--line-2); aspect-ratio: 16 / 10; object-fit: cover; object-position: top; width: 100%; background: var(--surf); transition: border-color .25s; }
.sample-media .m {
  position: absolute; right: 0; bottom: 0; width: 23%;
  aspect-ratio: 360 / 779; object-fit: cover; object-position: top;
  border-radius: 12px; border: 1px solid var(--line-2); outline: 5px solid var(--bg);
  box-shadow: var(--shadow); background: var(--surf);
  transition: transform .4s var(--ease-out);
}
.sample:hover .d { border-color: var(--mute); }
.sample:hover .m { transform: translateY(-6px); }
.sample-kind { margin-top: 20px; font-size: var(--t-sm); color: var(--mute); }
.sample h2, .sample h3 { margin-top: 4px; font-size: var(--t-lg); letter-spacing: -.015em; }
.sample :is(h2,h3) a { text-decoration: none; }
.sample :is(h2,h3) a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-media); }
.sample :is(h2,h3) a:focus-visible { outline: none; }
.sample :is(h2,h3) a:focus-visible::after { outline: 2px solid var(--acc); outline-offset: 6px; }
.sample :is(h2,h3) .arrow { display: inline-block; margin-left: 6px; color: var(--acc); transition: transform .25s var(--ease-out); }
.sample:hover :is(h2,h3) .arrow { transform: translate(3px, -3px); }
.sample .desc { margin-top: 8px; color: var(--mute); font-size: .9375rem; max-width: 52ch; }
.work-note { margin-top: 56px; font-size: var(--t-sm); color: var(--mute); }

/* ---------- Agencies ---------- */
.agency { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.agency .sec-head { margin-bottom: 0; }
.agency .btn { margin-top: 32px; }
.agency-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.agency-list li { padding: 24px 0; border-top: 1px solid var(--line); }
.agency-list h3 { font-size: var(--t-lg); letter-spacing: -.015em; }
.agency-list p { margin-top: 8px; color: var(--mute); font-size: .9375rem; max-width: 40ch; }

/* ---------- Prices ---------- */
.rates { border-top: 1px solid var(--line-2); }
.rate {
  display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.1fr) minmax(0, .9fr) minmax(0, 1.2fr);
  gap: 24px; align-items: baseline; padding: 28px 0; border-bottom: 1px solid var(--line);
}
.rate h3 { font-size: var(--t-lg); letter-spacing: -.015em; }
.rate h3 + p { margin-top: 6px; color: var(--mute); font-size: .9375rem; max-width: 44ch; }
.rate dl { display: contents; }
.rate dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rate dd { margin: 0; }
.price { font-size: var(--t-lg); font-weight: 600; white-space: nowrap; }
.price .mono, .when .mono { font-weight: 500; }
.price small { font-size: var(--t-sm); color: var(--mute); font-weight: 400; }
.rate .when { font-size: .9375rem; }
.rate .incl { color: var(--mute); font-size: .9375rem; }
.rates-head { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.1fr) minmax(0, .9fr) minmax(0, 1.2fr); gap: 24px; padding-bottom: 12px; font-size: .8125rem; color: var(--mute); }
.fine { margin-top: 24px; font-size: var(--t-sm); color: var(--mute); max-width: 70ch; }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 28px 0 0; }
.steps li::before {
  content: counter(s, decimal-leading-zero);
  display: block; font-family: var(--mono); font-size: .8125rem; color: var(--acc);
  padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line-2);
}
.steps h3 { font-size: var(--t-lg); letter-spacing: -.015em; }
.steps p { margin-top: 8px; color: var(--mute); font-size: .9375rem; max-width: 30ch; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: start; }
.about .avatar { width: 112px; height: 112px; font-size: 1.5rem; }
.about p { font-size: var(--t-xl); line-height: 1.35; letter-spacing: -.015em; max-width: 34ch; }
.about p + p { margin-top: 20px; font-size: var(--t-lg); line-height: 1.55; color: var(--mute); max-width: 56ch; letter-spacing: 0; }

/* ---------- Contact ---------- */
.contact h2 { font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.5rem); letter-spacing: -.035em; max-width: 14ch; }
.contact-ways { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.contact-plain { margin-top: 20px; color: var(--mute); font-size: var(--t-sm); }

.foot { padding: 32px 0 44px; border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--mute); }

/* Mobile sticky message bar (home only) */
.wa-bar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero, .case, .agency { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding: 56px 0 72px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 48px 0; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  body { font-size: 1rem; }
  html { scroll-padding-top: 116px; }
  .sec { padding: 80px 0; }
  .sec-head { margin-bottom: 40px; }
  .top .wrap { flex-wrap: wrap; gap: 0 8px; min-height: 0; padding-top: 6px; }
  .mark { line-height: 44px; }
  .top .btn { display: none; }
  .nav { order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 0 calc(var(--gutter) - 12px) 4px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; font-size: var(--t-sm); }
  .hero { padding: 40px 0 64px; gap: 44px; }
  .who { margin-bottom: 24px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .stack-cap { flex-direction: column; gap: 2px; }

  .case { padding-bottom: 64px; margin-bottom: 64px; gap: 32px; }
  .case-shots { grid-template-columns: 1fr; }
  .case-shots figure:last-child { max-width: 62%; }
  .case-stats { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
  .case-stats div { flex-direction: row; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .case-stats dd { margin-top: 0; }
  .samples { grid-template-columns: 1fr; gap: 56px; }

  .agency-list { grid-template-columns: 1fr; }
  .agency .btn, .contact-ways .btn { width: 100%; }

  .rates-head { display: none; }
  .rate { grid-template-columns: 1fr auto; gap: 6px 16px; padding: 24px 0; }
  .rate > div:first-child { grid-column: 1 / -1; margin-bottom: 8px; }
  .rate dt { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-size: var(--t-sm); color: var(--mute); }
  .rate dl { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; row-gap: 6px; }
  .rate dd { text-align: right; }

  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { display: grid; grid-template-columns: 44px 1fr; padding: 0 0 28px; }
  .steps li::before { grid-row: span 2; border: 0; padding: 3px 0 0; margin: 0; }
  .steps p { max-width: none; }

  .about { grid-template-columns: 1fr; gap: 24px; }
  .about .avatar { width: 80px; height: 80px; font-size: 1.125rem; }

  .wa-bar {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
    box-shadow: 0 12px 32px -10px rgba(0, 0, 0, .8);
    transition: transform .3s var(--ease-out), opacity .3s;
  }
  .wa-bar.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
  .has-wa-bar .foot { padding-bottom: 104px; }
}
@media (hover: none) {
  .sample:hover .m, .sample:hover :is(h2,h3) .arrow, .case-link:hover .arrow { transform: none; }
}
