/* Paleta Hilo Borgoña, from the brand manual */
:root {
  --borgona: #6B1E36;
  --rosa: #E8467C;
  --rosa-suave: #F6CFD8;
  --crema: #F7EFE4;
  --azul: #2F5BD3;
  --tinta: #2A1018;
  --lienzo: #FFFBF5;

  --font-text: "DM Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --font-hand: "Caveat", cursive;
  --font-campaign: "Anton", "Arial Narrow", sans-serif;

  --gutter: clamp(1.25rem, 5.5vw, 5rem);
  --section-space: clamp(5.5rem, 11vw, 10rem);
  --thread-width: 7px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--borgona) var(--crema);
}

body {
  margin: 0;
  background: var(--crema);
  color: var(--tinta);
  font-family: var(--font-text);
  font-size: 1.125rem;
  line-height: 1.6;
  caret-color: var(--rosa);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--rosa);
  color: #fff;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
}

:focus-visible {
  outline: 3px solid var(--ring, var(--borgona));
  outline-offset: 4px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 90rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  background: var(--crema);
  color: var(--borgona);
  font-weight: 700;
  border-radius: 999px;
}

.skip-link:focus {
  top: 1rem;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0 1.9rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 700 1.1875rem/1 var(--font-text);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), background-color 0.25s, color 0.25s, border-color 0.25s;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(1px);
}

.button--rosa {
  background: var(--rosa);
  color: #fff;
}

.button--rosa:hover {
  background: color-mix(in srgb, var(--rosa) 88%, var(--tinta));
}

.button--crema {
  background: var(--crema);
  color: var(--borgona);
}

.button--crema:hover {
  background: #fff;
}

.button--borgona {
  background: var(--borgona);
  color: var(--crema);
}

.button--borgona:hover {
  background: color-mix(in srgb, var(--borgona) 85%, var(--tinta));
}

.button--outline {
  border-color: var(--rosa-suave);
  color: var(--crema);
}

.button--outline:hover {
  border-color: var(--crema);
  background: rgb(247 239 228 / 0.08);
}

.button--large {
  min-height: 4rem;
  padding: 0 2.4rem;
  font-size: 1.3rem;
}

/* The thread */
.page {
  position: relative;
  isolation: isolate;
}

.thread {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.thread path {
  fill: none;
  stroke-width: var(--thread-width);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.thread-stitches {
  stroke-dasharray: 16 15;
  animation: stitches-in 0.9s var(--ease-out) both;
}

@keyframes stitches-in {
  from {
    opacity: 0;
  }
}

.thread-point {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 0;
  height: 0;
}

.thread-point[data-only="mobile"] {
  display: none;
}

.seam {
  position: absolute;
  inset: 0 0 auto;
  background-repeat: repeat-x;
}

.seam--puntada {
  height: 44px;
  background-image: url("assets/patrones/TP_patron_puntada-corrida_transparente.svg");
  background-size: 114px 132px;
  background-position: 0 -0.25rem;
}

.seam--cruz {
  height: 48px;
  background-image: url("assets/patrones/TP_patron_punto-de-cruz_con-fondo.svg");
  background-size: 100px 100px;
}

.page > section {
  position: relative;
}

.page > section > .container {
  position: relative;
  z-index: 2;
}

.step-note {
  position: absolute;
  z-index: 2;
  top: clamp(2.5rem, 5vw, 4.5rem);
  font: 700 clamp(1.75rem, 2.4vw, 2.4rem)/1 var(--font-hand);
  color: var(--rosa);
  transform: rotate(-5deg);
}

.step-note--right {
  right: calc(3% + 1.75rem);
}

.step-note--left {
  left: calc(3% + 1.75rem);
}

.step-note--crema {
  color: var(--crema);
}

.section-title {
  font: 600 clamp(2.5rem, 5.4vw, 4.75rem)/1 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--borgona);
  text-wrap: balance;
}

.section-lede {
  margin-top: clamp(1.25rem, 2.4vw, 2rem);
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
  line-height: 1.45;
  text-wrap: pretty;
}

/* Header */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  color: var(--crema);
  --ring: var(--rosa);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: clamp(1.5rem, 2.6vw, 2.25rem);
}

.site-header__logo img {
  width: clamp(160px, 14.5vw, 210px);
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.6vw, 2.5rem);
  font-weight: 500;
  font-size: 1.0625rem;
}

.site-nav__link {
  text-decoration: none;
  padding-block: 0.4rem;
  background: linear-gradient(var(--rosa), var(--rosa)) left bottom / 0 2px no-repeat;
  transition: background-size 0.35s var(--ease-out);
}

.site-nav__link:hover {
  background-size: 100% 2px;
}

.site-nav__pill {
  padding: 0.6rem 1.35rem;
  border: 2px solid var(--rosa);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.25s;
}

.site-nav__pill:hover {
  background: var(--rosa);
  color: #fff;
}

/* Hero */
.hero {
  min-height: min(100svh, 62rem);
  padding: clamp(10rem, 14.5vw, 13rem) 0 clamp(4rem, 7vw, 5.5rem);
  display: flex;
  flex-direction: column;
  background: var(--borgona);
  color: var(--crema);
  --ring: var(--rosa);
}

.hero__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero__title {
  font: 600 clamp(3.25rem, 9.6vw, 9rem)/0.92 var(--font-display);
  letter-spacing: -0.025em;
  max-width: 10ch;
}

.hero__accent {
  position: relative;
  display: inline-block;
  color: var(--rosa);
}

.hero__underline {
  position: absolute;
  left: -3%;
  bottom: -0.2em;
  width: 106%;
  height: auto;
}

.hero__loop {
  position: absolute;
  top: -1rem;
  right: var(--gutter);
  width: clamp(220px, 22vw, 320px);
  aspect-ratio: 1;
}

.hero__note {
  position: absolute;
  left: -1.5rem;
  top: 86%;
  font: 700 clamp(1.75rem, 2.3vw, 2.4rem)/1.02 var(--font-hand);
  color: var(--rosa-suave);
  transform: rotate(-6deg);
}

.hero__lede {
  max-width: 34rem;
  margin-top: clamp(2.5rem, 4.5vw, 3.75rem);
  font-size: clamp(1.15rem, 1.5vw, 1.375rem);
  line-height: 1.5;
  color: var(--rosa-suave);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.25rem;
}

.hero__steps {
  position: absolute;
  right: calc(var(--gutter) + 3.5rem);
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 1.0625rem;
  font-weight: 500;
}

.hero__steps a {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  text-decoration: none;
}

.hero__steps a:hover {
  color: #fff;
}

.hero__steps span {
  font: 700 1.5rem/1 var(--font-hand);
  color: var(--rosa);
  min-width: 4rem;
}

/* Nuestros tres pilares */
.aprender {
  padding: var(--section-space) 0;
  background: var(--crema);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
}

.pillars-title {
  font: 400 clamp(3.5rem, 7.6vw, 7.25rem)/0.92 var(--font-campaign);
  text-transform: uppercase;
  color: var(--borgona);
}

.pillars {
  position: relative;
  display: grid;
  gap: clamp(2.75rem, 5vw, 4.25rem);
}

/* Running stitch that ties the three pillar icons together */
.pillars::before {
  content: "";
  position: absolute;
  left: 2.25rem;
  top: 1rem;
  bottom: -2rem;
  border-left: 3px dashed var(--rosa);
}

.pillar {
  position: relative;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  column-gap: clamp(1.25rem, 3vw, 2.5rem);
}

.pillar__icon {
  grid-row: 1 / span 2;
  width: 4.5rem;
  height: 4.5rem;
  padding-block: 0.25rem;
  object-fit: contain;
  background: var(--crema);
}

.pillar__title {
  font: 600 clamp(2.25rem, 4vw, 3.5rem)/1 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--borgona);
}

.pillar__text {
  margin-top: 0.6rem;
  max-width: 30ch;
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  line-height: 1.45;
}

/* ¿Cómo lo hacemos? */
.encontrarnos {
  padding: var(--section-space) 0 calc(var(--section-space) + 2rem);
  background: var(--borgona);
  color: var(--crema);
  --ring: var(--rosa);
}

.meeting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(280px, 36vw, 500px);
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

.meeting__text {
  max-width: 38rem;
}

.how-title {
  font: 600 clamp(3rem, 6.6vw, 6rem)/0.95 var(--font-display);
  letter-spacing: -0.025em;
}

.how-title em {
  display: block;
  color: var(--rosa);
}

.how-list {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  margin-top: clamp(2.25rem, 4vw, 3.25rem);
  padding-top: clamp(2.25rem, 4vw, 3.25rem);
  border-top: 2px dashed rgb(246 207 216 / 0.45);
}

.how-list li {
  display: grid;
  grid-template-columns: clamp(3.5rem, 6vw, 5rem) minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: baseline;
}

.how-list__number {
  font: 400 clamp(2.5rem, 4vw, 3.5rem)/1 var(--font-campaign);
  color: var(--rosa);
}

.how-list p {
  max-width: 32ch;
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  font-weight: 500;
  line-height: 1.35;
}

.meeting__loop {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.meeting__note {
  position: absolute;
  left: 30%;
  top: 34%;
  width: 40%;
  font: 700 clamp(1.6rem, 2.3vw, 2.3rem)/1 var(--font-hand);
  color: var(--rosa-suave);
  text-align: center;
  transform: rotate(-4deg);
}

/* Avanzar */
.avanzar {
  padding: var(--section-space) 0 0;
  background: var(--azul);
  color: #fff;
  --ring: var(--crema);
}

.avanzar .section-title {
  color: #fff;
}

.avanzar__intro {
  max-width: 46rem;
}

.paths {
  margin-top: clamp(3rem, 6vw, 5rem);
  margin-bottom: var(--section-space);
}

.paths__row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 4.5rem;
  gap: clamp(1.25rem, 3vw, 3rem);
  align-items: center;
  padding-block: clamp(1.4rem, 2.4vw, 2rem);
  border-top: 2px dashed rgb(247 239 228 / 0.45);
}

.paths__row:last-child {
  border-bottom: 2px dashed rgb(247 239 228 / 0.45);
}

.paths__title {
  font: 600 clamp(1.6rem, 3vw, 2.6rem)/1.08 var(--font-display);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.paths__text {
  color: var(--crema);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.paths__icon {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: contain;
  justify-self: end;
}

.avanzar__seam {
  height: clamp(4rem, 7vw, 6rem);
  background: url("assets/patrones/TP_patron_botonera_con-fondo.svg") 0 0 / 100px 100px repeat-x;
}

/* Súmate */
.sumate {
  padding: var(--section-space) 0;
  background: var(--crema);
}

.join {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(4rem, 10vw, 9rem);
  align-items: start;
}

.join__text {
  max-width: 32rem;
  padding-top: 0.5rem;
}

.join__text > p:not(.section-lede) {
  margin-top: 1.25rem;
}

.join__text a {
  color: var(--borgona);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.join-form {
  display: grid;
  gap: 1.75rem;
  --ring: var(--rosa);
}

.join-form__roles {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 0.75rem;
}

.join-form__roles legend {
  padding: 0;
  margin-bottom: 1rem;
  font: 600 1.6rem/1.15 var(--font-display);
  color: var(--borgona);
}

.role {
  position: relative;
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1.1rem 1.25rem;
  background: var(--lienzo);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.role:hover {
  border-color: rgb(107 30 54 / 0.25);
}

.role:has(input:checked) {
  border-color: var(--borgona);
  background: #fff;
}

.role input {
  appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.15rem 0 0;
  border: 2px solid var(--borgona);
  border-radius: 50%;
  display: grid;
  place-content: center;
}

.role input::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--rosa);
  transform: scale(0);
  transition: transform 0.25s var(--ease-out);
}

.role input:checked::before {
  transform: scale(1);
}

.role__body {
  font-size: 1rem;
  line-height: 1.45;
}

.role__body strong {
  display: block;
  font-size: 1.125rem;
  color: var(--borgona);
}

.join-form__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field--wide {
  grid-column: 1 / -1;
}

.field__label {
  font-weight: 700;
  font-size: 1rem;
  color: var(--borgona);
}

.field__label em {
  font-style: normal;
  font-weight: 400;
  color: var(--tinta);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 1.0625rem;
  color: var(--tinta);
  background: #fff;
  border: 2px solid rgb(107 30 54 / 0.3);
  border-radius: 10px;
  transition: border-color 0.2s;
}

.field textarea {
  resize: vertical;
  min-height: 6.5rem;
}

.field input:hover,
.field textarea:hover {
  border-color: rgb(107 30 54 / 0.55);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--borgona);
  box-shadow: 0 0 0 3px rgb(232 70 124 / 0.35);
}

.field input:user-invalid {
  border-color: #B3261E;
}

.join-form__submit {
  justify-self: start;
}

.join-form__status {
  min-height: 1.6em;
  font-weight: 500;
  color: var(--borgona);
}

/* Apoya */
.apoya {
  padding: var(--section-space) 0 clamp(4rem, 7vw, 6rem);
  background: var(--borgona);
  color: var(--crema);
  --ring: var(--rosa);
}

.give {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  column-gap: clamp(3rem, 7vw, 7rem);
  row-gap: clamp(4rem, 7vw, 6rem);
  align-items: start;
}

.give__title {
  font: 400 clamp(3.5rem, 8.6vw, 8rem)/0.94 var(--font-campaign);
  text-transform: uppercase;
  letter-spacing: 0.005em;
}

.give__title span {
  color: var(--rosa);
}

.give__main .section-lede {
  max-width: 34rem;
  color: var(--rosa-suave);
}

.give__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.give__side {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  padding-top: clamp(1rem, 3vw, 2.5rem);
}

.needle {
  position: relative;
  width: clamp(140px, 15vw, 210px);
  aspect-ratio: 72 / 114;
  margin-left: clamp(4rem, 9vw, 9rem);
}

.needle__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.needle__body {
  fill: var(--crema);
  fill-rule: evenodd;
}

/* Stroke in needle viewBox units, sized to match the page thread */
.needle__tail {
  fill: none;
  stroke: var(--rosa);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.8s var(--ease-out);
}

.needle.is-threaded .needle__tail {
  stroke-dashoffset: 0;
}

.needle__eye {
  --x: 16%;
  --y: 88.6%;
}

.needle__approach {
  --x: calc(16% - 7rem);
  --y: calc(88.6% + 1.5rem);
}

.covers__title {
  font: 700 1.6rem/1 var(--font-hand);
  color: var(--rosa);
  font-size: 2rem;
}

.covers__list {
  margin-top: 1rem;
  display: grid;
  gap: 0.25rem;
}

.covers__list li {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding-block: 0.7rem;
  font: 600 clamp(1.25rem, 1.7vw, 1.5rem)/1.2 var(--font-display);
  border-bottom: 2px dashed rgb(246 207 216 / 0.3);
}

.covers__list img {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
}

.give__ways {
  grid-column: 1 / -1;
  padding-top: clamp(2.5rem, 4vw, 3.5rem);
  border-top: 2px dashed rgb(246 207 216 / 0.35);
}

.way__title {
  font: 600 1.6rem/1.15 var(--font-display);
  margin-bottom: 1rem;
}

.way p {
  max-width: 34rem;
  color: var(--rosa-suave);
}

.way__link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
  color: var(--crema);
  text-decoration-color: var(--rosa);
}

/* Footer */
.site-footer {
  background: var(--tinta);
  color: var(--crema);
  --ring: var(--rosa);
}

.site-footer__seam {
  height: 48px;
  background: url("assets/patrones/TP_patron_zigzag_con-fondo.svg") 0 0 / 80px 96px repeat-x;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.5rem 3rem;
  align-items: center;
  padding-block: clamp(3rem, 5vw, 4.5rem);
}

.site-footer__logo {
  width: 180px;
  height: auto;
}

.site-footer__tagline {
  color: var(--rosa-suave);
}

.site-footer__contact {
  display: grid;
  gap: 0.35rem;
  justify-items: end;
  font-size: 1rem;
}

.site-footer__contact a {
  text-decoration-color: var(--rosa);
}

.site-footer__legal {
  grid-column: 1 / -1;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(247 239 228 / 0.15);
  font-size: 0.9375rem;
  color: rgb(247 239 228 / 0.7);
}

/* Tablet and phone */
@media (max-width: 1080px) {
  .site-nav__link--wide {
    display: none;
  }
}

@media (max-width: 899px) {
  :root {
    --thread-width: 5px;
  }

  .container {
    padding-right: calc(var(--gutter) + 0.75rem);
  }

  .thread-point {
    left: var(--mx, var(--x));
    top: var(--my, var(--y));
  }

  .thread-point[data-only="mobile"] {
    display: block;
  }

  .thread-point[data-only="desktop"] {
    display: none;
  }

  .step-note {
    display: none;
  }

  .hero {
    min-height: 0;
    padding-top: 9.5rem;
  }

  .hero__loop {
    position: relative;
    top: auto;
    right: auto;
    width: 9rem;
    order: 1;
    margin: 2.5rem 0 0 auto;
  }

  .hero__note {
    left: auto;
    right: calc(100% + 0.75rem);
    top: 22%;
    width: 10.5rem;
    font-size: 1.75rem;
    text-align: right;
    transform: rotate(-4deg);
  }

  .hero__steps {
    position: static;
    order: 2;
    margin-top: 2.5rem;
  }

  .split,
  .meeting,
  .join,
  .give {
    grid-template-columns: minmax(0, 1fr);
  }

  .meeting__loop {
    width: min(82%, 340px);
    margin-left: auto;
  }

  .paths__row {
    grid-template-columns: minmax(0, 1fr) 3.5rem;
    row-gap: 0.5rem;
  }

  .paths__text {
    grid-column: 1;
  }

  .paths__icon {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 3.5rem;
    height: 3.5rem;
  }

  .join {
    row-gap: 3rem;
  }

  .meeting__note {
    font-size: 1.5rem;
  }

  .give__side {
    gap: 4.5rem;
  }

  .needle {
    margin-left: 1.5rem;
  }

  .needle__approach {
    --x: calc(16% - 1.5rem);
    --y: calc(88.6% + 2.75rem);
  }

  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer__contact {
    justify-items: start;
  }
}

@media (max-width: 560px) {
  .site-nav__link--medium {
    display: none;
  }

  .join-form__fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

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