/* "El camino": one line runs down the home page. It sets off from the full
   stop of the headline and runs down the lane between the columns. It leaves
   the lane only to touch something real: the frame of Laia's portrait, the
   stones of her studies, the drawings, the rings of the first steps, and the
   contact heading, where it ends in a dot like the one it started from.
   Loaded after styles.css by both home pages. */

:root {
  --cm-line: var(--wine);
  --cm-lw: 1.6;          /* stroke width of every drawing, in px at full size */
  --cm-spine: 7.5rem;    /* the lane between the columns the path runs down */
  --cm-bg: var(--calc);
  --cm-soft: var(--wine-soft);
}

/* ---------- Colour bands ----------
   One rule: neighbouring sections never share a colour, and each strong
   colour means one thing. The light sections alternate calç and rose;
   garnet is only the forensic practice, sage only "how to start" (steps
   and price). The topic tiles always sit on calç so they stand out.
   The line takes a colour that reads on each band. */

.cm-band {
  background: var(--cm-bg);
}

.cm-band--rosa {
  --cm-bg: var(--ground-rosa);
  --cm-soft: var(--soft-on-rosa);
}

/* The hero is one rose block, so the calç of "Sobre mí" starts clearly */
.hero {
  background: var(--rosa);
}

.cm-band--wine {
  --cm-bg: var(--wine);
  --cm-line: var(--rosa);
  --cm-soft: var(--soft-on-wine);
  color: var(--calc);
}

.cm-band--sage {
  --cm-bg: var(--sage-deep);
  --cm-line: var(--honey-light);
  --cm-soft: var(--calc);             /* lighter greys fail on sage */
  color: var(--calc);
}

.cm-band .note {
  color: var(--cm-soft);
}

/* Light text on the dark bands reads thinner than dark on light: a little
   more air between letters and lines for the sans. The serif titles and
   prices keep their own spacing. */
:is(.cm-band--wine, .cm-band--sage) :is(p, dt, .cm-steps h3) {
  letter-spacing: 0.012em;
}

:is(.cm-band--wine, .cm-band--sage) p {
  line-height: 1.68;
}

.cm-band--wine :focus-visible,
.cm-band--sage :focus-visible {
  outline-color: var(--rosa);
}

.cm-ln {
  fill: none;
  stroke: var(--cm-line);
  stroke-width: var(--cm-lw);
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The name of the stop on the path */

/* ---------- Stops along the path ---------- */

.cm-stop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--cm-spine) minmax(0, 1fr);
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* The empty lane the line runs down; at each section it zigzags out of it
   to draw the symbol beside the text */
.cm-lane {
  grid-column: 2;
  grid-row: 1;
}

/* The line itself, drawn by camino.js over the band backgrounds and the
   hero's rose panel, and under the text and photos */
main {
  position: relative;
}

.cm-path {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  max-width: none;
  overflow: visible;
  pointer-events: none;
}

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

.cm-cell {
  position: relative;
  z-index: 2;
  grid-row: 1;
  margin: 0;
  min-width: 0;
  padding: clamp(5rem, 9vw, 7.5rem) clamp(1rem, 2.5vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cm-l { grid-column: 1; }
.cm-r { grid-column: 3; }

.cm-text {
  gap: 1.25rem;
}

/* Spacing inside a text column, all from the column's 1.25rem gap:
   - a heading sits a little further from what follows it;
   - a subtitle right under the heading stays close to it;
   - a sub-section heading (Formació) opens a clear break above it and
     stays close to its own list below. */
.cm-text h2 {
  margin-bottom: 0.25rem;
}

/* A subtitle under the heading: the serif title, a step back in colour */
.cm-text h2 + h3 {
  margin-top: -0.75rem;
  color: var(--cm-soft);
}

.cm-text * + h3:not(h2 + h3) {
  margin-top: 1.25rem;
}

.cm-text * + h3:not(h2 + h3) + * {
  margin-top: -0.5rem;
}

.cm-big {
  font-size: var(--text-lede);
  line-height: 1.5;
}

.cm-art svg {
  width: 100%;
  max-width: 27.5rem;
  height: auto;
  margin-inline: auto;
  overflow: visible;
}

/* The aside opposite the text, where a band has no drawing */
/* It lines up with the top of the heading opposite, not the middle */
.cm-aside {
  justify-content: flex-start;
}

.cm-aside > :first-child {
  margin-top: 0;
}

/* ---------- Photos with a drawn frame ---------- */

.cm-photo {
  position: relative;
  width: 100%;
  max-width: 23.75rem;
  margin-inline: auto;
}

.cm-photo img,
.cm-placeholder {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 0.875rem;
}

/* The outline drawn a little off the photo, like a second pass of the pen */
.cm-offset {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--cm-line);
  border-radius: 1.125rem;
  transform: translate(0.875rem, 0.875rem);
}

/* When the path draws the frame itself (camino.js), the outline gives way */
.cm-offset.cm-drawn {
  border-color: transparent;
  animation: none;
}

.cm-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--paper);
  border: 1.5px dashed var(--edge-dashed);
}

.cm-placeholder p {
  font-size: var(--text-small);
  color: var(--wine-soft);
  text-align: center;
}

/* ---------- Questions ----------
   Native details/summary, so they open with the keyboard and screen readers
   for free. Soft panels instead of rules between them. */

.cm-faq {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cm-faq details {
  padding-inline: 1.25rem;
  border-radius: 0.875rem;
  background: var(--panel);
}

.cm-faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 3rem;
  padding-block: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.cm-faq summary::-webkit-details-marker {
  display: none;
}

/* A drawn plus whose upright stroke folds away: + becomes − as the answer
   opens. Two strokes in the text colour, so it matches every band. */
.cm-faq summary::after {
  content: "";
  flex: none;
  width: 0.875rem;
  height: 0.875rem;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.75px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.75px 100% no-repeat;
}

.cm-faq details[open] summary::after {
  background-size: 100% 1.75px, 1.75px 0%;
}

/* Focus rings the whole question card, not a box drawn across it */
.cm-faq summary:focus-visible {
  outline: none;
}

.cm-faq details:has(> summary:focus-visible) {
  outline: 3px solid var(--wine);
  outline-offset: 3px;
}

.cm-faq details p {
  padding-bottom: 1.1rem;
}

/* Opening a question unfolds its answer; closing folds it back, quicker
   (main.js animates the height). The answer fades in as the card opens and
   out before it folds; the + loses its upright stroke as it opens. With
   reduced motion the card simply opens and only the + / − change remains. */
.cm-faq details.is-closing summary::after {
  background-size: 100% 1.75px, 1.75px 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .cm-faq summary::after {
    transition: background-size 250ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .cm-faq details p {
    transition: opacity 280ms ease-out;
  }

  .cm-faq details.is-opening p {
    opacity: 0;
    transition: none;
  }

  .cm-faq details.is-closing p {
    opacity: 0;
    transition: opacity 140ms ease-in;
  }

  /* Once folded, the hidden answer resets without animating */
  .cm-faq details:not([open]) p {
    transition: none;
  }
}

.cm-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: cm-step;
}

.cm-steps li {
  counter-increment: cm-step;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  column-gap: 1rem;
}

.cm-steps li::before {
  content: counter(cm-step);
  grid-row: 1 / span 2;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--cm-line);
  border-radius: 50%;
  background: var(--cm-bg);           /* the line runs into the ring, not across it */
  font-family: var(--serif);
  font-size: var(--text-small);
}

/* Item titles: body size, sans, 600 */
.cm-steps h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--text-body);
  line-height: 1.35;
}

.cm-steps p {
  font-size: var(--text-small);
  color: var(--cm-soft);
}

/* Formación: a short stretch of path, one stone per degree */
.cm-trail {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cm-trail li {
  position: relative;
  padding: 0 0 1.25rem 2rem;
}

.cm-trail li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.4em;
  width: 0.75rem;
  height: 0.75rem;
  border: 1.5px solid var(--cm-line);
  border-radius: 50%;
  background: var(--cm-bg);
}

/* Without the script, short strokes join the stones; with it, the line
   itself runs through them */
.cm-trail li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(0.15rem + 0.375rem - 0.75px);
  top: calc(0.4em + 0.75rem);
  bottom: 0;
  border-left: 1.5px solid var(--cm-line);
}

.cm-live .cm-trail li::after {
  display: none;
}

.cm-trail strong {
  display: block;
  font-weight: 600;
}

.cm-trail span {
  display: block;
  font-size: var(--text-small);
  color: var(--cm-soft);
}

/* Formació as a row: three degrees in order, left to right, each a quiet
   panel with its stone on the top edge. The path hops from stone to stone
   over the row (camino.js). The heading and the card text share one left
   edge, clear of where the path comes down into the first stone. */
.cm-studies-title {
  margin: 0 0 3.5rem 2.5rem;
}

.cm-trail--cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.cm-trail--cards li {
  padding: 1.5rem 1.5rem 1.6rem 2.5rem;
  border-radius: 0.6rem;
  background: var(--card, var(--panel));
}

/* Each degree in the colour of the section it leads to: the clinical degree
   in therapy's rose, the forensic master in the garnet of the forensic band,
   the health master (the one that licenses therapy) in the sage of the first
   steps. Tint for the card, full colour for its stone; the text stays garnet */
.cm-trail--cards li:nth-child(1) {
  --card: var(--tint-rose);
  --stone: var(--stone-rose);
}

.cm-trail--cards li:nth-child(2) {
  --card: var(--tint-garnet);
  --stone: var(--wine);
}

.cm-trail--cards li:nth-child(3) {
  --card: var(--tint-sage);
  --stone: var(--sage-deep);
}

.cm-trail--cards span {
  color: var(--soft-on-rosa);
}

/* The stone sits on the card's top edge, filled with the card's colour */
.cm-trail--cards li::before {
  left: 0.5rem;
  top: -0.5rem;
  width: 1rem;
  height: 1rem;
  background: var(--stone, var(--cm-bg));
}

.cm-trail--cards li::after {
  display: none;
}

.cm-trail--cards strong {
  text-wrap: balance;
}

.cm-trail--cards span {
  margin-top: 0.35rem;
}

/* Who the forensic work is for: three tiles laid across the garnet band,
   like the topic pavement but quieter (they don't turn over). The path runs
   underneath them. Titles line up along the top; the panot is pressed into
   each tile's lower corner, and the third carries what the work with
   organisations is. */
.cm-ambits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cm-ambits li {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: clamp(14rem, 20vw, 17rem);
  padding: clamp(1.25rem, 2.2vw, 1.75rem);
  border-radius: 0.4rem;
  background: var(--tile-on-wine);
}

.cm-ambits li::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -2.75rem;
  bottom: -2.75rem;
  width: 12rem;
  height: 12rem;
  background: var(--groove-on-wine);
  -webkit-mask: url("../img/panot.svg") center / 100% 100% no-repeat;
  mask: url("../img/panot.svg") center / 100% 100% no-repeat;
  pointer-events: none;
}

.cm-ambits h3 {
  margin: 0;
  max-width: 15em;
  color: var(--rosa);
}

.cm-ambits p {
  margin: 0;
  max-width: 34ch;
  font-size: var(--text-small);
  color: var(--soft-on-wine);
}

/* What a session is: length, price, where */
.cm-session {
  margin-top: 1rem;
  padding-top: 1.25rem;
  border-top: 1.5px solid var(--cm-line);
}

.cm-session > p {
  font-size: var(--text-small);
  color: var(--cm-soft);
}

/* Three rows read like a price list: what, then how much. Labels in the
   body face, values in the display face, a hairline of the path's colour
   between rows. Long places wrap on the right without breaking the rows. */
.cm-facts {
  display: flex;
  flex-direction: column;
  margin: 0.5rem 0 0;
}

.cm-facts div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid color-mix(in srgb, var(--cm-line) 40%, transparent);
}

.cm-facts dt {
  flex: none;
  font-size: var(--text-small);
  color: var(--cm-soft);
}

.cm-facts dd {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--text-title);
  line-height: 1.15;
  text-align: right;
  text-wrap: balance;
}

/* A piece of copy still to come, shown as such */
.cm-todo {
  display: inline-block;
  padding: 0.05rem 0.6rem;
  border: 1.5px dashed var(--edge-dashed);
  border-radius: 0.4rem;
  background: var(--paper);
  color: var(--wine-soft);
}

/* ---------- Pavement band ----------
   The tiles themselves are in panots.css. Here: the band has no drawing,
   so the path runs on under the pavement and shows through the grout. */

.cm-stop--pave .cm-cell {
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

/* Contact: the form belongs to the same section, so it follows the text
   closely instead of a whole section's space below it */
.cm-stop--end .cm-cell {
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.cm-pave-wrap {
  position: relative;
  z-index: 2;
  padding-bottom: var(--section-space);
}

/* ---------- Questions: the heading stays in view beside them ---------- */

.cm-head {
  justify-content: flex-start;
}

.cm-sticky {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* The conversation drawing fills the foot of the heading column */
.cm-talk-wrap {
  margin-top: auto;
  padding-top: 3rem;
}

.cm-talk-wrap svg {
  display: block;
  width: 100%;
  max-width: 24rem;
  height: auto;
  overflow: visible;
}

/* ---------- Contact ---------- */

/* The form opens with what it is for, so a visitor who jumped straight to
   it from "Demana la primera trucada" lands knowing what happens next */
.form-head h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--step-3);
  line-height: 1.15;
}

.form-head p {
  margin-top: 0.5rem;
  color: var(--wine-soft);
}

/* Where the line ends: a filled stone just before the heading */
.cm-end {
  position: absolute;
  top: 50%;
  left: -1.6rem;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--cm-line);
  transform: translateY(-50%);
}

#contacte-titol,
#contacto-titulo {
  position: relative;
}

/* The ways to reach Laia, opposite the heading */
.cm-ways {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-lede);      /* sans: the serif's hairline + all but vanishes */
  font-weight: 500;
  line-height: 1.4;
}

.cm-ways a:not(.button) {
  display: inline-block;
  padding-block: 0.35rem;
  overflow-wrap: anywhere;
}

.cm-ways .button {
  margin-top: 0.5rem;
}

.cm-form {
  max-width: 52rem;
  padding-bottom: var(--section-space);
}

/* ---------- Wider screens: the text gets the larger column ----------
   Text needs about 60 to 70 characters a line; a photo or drawing needs
   less. So whichever side the text is on is the wider one, and the sides
   alternate down the page. In the questions it's the list that is wide. */

@media (min-width: 52.0625rem) {
  .cm-stop:has(> .cm-text.cm-l):not(:has(> .cm-text.cm-r)) {
    grid-template-columns: minmax(0, 1.4fr) var(--cm-spine) minmax(0, 1fr);
  }

  .cm-stop:has(> .cm-text.cm-r):not(:has(> .cm-text.cm-l)),
  .cm-stop:has(> .cm-head) {
    grid-template-columns: minmax(0, 1fr) var(--cm-spine) minmax(0, 1.4fr);
  }

  .cm-text {
    max-width: 40rem;
  }

  /* Full column width, so opening a long answer never widens the column */
  .cm-r.cm-text {
    justify-self: start;
    width: 100%;
  }

  .cm-l.cm-text {
    justify-self: end;
    width: 100%;
  }

  /* A side column starts where the text under the heading opposite starts:
     the heading stands alone at the top, and the facts sit beneath it.
     One heading line (line-height 1.15) plus the 1.5rem below it */
  .cm-aside > :first-child {
    margin-top: calc(var(--step-4) * 1.15 + 1.5rem);
  }

  /* A photo beside a long text fills its column and starts level with the
     heading; the path draws its frame and then walks down the space under
     it to the next stop */
  .cm-art--top {
    justify-content: flex-start;
  }

  .cm-art--top .cm-photo {
    max-width: 28rem;
  }

  /* The row lines up with the photo and the text above it */
  .cm-studies {
    padding-inline: calc(var(--gutter) + clamp(1rem, 2.5vw, 2rem));
  }

  /* The form continues the contact text, in the same column */
  .cm-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--cm-spine) minmax(0, 1.4fr);
    max-width: var(--wrap);
  }

  .cm-form > form {
    grid-column: 3;
    max-width: 40rem;
    padding-inline: clamp(1rem, 2.5vw, 2rem);
  }
}

/* ---------- Phones: the path runs down the left edge ---------- */

@media (max-width: 52rem) {
  .cm-stop {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    column-gap: 0.75rem;
  }

  .cm-lane {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .cm-l,
  .cm-r {
    grid-column: 2;
  }

  .cm-text {
    grid-row: 1;
    padding: 4rem 0 1.5rem;
  }

  .cm-art {
    grid-row: 2;
    padding: 0 0.875rem 4rem 0;
  }

  .cm-sticky {
    position: static;
  }

  /* The text follows its heading instead of sharing its row, at the
     same distance as anywhere else */
  .cm-head + .cm-text {
    grid-row: 2;
    padding-top: 0;
  }

  .cm-stop .cm-cell.cm-head {
    padding-bottom: 1.5rem;
  }

  /* On a phone the questions follow their heading straight away */
  .cm-talk-wrap {
    display: none;
  }

  .cm-end {
    left: -1.35rem;
  }

  /* The degrees stack beside the rail, in line with the text */
  .cm-studies-title,
  .cm-trail--cards {
    margin-left: 3.25rem;
  }

  .cm-studies-title {
    margin-bottom: 1.75rem;
  }

  .cm-trail--cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  /* The three tiles stack; each just tall enough for its corner panot */
  .cm-ambits {
    grid-template-columns: minmax(0, 1fr);
  }

  .cm-ambits li {
    min-height: 8.5rem;
  }

  .cm-ambits li::after {
    width: 8rem;
    height: 8rem;
    right: -2rem;
    bottom: -2rem;
  }

  /* The form lines up with the text above it, beside the rail */
  .cm-form > form {
    margin-left: 3.25rem;
  }

}

/* ---------- Drawing the lines ----------
   Every stroke has pathLength="1", so a dash of 1 covers it whole and
   moving the offset from 1 to 0 draws it. The path and the symbols are
   drawn with the scroll by camino.js. With reduced
   motion, or without the script, the lines are simply there. */

/* A photo's offset frame traced like one stroke of the pen: down its right
   side, round the corner, then back along the bottom. Its top and left sides
   lie behind the photo, so only that L ever shows. --cm-corner is the square
   that holds the rounded corner. */
@keyframes cm-wipe {
  from {
    clip-path: polygon(0 0, 100% 0, 100% 0, calc(100% - var(--cm-corner)) 0, calc(100% - var(--cm-corner)) 0, 0 0);
  }
  55% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, calc(100% - var(--cm-corner)) 100%, calc(100% - var(--cm-corner)) calc(100% - var(--cm-corner)), 0 calc(100% - var(--cm-corner)));
  }
  to {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 calc(100% - var(--cm-corner)), 0 calc(100% - var(--cm-corner)));
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    /* Each photo's drawn frame traces itself as the photo comes in. The
       timeline follows the photo, not its figure: beside the form the figure
       is as tall as the form while the photo stays put, which would leave
       the frame half drawn for the whole length of the form */
    .cm-draw .cm-photo {
      view-timeline-name: --cm-art;
    }

    .cm-draw .cm-offset:not(.cm-drawn) {
      --cm-corner: 2rem;
      animation: cm-wipe linear both;
      animation-timeline: --cm-art;
      animation-range: entry 20% cover 45%;
    }
  }
}

/* ---------- Drawings ---------- */

/* A shape the path draws closed over what lies behind it (the lens) */
.cm-ln.cm-fill {
  fill: var(--cm-bg);
}

/* Lines seen through the lens, a little bolder */
.cm-ln.cm-thick {
  stroke-width: calc(var(--cm-lw) * 1.8);
}

/* A drawing above a photo in the same column */
.cm-art .cm-sym + .cm-photo {
  margin-top: 2.5rem;
}

/* ---------- Calls to action along the way ---------- */

.cm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 0.75rem;
}

/* On the deep sage the garnet button would sink in: it turns light */
.cm-band--sage .button {
  background: var(--calc);
  border-color: var(--calc);
  color: var(--wine);
}

.cm-band--sage .button:hover {
  background: var(--honey-light);
  border-color: var(--honey-light);
}

/* Phone and email are easy to tap: at least 48px tall */
.cm-ways a:not(.button) {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding-block: 0;
}

/* The contact form in one column: one thing to fill at a time */
.cm-form .form {
  grid-template-columns: minmax(0, 1fr);
}

/* ---------- Photos of the centre ---------- */

/* The consulting room is a landscape: kept wide so the armchair and the
   sofa facing it both stay in frame */
.cm-photo--wide {
  max-width: 27.5rem;
}

.cm-photo--wide img {
  aspect-ratio: 4 / 3;
}

/* The entrance sits beside the form: where you'll arrive */
.cm-form-photo {
  margin: 0;
}

@media (min-width: 52.0625rem) {
  .cm-form-photo {
    grid-column: 1;
    grid-row: 1;
    padding-inline: clamp(1rem, 2.5vw, 2rem);
  }

  .cm-form-photo .cm-photo {
    position: sticky;
    top: 2.5rem;
    margin-inline: 0;
  }

  .cm-form > form {
    grid-row: 1;
  }
}

/* On phones it follows the form, in line with the text */
@media (max-width: 52rem) {
  .cm-form {
    display: flex;
    flex-direction: column;
  }

  .cm-form-photo {
    order: 2;
    margin: 3rem 0 0 3.25rem;
    padding-right: 0.875rem;
  }
}
