/* COCONYTE – the contact form in the start page footer (#kontakt, assets/contact.js). On top of
   footer.css: the night half of the hero, underline fields, numbered labels like the legal pages'
   contents, the coconut sum, and the verification badge – a drop fills a can while the browser
   works, the can becomes a check mark once the sum is answered too. */

.footer--contact {
  --cf-ink: #f4f5f6; --cf-soft: #b4bac3; --cf-line: #6b7079; --cf-error: #f39a8c; --ease: cubic-bezier(.2, .7, .2, 1);
  background: radial-gradient(60% 48% at 82% 22%, rgba(91, 142, 230, .13), transparent 72%), var(--dark);
}

/* ---------- layout: intro + mail card left, the form right; one column on phones ---------- */
.foot--contact { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "intro form" "direct form"; column-gap: clamp(40px, 7vw, 120px); row-gap: 40px; align-items: start; scroll-margin-top: 96px; } /* clear of the fixed nav */
.foot__intro { grid-area: intro; }
.cf-stage { grid-area: form; min-width: 0; }
.foot__direct { grid-area: direct; align-self: end; }
.foot__direct .reach { margin-top: 12px; }
@media (max-width: 899px) {
  .foot--contact { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "form" "direct"; row-gap: 48px; }
}

.foot__title { margin: clamp(44px, 6vw, 80px) 0 18px; font-size: clamp(38px, 4.8vw, 62px); font-weight: 300; line-height: 1.02; letter-spacing: -.01em; color: var(--cf-ink); }
.foot__dot { color: var(--blue); }
.foot__lede { max-width: 34ch; font-size: 17px; line-height: 1.65; color: var(--cf-soft); }

/* ---------- fields ---------- */
.cf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(20px, 3vw, 36px); row-gap: 4px; }
.cf-field--wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .cf-grid { grid-template-columns: minmax(0, 1fr); } }

.cf-labelrow { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
/* --cf-soft: the quiet text of the form (labels, hints, the note): 9.9:1 on the night ground */
.cf-label { display: flex; align-items: baseline; gap: 10px; font-size: 13px; font-weight: 500; letter-spacing: .12em; line-height: 1.5; text-transform: uppercase; color: var(--cf-soft); transition: color .3s; cursor: pointer; }
.cf-num { font-size: 13px; font-weight: 400; letter-spacing: .04em; color: var(--blue); font-variant-numeric: tabular-nums; }
.cf-opt { font-size: 14px; font-weight: 300; letter-spacing: .01em; text-transform: none; }
.cf-field:focus-within .cf-label { color: var(--cf-ink); }

.cf-control { position: relative; display: block; margin-top: 2px; }
.cf-control::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--blue); transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s var(--ease), background-color .3s; pointer-events: none; }
.cf-control:focus-within::after { transform: scaleX(1); }
.cf-input { display: block; width: 100%; margin: 0; padding: 10px 0 12px; border: 0; border-bottom: 1px solid var(--cf-line); border-radius: 0; background: transparent; color: var(--cf-ink); font: inherit; font-size: 18px; font-weight: 300; line-height: 1.4; caret-color: var(--blue); outline: none; -webkit-appearance: none; appearance: none; transition: border-color .3s; }
.cf-input:hover { border-bottom-color: #8b9099; }
textarea.cf-input { min-height: 132px; max-height: 440px; resize: vertical; field-sizing: content; line-height: 1.55; }
/* autofill keeps the night look */
.cf-input:-webkit-autofill, .cf-input:-webkit-autofill:hover, .cf-input:-webkit-autofill:focus { -webkit-text-fill-color: var(--cf-ink); -webkit-box-shadow: 0 0 0 1000px var(--dark) inset; caret-color: var(--blue); transition: background-color 600000s 0s; }

.cf-field[data-invalid] .cf-input { border-bottom-color: var(--cf-error); }
.cf-field[data-invalid] .cf-control::after { background: var(--cf-error); }
/* one line is always reserved, so a message never pushes the form around */
.cf-error { min-height: 1.45em; margin: 7px 0 12px; font-size: 14px; line-height: 1.45; color: var(--cf-error); }

.cf-count { font-size: 13px; font-weight: 400; letter-spacing: .04em; color: var(--cf-soft); font-variant-numeric: tabular-nums; white-space: nowrap; transition: color .3s; }
.cf-count[data-band="1"], .cf-count[data-band="2"] { color: var(--blue); }
.cf-count[data-band="3"] { color: var(--cf-error); }

/* the coconut sum: five slots a side, the coconuts pop in when the shop sends the sum */
.cf-coco__q { margin-top: 8px; font-size: 16px; line-height: 1.5; color: var(--cf-soft); }
.cf-coco__sum { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 12px; }
/* five slots a side in the markup; the row keeps its height whatever the sum (three ghosts a side
   before the shop sends it) */
.cf-coco__set { display: inline-flex; gap: 4px; min-height: 24px; }
.cf-nut { display: none; flex: none; width: 24px; height: 24px; color: #e9ebee; fill: var(--blue); }
.cf-coco[data-state="pending"] .cf-nut:nth-child(-n+3) { display: block; opacity: .26; }
.cf-nut.is-on { display: block; animation: cf-pop .55s var(--ease) both; }
.cf-nut.is-on:nth-child(2) { animation-delay: .05s; } .cf-nut.is-on:nth-child(3) { animation-delay: .1s; }
.cf-nut.is-on:nth-child(4) { animation-delay: .15s; } .cf-nut.is-on:nth-child(5) { animation-delay: .2s; }
@keyframes cf-pop { from { opacity: 0; transform: scale(.55); } }
.cf-coco__op { min-width: 1ch; font-size: 24px; font-weight: 300; line-height: 1; text-align: center; color: var(--cf-ink); }
.cf-coco__answer { margin-top: 0; }
.cf-coco__answer .cf-input { width: 2.6em; min-height: 44px; padding: 2px 0 6px; font-size: 24px; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .cf-coco__sum { gap: 8px 10px; }
  .cf-coco__set { gap: 3px; min-height: 17px; }
  .cf-nut { width: 17px; height: 17px; }
}

/* honeypot: off-screen for people, present for naive bots */
.cf-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.cf-privacy { max-width: 62ch; margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--cf-soft); }
.cf a { color: #dfe3ea; text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: rgba(91, 142, 230, .75); text-underline-offset: 3px; transition: color .2s; }
.cf a:hover { color: #fff; }

/* form-wide messages (role="alert"); empty it takes no room */
.cf-note { margin-top: 18px; padding: 14px 16px; border-left: 2px solid var(--cf-error); background: rgba(243, 154, 140, .07); font-size: 16px; line-height: 1.55; color: #f1e6e3; }
.cf-note[data-tone="hint"] { border-left-color: var(--blue); background: rgba(91, 142, 230, .08); color: var(--cf-ink); }
.cf-note:empty { margin: 0; padding: 0; border: 0; }
.cf-nojs { padding: 18px 20px; border-left: 2px solid var(--blue); background: rgba(91, 142, 230, .08); font-size: 16px; line-height: 1.6; color: var(--cf-ink); }

/* ---------- badge + send ---------- */
.cf-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-d); }
.cf-send { margin-left: auto; min-width: 15.5em; }
.cf-send .ico { transition: transform .35s var(--ease); }
.cf-send:hover .ico { transform: translateX(4px); }
.cf-send[aria-disabled="true"] { cursor: progress; }
.cf-send[aria-disabled="true"] .ico { animation: cf-nudge 1s var(--ease) infinite; }
@keyframes cf-nudge { 50% { transform: translateX(5px); } }
.cf-send:focus-visible, .verify__retry:focus-visible, .cf a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (max-width: 560px) { .cf-send { width: 100%; margin-left: 0; } }

.verify { --fill: .06; display: inline-flex; align-items: center; gap: 14px; min-height: 48px; }
.verify__can { flex: none; width: 27px; height: 37px; overflow: visible; }
.verify__line { fill: none; stroke: rgba(240, 241, 243, .5); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; transition: stroke .5s; }
.verify__level { transform: translateY(calc(40.5px - var(--fill) * 35px)); transition: transform .9s var(--ease); }
.verify__liquid { fill: var(--blue); }
.verify__drop { fill: var(--blue); opacity: 0; }
.verify__check { fill: none; stroke: #fff; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.verify__bang { fill: none; stroke: var(--cf-error); stroke-width: 2; stroke-linecap: round; opacity: 0; transition: opacity .3s; }
.verify__text { display: grid; justify-items: start; gap: 3px; }
.verify__status { display: grid; gap: 3px; }
.verify__label { font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: #dfe3ea; white-space: nowrap; transition: color .4s; }
.verify__sub { font-size: 14px; line-height: 1.35; color: var(--cf-soft); }
.verify__sub:empty { display: none; }
.verify__retry { min-height: 44px; margin: -8px 0; padding: 0; border: 0; background: none; font-size: 15px; line-height: 1.3; color: var(--cf-ink); text-decoration: underline; text-decoration-color: var(--cf-error); text-underline-offset: 3px; cursor: pointer; }
.verify__retry[hidden] { display: none; }

.verify[data-state="working"] .verify__liquid { animation: verify-wave 1.6s linear infinite; }
.verify[data-state="working"] .verify__drop { animation: verify-drop 1.15s cubic-bezier(.55, 0, .8, .35) infinite; }
.verify[data-state="ready"] .verify__line, .verify[data-state="verified"] .verify__line { stroke: var(--blue); }
.verify[data-state="verified"] .verify__label { color: var(--blue); }
.verify[data-state="verified"] .verify__check { stroke-dashoffset: 0; transition: stroke-dashoffset .55s var(--ease) .55s; }
.verify[data-state="verified"] .verify__can { animation: verify-pop .8s var(--ease) .45s both; }
.verify[data-state="error"] .verify__line { stroke: var(--cf-error); }
.verify[data-state="error"] .verify__label { color: var(--cf-error); }
.verify[data-state="error"] .verify__bang { opacity: 1; }
@keyframes verify-wave { to { transform: translateX(8px); } }
@keyframes verify-drop {
  0% { transform: translateY(-3px) scale(.5); opacity: 0; }
  22% { transform: translateY(1px) scale(1); opacity: 1; }
  78% { opacity: 1; }
  100% { transform: translateY(21px) scale(.85, 1.15); opacity: 0; }
}
@keyframes verify-pop { 45% { transform: scale(1.1); } 100% { transform: none; } }

/* ---------- the thank-you that takes the form's place ---------- */
.cf { transition: opacity .38s ease, transform .5s var(--ease); }
.cf.is-leaving { opacity: 0; transform: translateY(-12px); }
.cf-done { display: grid; align-content: center; justify-items: start; padding: 8px 0 24px; outline: none; }
.cf-done[hidden] { display: none; }
.cf-done__mark { width: 58px; height: 80px; margin-bottom: 30px; overflow: visible; }
.cf-done__mark .verify__line { stroke: var(--blue); stroke-width: 1.2; }
.cf-done__mark .verify__check { stroke-width: 2; }
.cf-done__eyebrow { color: var(--blue); }
.cf-done__title { max-width: 19ch; margin-top: 14px; font-size: clamp(28px, 3.2vw, 42px); font-weight: 300; line-height: 1.12; color: var(--cf-ink); }
.cf-done__text { max-width: 42ch; margin-top: 18px; font-size: 17px; color: var(--cf-soft); }
.cf-done__level { transform: translateY(40.5px); }
.cf-done.is-in .cf-done__level { animation: done-fill 1.3s var(--ease) .15s forwards; }
.cf-done.is-in .verify__liquid { animation: verify-wave 1.6s linear 3 both; }
.cf-done.is-in .verify__check { stroke-dashoffset: 0; transition: stroke-dashoffset .7s var(--ease) 1.25s; }
.cf-done.is-in > * { animation: cf-rise .9s var(--ease) both; }
.cf-done.is-in > :nth-child(2) { animation-delay: .35s; }
.cf-done.is-in > :nth-child(3) { animation-delay: .45s; }
.cf-done.is-in > :nth-child(4) { animation-delay: .55s; }
@keyframes done-fill { to { transform: translateY(5.5px); } }
@keyframes cf-rise { from { opacity: 0; transform: translateY(16px); } }

/* phones and other touch screens: labels and hints at 14px and up; every text field is 16px or
   more at any size (no zoom on focus) */
@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .cf-label, .verify__label { font-size: 14px; letter-spacing: .1em; }
  .cf-num, .cf-count { font-size: 14px; }
  .cf-privacy { font-size: 15px; }
  .verify__sub { font-size: 15px; }
  .cf-error { font-size: 15px; }
}

/* ---------- no script: the form needs one, so it steps aside ---------- */
@media (scripting: none) { .cf > :not(noscript) { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .cf, .cf-control::after, .verify__level, .verify__line, .verify__label { transition: none; }
  .verify *, .verify__can, .cf-done *, .cf-done.is-in > *, .cf-send .ico, .cf-nut { animation: none !important; }
  .verify[data-state="verified"] .verify__check, .cf-done.is-in .verify__check { transition: none; }
  .cf-done.is-in .cf-done__level { transform: translateY(5.5px); }
}
