/* ==========================================================================
   Rbot.nl — service manual for your robot
   Design tokens: blueprint schematic + workshop paper
   ========================================================================== */

:root {
  --blueprint:        #142C44;
  --blueprint-deep:    #0E2033;
  --blueprint-panel:   #1D3C59;
  --blueprint-panel-2: #234873;
  --blueprint-line-bg: rgba(243, 236, 221, .06);

  --paper:      #EFE7D8;
  --paper-dim:  #E4DAC5;
  --ink:        #12181F;
  --ink-dim:    #3A4552;

  --line:       #F3ECDD;
  --line-dim:   rgba(243, 236, 221, .55);
  --line-faint: rgba(243, 236, 221, .16);

  --orange:     #E2622C;
  --orange-hi:  #F17A44;
  --orange-dim: #B94E22;

  --green:      #86AC85;
  --green-dim:  #5E8564;

  /* hardware (repair) = orange, software (open source) = cyan */
  --cyan:       #5FD0D6;
  --cyan-hi:    #7EDEE3;
  --cyan-dim:   #38878C;

  --font-display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --font-body:    'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --container-w: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  background: var(--blueprint);
  color: var(--line);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.02;
  color: var(--line);
  margin: 0 0 .5em;
}

.container { max-width: var(--container-w); }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* ---- small reusable bits ---------------------------------------------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--orange-hi);
  display: inline-flex;
  align-items: center;
  gap: .5em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--orange-hi);
  display: inline-block;
}

.btn-rbot {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .85em 1.5em;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-rbot:hover { transform: translateY(-1px); color: var(--line); }
.btn-rbot-solid {
  background: var(--orange);
  color: var(--blueprint-deep);
  font-weight: 600;
}
.btn-rbot-solid:hover { background: var(--orange-hi); color: var(--blueprint-deep); }
.btn-rbot-outline {
  border-color: var(--line-dim);
  color: var(--line);
}
.btn-rbot-outline:hover { border-color: var(--orange-hi); background: rgba(226, 98, 44, .1); }
.btn-rbot-cyan {
  border-color: var(--cyan-dim);
  color: var(--cyan-hi);
}
.btn-rbot-cyan:hover { border-color: var(--cyan-hi); background: rgba(95, 208, 214, .1); color: var(--cyan-hi); }

/* ==========================================================================
   Navbar
   ========================================================================== */

#header { position: relative; z-index: 40; }

.navbar-meisje {
  background: var(--blueprint-deep);
  border-bottom: 1px solid var(--line-faint);
  padding: .7rem 0;
  transition: background-color .2s ease;
}
.navbar-meisje .navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: .01em;
  color: var(--line) !important;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.navbar-meisje .navbar-brand i { color: var(--orange-hi); }

.navbar-meisje .navbar-nav .nav-link {
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--line-dim) !important;
  padding: .6rem 1rem !important;
  transition: color .15s ease;
}
.navbar-meisje .navbar-nav .nav-link:hover,
.navbar-meisje .navbar-nav .nav-link.active { color: var(--orange-hi) !important; }

.navbar-meisje .navbar-toggler { border: 1px solid var(--line-faint); }
.navbar-toggler .icon-bar {
  display: block; width: 20px; height: 2px; background: var(--line); margin: 4px 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-left: 1rem;
  font-family: var(--font-mono);
  font-size: .74rem;
}
.lang-switch-icon { opacity: .6; margin-right: .1rem; }
.lang-opt {
  color: var(--line-dim);
  padding: .2rem .45rem;
  border: 1px solid var(--line-faint);
  border-radius: 2px;
}
.lang-opt.is-active { color: var(--blueprint-deep); background: var(--orange-hi); border-color: var(--orange-hi); }

/* ==========================================================================
   Home hero
   ========================================================================== */

.rbot-hero {
  position: relative;
  padding: 7.5rem 0 3.5rem;
  background:
    linear-gradient(180deg, transparent 0%, var(--blueprint) 90%),
    repeating-linear-gradient(0deg, var(--blueprint-line-bg) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, var(--blueprint-line-bg) 0 1px, transparent 1px 48px),
    var(--blueprint);
  overflow: hidden;
}

.rbot-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 2.5rem;
  align-items: center;
}

.rbot-hero-title {
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  margin: .5rem 0 1.1rem;
}
.rbot-hero-title .accent { color: var(--orange-hi); }

.rbot-hero-sub {
  font-size: 1.1rem;
  color: var(--line-dim);
  max-width: 34rem;
  margin-bottom: 1.8rem;
}

.rbot-hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2.2rem; }

.rbot-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .05em;
  color: var(--green);
  border-top: 1px solid var(--line-faint);
  padding-top: 1rem;
}
.rbot-readout span { display: inline-flex; align-items: center; gap: .45em; }
.rbot-readout span::before { content: "●"; font-size: .55rem; color: var(--orange-hi); }

.rbot-hero-art { position: relative; }
.rbot-hero-art svg { width: 100%; height: auto; }
.rbot-hero-art .rbot-callout-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  fill: var(--line);
  letter-spacing: .02em;
}
.rbot-hero-art .rbot-callout-label tspan.sub { fill: var(--line-dim); }
.rbot-hero-art .rbot-line { stroke: var(--line-dim); stroke-width: 1; fill: none; }
.rbot-hero-art .rbot-outline { stroke: var(--line); stroke-width: 1.6; fill: none; }
.rbot-hero-art .rbot-dot { fill: var(--orange-hi); }
.rbot-hero-art .rbot-fill-paper { fill: var(--paper); opacity: .06; }

@media (max-width: 991px) {
  .rbot-hero-grid { grid-template-columns: 1fr; }
  .rbot-hero { padding-top: 6rem; }
}

/* ==========================================================================
   Chapters (services)
   ========================================================================== */

.chapters-section { padding: 5rem 0; background: var(--blueprint-deep); }
.chapters-intro { max-width: 40rem; margin-bottom: 2.8rem; }
.chapters-intro h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

.chapters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (max-width: 900px) { .chapters-grid { grid-template-columns: 1fr; } }

.chapter-card {
  background: var(--blueprint-panel);
  border: 1px solid var(--line-faint);
  border-radius: 6px;
  padding: 2.2rem;
  position: relative;
}
.chapter-num {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .1em;
  color: var(--orange-hi);
  text-transform: uppercase;
  display: block;
  margin-bottom: .6rem;
}
.chapter-card--cyan .chapter-num { color: var(--cyan-hi); }
.chapter-card h3 { font-size: 1.6rem; margin-bottom: .8rem; }
.chapter-card h3 i { color: var(--orange-hi); margin-right: .3rem; }
.chapter-card--cyan h3 i { color: var(--cyan-hi); }
.chapter-card--cyan { border-color: rgba(95, 208, 214, .25); }
.chapter-card--cyan .chapter-list li::before { color: var(--cyan-hi); }
.chapter-card p { color: var(--line-dim); margin-bottom: 1.2rem; }

.chapter-list { list-style: none; padding: 0; margin: 0 0 1.6rem; }
.chapter-list li {
  font-size: .92rem;
  padding: .45rem 0;
  border-top: 1px solid var(--line-faint);
  display: flex;
  align-items: baseline;
  gap: .6rem;
}
.chapter-list li:first-child { border-top: none; }
.chapter-list li::before { content: "—"; color: var(--orange-hi); flex: none; }

.chapter-brands {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--line-dim);
  letter-spacing: .02em;
  border-top: 1px dashed var(--line-faint);
  padding-top: 1rem;
  margin-top: .4rem;
}
.chapter-brands b { color: var(--line); font-weight: 600; }

/* ==========================================================================
   Process
   ========================================================================== */

.process-section { padding: 5rem 0; }
.process-section h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 2.4rem; }
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 850px) { .process-grid { grid-template-columns: 1fr; } }
.process-step { border-left: 2px solid var(--orange-hi); padding-left: 1.2rem; }
.process-step-num {
  font-family: var(--font-mono);
  color: var(--orange-hi);
  font-size: .8rem;
  letter-spacing: .1em;
}
.process-step h3 { font-size: 1.3rem; margin: .3rem 0 .5rem; }
.process-step p { color: var(--line-dim); font-size: .95rem; margin: 0; }

/* ==========================================================================
   Logbook / article grid  (used on home + blog listing)
   ========================================================================== */

.logbook-section { padding: 5rem 0; background: var(--blueprint-deep); }
.logbook-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.2rem; }
.logbook-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: .3rem; }
.logbook-head p { color: var(--line-dim); margin: 0; max-width: 32rem; }

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}

.art-card {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  min-height: 300px;
  background: var(--blueprint-panel);
  border: 1px solid var(--line-faint);
  display: flex;
}
.art-card-no-img { min-height: 220px; }
.art-card-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform .5s ease;
}
.art-card:hover .art-card-bg { transform: scale(1.05); }
.art-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,32,51,.15) 0%, rgba(14,32,51,.92) 78%);
}
.art-card-no-img .art-card-overlay { background: var(--blueprint-panel); }
.art-card-shimmer { display: none; }
.art-card-badge {
  position: absolute; top: 1rem; left: 1rem;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .05em;
  color: var(--blueprint-deep); background: var(--orange-hi);
  padding: .25rem .55rem; border-radius: 2px; z-index: 2;
}
.art-card-link { position: relative; z-index: 1; padding: 1.4rem; display: flex; flex-direction: column; justify-content: flex-end; width: 100%; }
.art-card-accent { width: 30px; height: 2px; background: var(--orange-hi); margin-bottom: .8rem; }
.art-card-title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--line); margin-bottom: .5rem; }
.art-card-lead { font-size: .88rem; color: var(--line-dim); margin-bottom: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.art-card-cta { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; color: var(--orange-hi); display: inline-flex; align-items: center; gap: .4em; }
.art-card-cta i { transition: transform .15s ease; }
.art-card:hover .art-card-cta i { transform: translateX(3px); }

.art-grid-cta { text-align: center; margin-top: 2.2rem; }
.art-grid-cta-link { font-family: var(--font-mono); font-size: .82rem; letter-spacing: .05em; text-transform: uppercase; color: var(--orange-hi); border-bottom: 1px solid var(--orange-hi); padding-bottom: .2rem; }

/* ==========================================================================
   Final CTA band
   ========================================================================== */

.cta-band { padding: 4.5rem 0; text-align: center; }
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); max-width: 32rem; margin: 0 auto 1.6rem; }

/* ==========================================================================
   Page hero (blog / article shared bits)
   ========================================================================== */

.page-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 30;
  padding-top: 5.4rem;
}
.page-topbar.is-fixed {
  position: fixed; padding-top: 0; background: var(--blueprint-deep);
  border-bottom: 1px solid var(--line-faint);
}
.page-topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; }
.page-topbar-navlink { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--line-dim); }
.page-topbar-navlink:hover { color: var(--orange-hi); }
.page-topbar-meta { display: flex; align-items: center; gap: .6rem; font-family: var(--font-mono); font-size: .76rem; color: var(--line-dim); }
.page-topbar-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-dim); }

.page-hero-accent { width: 40px; height: 3px; background: var(--orange-hi); margin-bottom: 1.1rem; }

.blog-hero {
  position: relative;
  background: var(--blueprint);
  padding: 10rem 0 4rem;
  background-image:
    repeating-linear-gradient(0deg, var(--blueprint-line-bg) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, var(--blueprint-line-bg) 0 1px, transparent 1px 48px);
}
.blog-hero-title { font-size: clamp(2.4rem, 5vw, 3.4rem); }
.blog-hero-sub { color: var(--line-dim); font-size: 1.05rem; max-width: 30rem; }
.blog-hero-page { font-family: var(--font-mono); font-size: .78rem; color: var(--orange-hi); margin-top: 1rem; }

.blog-section { padding: 3.5rem 0; }
.blog-section-bg.fullWidthBackground2 { background: var(--blueprint-deep); padding: 3.5rem 0; }

.myrule { border: none; border-top: 1px solid var(--line-faint); margin: 0; }

.blog-pager { display: flex; justify-content: center; padding: 2rem 0 5rem; }
.blog-pager .pagination { gap: .35rem; }
.blog-pager .page-link {
  background: var(--blueprint-panel); border: 1px solid var(--line-faint); color: var(--line-dim);
  font-family: var(--font-mono); font-size: .82rem; border-radius: 3px !important;
}
.blog-pager .page-item.active .page-link { background: var(--orange-hi); border-color: var(--orange-hi); color: var(--blueprint-deep); }
.blog-pager .page-link:hover { color: var(--orange-hi); }

/* ==========================================================================
   Article page
   ========================================================================== */

.arth-hero { position: relative; min-height: 62vh; display: flex; align-items: flex-end; background: var(--blueprint-panel); overflow: hidden; }
.arth-hero-no-img { min-height: 40vh; }
.arth-hero-bg { position: absolute; inset: -6% -6%; background-size: cover; background-position: center; }
.arth-hero-top-fade { position: absolute; top: 0; left: 0; right: 0; height: 40%; background: linear-gradient(180deg, rgba(14,32,51,.75), transparent); }
.arth-hero-vignette { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(14,32,51,.95) 100%); }
.arth-hero-content { position: relative; z-index: 2; padding: 8rem 0 3rem; }
.arth-hero-title { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.arth-hero-lead { color: var(--line-dim); max-width: 40rem; font-size: 1.1rem; }

.arth-body-section { padding: 2.6rem 0; }
.arth-body-wrap { max-width: 42rem; margin: 0 auto; font-size: 1.06rem; color: var(--line-dim); }
.arth-body-wrap p { margin-bottom: 1.3rem; }
.arth-body-wrap h2, .arth-body-wrap h3 { color: var(--line); margin-top: 1.6rem; }
.arth-body-wrap a { color: var(--orange-hi); text-decoration: underline; }

.arth-img-break { padding: 1rem 0 2.2rem; }
.arth-img-break-figure { max-width: 46rem; margin: 0 auto; position: relative; cursor: zoom-in; border-radius: 6px; overflow: hidden; }
.arth-img-break-figure img { width: 100%; display: block; }
.arth-img-break-overlay { position: absolute; inset: 0; background: rgba(14,32,51,0); transition: background .2s ease; }
.arth-img-break-expand { position: absolute; right: .8rem; bottom: .8rem; background: rgba(14,32,51,.7); color: var(--line); width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s ease; }
.arth-img-break-figure:hover .arth-img-break-overlay { background: rgba(14,32,51,.25); }
.arth-img-break-figure:hover .arth-img-break-expand { opacity: 1; }

.arth-lightbox { position: fixed; inset: 0; background: rgba(10,18,26,.94); display: flex; align-items: center; justify-content: center; z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.arth-lightbox.open { opacity: 1; pointer-events: auto; }
.arth-lightbox img { max-width: 90vw; max-height: 88vh; border-radius: 4px; }
.arth-lightbox-close { position: absolute; top: 1.5rem; right: 1.5rem; background: none; border: none; color: var(--line); font-size: 1.6rem; }

.arth-bio-section { padding: 3rem 0 5rem; }
.arth-bio-wrap { max-width: 42rem; margin: 0 auto; }
.arth-bio-card { display: flex; align-items: center; gap: 1.1rem; padding: 1.4rem; background: var(--blueprint-panel); border: 1px solid var(--line-faint); border-radius: 6px; margin-bottom: 1.4rem; }
.arth-bio-photo { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; flex: none; }
.arth-bio-caption { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--orange-hi); }
.arth-bio-name { font-family: var(--font-display); font-size: 1.2rem; margin: .1rem 0; }
.arth-bio-text { font-size: .88rem; color: var(--line-dim); }
.arth-back-link { font-family: var(--font-mono); font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--line-dim); }
.arth-back-link:hover { color: var(--orange-hi); }

/* ==========================================================================
   Contact page
   ========================================================================== */

.contact-hero {
  position: relative;
  padding: 10rem 0 3.5rem;
  background: var(--blueprint);
  background-image:
    repeating-linear-gradient(0deg, var(--blueprint-line-bg) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, var(--blueprint-line-bg) 0 1px, transparent 1px 48px);
}
.contact-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); }
.contact-hero p { color: var(--line-dim); max-width: 34rem; }

.site-contact { padding-bottom: 5rem; }

.contact-channels { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 2.2rem; }

.contact-address {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--line-dim);
  line-height: 1.9;
  border-left: 2px solid var(--orange-hi);
  padding-left: 1rem;
}

.whiteBg { background: transparent; }

#email.whiteBg,
.row.whiteBg {
  background: var(--blueprint-panel);
  border: 1px solid var(--line-faint);
  border-radius: 8px;
  padding: 2.2rem;
  margin: 0 0 2rem;
}

.site-contact .lead { font-family: var(--font-mono); font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--orange-hi); margin-bottom: .8rem; }

.site-contact .form-check.form-switch { margin-bottom: .6rem; padding-left: 2.6em; }
.site-contact .form-check-input { background-color: var(--blueprint-deep); border-color: var(--line-dim); }
.site-contact .form-check-input:checked { background-color: var(--orange-hi); border-color: var(--orange-hi); }
.site-contact .form-check-label { color: var(--line); }

.site-contact .form-floating > .form-control,
.site-contact .form-floating > textarea {
  background: var(--blueprint-deep);
  border: 1px solid var(--line-faint);
  color: var(--line);
}
.site-contact .form-floating > label { color: var(--line-dim); }
.site-contact .form-control:focus { background: var(--blueprint-deep); color: var(--line); border-color: var(--orange-hi); box-shadow: none; }
.site-contact .invalid-feedback { color: var(--orange-hi); }

/* Kartik's Summernote widget wraps the whole editor (toolbar + editing area) in
   a div carrying Bootstrap's `.form-control` class purely for consistent field
   styling — but that class also sets a fixed single-line input height (~58px),
   clipping the actual editor underneath it and letting it spill over whatever
   comes next on the page (here: the image uploader). The wrapper needs to size
   to its content instead. */
.site-contact .kv-editor-container {
  height: auto !important;
  min-height: 0;
  padding: 0;
  border: none;
  background: transparent;
}
.site-contact .note-editor.note-frame {
  background: var(--blueprint-deep);
  border: 1px solid var(--line-faint);
  border-radius: 4px;
}
.site-contact .note-editor .note-toolbar {
  background: var(--blueprint-panel);
  border-bottom: 1px solid var(--line-faint);
  padding: .4rem;
}
.site-contact .note-editable {
  background: var(--blueprint-deep);
  color: var(--line);
}

/* Toolbar buttons render as Bootstrap's light-themed `.btn-light` by default
   (white pill, black icon) — jarring against the dark toolbar background. */
.site-contact .note-toolbar .note-btn.btn {
  background: var(--blueprint-deep);
  border-color: var(--line-faint);
  color: var(--line-dim);
}
.site-contact .note-toolbar .note-btn.btn:hover,
.site-contact .note-toolbar .note-btn.btn:focus {
  background: var(--blueprint-panel-2);
  border-color: var(--orange-hi);
  color: var(--line);
}
.site-contact .note-toolbar .note-btn.btn.active,
.site-contact .note-toolbar .note-btn.btn[aria-pressed="true"] {
  background: var(--orange-hi);
  border-color: var(--orange-hi);
  color: var(--blueprint-deep);
}
.site-contact .note-toolbar .note-btn-group .note-btn.btn + .note-btn.btn { margin-left: 2px; }
.site-contact .note-toolbar .note-icon-caret { color: inherit; }

/* the style/table dropdown popovers stay on Bootstrap's default light surface —
   they float above everything so they don't need to match the dark toolbar,
   just needed a border so they don't disappear against the page */
.site-contact .note-dropdown-menu { border: 1px solid var(--line-faint); }

/* bootstrap-fileinput's own theme makes the "no file selected" caption bar
   transparent with dark text — invisible on our dark background */
.site-contact .file-caption-name,
.site-contact .file-caption-name.kv-fileinput-caption {
  background: var(--blueprint-deep) !important;
  color: var(--line-dim) !important;
  border-color: var(--line-faint) !important;
}
.site-contact .file-input .input-group-append .btn,
.site-contact .file-input .input-group-prepend .btn { border-color: var(--line-faint); }

.site-contact .featurette-image { border-radius: 8px; opacity: .9; }

/* ==========================================================================
   Footer
   ========================================================================== */

footer#footer { background: var(--blueprint-deep); border-top: 1px solid var(--line-faint); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.4rem; padding: 3rem 0; }
.footer-logo { font-family: var(--font-display); font-size: 1.5rem; color: var(--line); }
.footer-tld { color: var(--orange-hi); }
.footer-tagline { font-family: var(--font-mono); font-size: .78rem; color: var(--line-dim); margin: .3rem 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.6rem; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .03em; text-transform: uppercase; }
.footer-links a { color: var(--line-dim); }
.footer-links a:hover { color: var(--orange-hi); }
.footer-base { border-top: 1px solid var(--line-faint); padding: 1.2rem 0; font-family: var(--font-mono); font-size: .72rem; color: var(--line-dim); text-align: center; }

/* ==========================================================================
   Back to top
   ========================================================================== */

.global-back-top {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 60;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--blueprint-panel); border: 1px solid var(--line-faint); color: var(--line);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
.global-back-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.global-back-top:hover { border-color: var(--orange-hi); color: var(--orange-hi); }

/* ==========================================================================
   Alerts / misc
   ========================================================================== */

.alert { border-radius: 6px; font-family: var(--font-mono); font-size: .88rem; border: 1px solid var(--line-faint); }
.alert-success { background: rgba(134, 172, 133, .14); color: var(--green); border-color: var(--green-dim); }
.alert-warning { background: rgba(226, 98, 44, .12); color: var(--orange-hi); border-color: var(--orange-dim); }
.alert-error, .alert-danger { background: rgba(226, 98, 44, .16); color: var(--orange-hi); border-color: var(--orange-dim); }
/* Bootstrap's .btn-close is a dark SVG glyph, made for light alert
   backgrounds — invert it for our dark ones (same trick Bootstrap's own
   .btn-close-white uses). */
.alert .btn-close { filter: invert(1) grayscale(100%) brightness(200%); opacity: .7; }
.alert .btn-close:hover { opacity: 1; }

.close-navbar-toggler { display: none; }

.main-container-default,
.main-container-with-header,
.main-container-presentation { padding-top: 0; }

/* The fixed/floating navbar (~72px tall) overlaps whatever sits at the very
   top of <main> — every page compensates with its own oversized hero
   top-padding (e.g. 10rem), except this flash box, which has none of its
   own. Without this, a flash message renders in the DOM but is completely
   hidden behind the navbar, on every page, regardless of scroll position. */
.site-index-flash { padding: 6rem 0 1.5rem; }

.page-header-banner { padding: 9rem 0 3rem; background: var(--blueprint); }
.page-header-title { font-size: clamp(2rem, 4vw, 2.8rem); }

/* ==========================================================================
   Admin (/articles) — functional, not brand-polished
   ========================================================================== */

.site-contact .table { color: var(--line); }
.site-contact .table > :not(caption) > * > * { background: transparent; border-color: var(--line-faint); color: var(--line); }
.site-contact .pagination .page-link { background: var(--blueprint-panel); border-color: var(--line-faint); color: var(--line-dim); }
.site-contact .pagination .page-item.active .page-link { background: var(--orange-hi); border-color: var(--orange-hi); color: var(--blueprint-deep); }

.admin-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.admin-image-item { display: block; border: 1px solid var(--line-faint); border-radius: 6px; overflow: hidden; background: var(--blueprint-panel); cursor: pointer; }
.admin-image-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.admin-image-item span { display: flex; align-items: center; gap: .4em; padding: .5rem; font-family: var(--font-mono); font-size: .74rem; color: var(--line-dim); }

/* ==========================================================================
   Contact form — "message sent" moment
   The paper-plane icon on the Send button flies in and dissolves into a
   hand-drawn checkmark ring, echoing the button the visitor just pressed.
   ========================================================================== */

.contact-success {
  max-width: 30rem;
  padding: 3rem 0 2rem;
  text-align: center;
  margin: 0 auto;
}
.contact-success .eyebrow { justify-content: center; margin-bottom: 1rem; }
.contact-success-title { font-size: clamp(1.8rem, 3.4vw, 2.4rem); margin-bottom: .8rem; }
.contact-success p { color: var(--line-dim); }

.contact-success-badge {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.4rem;
}
.contact-success-plane {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--orange-hi);
}
.contact-success-ring .ring { stroke: var(--orange-hi); }
.contact-success-ring .check { stroke: var(--green); }

/* Static end-state by default (also what prefers-reduced-motion sees: nothing
   moves, the finished checkmark is just there). Dasharray is sized to each
   path's actual length so the draw-in animation below paces evenly instead of
   finishing instantly. */
.contact-success-plane { opacity: 0; }
.contact-success-ring .ring { stroke-dasharray: 176; stroke-dashoffset: 0; }
.contact-success-ring .check { stroke-dasharray: 46; stroke-dashoffset: 0; }

@media (prefers-reduced-motion: no-preference) {
  .contact-success {
    animation: contact-success-in .5s cubic-bezier(.34, 1.56, .64, 1) both;
  }
  .contact-success-plane {
    animation: contact-success-plane .6s ease-out both;
  }
  .contact-success-ring .ring {
    animation: contact-success-draw-ring .5s .55s ease-out both;
  }
  .contact-success-ring .check {
    animation: contact-success-draw-check .35s .9s ease-out both;
  }
}

@keyframes contact-success-in {
  from { opacity: 0; transform: translateY(10px) scale(.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes contact-success-plane {
  0%   { opacity: 0; transform: translate(-30px, 8px) rotate(-18deg); }
  35%  { opacity: 1; }
  65%  { opacity: 1; transform: translate(0, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate(8px, -6px) rotate(14deg); }
}
@keyframes contact-success-draw-ring {
  from { stroke-dashoffset: 176; }
  to   { stroke-dashoffset: 0; }
}
@keyframes contact-success-draw-check {
  from { stroke-dashoffset: 46; }
  to   { stroke-dashoffset: 0; }
}
