/* ------------------------------ Get in touch -------------------------------
   From the PDF "Form (1)" (390 x 2500). The stamp grid sits on green; the
   page comes up over it as a card with 8px corners, 487.5 from the top. */

.page-contact {
  background: var(--bg);
}

/* From the PDF "Form" (390 x 708): a 4:5 green block (390 x 487.5) with the
   stamps as a 4 x 5 grid; the card comes up over its last 8px. Everything
   inside is drawn in the PDF's 390-wide units (--u), so it follows the
   block's edges at any phone width. */
.cl-hero {
  container-type: inline-size;
  position: relative;
  /* content-box: the 4:5 is the green above the card, the 8px go under it. */
  box-sizing: content-box;
  aspect-ratio: 4 / 5;
  padding-bottom: 8px;
  background: var(--green);
}

.cl-hero-grid {
  --u: calc(100cqw / 390);
  position: absolute;
  inset: 0;
}

/* One cell: a 68 x 68 window on stamp-grid.svg at 1.291x (the PDF's stamps
   are 65 wide, the file's 50.3), centred on its place (--x, --y) and showing
   whichever stamp --px / --py point it at. */
.cl-stamp {
  position: absolute;
  top: calc(var(--u) * var(--y));
  left: calc(var(--u) * var(--x));
  width: calc(var(--u) * 68);
  height: calc(var(--u) * 68);
  margin: calc(var(--u) * -34) 0 0 calc(var(--u) * -34);
  background: url("assets/img/home/stamp-grid.png")
    calc(var(--u) * var(--px)) calc(var(--u) * var(--py)) /
    calc(var(--u) * 358.9) calc(var(--u) * 284) no-repeat;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.cl-stamp.is-on {
  opacity: 1;
}

.cl-card {
  position: relative;
  margin-top: -8px;
  border-radius: 8px 8px 0 0;
  background: var(--bg);
  color: var(--ink);
}

/* The page's big headings: 32px Inktrap, the baseline 28 into a 40 line. */
.cf-title,
.cl-title,
.page-contact .about-join-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: 0;
  color: var(--ink);
}

.cf-title em,
.cl-title em {
  font-weight: 800;
  font-style: italic;
}

/* ------------------------- Get in touch: the form -------------------------
   Everything sits on a 56px rhythm: each field is a 56px row closed by a
   0.5px ink rule, the label's baseline 12px above it. Labels rest at 10px,
   30% ink; touching a field turns its label 12px purple. */

.cf {
  --cf-pad: 32px;
  --cf-rest: rgba(51, 51, 51, 0.65);
  --cf-option: 35px;
  display: block;
  box-sizing: border-box;
  width: 100%;
  /* The title's baseline 95 under the card's top edge. */
  padding: 67px var(--cf-pad) 0;
}

/* Three lines of 12px mono, the first baseline 40 under the title's. */
.cf-lead {
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  color: var(--ink);
}

/* The first row's label sits 52 under the lead's last baseline. */
.cf-form {
  margin: 4.25px 0 0;
}

.cf-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- A row: label and field on one line, the rule underneath ---- */

.cf-row {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  box-sizing: border-box;
  height: 56px;
  padding-bottom: 9px;
  border-bottom: 0.5px solid var(--ink);
  cursor: text;
  transition: border-color 0.25s var(--ease-enter);
}

.cf-label {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 10px;
  line-height: 1;
  color: var(--cf-rest);
  white-space: nowrap;
  cursor: inherit;
  transition:
    color 0.25s var(--ease-enter),
    font-size 0.25s var(--ease-enter);
}

.cf-input {
  flex: 1;
  min-width: 0;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: var(--font-mono);
  /* 16px: anything smaller makes iOS zoom the page on focus. */
  font-size: 16px;
  line-height: 16px;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}

.cf-input:focus {
  outline: none;
}

/* Being touched: the label grows to 12px and turns purple, so does the rule. */
.cf-row.is-active {
  border-bottom-color: var(--purple);
}

.cf-row.is-active .cf-label {
  font-size: 12px;
  color: var(--purple);
}

/* ---- Need and Budget: a box with a menu that drops from it ----
   The box sits in the 218px right of the label (140 to 358 at 390), 8px
   under the rule above and 8px over the one below. It is always there, with
   the first choice in it, and fades in once the page has loaded. */

.cf-choice {
  cursor: pointer;
}

.cf-select {
  position: absolute;
  top: 7.75px;
  right: 0;
  left: 108px;
  z-index: 1;
  height: 40px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.6s var(--ease-enter),
    visibility 0s 0.6s;
}

.cf-choice.is-shown .cf-select {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s var(--ease-enter);
}

/* Open, the menu runs over the rows and the box below it; rolling up, it
   stays on top until it is gone. */
.cf-choice.is-open .cf-select {
  z-index: 5;
}

.cf-choice.is-closing .cf-select {
  z-index: 6;
}

.cf-select-head {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 32px;
  border: 0;
  border-radius: 4px;
  /* At rest the box is ink at 20%; the row being touched turns it purple. */
  background: rgba(51, 51, 51, 0.2);
  color: var(--bg);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.3s var(--ease-enter);
}

.cf-choice.is-active .cf-select-head {
  background: var(--purple);
}

.cf-select-head:focus {
  outline: none;
}

/* The arrow: 9 x 8, 16 from the right edge. */
.cf-select-head::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 9px;
  height: 8px;
  margin-top: -3px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* The menu tucks under the box's last 4px, so the box shows square bottom
   corners while it is open. It lists every choice but the one in the box.
   It opens by growing in height, so its border and rounded bottom are
   there from the first frame: a closed box that gets taller, never one cut
   open. --rows is set by the script. */
.cf-select-list {
  --rows: 4;
  --list-h: calc(var(--rows) * var(--cf-option) + 0.75px);
  position: absolute;
  top: 36px;
  right: 0;
  left: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: 0.75px;
  overflow: hidden;
  border: 0.75px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: var(--bg);
  visibility: hidden;
}

.cf-select-list [role="option"] {
  --i: 0;
  flex: none;
  height: var(--cf-option);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: color 0.2s var(--ease-enter);
}

.cf-select-list [role="option"][hidden] {
  display: none;
}

.cf-select-list [role="option"]:hover,
.cf-select-list [role="option"]:focus-visible {
  outline: none;
  color: var(--purple);
}

/* Opening: the box lifts a touch, then comes back down while the menu
   unrolls from it, and the names follow one after another. Each leg eases in
   and out, so the lift flows into the drop without a stop. */
.cf-choice.is-open .cf-select {
  animation: cf-select-lift 0.62s both;
}

.cf-choice.is-open .cf-select-list {
  visibility: visible;
  height: var(--list-h);
  animation: cf-list-drop 0.62s both;
}

.cf-choice.is-open .cf-select-list [role="option"] {
  animation: cf-option-in 0.4s var(--ease-enter) calc(0.2s + var(--i) * 45ms) both;
}

@keyframes cf-select-lift {
  0%   { transform: translateY(0); animation-timing-function: cubic-bezier(0.37, 0, 0.63, 1); }
  28%  { transform: translateY(-4px); animation-timing-function: cubic-bezier(0.45, 0, 0.2, 1); }
  100% { transform: translateY(0); }
}

@keyframes cf-list-drop {
  0%, 18% { height: 0.75px; animation-timing-function: cubic-bezier(0.45, 0, 0.2, 1); }
  100%    { height: var(--list-h); }
}

@keyframes cf-option-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Closing: the menu rolls back up, quicker and without the lift. */
.cf-choice.is-closing .cf-select-list {
  visibility: visible;
  animation: cf-list-up 0.32s cubic-bezier(0.45, 0, 0.55, 1) both;
}

@keyframes cf-list-up {
  from { height: var(--list-h); }
  to   { height: 0.75px; }
}

/* ---- The idea: a box, 40 under the last rule ---- */

.cf-idea {
  position: relative;
  margin-top: 40px;
}

/* The placeholder, laid exactly where the box's first line of text sits
   (0.75 border + 12 padding, 0.75 border + 16 padding). */
.cf-hint {
  position: absolute;
  top: 12.75px;
  left: 16.75px;
  right: 16.75px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 16px;
  color: var(--ink);
  opacity: 0.65;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-enter);
}

.cf-idea.is-typed .cf-hint {
  opacity: 0;
}

/* "bold" is written twice in the same spot: Inktrap Regular, then Ultrabold
   Italic. A wipe runs left to right and swaps one for the other, so the
   word fills in like ink rather than fading — the same left-to-right wipe
   as "authentic dream" on the home. The two are clipped at the same edge,
   so they never overlap. */
.cf-bold {
  display: inline-grid;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1;
}

.cf-bold > span {
  grid-area: 1 / 1;
}

.cf-bold-thin {
  font-weight: 400;
  font-style: normal;
  clip-path: inset(0 0 0 0);
}

.cf-bold-thick {
  font-weight: 800;
  font-style: italic;
  clip-path: inset(0 100% 0 0);
}

/* It loops: 0.9s wipe to bold, 1.8s held, 0.9s wipe back to regular (same
   left-to-right direction), 1.8s held — 5.4s round. */
.cf-idea.is-seen .cf-bold-thin {
  animation: cf-bold-thin 5.4s var(--ease-enter) 0.4s infinite both;
}

.cf-idea.is-seen .cf-bold-thick {
  animation: cf-bold-thick 5.4s var(--ease-enter) 0.4s infinite both;
}

/* The edge runs a little past each side so it starts and ends off the
   italic's overhang. Each word jumps back to its starting side only while
   it is fully hidden, so the jump never shows. */
@keyframes cf-bold-thick {
  0%            { clip-path: inset(-20% 105% -20% -10%); }
  16.67%, 50%   { clip-path: inset(-20% -10% -20% -10%); }
  66.67%, 99.9% { clip-path: inset(-20% -10% -20% 110%); }
  100%          { clip-path: inset(-20% 105% -20% -10%); }
}

@keyframes cf-bold-thin {
  0%            { clip-path: inset(-20% -10% -20% -10%); }
  16.67%, 49.9% { clip-path: inset(-20% -10% -20% 110%); }
  50%           { clip-path: inset(-20% 105% -20% -10%); }
  66.67%, 100%  { clip-path: inset(-20% -10% -20% -10%); }
}

.cf-textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 120px;
  margin: 0;
  padding: 12px 16px;
  border: 0.75px solid var(--ink);
  border-radius: 8px;
  background: none;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 16px;
  color: var(--ink);
  resize: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.25s var(--ease-enter);
}

.cf-textarea:focus {
  outline: none;
  border-color: var(--purple);
}

/* ---- Consent on the left, Send on the right, 24 under the box ---- */

.cf-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.cf-consent {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cf-consent input {
  position: relative;
  flex: none;
  width: 11px;
  height: 11px;
  margin: 0;
  border: 0.75px solid var(--ink);
  border-radius: 3px;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: background 0.2s var(--ease-enter), border-color 0.2s var(--ease-enter);
}

.cf-consent input:checked {
  border-color: var(--purple);
  background: var(--purple);
}

.cf-consent input:checked::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 3px;
  width: 2px;
  height: 5px;
  border: solid var(--bg);
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
}

.cf-consent input:focus-visible {
  outline: 1px solid var(--purple);
  outline-offset: 2px;
}

.cf-consent label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 14px;
  color: var(--ink);
  cursor: pointer;
}

/* The site's green pill. */
.cf-send {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 144px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--green);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.25s ease;
}

.cf-send:active {
  background: var(--ink);
  color: var(--green);
}

.cf-status {
  min-height: 16px;
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  color: var(--red, #f0262b);
}

.cf-status.is-good {
  color: var(--ink);
}

/* An empty required field, after a try at sending. */
.cf-row.is-wrong .cf-label,
.cf-consent.is-wrong label {
  color: var(--red, #f0262b);
}

.cf-row.is-wrong {
  border-bottom-color: var(--red, #f0262b);
}

.cf-idea.is-wrong .cf-textarea {
  border-color: var(--red, #f0262b);
}

/* ---- Or just write: four ways in, each between two 0.5 rules ----
   Title baseline 87 under Send; the first rule 32 under the title's
   baseline; in each item the purple label's baseline 28 under the rule, the
   value's 30 under that, the next rule 20 under the value. */

.cl-direct {
  padding: 27px 32px 0;
}

.cl-direct-list {
  margin: 19.75px 0 0;
  padding: 0;
  list-style: none;
}

.cl-direct-list li {
  padding: 15.25px 0 13.75px;
  border-top: 0.5px solid var(--ink);
}

.cl-direct-list li:last-child {
  border-bottom: 0.5px solid var(--ink);
}

/* The items cascade in as they are scrolled to, exactly as the archive rows
   on Our Designs do. The hidden state only applies once the script has
   marked the list, so the addresses stay readable without it. */
.cl-direct-list.is-staggered li {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s cubic-bezier(0.55, 0, 1, 0.45),
    transform 0.55s cubic-bezier(0.55, 0, 1, 0.45);
}

.cl-direct-list.is-staggered li.is-revealed {
  opacity: 1;
  transform: none;
}

.cl-direct-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  color: var(--purple);
}

.cl-direct-value {
  display: block;
  margin-top: 11px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  line-height: 21px;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.25s var(--ease-enter);
}

a.cl-direct-value:hover,
a.cl-direct-value:focus-visible {
  outline: none;
  color: var(--purple);
}

/* ---- The four stamps, 64 under the last rule, 77 centre to centre ---- */

.cl-marks {
  display: flex;
  justify-content: center;
  padding-top: 64.5px;
}

/* ---- Join our team: the Isola Studio page's block, spaced for this page ----
   Title capitals 80 under the stamps; the address rule on the label's
   baseline, 48 under the title's; the box 24 under the rule. */

.page-contact .cl-join {
  padding: 75px 32px 0;
}

.page-contact .about-join-form {
  margin-top: 24px;
}

.page-contact .about-join-field {
  gap: 16.6px;
}

/* The 0.5 rule under the box, clear of the text (the user, 2026-11-12: it
   used to run through the baseline and the typed text sat on it). */
.page-contact .about-join-field input {
  background: linear-gradient(var(--rule), var(--rule)) no-repeat 0 100% / 100% 0.5px;
  --rule: var(--ink);
}

.page-contact .about-join-field input:focus {
  --rule: var(--purple);
}

.page-contact .about-join-field:focus-within label {
  color: var(--purple);
}

.page-contact .about-join-message {
  margin-top: 20px;
  padding: 8.25px 11.25px;
  border: 0.75px solid var(--ink);
}

.page-contact .about-join-clip {
  border: 0.75px solid var(--ink);
}

.page-contact .about-join-clip.is-set {
  border-color: var(--purple);
}

/* ---- Want see some design: the two cards, captions centred ---- */

.page-contact .cl-work {
  padding: 29px 32px 80px;
}

.page-contact .work-kicker {
  font-size: 20px;
  margin-bottom: 26px;
}

.page-contact .work-card span {
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .cf-choice.is-open .cf-select,
  .cf-choice.is-open .cf-select-list,
  .cf-choice.is-open .cf-select-list [role="option"],
  .cf-choice.is-closing .cf-select-list {
    animation: none;
  }

  .cf-idea .cf-bold > span {
    animation: none;
  }

  .cf-bold-thin {
    visibility: hidden;
  }

  .cf-bold-thick {
    clip-path: none;
  }
}

/* Phone: 24px less air in the widest gaps (the user, 2026-11-12). */
@media (max-width: 899px) {
  .cf { padding-top: 43px; }
  .page-contact .about-join { padding-top: 51px; }
  .page-contact .about-work { padding-bottom: 56px; }
}

/* IBM Plex Mono one pixel larger on the PHONE only (the user, 2026-11-12:
   10 -> 11, 12 -> 13; the desktop stays as it was). */
@media (max-width: 899px) {
  .cf-lead { font-size: 13px; }
  .cf-label { font-size: 11px; }
  .cf-row.is-active .cf-label { font-size: 13px; }
  .cf-select-head { font-size: 13px; }
  .cf-select-list [role="option"] { font-size: 13px; }
  .cf-hint { font-size: 11px; }
  .cf-consent label { font-size: 10px; line-height: 13px; }
  .cf-send { font-size: 13px; }
  .cf-status { font-size: 13px; }
  .cl-direct-label { font-size: 13px; }
}

/* Phone forms (the user, 2026-11-12): the consent runs the box's full width,
   Send under it, flush with the box's right edge (as in the dream form). */
@media (max-width: 899px) {
  .cf-foot {
    flex-wrap: wrap;
    justify-content: flex-end;
    /* 2026-11-16, lui: "togli ISOLA STUDIO, gestisci tutto su due righe e
       alza il tasto verde". Tolto il nome la frase sta in due righe piene e
       la terza riga non si apre più; il verde sale di 8 chiudendo il vuoto
       che era rimasto sotto. */
    row-gap: 8px;
  }
  .cf-foot .cf-consent {
    flex: 1 1 100%;
    max-width: none;
  }
}

/* Need and Budget menus, phone (the user, 2026-11-12): as on the desktop,
   the menu comes out from BEHIND the box instead of dropping over it. It
   starts halfway up the box, under it, so the box is opaque (the same grey
   as its 20% ink on the page ground) and stays put: no lift. */
@media (max-width: 899px) {
  .cf-select-head {
    z-index: 2;
    background: rgb(205 205 205);
  }
  .cf-choice.is-active .cf-select-head {
    background: var(--purple);
  }
  .cf-choice.is-open .cf-select {
    animation: none;
  }
  .cf-select-list {
    --list-h: calc(var(--rows) * var(--cf-option) + 20.75px);
    top: 20px;
    padding-top: 20px;
  }
  .cf-choice.is-open .cf-select-list {
    animation: cf-list-out-phone 0.5s cubic-bezier(0.45, 0, 0.2, 1) both;
  }
  .cf-choice.is-closing .cf-select-list {
    animation: cf-list-in-phone 0.32s cubic-bezier(0.45, 0, 0.55, 1) both;
  }
  @keyframes cf-list-out-phone {
    from { height: 20px; }
    to   { height: var(--list-h); }
  }
  @keyframes cf-list-in-phone {
    from { height: var(--list-h); }
    to   { height: 20px; }
  }
}
/* The idea box, phone (the user, 2026-11-12): what is typed at the form's
   13px body. Set at 16px so iOS does not zoom on focus, scaled by 13/16,
   its box sized up by 16/13 so it still measures 120 tall, 0.75 edge. */
@media (max-width: 899px) {
  .cf-textarea {
    width: calc(100% / 0.8125);
    height: calc(120px / 0.8125);
    margin-bottom: calc(120px - 120px / 0.8125);
    padding: calc(12px / 0.8125) calc(16px / 0.8125);
    border-width: calc(0.75px / 0.8125);
    border-radius: calc(8px / 0.8125);
    line-height: calc(16px / 0.8125);
    transform: scale(0.8125);
    transform-origin: 0 0;
  }
}
/* The consent tick turns red with its words (the user, 2026-11-12). */
.cf-consent.is-wrong input,
.page-contact .cf-form .cf-consent.is-wrong input { border-color: var(--red, #f0262b); }