/* Let's chat: title on the left, fields on the right, twice over */

.contact { padding: clamp(28px, 7vh, 90px) 4vw clamp(60px, 10vh, 120px); }
.contact-row {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr);
  gap: clamp(28px, 5vw, 96px);
  align-items: start;
}
.contact-row + .contact-row {
  margin-top: clamp(56px, 10vh, 120px);
  padding-top: clamp(40px, 7vh, 80px);
  border-top: 1px solid rgba(16, 40, 76, .2);
}

/* The title borrows the homepage's weight-under-the-cursor effect (styles.css .weighted) */
.contact-title.weighted {
  position: sticky;
  top: 24px;
  width: auto;
  margin: 0;
  font-size: clamp(42px, 5.6vw, 92px);
  line-height: .98;
  text-align: left;
}
.contact-sub {
  margin: 0;
  font-size: clamp(32px, 3.6vw, 56px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
}

/* Fields, after fragment.im: outlined boxes whose label floats up once you type */

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field { position: relative; }
.field-wide { grid-column: 1 / -1; }

.field input, .field textarea {
  display: block;
  width: 100%;
  height: 64px;
  padding: 26px 16px 10px;
  border: 1.5px solid rgba(16, 40, 76, .28);
  border-radius: 8px;
  background: rgba(255, 255, 255, .55);
  color: var(--navy);
  font: 500 18px / 1.3 var(--grotesk);
  outline: none;
  transition: border-color .25s, background-color .25s, box-shadow .25s;
}
.field textarea { height: auto; min-height: 140px; resize: vertical; padding-top: 32px; }
.field input:hover, .field textarea:hover { border-color: rgba(16, 40, 76, .55); }
.field input:focus, .field textarea:focus {
  border-color: var(--navy);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(16, 40, 76, .1);
}

.field label {
  position: absolute;
  left: 17px;
  top: 21px;
  color: rgba(16, 40, 76, .6);
  font-size: 17px;
  font-weight: 500;
  pointer-events: none;
  transform-origin: 0 0;
  transition: transform .25s var(--ease), color .25s;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  color: var(--navy);
  transform: translateY(-12px) scale(.7);
}

/* After a send attempt, missing answers are outlined */
.was-checked .field input:invalid, .was-checked .field textarea:invalid { border-color: #b3261e; }

/* Your project, after bitwip.fr */

.project { display: grid; gap: clamp(26px, 4vh, 40px); }
.group { min-width: 0; margin: 0; padding: 0; border: 0; }
.group legend {
  margin-bottom: 14px;
  padding: 0;
  font-size: 17px;
  font-weight: 700;
}
.group legend span { margin-left: 6px; font-weight: 500; opacity: .6; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 12px;
  border: 1.5px solid rgba(16, 40, 76, .28);
  border-radius: 100px;
  background: rgba(255, 255, 255, .55);
  color: var(--navy);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background-color .25s, color .25s, border-color .25s, transform .2s;
}
.chip:hover { border-color: var(--navy); }
.chip:active { transform: scale(.97); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--navy); border-color: var(--navy); color: var(--white); }
.chip:has(input:focus-visible) { outline: 2px solid var(--navy); outline-offset: 3px; }
.chip-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--tint);
}
.chip-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--navy);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.group-error { margin: 10px 0 0; color: #b3261e; font-size: 14px; font-weight: 500; }

/* Currency switch: the dark highlight slides between USD and AED */
.currency {
  position: relative;
  display: inline-flex;
  margin-bottom: 12px;
  padding: 3px;
  border: 1.5px solid rgba(16, 40, 76, .28);
  border-radius: 6px;
  isolation: isolate;
  /* A parallelogram like the menu buttons, with upright letters */
  transform: skewX(var(--lean));
}
.currency button {
  padding: 6px 14px;
  border: 0;
  background: none;
  color: var(--navy);
  font: 700 13px / 1 var(--grotesk);
  letter-spacing: .04em;
  cursor: pointer;
  transition: color .3s;
}
.currency button > span { display: inline-block; transform: skewX(calc(-1 * var(--lean))); }
.currency button[aria-pressed="true"] { color: var(--white); }
.currency-bg {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  z-index: -1;
  border-radius: 4px;
  background: var(--navy);
  transition: transform .4s var(--ease), width .4s var(--ease);
}

/* Budget: one row of joined segments */
.segments {
  display: flex;
  border: 1.5px solid rgba(16, 40, 76, .28);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, .55);
}
.seg { flex: 1 1 0; display: flex; position: relative; cursor: pointer; }
.seg + .seg { border-left: 1.5px solid rgba(16, 40, 76, .28); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: grid;
  place-items: center;
  width: 100%;
  padding: 12px 10px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  transition: background-color .25s, color .25s;
}
.seg:hover span { background: rgba(16, 40, 76, .06); }
.seg input:checked + span { background: var(--navy); color: var(--white); }
.seg input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: -4px; }

.field-story textarea { min-height: 180px; }

/* Send: the menu pill, with an edge so it shows on the paper */
.send {
  justify-self: start;
  height: 48px;
  padding: 0 28px;
  font-size: 16px;
  box-shadow: 0 0 0 1px rgba(16, 40, 76, .2);
}

/* Abu Dhabi and its time, at the foot of the left column of "Your project" */
.contact-sub { grid-column: 1; grid-row: 1; }
.contact-foot {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
}
.privacy-small {
  display: inline-block;
  margin-top: 10px;
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  text-underline-offset: 3px;
  opacity: .75;
}
.privacy-small:hover { opacity: 1; }
.local-time {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.local-time time { font-variant-numeric: tabular-nums; opacity: .7; }
/* A wireframe globe; contact.js turns its meridians so it spins */
.globe {
  flex: none;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
}
.project { grid-column: 2; grid-row: 1; }

/* "Sending…" while the form is on its way, and a note if it couldn't be sent */
.send[disabled] { opacity: .6; cursor: progress; }
.send-error { margin: 0; color: #b3261e; font-size: 14px; font-weight: 500; }

/* Thank-you box: opens over the page like the letters on the Who page */
.thanks {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 10px;
  background:
    radial-gradient(circle, rgba(0, 0, 0, .05) .7px, transparent 1px) 0 0 / 8px 8px,
    #fbfaf6;
  box-shadow: 0 30px 90px rgba(16, 40, 76, .35);
  color: var(--navy);
  font-family: var(--grotesk);
}
.thanks[open] { animation: thanks-in .5s var(--ease); }
.thanks::backdrop { background: rgba(16, 40, 76, .42); backdrop-filter: blur(3px); }
@keyframes thanks-in {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.thanks-body { position: relative; padding: 52px 48px 42px; text-align: center; }
.thanks-body p { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.5; }
.thanks-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .06);
  color: var(--navy);
}
.thanks-close:hover { background: rgba(0, 0, 0, .12); }
.thanks-close svg { width: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

/* The logo, a little larger than in the header */
.thanks-logo { position: relative; width: 130px; margin: 0 auto 24px; }
.thanks-logo img { display: block; width: 100%; height: auto; }
/* The glow and shapes only show inside the logo's own outline, at the birdcage */
.thanks-fire {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask: url("assets/logo-navy.png") 0 0 / 100% 100% no-repeat;
  mask: url("assets/logo-navy.png") 0 0 / 100% 100% no-repeat;
}
/* The cage's light pulses like a slow breath, glow and halo together */
.fire-ember { animation: ember 1.8s ease-in-out infinite alternate; transform-origin: 446px 150px; }
.fire-sail { animation: sail 3.4s ease-in-out infinite alternate; transform-origin: 448px 192px; }
.fire-shapes { animation: flicker 1.9s ease-in-out infinite alternate; }
/* A soft light around the cage, outside the outline */
.thanks-halo {
  position: absolute;
  left: 55.2%;
  top: 36.3%;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 150, 60, .55), rgba(232, 80, 40, .22) 45%, transparent 70%);
  filter: blur(4px);
  transform: translate(-50%, -50%);
  animation: halo 1.8s ease-in-out infinite alternate;
}
@keyframes ember { from { opacity: .7; transform: scale(.9); filter: brightness(.9); } to { opacity: 1; transform: scale(1.06); filter: brightness(1.25); } }
@keyframes sail { from { transform: rotate(-4deg); } to { transform: rotate(3deg); } }
@keyframes flicker { from { opacity: .8; } to { opacity: 1; } }
@keyframes halo { from { opacity: .25; transform: translate(-50%, -50%) scale(.75); } to { opacity: 1; transform: translate(-50%, -50%) scale(1.25); } }

@media (max-width: 900px) {
  .contact-row { grid-template-columns: 1fr; }
  .contact-sub, .project, .contact-foot { grid-column: 1; grid-row: auto; }
  /* Stacked, the place and time go to the end of the section */
  .contact-foot { order: 1; }
  .contact-title.weighted { position: static; }
}
@media (max-width: 560px) {
  .thanks-body { padding: 48px 24px 32px; }
  .thanks-body p { font-size: 17px; }
  .fields { grid-template-columns: 1fr; }
  .segments { flex-direction: column; }
  .seg + .seg { border-left: 0; border-top: 1.5px solid rgba(16, 40, 76, .28); }
}

@media (prefers-reduced-motion: reduce) {
  .field label, .currency-bg { transition: none; }
  .thanks[open], .fire-ember, .fire-sail, .fire-shapes, .thanks-halo { animation: none; }
}
