/* Контакти: перший екран, бриф, годинник, способи зв'язку, кроки після заявки. */

/* ── Перший екран ── */
.ct-hero { position: relative; overflow: hidden; }
.grid-bg { position: absolute; inset: 0; background-image: linear-gradient(#1D1D18 1px, transparent 1px), linear-gradient(90deg, #1D1D18 1px, transparent 1px); background-size: 64px 64px; -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 15%, transparent 72%); mask-image: radial-gradient(ellipse at 70% 30%, #000 15%, transparent 72%); pointer-events: none; }
.ct-hero__in { position: relative; padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(40px, 5vw, 64px); }
.ct-title { font-size: clamp(40px, 9vw, 136px); margin-top: 28px; }
.ct-lead { font-size: clamp(17px, 1.5vw, 20px); max-width: 560px; margin-top: 28px; }
.word { display: inline-block; transition: transform .45s var(--ease), color .3s; }
.fine .word:hover { transform: translateY(-8px) rotate(-2deg); color: var(--accent); }

/* ── Сітка: бриф + бічна колонка ── */
.ct-main { padding-bottom: clamp(56px, 7vw, 96px); }
.ct-grid { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.form-card { flex: 1.6 1 560px; min-width: 0; border: 1px solid var(--line); border-radius: 32px; background: var(--card); padding: clamp(24px, 4vw, 48px); }
.side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* ── Бриф ── */
.brief__title { font-size: clamp(22px, 2.4vw, 26px); margin-bottom: 28px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field--msg { margin-top: 26px; }
.field label, .legend { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field__count { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.field__count.is-near { color: var(--accent); }
.field__count.is-full { color: var(--danger); }
.field input, .field textarea { width: 100%; min-height: 56px; padding: 0 18px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-family: inherit; font-size: 16px; transition: border-color .3s, box-shadow .3s; }
.field textarea { display: block; min-height: 150px; padding: 16px 18px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.field input::placeholder, .field textarea::placeholder { color: #6E6C63; }
.field .is-error { border-color: var(--danger); }
.field .is-error:focus { border-color: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 18%, transparent); }
.field__err { font-size: 13px; color: var(--danger); }
.field__err:empty { display: none; }

.pick { border: 0; padding: 0; margin: 26px 0 0; min-width: 0; }
.legend { padding: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.pill { position: relative; display: inline-flex; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background-color .3s, color .3s, border-color .3s, transform .3s var(--ease); }
.pill:hover span { border-color: var(--accent); color: var(--text); }
.pill input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--bg); transform: scale(1.04); }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

.brief__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 28px; }
.brief__note { font-size: 13px; max-width: 320px; }
.brief__status { margin-top: 16px; font-size: 14px; color: var(--text-2); }
.brief__status:empty { display: none; }

/* ── Після відправки: форма ховається, з'являється галочка ── */
.success { display: none; flex-direction: column; align-items: flex-start; gap: 20px; padding: 24px 0; }
.brief.is-sent { display: none; }
.brief.is-sent + .success { display: flex; }
.motion .brief.is-sent + .success { animation: ct-rise .7s var(--ease) both; }
.check { width: 88px; height: 88px; border-radius: 50%; background: var(--accent); color: var(--bg); display: grid; place-items: center; }
.motion .check { animation: ct-pop .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.motion .check path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: ct-draw .5s ease .4s forwards; }
.success__title { font-size: clamp(24px, 3vw, 32px); }
.success__title:focus { outline: none; }
.success__text { max-width: 460px; }

/* ── Годинник ── */
.clock { padding: 28px; border-radius: 24px; background: var(--accent); color: var(--bg); }
.clock__label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.clock-time { display: block; margin-top: 10px; font-family: var(--font-display); font-weight: 800; font-size: clamp(44px, 5vw, 56px); letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.colon { animation: ct-blink 1s steps(1) infinite; }
.clock__status { font-weight: 700; margin-top: 12px; }

/* ── Способи зв'язку ── */
.methods { display: flex; flex-direction: column; gap: 16px; }
.card { position: relative; display: flex; align-items: center; border-radius: 24px; border: 1px solid var(--line); background: var(--card); transition: border-color .3s, transform .45s var(--ease); }
.card:hover, .card:focus-within { border-color: var(--accent); }
.fine .card:hover { transform: translateX(6px); }
.card__link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; padding: 22px; border-radius: 24px; color: var(--text); }
.card__link:hover { color: var(--text); }
.card-ico { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: #1E1E19; color: var(--accent); }
.card__body { min-width: 0; }
.card__label { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.card__val { display: block; font-weight: 700; overflow-wrap: anywhere; }
.copy-btn { flex: none; width: 44px; height: 44px; margin-right: 16px; border-radius: 50%; border: 1px solid var(--line-3); background: transparent; color: var(--text-2); display: grid; place-items: center; cursor: pointer; padding: 0; transition: border-color .3s, color .3s, background-color .3s; }
.copy-btn:hover, .copy-btn.is-done { border-color: var(--accent); color: var(--accent); }
.copy-tip { position: absolute; right: 16px; top: -12px; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--bg); font-size: 11px; pointer-events: none; }
.copy-tip:empty { display: none; }

/* ── Що буде далі ── */
.ct-next { padding-bottom: clamp(72px, 10vw, 140px); }
.ct-next__title { margin: 0 0 28px; font-weight: 400; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.step { padding: 28px; border-radius: 24px; border: 1px solid var(--line); }
.step-n { font-family: var(--font-mono); color: var(--accent); font-size: 14px; }
.step__title { font-size: 20px; margin-top: 14px; }
.step__text { margin-top: 10px; font-size: 15px; }

@keyframes ct-rise { from { opacity: 0; transform: translateY(44px); } to { opacity: 1; transform: none; } }
@keyframes ct-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes ct-draw { to { stroke-dashoffset: 0; } }
@keyframes ct-blink { 50% { opacity: .2; } }

@media (max-width: 720px) {
    .form-card { border-radius: 24px; }
    .ct-grid { gap: 20px; }
    .brief__foot .btn { width: 100%; }
    .pill span { padding: 0 14px; }
    .clock, .step { padding: 22px; }
    .card__link { padding: 16px; gap: 12px; }
    .copy-btn { margin-right: 12px; }
}
