:root {
  color-scheme: light;
  --paper: #f5f4ef;
  --ink: #22231e;
  --muted: #55584b;
  --line: #cdcec2;
  --olive: #454a36;
  --serif: Georgia, "Times New Roman", serif;
  --gutter: clamp(1.1rem, 4vw, 4.5rem);
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p { margin: 0; }
a { color: inherit; }
img { display: block; width: 100%; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid #8b5e42; outline-offset: 4px; }
[id] { scroll-margin-top: 1.5rem; }
.wrap { width: min(100% - 2 * var(--gutter), 94rem); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.skip:focus { position: absolute; z-index: 2; background: var(--paper); padding: 1rem; }

.site-header, .footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.site-header { min-height: 5.75rem; }
.wordmark { font-size: 1.35rem; font-weight: 700; line-height: .96; letter-spacing: -.065em; text-decoration: none; }
.wordmark span { color: #777f58; }
nav { display: flex; flex-wrap: wrap; align-items: center; column-gap: clamp(.75rem, 3vw, 3rem); }
nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: .875rem; }
nav a:hover { text-decoration: underline; text-underline-offset: .3em; }
.demos-link {
  padding-inline: .8rem;
  border: 1px solid var(--olive);
  white-space: nowrap;
}
.demos-link:hover { background: var(--olive); color: white; text-decoration: none; }

.cover {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: clamp(32rem, 79svh, 58rem);
  color: white;
  background: #35382b;
}
.cover img, .cover::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover img { z-index: -2; object-fit: cover; object-position: center 54%; }
.cover::after {
  content: "";
  z-index: -1;
  background: linear-gradient(0deg, rgb(19 20 15 / .80), transparent 69%),
              linear-gradient(90deg, rgb(19 20 15 / .22), transparent 65%);
}
.cover-copy { padding-block: clamp(2.1rem, 5.5vw, 5rem); }
.label { font-size: .8125rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.052em; }
h1 { font-size: clamp(3.75rem, 8.4vw, 9rem); line-height: .88; margin-block: 1rem 1.35rem; }
.cover-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid currentColor;
  text-decoration: none;
  font-size: .9375rem;
}
.cover-link:focus-visible { outline-color: white; }

.section { padding-block: clamp(3.7rem, 8vw, 8rem); }
h2 { font-size: clamp(2.65rem, 5.8vw, 6.25rem); line-height: .98; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem 2rem; }
.section-heading p, .note, .caption span { font-size: .875rem; color: var(--muted); line-height: 1.5; }
.filters { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 1rem 0 1.4rem; }
.filters button {
  min-height: 44px;
  padding: 0 .125rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: .9375rem;
}
.filters button:hover, .filters button[aria-pressed="true"] { border-color: var(--olive); color: var(--ink); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.35rem, 3vw, 3rem); }
.filters[hidden] + .sr-only + .project-grid { margin-top: 1.5rem; }
.project-wide { grid-column: 1 / -1; }
.project-link { display: block; text-decoration: none; }
.project img { aspect-ratio: 5 / 4; object-fit: cover; background: #d9d8cc; }
.project-wide img { aspect-ratio: 2.55; object-position: center 56%; }
.caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .25rem 1rem;
  border-bottom: 1px solid var(--line);
  padding-block: .9rem;
}
.caption h3, .project-detail h3 { font-size: clamp(1.75rem, 3vw, 3.1rem); }
.project-link:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.project-detail { display: none; }
.project-detail:target {
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: start;
  gap: 1rem 2rem;
  margin-top: 2rem;
  padding: clamp(1rem, 3vw, 2.5rem);
  background: #e8e9df;
}
.project-detail p { line-height: 1.65; max-width: 65ch; }

.studio { background: #e8e9df; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 7vw, 7rem); }
.split .label { margin-bottom: 1rem; color: var(--muted); }
.intro { font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1.55; max-width: 37ch; }
#contacto .intro { margin-block: 1.25rem .65rem; }
.service-list, details { margin-top: 1.5rem; }
.service-list p, summary { border-top: 1px solid var(--line); padding-block: .9rem; }
summary { cursor: pointer; font-weight: 600; }
details > p { line-height: 1.6; }
.form { display: grid; gap: 1rem; }
.contact-form { align-self: start; }
.form label { display: grid; gap: .4rem; font-size: .9375rem; }
.form input:not([type="checkbox"]), .form select, .form textarea {
  min-width: 0;
  width: 100%;
  padding: .75rem;
  min-height: 46px;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid #90917e;
  border-radius: 0;
}
.form textarea { resize: vertical; }
.form .consent { display: flex; align-items: baseline; gap: .5rem; line-height: 1.4; }
.consent input { accent-color: var(--olive); }
.action {
  justify-self: start;
  min-height: 46px;
  padding: .65rem 1.2rem;
  border: 0;
  border-radius: 0;
  background: var(--olive);
  color: white;
  cursor: pointer;
}
.action:hover { background: var(--ink); }
output:empty { display: none; }
output { font: 1.55rem var(--serif); }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { padding-block: 1.25rem; font-size: .875rem; }

@media (max-width: 42rem) {
  .site-header { min-height: 4.65rem; }
  .wordmark { font-size: 1.15rem; }
  .cover { min-height: clamp(29rem, 70svh, 42rem); }
  .cover img { object-position: 58% center; }
  .cover .label { font-size: .75rem; letter-spacing: .09em; }
  .project-grid, .split, .project-detail:target { grid-template-columns: 1fr; }
  .project img, .project-wide img { aspect-ratio: 4 / 3; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: .2rem; }
}
@media (max-width: 30rem) {
  .site-header { flex-wrap: wrap; gap: .3rem; padding-block: .85rem; }
  .site-header nav { width: 100%; }
  .demos-link { margin-inline-start: auto; }
}
@media (max-width: 23rem) {
  .site-header nav { column-gap: .55rem; }
  .site-header nav a { font-size: .8125rem; }
  h1 { font-size: 3.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
