/* ==========================================================================
   Contact — the beginning of a project
   hero · brief (underlined fields, typographic service picker) · network
   visual and contact details · what happens next
   ========================================================================== */
:root { --warn: #d64550; }

/* ==========================================================================
   Hero
   ========================================================================== */
.ct-hero { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 100svh; overflow: hidden; padding: calc(var(--header-h) + clamp(2rem, 7vh, 5rem)) 0 clamp(1.75rem, 4vh, 3rem); background: var(--black); color: var(--white); }
.ct-hero__glow { position: absolute; left: 22%; right: -12%; bottom: -34%; z-index: -1; height: 88%; background: radial-gradient(34% 44% at 40% 50%, rgb(107 63 212 / 0.4), transparent 70%), radial-gradient(30% 42% at 76% 44%, rgb(58 126 246 / 0.32), transparent 70%); pointer-events: none; }
.ct-hero__inner { display: flex; flex: 1; flex-direction: column; }
.ct-hero__label { display: flex; align-items: center; gap: 1.25rem; font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgb(255 255 255 / 0.5); }
.ct-hero__label span:first-child { color: var(--white); }
.ct-hero__label span + span::before { content: ""; display: inline-block; width: 2rem; height: 1px; margin-right: 1.25rem; background: currentColor; vertical-align: middle; }
.ct-hero__title { margin-block: auto; padding-block: clamp(2rem, 6vh, 4rem); font-size: clamp(3.2rem, 0.6rem + 10vw, 13rem); font-weight: 700; line-height: 0.9; letter-spacing: -0.06em; }
.ct-hero__title .mask { display: block; width: fit-content; padding-bottom: 0.18em; margin-bottom: -0.18em; }
.ct-hero__sub { font-size: 0.42em; font-weight: 600; letter-spacing: -0.04em; color: rgb(255 255 255 / 0.9); }
.ct-hero__title .mask:last-child { margin-top: clamp(0.75rem, 2vh, 1.75rem); }
.ct-hero__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem 3rem; }
.ct-hero__lead { max-width: 30em; font-size: clamp(1.05rem, 0.9rem + 0.5vw, 1.45rem); line-height: 1.4; letter-spacing: -0.02em; color: rgb(255 255 255 / 0.7); }
.ct-hero__next { display: inline-flex; align-items: center; gap: 0.9rem; padding-bottom: 0.35rem; border-bottom: 1px solid rgb(255 255 255 / 0.3); font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; transition: border-color 0.35s; }
.ct-hero__next svg { width: 1.3rem; height: 0.65rem; rotate: 90deg; transition: translate 0.5s var(--ease-out); }
.ct-hero__next:is(:hover, :focus-visible) { border-color: var(--white); }
.ct-hero__next:is(:hover, :focus-visible) svg { translate: 0 0.25rem; }

@media (prefers-reduced-motion: no-preference) {
  .js .ct-hero__title .mask > span { transform: translate3d(0, 110%, 0); }
  .is-loaded .ct-hero__title .mask > span { transform: none; transition: transform 1.3s var(--ease-out) calc(var(--d) * 140ms + 150ms); }
}

/* ==========================================================================
   Brief
   ========================================================================== */
.ct { background: var(--off-white); color: var(--black); padding-block: clamp(4.5rem, 9vw, 10rem); }
.ct__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); align-items: start; gap: clamp(2.5rem, 6vw, 7rem); }
.ct__title { margin-top: 1rem; font-size: clamp(2rem, 1rem + 2.8vw, 4rem); font-weight: 700; line-height: 0.98; letter-spacing: -0.05em; }
.ct__title .mask { display: block; width: fit-content; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.ct__side { position: sticky; top: calc(var(--header-h) + 1.5rem); }

.f__stage { position: relative; display: grid; margin-top: clamp(2.5rem, 5vw, 4rem); }
.f { grid-area: 1 / 1; display: grid; gap: clamp(1.75rem, 3.4vw, 3rem); transition: opacity 0.5s var(--ease-soft), filter 0.5s; }
.f__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.75rem, 3.4vw, 3rem); }
.f__pair--sets { gap: clamp(1.75rem, 3.4vw, 3rem) clamp(2rem, 4vw, 4rem); }

/* ---- underlined fields ---- */
.f-field { display: grid; gap: 0.55rem; }
.f-field label { font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #8a8a8a; transition: color 0.3s; }
.f-field label em { font-style: normal; letter-spacing: 0.04em; text-transform: none; color: #b4b4b4; }
.f-field :is(input, textarea) {
  width: 100%; padding: 0.4rem 0 0.7rem;
  border: 0; border-bottom: 1px solid rgb(0 0 0 / 0.25); border-radius: 0;
  background-color: transparent;
  background-image: linear-gradient(90deg, var(--purple), var(--blue));
  background-size: 0% 2px; background-position: 0 100%; background-repeat: no-repeat;
  color: var(--black);
  font: 500 clamp(1.05rem, 0.9rem + 0.65vw, 1.55rem)/1.35 var(--font-body);
  letter-spacing: -0.02em;
  transition: background-size 0.6s var(--ease-out), border-color 0.4s;
}
.f-field textarea { min-height: 4.6em; resize: vertical; }
.f-field :is(input, textarea):focus { outline: none; border-color: rgb(0 0 0 / 0.5); background-size: 100% 2px; }
.f-field:focus-within label { color: var(--black); }
.f-field.is-invalid :is(input, textarea) { border-color: var(--warn); }
.f-field.is-invalid label { color: var(--warn); }
.f-error { font-size: 0.85rem; color: var(--warn); }

/* ---- service picker: typography, not checkboxes ---- */
.f-set { display: grid; gap: 1.1rem; margin: 0; padding: 0; border: 0; }
.f-set legend { padding: 0; font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #8a8a8a; }
.picks, .chips { display: flex; flex-wrap: wrap; }
.picks input, .chips input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.picks { gap: 0.3rem 1.5rem; }
.picks label { display: inline-flex; align-items: center; gap: 0.55rem; padding-block: 0.2rem; font-size: clamp(1.05rem, 0.85rem + 0.8vw, 1.7rem); font-weight: 600; line-height: 1.15; letter-spacing: -0.035em; color: #a4a4a4; cursor: pointer; transition: color 0.35s; }
.picks label::before { content: ""; width: 0.4em; height: 0.4em; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; transition: background-color 0.35s, box-shadow 0.35s, scale 0.45s var(--ease-out); }
.picks label:hover { color: var(--black); }
.picks input:checked + label { color: var(--black); }
.picks input:checked + label::before { background: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); scale: 1.1; }
.picks input:focus-visible + label, .chips input:focus-visible + label { outline: 2px solid var(--blue-bright); outline-offset: 4px; }

.chips { gap: 0.5rem; }
.chips label { display: inline-flex; padding: 0.55rem 1rem; border: 1px solid rgb(0 0 0 / 0.16); border-radius: 999px; font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; color: #5e5e5e; cursor: pointer; transition: border-color 0.35s, color 0.35s, background-color 0.35s; }
.chips label:hover { border-color: var(--black); color: var(--black); }
.chips input:checked + label { background: var(--black); border-color: var(--black); color: var(--white); }

/* ---- send ---- */
.f__send { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; padding-top: clamp(1.25rem, 2.5vw, 2rem); border-top: 1px solid var(--black); }
.f-send { display: inline-flex; align-items: center; gap: clamp(1rem, 2vw, 1.75rem); font-size: clamp(1.15rem, 0.9rem + 0.8vw, 1.9rem); font-weight: 600; letter-spacing: -0.03em; }
.f-send__label { position: relative; padding-bottom: 0.2rem; }
.f-send__label::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0.25); transform-origin: 0 50%; transition: transform 0.7s var(--ease-out); }
.f-send__circle { display: grid; place-items: center; width: clamp(3.5rem, 2.4rem + 3vw, 5.5rem); aspect-ratio: 1; border-radius: 50%; background: var(--grad-accent); color: var(--white); transition: scale 0.6s var(--ease-out); }
.f-send__circle svg { width: 36%; height: 18%; rotate: -45deg; transition: rotate 0.6s var(--ease-out); }
.f-send:is(:hover, :focus-visible) .f-send__label::after { transform: none; }
.f-send:is(:hover, :focus-visible) .f-send__circle { scale: 1.08; }
.f-send:is(:hover, :focus-visible) .f-send__circle svg { rotate: 0deg; }
.f-send:focus-visible { outline-offset: 0.75rem; }
.f-note { max-width: 24em; font-size: 0.9rem; line-height: 1.45; color: #7a7a7a; }
.f-summary { font-size: 0.9rem; font-weight: 600; color: var(--warn); }

/* ---- submit states ---- */
.f-state { grid-area: 1 / 1; align-self: center; display: grid; justify-items: start; gap: 0.9rem; max-width: 26em; opacity: 0; visibility: hidden; transform: translate3d(0, 1rem, 0); transition: opacity 0.5s var(--ease-soft), transform 0.8s var(--ease-out), visibility 0s linear 0.8s; }
.f__stage[data-form-state] .f-state { opacity: 1; visibility: visible; transform: none; transition-delay: 0.15s, 0.15s, 0s; }
.f__stage[data-form-state] .f { opacity: 0.06; filter: blur(3px); }
.f-state__ring { width: clamp(3rem, 2.4rem + 1.6vw, 4.5rem); }
.f-state__ring svg { width: 100%; height: auto; fill: none; stroke-linecap: round; }
.f-state__track { stroke: rgb(0 0 0 / 0.12); stroke-width: 3; }
.f-state__arc { stroke: var(--blue); stroke-width: 3; stroke-dasharray: 0.22 0.78; transform-box: view-box; transform-origin: 50% 50%; transition: opacity 0.3s; }
.f-state__tick { stroke: var(--blue); stroke-width: 4; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.f-state__word { font-size: clamp(2rem, 1.2rem + 2.6vw, 4rem); font-weight: 700; line-height: 1; letter-spacing: -0.05em; }
.f-state__note { font-size: clamp(1rem, 0.9rem + 0.3vw, 1.2rem); line-height: 1.5; color: #5e5e5e; }
.f-state__again { margin-top: 0.5rem; padding-bottom: 0.25rem; border-bottom: 1px solid rgb(0 0 0 / 0.3); font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; transition: border-color 0.3s, color 0.3s; }
.f-state__again:is(:hover, :focus-visible) { color: var(--blue); border-color: var(--blue); }
[data-form-state="received"] .f-state__arc, [data-form-state="done"] .f-state__arc,
[data-form-state="mail"] .f-state__arc, [data-form-state="error"] .f-state__arc { opacity: 0; }
[data-form-state="received"] .f-state__tick, [data-form-state="done"] .f-state__tick { stroke-dashoffset: 0; transition: stroke-dashoffset 0.7s var(--ease-out) 0.1s; }
[data-form-state="error"] .f-state__track { stroke: color-mix(in srgb, var(--warn) 35%, transparent); }
[data-form-state="mail"] .f-state__track { stroke: rgb(0 0 0 / 0.2); }

@media (prefers-reduced-motion: no-preference) {
  [data-form-state="sending"] .f-state__arc { animation: ct-spin 1.1s linear infinite; }
  .f-state__word.is-in { animation: ct-word 0.7s var(--ease-out) both; }
  @keyframes ct-spin { to { rotate: 360deg; } }
  @keyframes ct-word { from { opacity: 0; transform: translate3d(0, 0.5em, 0); } }
}

/* ==========================================================================
   Side — network visual and details
   ========================================================================== */
.net { width: min(100%, 21rem); margin: 0 0 clamp(2rem, 4vw, 3rem); }
.net svg { width: 100%; height: auto; }
.net__links path { fill: none; stroke: rgb(0 0 0 / 0.14); stroke-width: 1; vector-effect: non-scaling-stroke; }
.net__pulse { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 0.12 0.88; stroke-dashoffset: 0.12; vector-effect: non-scaling-stroke; }
.net__nodes circle { fill: var(--off-white); stroke: rgb(0 0 0 / 0.45); stroke-width: 1.5; }
.net__core { fill: var(--purple); }
.net__halo { fill: none; stroke: var(--purple); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.net__orbit circle { fill: none; stroke: rgb(0 0 0 / 0.16); stroke-width: 1; stroke-dasharray: 0.004 0.02; transform-box: view-box; transform-origin: 50% 50%; }

@media (prefers-reduced-motion: no-preference) {
  .net__pulse { animation: net-travel 9s linear infinite; }
  .net__halo { animation: net-ping 4.5s var(--ease-out) infinite; }
  .net__orbit circle { animation: net-orbit 48s linear infinite; }
  @keyframes net-travel { to { stroke-dashoffset: -0.88; } }
  @keyframes net-ping { 0% { scale: 1; opacity: 0.5; } 70%, 100% { scale: 2.6; opacity: 0; } }
  @keyframes net-orbit { to { rotate: 360deg; } }
}

.info { display: grid; gap: clamp(1.25rem, 2.4vw, 1.9rem); padding-top: clamp(1.5rem, 3vw, 2rem); border-top: 1px solid var(--black); }
.info__row { display: grid; gap: 0.4rem; }
.info__k { font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #8a8a8a; }
.info__v { font-size: clamp(1rem, 0.9rem + 0.4vw, 1.25rem); font-weight: 600; letter-spacing: -0.02em; }
a.info__v { width: fit-content; padding-bottom: 0.15rem; border-bottom: 1px solid rgb(0 0 0 / 0.2); transition: color 0.3s, border-color 0.3s; }
a.info__v:is(:hover, :focus-visible) { color: var(--blue); border-color: var(--blue); }
.info__v--addr { display: grid; gap: 0.7rem; font-size: 0.95rem; font-weight: 500; line-height: 1.45; color: #5e5e5e; }
.info__social { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 0.15rem; }
.info__social a { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 600; color: #5e5e5e; transition: color 0.3s; }
.info__social svg { width: 1.05rem; height: 1.05rem; }
.info__social a:is(:hover, :focus-visible) { color: var(--blue); }

/* ==========================================================================
   What happens next
   ========================================================================== */
.nx { background: var(--black); color: var(--white); padding-block: clamp(4.5rem, 9vw, 10rem); }
.nx__title { margin-top: 1rem; font-size: clamp(2.3rem, 0.9rem + 4.4vw, 6.25rem); font-weight: 700; line-height: 0.94; letter-spacing: -0.055em; }
.nx__title .mask { display: block; width: fit-content; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.nx__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); margin-top: clamp(3rem, 6vw, 5.5rem); border-top: 1px solid rgb(255 255 255 / 0.5); }
.nx__list li { position: relative; padding-top: clamp(1.5rem, 2.5vw, 2.25rem); }
.nx__list li::before { content: ""; position: absolute; left: 0; top: -6px; width: 11px; height: 11px; border-radius: 50%; background: var(--black); border: 1.5px solid rgb(255 255 255 / 0.5); transition: background-color 0.5s, border-color 0.5s; transition-delay: calc(var(--i) * 140ms + 0.3s); }
.nx__list li.is-in::before { background: var(--blue); border-color: var(--blue); }
.nx__list b { font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.08em; color: var(--blue-bright); }
.nx__list h3 { margin-top: 0.5rem; font-size: clamp(1.3rem, 1rem + 1vw, 2rem); font-weight: 600; letter-spacing: -0.04em; }
.nx__list p { margin-top: 0.6rem; font-size: 0.98rem; line-height: 1.5; color: rgb(255 255 255 / 0.62); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 64em) {
  .ct__grid { grid-template-columns: 1fr; }
  .ct__side { position: static; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; gap: clamp(2rem, 5vw, 4rem); }
  .net { margin-bottom: 0; }
  .nx__list { grid-template-columns: 1fr; gap: 0; }
  .nx__list li { padding-block: clamp(1.5rem, 2.5vw, 2.25rem); border-bottom: 1px solid var(--border-dark); }
  .nx__list li::before { top: calc(-6px + 0px); }
  .nx__list li + li::before { top: -6px; }
}

@media (max-width: 48em) {
  .f__pair { grid-template-columns: 1fr; }
  .ct__side { grid-template-columns: 1fr; }
  .net { width: min(100%, 16rem); margin-bottom: 2rem; }
  .f__send { justify-content: flex-start; }
}
