/* Tails. The tank device, in gecko yellow, plus the set piece: one drawn gecko that draws itself as the care screen scrolls. */

/* ---- Opening: stacked on small screens, a full tank on wide ones ------------- */
.tails-open { min-height: 0; --hood-x: 78%; }
.tails-open .tank-label { background: color-mix(in srgb, var(--shade) 88%, transparent); }
.tails-open .tank-body { flex: none; margin-top: clamp(1.5rem, 5vh, 3rem); }
.tails-h1 { font-size: clamp(2.75rem, 1rem + 5.4vw, 6.75rem); line-height: .94; letter-spacing: -.03em; }
.tails-bg {
  position: relative; margin: clamp(2rem, 6vh, 3.5rem) calc(var(--gut) * -1) calc(clamp(3rem, 9vh, 6.5rem) * -1);
  background: var(--shade);
}
.tails-bg img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 80%; }

@media (min-width: 56rem) and (min-aspect-ratio: 5 / 4) {
  .tails-open { min-height: calc(100vh - var(--head-h)); min-height: calc(100svh - var(--head-h)); }
  .tails-open .tank-body { flex: 1; }
  .tails-bg { position: absolute; inset: 0; z-index: -2; margin: 0; }
  .tails-bg img { height: 100%; aspect-ratio: auto; object-position: 50% 85%; }
  /* Scrim: dark over the headline corner, clear over the lower third where the gecko rests. */
  .tails-bg::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse 80% 95% at 0% 0%, rgba(6, 16, 18, .9) 0%, rgba(6, 16, 18, .8) 50%, rgba(6, 16, 18, .45) 80%, rgba(6, 16, 18, 0) 100%);
  }
}

/* ---- Ask in person ----------------------------------------------------------- */
.tails-ask .tank-body { flex: none; }
.tails-ask .col-text { --stack: 1.4rem; }

/* ---- Care: heat and light, one column, and the gecko in the margin ------------ */
.care { --hood-x: 82%; }
.care-head .lede { margin-top: 1.25rem; }
.care-blocks { display: grid; }
.care-block { padding: 1.4rem 0 1.6rem; border-top: var(--hair) solid var(--line); }
.care-block:last-child { border-bottom: var(--hair) solid var(--line); }
.care-block .label { margin-bottom: .7rem; }
.care-block p { max-width: 28rem; }

/* The drawn gecko: one path, nose to tail tip, so the tail is the last thing drawn.
   --p comes from site.js (data-progress); with no script or reduced motion it is 1 and the line is complete. */
.gecko { --d0: .1; --d1: .42; display: flex; align-items: flex-start; justify-content: center; }
.gecko svg { height: min(60vh, 22rem); width: auto; max-width: 100%; overflow: visible; }
.gecko path {
  fill: none; stroke: var(--yellow); stroke-width: 1.5; stroke-linecap: butt; stroke-linejoin: round;
  stroke-dasharray: 1 2;
  stroke-dashoffset: calc(1 - clamp(0, (var(--p, 1) - var(--d0)) / var(--d1), 1));
}
@media (prefers-reduced-motion: reduce) { .gecko path { stroke-dashoffset: 0; } }

@media (min-width: 56rem) {
  .care-head { grid-column: 1 / span 5; grid-row: 1; }
  .care-blocks { grid-column: 1 / span 5; grid-row: 2; }
  .gecko { --d0: .12; --d1: .5; grid-column: 9 / -1; grid-row: 1 / span 2; justify-content: flex-end; }
  .gecko svg { position: sticky; top: 8vh; height: min(74vh, 40rem); }
}

/* ---- Guinea pig: the picture sits large, low and to the right ----------------- */
.mammal { --hood-x: 72%; }
.mammal-text { --stack: 1.3rem; }
.mammal .pic-frame { aspect-ratio: 3 / 2; }
@media (min-width: 56rem) {
  .mammal .tank-body { align-items: end; }
  .mammal-text { grid-column: 1 / span 4; align-self: start; }
  .mammal-pic { grid-column: 6 / -1; }
  .mammal-pic .pic-frame { margin-right: calc(var(--gut) * -1); }
}

/* ---- End: three names and the telephone ---------------------------------------- */
.tails-end { --hood-x: 40%; }
.tails-end .tank-body { flex: none; }
.tails-end .col-text { --stack: 1.4rem; }
.names { list-style: none; padding: 0; margin: 0; border-bottom: var(--hair) solid var(--line); }
.names li { border-top: var(--hair) solid var(--line); }
.names a {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .35rem 1.5rem;
  min-height: 2.75rem; padding: 1.1rem 0;
}
.names-name {
  font-family: var(--serif); font-size: clamp(1.75rem, 1rem + 2.4vw, 3.25rem); line-height: 1.05; letter-spacing: -.02em;
  font-variation-settings: "SOFT" 100, "WONK" 1; overflow-wrap: break-word; min-width: 0; transition: color .4s var(--ease);
}
.names a:hover .names-name, .names a:focus-visible .names-name { color: var(--yellow); }
@media (min-width: 56rem) { .names { grid-column: 1 / span 7; } }
