/* ============================================================
   Kolibrio — CMS additions on top of the static template (style.css)
   Keep style.css identical to html/styles.css; put every CMS-specific
   rule here.
   ============================================================ */

/* ---------- nav ---------- */
.nav-links a.is-active:not(.btn) { opacity: 1; }

/* ---------- references: whole screenshot links to the live website ---------- */
.ref-shot-link { display: block; color: inherit; text-decoration: none; }
.ref-card:not(.ref-card-link) .ref-shot::before,
.ref-card:not(.ref-card-link) .ref-shot::after { display: none; }

/* ---------- subpage header ---------- */
.page-header {
  overflow: hidden;
  padding-top: calc(84px + clamp(3rem, 7vw, 6rem));
  padding-bottom: clamp(2rem, 4vw, 3rem);
  background:
    radial-gradient(1000px 520px at 85% 0%, rgba(3, 233, 248, .10), transparent 60%),
    radial-gradient(820px 480px at 70% 20%, rgba(23, 233, 180, .12), transparent 66%),
    linear-gradient(180deg, #f4f9fd 0%, var(--bg) 100%);
}
.page-header .container { position: relative; z-index: 2; }
.page-header .section-head { margin-bottom: 0; }
.page-header h1 { margin-top: 1rem; font-size: clamp(2.25rem, 4.6vw, 3.5rem); }
.page-header-lines { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.error-page { min-height: 70vh; display: flex; align-items: center; }
.error-actions { margin-top: 2.2rem; }

/* ---------- text block (WYSIWYG) ---------- */
.text-section { padding-top: clamp(2rem, 4vw, 3rem); }
.page-header + .text-section { padding-top: 0; }
.text-section:has(+ .text-section) { padding-bottom: 0; }
.prose { max-width: 48rem; color: var(--text-soft); }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { color: var(--text); margin-top: 2em; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.prose h3 { font-size: 1.3rem; }
.prose h4 { font-size: 1.1rem; }
.prose strong { color: var(--text); }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose img { border-radius: var(--radius); }
.prose .table-responsive { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { color: var(--text); }

/* ---------- contact form ---------- */
.form-errors {
  list-style: none;
  padding: .9rem 1.1rem;
  border-radius: 14px;
  background: #fff1f1;
  color: #b3261e;
  font-size: .95rem;
}
.form-field input:user-invalid,
.form-field textarea:user-invalid { border-color: #e5484d; }
.contact-form .btn[disabled] { opacity: .7; cursor: default; }

/* ---------- footer ---------- */
.footer-links { display: flex; gap: .4rem 1.4rem; flex-wrap: wrap; }
.footer-bottom a:not(.footer-link) { color: inherit; }

/* ---------- flash messages ---------- */
.flash-messages {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: grid;
  gap: .6rem;
  width: min(560px, calc(100vw - 32px));
  pointer-events: none;
}
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem 1rem 1.4rem;
  border-radius: 18px;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 18px 50px -12px rgba(0, 8, 73, .45);
  pointer-events: auto;
  animation: flash-in .45s cubic-bezier(.2, .7, .2, 1) both;
}
.flash-success { border-left: 6px solid var(--mint); }
.flash-error, .flash-danger { border-left: 6px solid #ff6b6b; }
.flash.is-hidden { opacity: 0; transform: translateY(12px); transition: opacity .3s ease, transform .3s ease; }
.flash-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
@keyframes flash-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .flash { animation: none; }
}

/* honeypot field – off-screen for people, visible to naive bots */
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- references: long quotes clamped to 6 lines ---------- */
.ref-body blockquote.ref-quote {
  flex: 0 1 auto;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  overflow: hidden;
}
.ref-body blockquote.ref-quote.is-open { display: block; -webkit-line-clamp: unset; line-clamp: unset; }
.ref-body .ref-name { margin-top: auto; }
.ref-more {
  align-self: flex-start;
  margin: -.6rem 0 1.2rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* ---------- keyboard accessibility ---------- */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.section-dark :focus-visible, .footer :focus-visible { outline-color: var(--mint); }
.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: .7rem 1.1rem;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
}
/* opacity: in Safari the overscroll (rubber-band) area above the viewport would show the off-screen link */
.skip-link:focus { transform: none; opacity: 1; }
