/* ═══════════════════════════════════════════════════════════════
   SEO Scala · Kontakt / Offerte (Studio) — loaded after site.css on /kontakt/ only
   The form is the page: large calm pills on ink, lime only for focus,
   marks and the send pill. Danger (coral) only for invalid fields.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Hero: one monumental line, a ruled row that draws in ─── */
/* cqi = the hero's real content box, so the line fills ~98% with or without classic scrollbars */
.kt-hero{container-type:inline-size;padding-bottom:clamp(44px,5.4vw,96px)}
.kt-h{margin-top:0;font-size:clamp(56px,12.6vw,264px);font-size:clamp(56px,13.6cqi,264px)}
.kt-row{position:relative;align-items:start;border-top:0}
.kt-row::before{content:"";position:absolute;left:0;right:0;top:0;height:1px;background:var(--ink-line);transform-origin:0 50%}
.motion .kt-row::before{transition:transform 1.5s var(--ease-io) .3s}
.motion:not(.is-in) .kt-row::before{transform:scaleX(0)}
.kt-row .lead{grid-column:6 / -1;max-width:42ch}

/* ─── Section: form right (cols 6–12), info left and sticky ─── */
.kt{padding:0 var(--gutter) clamp(96px,10vw,180px)}
.kt-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--gap);padding-top:clamp(22px,2.2vw,34px);border-top:1px solid var(--ink-line)}
.kt-form{grid-column:6 / -1;grid-row:1;min-width:0;container:kt-form / inline-size}
.kt-info{grid-column:1 / span 4;grid-row:1;align-self:start;min-width:0}

/* ─── Info column ─── */
.kt-h2{margin-top:clamp(24px,2.4vw,38px);font-size:clamp(30px,2.75vw,50px);font-weight:560;line-height:1;letter-spacing:-.035em;text-wrap:balance}
.kt-list{margin-top:clamp(26px,2.6vw,42px);border-bottom:1px solid var(--ink-line)}
.kt-list li{display:flex;align-items:flex-start;gap:14px;padding:clamp(14px,1.15vw,18px) 0;border-top:1px solid var(--ink-line);font-size:clamp(17px,1.2vw,19px);font-weight:500;line-height:1.4;letter-spacing:-.005em}
.kt-list .chk{margin-top:.1em}
.kt-direct{display:flex;flex-direction:column;align-items:flex-start;gap:14px;margin-top:clamp(26px,2.6vw,42px);font-size:17px;line-height:1.35;color:var(--paper-dim)}

/* ─── Fields ─── */
.kt-form{--fh:clamp(58px,4.5vw,66px);--fx:clamp(20px,1.75vw,26px);--f-bg:var(--ink-2);--f-line:var(--ink-line-2);--f-ph:#908b81}
/* --f-ph: placeholder on --f-bg 5.3:1, clearly dimmer than typed text (--paper 15:1) */
.kt-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(22px,2.2vw,32px) var(--gap)}
.fld{display:flex;flex-direction:column;gap:10px;min-width:0}
.fld--full{grid-column:1 / -1}
.fld>label{align-self:flex-start;padding:0 var(--fx);font-size:17px;font-weight:540;line-height:1.35;color:var(--paper);cursor:pointer;transition:color .35s var(--ease)}
.req{color:var(--signal)}

.fld input,.fld select,.fld textarea{display:block;width:100%;min-width:0;height:var(--fh);margin:0;padding:0 var(--fx);border:1px solid var(--f-line);border-radius:999px;background:var(--f-bg);color:var(--paper);font:inherit;font-size:clamp(18px,1.32vw,20px);font-weight:440;line-height:1.3;letter-spacing:-.006em;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;transition:border-color .3s,box-shadow .3s,background-color .3s}
.fld input{text-overflow:ellipsis}
.fld textarea{height:auto;min-height:clamp(176px,15vw,232px);padding:calc(var(--fx) * .72) var(--fx);border-radius:clamp(22px,2vw,30px);line-height:1.5;resize:vertical;scrollbar-color:#4a4740 transparent}
@supports (field-sizing:content){.fld textarea{field-sizing:content;resize:none}}
.fld ::placeholder{color:var(--f-ph);opacity:1}

@media (hover:hover){
  .fld input:hover,.fld select:hover,.fld textarea:hover{border-color:var(--paper-dim)}
}
.fld input:focus,.fld select:focus,.fld textarea:focus{border-color:var(--signal);box-shadow:0 0 0 1px var(--signal)}
/* transparent outline stays visible in forced-colors mode, where box-shadow is dropped */
.fld input:focus-visible,.fld select:focus-visible,.fld textarea:focus-visible{outline:2px solid transparent;outline-offset:2px}
.fld:focus-within>label{color:var(--signal)}

/* Invalid only after the visitor has interacted (no red on arrival) */
.fld input:user-invalid,.fld textarea:user-invalid{border-color:var(--danger);box-shadow:0 0 0 1px var(--danger)}
.fld:has(:user-invalid)>label,.fld:has(:user-invalid) .req{color:var(--danger)}

/* Browser autofill: keep the ink field, never the UA's blue/yellow wash */
.fld input:-webkit-autofill{-webkit-text-fill-color:var(--paper);caret-color:var(--signal);-webkit-box-shadow:inset 0 0 0 100px var(--ink-3);box-shadow:inset 0 0 0 100px var(--ink-3);transition:background-color 100000s 0s,color 100000s 0s}
.fld input:-webkit-autofill:focus{-webkit-box-shadow:inset 0 0 0 100px var(--ink-3),0 0 0 1px var(--signal);box-shadow:inset 0 0 0 100px var(--ink-3),0 0 0 1px var(--signal);border-color:var(--signal)}

/* Select: a ghost pill with a round chevron, echoing .btn-ico */
.sel{position:relative}
.sel select{padding-right:calc(var(--fh) + 4px);text-overflow:ellipsis;cursor:pointer}
.sel select:has(option[value=""]:checked){color:var(--f-ph)}
.sel option,.sel optgroup{background:var(--ink-2);color:var(--paper)}
.sel-ico{--ico:calc(var(--fh) - 22px);position:absolute;top:50%;right:11px;display:grid;place-items:center;width:var(--ico);height:var(--ico);margin-top:calc(var(--ico) / -2);border-radius:50%;background:var(--ink-3);color:var(--paper);pointer-events:none;transition:background-color .4s var(--ease),color .4s var(--ease)}
.sel-ico svg{width:16px;height:16px}
@media (hover:hover){.sel:hover .sel-ico{background:var(--paper);color:var(--ink)}}
.sel:focus-within .sel-ico{background:var(--signal);color:var(--ink)}

/* ─── Send row: on the field grid. Turnstile under col 1, lime pill under col 2;
   pill label and note share the fields' text inset (--fx) ─── */
.kt-send{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:20px var(--gap);margin-top:clamp(32px,3.2vw,52px)}
/* the widget's inline margin is part of the fixed markup; the grid gap owns spacing here.
   line-height:0 removes the baseline gap under Cloudflare's inline iframe (65px, not 73px) */
.kt-send .cf-turnstile{grid-column:1;justify-self:start;width:300px;margin:0!important;line-height:0}
.kt-send .cf-turnstile:empty{min-height:65px;border-radius:8px;box-shadow:inset 0 0 0 1px var(--ink-line)}
/* Held send (main.js waits for the token): the check is the next step, so it gets the lime ring.
   An ink gap keeps the ring off Cloudflare's own border; with motion it pulses three times. */
.kt-send .cf-turnstile.is-needed{border-radius:6px;box-shadow:0 0 0 3px var(--ink),0 0 0 5px var(--signal)}
.motion .kt-send .cf-turnstile.is-needed{animation:kt-need 1.1s var(--ease) 3}
@keyframes kt-need{
  0%{box-shadow:0 0 0 3px var(--ink),0 0 0 5px var(--signal),0 0 0 5px rgba(200,241,53,.5)}
  100%{box-shadow:0 0 0 3px var(--ink),0 0 0 5px var(--signal),0 0 0 22px rgba(200,241,53,0)}
}
.kt-submit{--bh:clamp(64px,5vw,76px);--bi:calc(var(--bh) - 16px);grid-column:2;height:var(--bh);padding:0 8px 0 var(--fx);gap:18px;font-size:clamp(18px,1.45vw,22px)}
.kt-submit .btn-ico{width:var(--bi);height:var(--bi)}
/* arrow scales with the circle so the parked second arrow stays fully outside it */
.kt-submit .btn-ico svg{width:calc(var(--bi) * .42);height:calc(var(--bi) * .42)}
.kt-note{grid-column:2;padding-left:var(--fx);font-size:16px;line-height:1.5;color:var(--paper-dim);text-wrap:pretty}

@container kt-form (max-width:680px){
  .kt-send{grid-template-columns:minmax(0,1fr)}
  .kt-send .cf-turnstile,.kt-submit,.kt-note{grid-column:1}
}

/* The status toast only ever renders on this page (the Function redirects here). Size it to its
   content so its max-width governs; site.css's left:50% otherwise squeezes it to ~220px on phones. */
.toast{width:max-content}

/* ─── Responsive ─── */
@media (min-width:1200px) and (min-height:720px){
  .kt-info{position:sticky;top:calc(var(--nav-h) + 28px)}
}
@media (max-width:1199px){
  .kt-grid{display:block}
  .kt-info{margin-top:clamp(72px,10vw,112px);padding-top:clamp(22px,2.2vw,34px);border-top:1px solid var(--ink-line)}
  .kt-h2,.kt-list,.kt-direct{max-width:640px}
}
@media (max-width:900px){
}
@media (max-width:700px){
  .kt-h{font-size:19.6vw;font-size:clamp(44px,22.4cqi,132px);line-height:.92}
  .kt-fields{grid-template-columns:minmax(0,1fr)}
  .kt-form{--fh:58px;--fx:24px}
  .kt-submit{--bh:64px}
  .kt-list li{gap:12px}
}
/* site.css prints plain (black on white); keep the ink field fills from swallowing that text */
@media print{
  .fld input,.fld select,.fld textarea{background:#fff!important;border-color:#000!important;box-shadow:none!important}
  .sel-ico,.kt-send .cf-turnstile{display:none!important}
}
