/* The Instagram bio page (/enlaces/). Loaded after style.css and built only
   from its tokens: no new colour, no new radius, no new face. Everything here
   is layout for a single phone-width column. */

.links-shell {
  width: min(100% - var(--edge) * 2, 34rem);
  margin-inline: auto;
}

/* ------------------------------------------------------------ the field */

.links-head {
  padding-block: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem) clamp(2rem, 1.5rem + 2vw, 2.8rem);
}

.links-head__mark {
  width: 2.1rem;
  margin-bottom: clamp(1.3rem, 1rem + 1.2vw, 1.8rem);
}

.links-id {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1.1rem;
  align-items: end;
  margin-bottom: 1.4rem;
}

/* The face, cut 4:5 for this size only. A die-cut corner like every other
   photo on the site: there is no circle anywhere in the system. */
.links-id__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--paper);
}

.links-id__name {
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.1rem);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.03em;
  line-height: 0.94;
  margin-bottom: 0.7rem;
}

/* Below the name, never above it: the Label-Below Rule. */
.links-id__specialty {
  font-family: var(--display);
  font-size: var(--step--1);
  font-weight: 500;
  line-height: 1.3;
  color: var(--on-teal-2);
}

.links-head__lede {
  font-size: var(--step-0);
  line-height: 1.5;
  margin-bottom: 1.4rem;
}

/* Full column width: on a bio page the action is the reason the visitor came. */
.links-head__action {
  display: block;
  text-align: center;
}

/* --------------------------------------------------------------- idband */

.links-idband {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.links-idband .idband__cell {
  padding-inline: 0.8rem;
}

.links-idband .idband__cell:first-child {
  padding-left: 0;
}

.links-idband .idband__cell:last-child {
  padding-right: 0;
}

/* ---------------------------------------------------------------- bands */

.links-band {
  padding-block: clamp(2rem, 1.5rem + 2vw, 2.8rem);
}

.links-title {
  font-size: var(--step-2);
  font-weight: 700;
  font-stretch: 106%;
  letter-spacing: -0.026em;
  margin-bottom: 1.1rem;
}

/* ---------------------------------------------------------------- lines */

/* The shelf technique: 1px gaps on a rule ground draw the hairlines between
   rows, so no row carries a border of its own. */
.lines,
.exits {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
}

.line {
  background: var(--teal-pale);
  transition: background var(--fast) var(--ease);
}

.line__summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.1rem;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}

.line__summary::-webkit-details-marker {
  display: none;
}

.line__text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.line__name {
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.12;
  color: var(--ink);
}

.line__cat {
  margin: 0;
}

/* Plus that turns into a minus: two 2px strokes, the vertical one folds away. */
.line__toggle {
  position: relative;
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
  color: var(--teal-deep);
}

.line__toggle::before,
.line__toggle::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 2px;
  margin-top: -1px;
  background: currentColor;
  transition: transform 220ms var(--ease);
}

.line__toggle::after {
  transform: rotate(90deg);
}

.line[open] .line__toggle::after {
  transform: rotate(0deg);
}

.line__panel {
  padding: 0 1.1rem 1.3rem;
  font-size: var(--step--1);
  line-height: 1.55;
  color: var(--ink-2);
}

.line__panel p {
  max-width: 46ch;
  margin-bottom: 1rem;
}

.line__panel .action {
  font-size: var(--step--1);
  padding: 0.85rem 1.2rem;
}

@media (hover: hover) {
  .line:not([open]):hover {
    background: var(--teal-pale-2);
  }
}

/* The flagship takes the package colour at full strength, as on the shelf. */
.line--lead {
  background: var(--teal);
  color: var(--on-teal);
}

.line--lead .line__name,
.line--lead .line__toggle,
.line--lead .label {
  color: var(--on-teal);
}

.line--lead .line__name {
  font-size: var(--step-2);
  font-stretch: 106%;
}

.line--lead .line__panel {
  color: var(--on-teal-2);
}

.line--lead .action {
  background: var(--paper);
  color: var(--teal-deep);
}

.line--lead .link-more {
  color: var(--on-teal);
}

@media (hover: hover) {
  .line--lead:not([open]):hover {
    background: var(--teal-deep);
  }

  .line--lead .action:hover {
    background: var(--paper-3);
    color: var(--teal-deep);
  }
}

/* ------------------------------------------------------------ home care */

.links-care {
  padding-block: clamp(2.2rem, 1.6rem + 2.4vw, 3.2rem);
}

.links-care__title {
  font-size: var(--step-3);
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.links-care .stamp {
  margin: 0.9rem 0 1.2rem;
}

.links-care__lede {
  font-size: var(--step-0);
  line-height: 1.5;
  margin-bottom: 1.4rem;
}

.links-care__note {
  margin-top: 1.2rem;
}

/* ---------------------------------------------------------------- exits */

.exit {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  /* Flush with the heading above: on paper there is no tinted panel to inset
     from, so an inline padding would only read as a stray indent. */
  padding: 1rem 0;
  min-height: 44px;
  background: var(--paper);
  color: inherit;
  text-decoration: none;
  transition: background var(--fast) var(--ease);
}

.exit__name {
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.15;
  color: var(--teal-deep);
}

.exit__meta {
  margin: 0;
  letter-spacing: 0.08em;
}

@media (hover: hover) {
  .exit:hover {
    background: var(--teal-pale);
  }
}

.exit:active,
.line__summary:active {
  transform: scale(0.985);
  transition: transform var(--fast) var(--ease);
}

/* --------------------------------------------------------------- footer */

.links-footer {
  padding-block: 1.8rem 2.2rem;
}

.links-footer p {
  margin: 0 0 0.4rem;
}

.links-footer__base {
  color: var(--on-ink-2);
  font-family: var(--display);
  font-size: 0.76rem;
}

/* ---------------------------------------------------------------- narrow */

@media (max-width: 23rem) {
  .links-id {
    grid-template-columns: 6.5rem minmax(0, 1fr);
  }

  .links-idband .idband__cell {
    padding-inline: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .line__toggle::before,
  .line__toggle::after,
  .exit:active,
  .line__summary:active {
    transition: none;
    transform: none;
  }

  .line__toggle::after {
    transform: rotate(90deg);
  }

  .line[open] .line__toggle::after {
    transform: rotate(0deg);
  }
}
