/* kontaktai page styles. Prefix: kt-
   One landscape photograph across the whole screen; in the middle of it a light panel with the form.
   The panel is the one light surface of the site, so it has its own few colours. */
:root {
  --kt-paper: oklch(96.5% 0.006 230 / 0.9);
  --kt-well: oklch(89.5% 0.012 215);
  --kt-well-2: oklch(86% 0.016 215);
  --kt-text: oklch(24% 0.012 245);
  --kt-soft: oklch(42% 0.014 240);
  --kt-btn: oklch(44% 0.04 212);
  --kt-btn-2: oklch(36% 0.04 212);
  --kt-err: oklch(46% 0.16 27);
}

.kt { position: relative; isolation: isolate; overflow: clip; display: grid; place-items: center; margin-top: calc(-1 * var(--top-h)); min-height: 100svh;
  padding: calc(var(--top-h) + clamp(1rem, 4svh, 3rem)) var(--gut) clamp(2rem, 8svh, 5rem); }
/* the same block as the last section of the home page: not under the header, and no taller than it needs */
.kt--in { margin-top: 0; min-height: 0; padding-block: clamp(4rem, 11vw, 9rem); }
.kt--in .kt-bg::after { display: none; }
.kt-bg { position: absolute; inset: 0; z-index: -1; background: var(--ink); }
.kt-bg .ph { position: absolute; inset: 0; }
.kt-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in oklab, var(--ink) 55%, transparent) 0%, transparent 26%); }

.kt-panel { width: min(100%, 62.5rem); padding: clamp(2rem, 6.5svh, 4.5rem) clamp(1.25rem, 6.2vw, 6.25rem) clamp(1.75rem, 5svh, 3.5rem); background: var(--kt-paper); color: var(--kt-text);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.kt-title { margin-bottom: clamp(1.5rem, 4.5svh, 3rem); text-align: center; font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 460; line-height: 1.1; letter-spacing: -0.02em; overflow-wrap: break-word; min-width: 0; }

.kt-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1.5rem; }
.kt-f { min-width: 0; }
.kt-f--full { grid-column: 1 / -1; }
.kt-l { display: block; margin-bottom: 0.5rem; font-size: var(--t-sm); font-weight: 500; line-height: 1.3; color: var(--kt-text); }

.kt-in { display: block; width: 100%; min-height: 3.25rem; padding: 0 0.875rem; border: 1px solid transparent; border-radius: 0; background: var(--kt-well); color: var(--kt-text); font: inherit; font-size: 1.0625rem; color-scheme: light;
  -webkit-appearance: none; appearance: none; transition: background-color var(--d-fast) var(--out), border-color var(--d-fast) var(--out); }
.kt-in::placeholder { color: var(--kt-soft); opacity: 0.8; }
.kt-in:hover { background: var(--kt-well-2); }
.kt-in:focus-visible { outline: 2px solid var(--kt-text); outline-offset: 2px; }
.kt-in--area { min-height: 9.5rem; padding-block: 0.875rem; line-height: 1.5; resize: vertical; }
.kt-in[type="date"] { -webkit-appearance: auto; appearance: auto; }
.kt-f.is-bad .kt-in { border-color: var(--kt-err); }
/* the select keeps its own arrow: two short strokes drawn at the right edge */
.kt-sel { position: relative; display: block; }
.kt-sel select { padding-right: 2.75rem; cursor: pointer; }
.kt-sel::after { content: ""; position: absolute; right: 1.125rem; top: 50%; width: 0.5rem; height: 0.5rem; margin-top: -0.4rem; border-right: 1.5px solid var(--kt-text); border-bottom: 1.5px solid var(--kt-text); transform: rotate(45deg); pointer-events: none; }

.kt-msg { margin-top: 0.4rem; font-size: var(--t-xs); line-height: 1.35; color: var(--kt-soft); }
.kt-msg:empty { display: none; }
.kt-msg.is-err { color: var(--kt-err); font-weight: 600; }

.kt-act { display: grid; justify-items: center; gap: 0.75rem; text-align: center; margin-top: 0.25rem; }
.kt-send, .kt-copy { display: inline-flex; align-items: center; justify-content: center; min-height: 3.375rem; min-width: 11.75rem; padding: 0 2rem; border: 1px solid var(--kt-btn); border-radius: 0; background: var(--kt-btn); color: var(--fog); font: inherit; font-weight: 620; font-size: 1rem; cursor: pointer;
  transition: background-color var(--d-fast) var(--out), border-color var(--d-fast) var(--out), color var(--d-fast) var(--out), transform 0.15s var(--out); }
.kt-send:hover { background: var(--kt-btn-2); border-color: var(--kt-btn-2); }
.kt-copy { background: transparent; color: var(--kt-btn-2); }
.kt-copy:hover { background: var(--kt-btn); color: var(--fog); }
.kt-send:active, .kt-copy:active { transform: scale(0.97); }
.kt-send:focus-visible, .kt-copy:focus-visible { outline: 2px solid var(--kt-text); outline-offset: 3px; }
.kt-note { max-width: 46ch; font-size: var(--t-xs); line-height: 1.5; color: var(--kt-soft); }
.kt-note a { color: var(--kt-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.kt-note a:focus-visible { outline: 2px solid var(--kt-text); outline-offset: 2px; }
.kt-done { font-weight: 620; color: var(--kt-text); }
.kt-raw { justify-self: stretch; text-align: left; }
.kt-raw[hidden], .kt-copy[hidden], .kt-note[hidden], .kt-done[hidden] { display: none; }

@media (max-width: 40rem) {
  .kt { padding-inline: 0.75rem; padding-bottom: 1.5rem; }
  .kt-form { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .kt-send { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .kt-in, .kt-send, .kt-copy { transition: none; }
}
