/* ==========================================================================
   FAIQA RIAZ - CONTACT PAGE
   Builds on landing.css tokens, buttons, nav, notches and footer.
   A labelled brief form beside a sticky "direct line" panel; the form is
   swapped for a confirmation once the message is sent.
   ========================================================================== */

:root { --err: #FF8A65; }
:root[data-theme="light"] { --err: #B3261E; }

.ct { padding: 7.25rem 0 var(--section); }
.ct__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 23rem); gap: clamp(2rem, 6vw, 5.5rem); align-items: start; }
.ct__main { display: grid; gap: 1.1rem; justify-items: start; min-width: 0; }
.ct__title { font-size: clamp(2.4rem, 1rem + 3.6vw, 4rem); line-height: 1.03; letter-spacing: -.04em; max-width: 14ch; }

/* FORM ---------------------------------------------------------------------- */
.brief { width: 100%; margin-top: 1.5rem; display: grid; gap: 1.75rem; }
.field { display: grid; gap: .5rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label, .field legend { padding: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
.field legend { margin-bottom: .85rem; }
.field__opt { margin-left: .35rem; font-family: var(--font-body); font-weight: 500; font-size: .85rem; color: var(--muted); }
.field__help { font-size: .9rem; color: var(--muted); }
.field__err[hidden], .sent[hidden], .brief[hidden] { display: none; }
.field__err { display: flex; align-items: center; gap: .4rem; font-size: .92rem; font-weight: 600; color: var(--err); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem 1.25rem; }

.field input:not([type="radio"]), .field textarea {
  width: 100%; min-height: 52px; padding: .8rem 1rem; border: 1.5px solid var(--line-2); border-radius: 14px;
  background: var(--surface); color: var(--text); transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 9rem; line-height: 1.6; }
.field input::placeholder { color: var(--muted); }
.field input:hover, .field textarea:hover { border-color: var(--text-2); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--hl); box-shadow: 0 0 0 4px var(--accent-soft); }
.field [aria-invalid="true"] { border-color: var(--err); }

/* situation tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.tile {
  --nw: 30%; --nh: .4rem; --nd: .65rem;
  position: relative; display: flex; align-items: center; gap: .85rem; min-height: 64px; padding: .55rem 1rem .55rem .55rem;
  background: var(--surface); color: var(--text); font-family: var(--font-display); font-weight: 500; line-height: 1.3; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.tile input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.tile__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); color: var(--hl); font-size: 1.15rem; transition: background-color .25s, color .25s; }
.tile:hover { background: var(--surface-2); }
.tile.is-on { background: var(--accent); color: var(--on-accent); }
.tile.is-on .tile__icon { background: var(--on-accent); color: var(--accent); }
.tile.has-focus { outline: 2px solid var(--focus); outline-offset: -5px; }
.tile.is-on.has-focus { outline-color: var(--on-accent); }
.tile--wide { grid-column: 1 / -1; }
.field--sit.is-invalid .tile:not(.is-on) { box-shadow: inset 0 0 0 1.5px var(--err); }

.brief__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.brief__note { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; color: var(--muted); }
.brief__status:empty { display: none; }
.brief__status { padding: .85rem 1.1rem; border-radius: 12px; border: 1.5px solid var(--err); color: var(--err); font-weight: 600; }
.brief__status a { border-bottom: 1.5px solid currentColor; }

/* SENT ------------------------------------------------------------------------ */
.sent { --nw: 26%; --nh: .7rem; --nd: 1rem; width: 100%; margin-top: 1.5rem; display: grid; gap: 1rem; justify-items: start; padding: clamp(1.75rem, 4vw, 3rem); border-radius: 1.75rem; background: var(--ink); color: var(--ink-text); outline: none; }
.sent__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 1.6rem; }
.sent h2 { font-size: clamp(2rem, 1rem + 2.4vw, 3rem); }
.sent > p { color: var(--ink-muted); font-size: 1.0625rem; max-width: 46ch; }
.sent__next { counter-reset: step; display: grid; gap: .9rem; width: 100%; margin: .75rem 0 .5rem; padding-top: 1.25rem; border-top: 1px solid var(--ink-line); }
.sent__next li { counter-increment: step; display: grid; grid-template-columns: auto 1fr; column-gap: .9rem; align-items: baseline; }
.sent__next li::before { content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink-3); color: var(--accent); font: 700 .85rem/1 var(--font-display); align-self: start; }
.sent__next b { font-family: var(--font-display); font-weight: 600; }
.sent__next span { color: var(--ink-muted); }
.sent .link-arrow { color: var(--accent); }

/* DIRECT LINE ------------------------------------------------------------------ */
.line { --nw: 34%; --nh: .65rem; --nd: .95rem; position: sticky; top: 7rem; display: grid; gap: 1.4rem; padding: 1.75rem; border-radius: 1.75rem; background: var(--ink); color: var(--ink-text); }
.line__who { display: flex; align-items: center; gap: 1rem; }
.line__who img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: 50% 40%; border: 2px solid var(--accent); }
.line__who b { display: block; font-family: var(--font-display); font-size: 1.15rem; }
.line__who span { color: var(--ink-muted); font-size: .92rem; }
.line__reply { justify-self: start; display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-family: var(--font-display); font-weight: 600; font-size: .92rem; }
.line__ways li > a, .line__ways li > div { display: flex; align-items: center; gap: .9rem; padding-block: 1rem; border-top: 1px solid var(--ink-line); }
.line__ways i { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--ink-3); color: var(--accent); font-size: 1.2rem; transition: background-color .25s, color .25s; }
.line__ways span { display: grid; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.line__ways small { font-weight: 500; font-size: .8rem; color: var(--ink-muted); }
.line__ways a:hover span { color: var(--accent); }
.line__ways a:hover i { background: var(--accent); color: var(--on-accent); }
.line__time { font-style: normal; font-weight: 500; font-size: .88rem; color: var(--ink-muted); }
.line__price { display: flex; gap: .6rem; align-items: flex-start; padding-top: 1.1rem; border-top: 1px solid var(--ink-line); color: var(--ink-muted); font-size: .95rem; }
.line__price i { margin-top: .2rem; color: var(--accent); }

/* MOTION ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .ct__main > :not(.sent) { animation: rise .8s var(--ease) both; }
  .line { animation: rise 1s var(--ease) .12s both; }
  /* the confirmation arrives where the form was */
  .sent:not([hidden]) { animation: rise .6s var(--ease) both; }
}

/* RESPONSIVE --------------------------------------------------------------------- */
@media (max-width: 62rem) {
  .ct { padding-top: 6.5rem; }
  .ct__grid { grid-template-columns: 1fr; }
  .line { position: static; }
}
@media (max-width: 48rem) {
  .field-row { grid-template-columns: 1fr; }
  .brief__foot .btn { flex: 1 1 auto; }
}
@media (max-width: 26rem) {
  .tiles { grid-template-columns: 1fr; }
}
