:root {
  color-scheme: light;
  --paper: #f5f4ef;
  --ink: #252722;
  --muted: #66695f;
  --line: #d6d8ce;
  --accent: #dce9bd;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 5px;
}

.page {
  width: min(1040px, calc(100% - 96px));
  margin-inline: auto;
}

.header,
.section-heading,
.card-top,
.card-bottom,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "title domain social";
  gap: 20px;
  min-height: 64px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  grid-area: title;
  margin: 0;
  align-self: center;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -1px;
  text-decoration: none;
}
.header .domain { grid-area: domain; justify-self: end; text-decoration: none; }
.header-social { grid-area: social; justify-self: end; display: flex; align-items: center; gap: 18px; }
.header-instagram { display: inline-flex; gap: 7px; align-items: center; min-height: 36px; font-size: 14px; text-decoration: none; }
.spotify-link { display: inline-flex; align-items: center; min-height: 36px; }
.spotify-link img { display: block; width: 132px; max-width: 100%; height: auto; }

.wordmark span {
  color: #667344;
}

.domain,
.eyebrow,
.category,
.number,
.project-count,
.footer {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.domain,
.project-count,
.number,
.footer {
  color: var(--muted);
}

.intro {
  padding-block: 20px 28px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 25px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #73834e;
  flex-shrink: 0;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 6.7vw, 76px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.065em;
}

h1 span {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  font-style: italic;
  letter-spacing: -0.06em;
}

.intro-text {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.intro-social {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-top: 17px;
  color: #526135;
  font-size: 12px;
  text-decoration: none;
}

.project-logo { display: flex; align-items: center; justify-content: flex-start; min-height: 112px; margin: 0 0 24px; padding: 14px; border-radius: 6px; }
.project-logo-dark { background: #14213a; }
.project-logo-justrave { background: #000; }
.project-logo-smsregalos { background: #c6140c; }
.project-logo img { display: block; width: auto; height: auto; max-width: 100%; max-height: 90px; object-fit: contain; }

.intro-social:hover,
.social-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.projects {
  scroll-margin-top: 24px;
  margin-top: 16px;
}

.section-heading {
  margin-bottom: 18px;
}

h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 285px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 3px;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.card:has(a):hover,
.card:focus-within {
  background: #eaf0df;
  border-color: #aab397;
}

.card-podcast {
  background: var(--accent);
  border-color: #cbd5b7;
}

.category {
  font-size: 12px;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.number {
  font-size: 13px;
}

.card-content {
  flex: 1;
  padding-block: 32px 25px;
}

h3 {
  margin: 0 0 11px;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -1.2px;
}

.card-content p {
  max-width: 335px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.card-bottom {
  min-height: 32px;
  font-size: 14px;
  text-decoration: none;
}

.card-links {
  display: grid;
  gap: 9px;
}

.social-link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding-top: 9px;
  border-top: 1px solid #b5c297;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  text-decoration: none;
}

/* La ficha completa enlaza al proyecto, manteniendo un único enlace accesible. */
a.card-bottom::after {
  position: absolute;
  inset: 0;
  content: "";
}

a.card-bottom:focus-visible {
  outline: none;
}

.card:has(a:focus-visible) {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.arrow {
  font-size: 23px;
  transition: transform 180ms ease;
}

.card:hover .arrow {
  transform: translate(2px, -2px);
}

.pending {
  color: #535b42;
}

.pending > span {
  font-size: 23px;
}

.footer {
  gap: 20px;
  margin-top: 64px;
  padding-block: 24px 32px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 12px;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 620px) {
  .page {
    width: calc(100% - 40px);
  }

  .header {
    gap: 8px;
    min-height: 0;
    padding-block: 14px;
  }
  .header .wordmark { font-size: 22px; letter-spacing: -0.6px; }
  .header-instagram { min-width: 32px; justify-content: center; }
  .header-instagram span { display: none; }

  .domain {
    font-size: 10px;
  }

  .intro {
    padding-block: 18px 22px;
  }

  .eyebrow {
    font-size: 10px;
  }

  h1 {
    font-size: clamp(36px, 9.6vw, 59px);
  }

  .intro-text {
    font-size: 14px;
  }

  .desktop-break {
    display: none;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card {
    min-height: 265px;
    padding: 24px;
  }

  .footer {
    margin-top: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
