/* Site styles on top of Bootstrap 5 RTL. Colors and sizes come from tokens.css. */

/* ---------- Base ---------- */
:root {
  --bs-body-font-family: var(--font);
  --bs-body-font-size: var(--fs-body);
  --bs-body-line-height: var(--lh-body);
  --bs-body-color: var(--c-ink);
  --bs-body-bg: var(--c-bg);
  --bs-link-color: var(--c-lime-ink);
  --bs-link-color-rgb: 84, 106, 18;
  --bs-link-hover-color: var(--c-ink);
  --bs-border-color: var(--c-stone);
}

/* Wide Bootstrap gutters (g-4, g-5) reach past the container edge; clip them so phones never scroll sideways */
main, .site-footer { overflow-x: clip; }

body {
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font);
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { color: var(--c-ink); line-height: 1.45; }
p { margin-bottom: 1rem; }
img { max-width: 100%; height: auto; }

.container { padding-inline: var(--gutter); }

:focus-visible {
  outline: 3px solid var(--c-lime-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 2000;
  background: var(--c-ink);
  color: var(--c-on-ink);
  padding: .5rem 1rem;
  border-radius: var(--r-sm);
}
.skip-link:focus { top: 1rem; }

.icon { flex-shrink: 0; vertical-align: middle; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- Buttons ---------- */
.btn-ink,
.btn-quiet,
.btn-lime {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.5;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-ink { background: var(--c-ink); color: var(--c-on-ink); }
.btn-ink:hover { background: var(--c-lime-ink); color: #fff; }
.btn-quiet { background: transparent; color: var(--c-ink); border-color: var(--c-taupe); }
.btn-quiet:hover { background: var(--c-lime-soft); border-color: var(--c-lime-ink); color: var(--c-ink); }
.btn-lime { background: var(--c-lime); color: var(--c-ink); }
.btn-lime:hover { background: var(--c-lime-line); color: var(--c-ink); }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--c-lime-ink);
  font-weight: 600;
  font-size: .925rem;
  text-decoration: none;
  white-space: nowrap;
}
.link-more:hover { color: var(--c-ink); }

/* ---------- Header ---------- */
.site-header {
  background: rgba(211, 229, 156, .94); /* --c-pistachio */
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid #bcd27c;
}
.site-header .navbar { padding-block: .5rem; }
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--c-ink);
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
}
.brand img { height: 64px; width: auto; }
@media (min-width: 992px) { .brand img { height: 88px; } }
.site-header .nav-link {
  position: relative;
  color: var(--c-ink);
  font-weight: 500;
  padding-inline: .9rem !important;
}
.site-header .nav-link:hover { color: var(--c-pistachio-deep); }
.site-header .nav-link.active { color: var(--c-ink); font-weight: 700; }
.site-header .nav-link.active::after {
  content: "";
  position: absolute;
  inset-inline: .9rem;
  bottom: .1rem;
  height: 3px;
  border-radius: 3px;
  background: var(--c-ink);
}
.nav-toggle {
  border: 1px solid #b3c972;
  background: rgba(255, 255, 255, .55);
  color: var(--c-ink);
  border-radius: var(--r-sm);
  padding: .4rem .55rem;
}
@media (max-width: 991.98px) {
  .site-header .navbar-collapse { padding-block: 1rem .5rem; }
  .site-header .nav-link.active::after { inset-inline: .9rem auto; width: 1.5rem; }
  .header-cta { margin-top: .75rem; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section-cream { background: var(--c-cream); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 2.5rem;
}
.section-head h2 { font-size: var(--fs-h2); font-weight: 800; margin: 0; }
.section-head p { color: var(--c-muted); max-width: 54ch; margin: .6rem 0 0; }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem);
  overflow: hidden;
  background: var(--c-pistachio-soft);
  border-bottom: 1px solid #e1ebc0;
}
/* Thin rounded frame around the headline and intro text */
.hero-copy {
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2.25rem);
  margin-bottom: 2rem;
  border: 1px solid #b3c972;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .45);
}
/* Title and text come formatted from the admin editor (font, size, alignment per line).
   Sizes there are in em, so they scale with the base sizes below on every screen. */
.hero-title {
  font-size: clamp(1.7rem, 1.05rem + 2.3vw, 2.65rem);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}
.hero-title:last-child { margin-bottom: 0; }
.hero-title strong { font-weight: 800; }
.hero-title .line { display: block; }
.hero-title .line + .line { margin-top: .35em; }
.hero-title [dir="ltr"] { color: var(--c-pistachio-deep); line-height: 1.35; }
.hero-text { color: var(--c-muted); font-size: 1.125rem; }
.hero-text p { margin: 0 0 .5rem; }
.hero-text p:last-child { margin-bottom: 0; }
.hero-text [dir="ltr"] { color: #6b7064; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-image img { border-radius: var(--r-lg); width: 100%; object-fit: cover; aspect-ratio: 5 / 4; }

/* Service map: the company hub connected to each service like a network diagram.
   Node positions are physical (left/top) so they line up with the SVG lines. */
.netmap {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
}
.netmap > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.netmap-ring { fill: none; stroke: #c9cfb3; stroke-width: .35; stroke-dasharray: 1 1.6; }

/* Thin line that keeps travelling around the ring (two arcs, opposite each other) */
.netmap-orbit {
  transform-box: view-box;
  transform-origin: 50% 50%;
  animation: netmap-spin 16s linear infinite;
}
.netmap-orbit-line {
  fill: none;
  stroke: var(--c-lime-ink);
  stroke-width: .3;
  stroke-linecap: round;
  stroke-dasharray: 14 36;
  opacity: .75;
}
.netmap-packet { fill: var(--c-lime-ink); }
@keyframes netmap-spin { to { transform: rotate(360deg); } }
.netmap-link {
  stroke: var(--c-lime-line);
  stroke-width: .55;
  stroke-linecap: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: netmap-draw 1s cubic-bezier(.3, .7, .2, 1) forwards;
  animation-delay: calc(var(--i) * 120ms + 150ms);
}
.netmap-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 34%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--c-ink);
  color: var(--c-on-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-weight: 800;
  font-size: clamp(.85rem, .7rem + .6vw, 1.05rem);
  line-height: 1.6;
  box-shadow: 0 0 0 10px var(--c-pistachio), 0 0 0 11px #bcd27c;
}
.netmap-hub img { max-width: 75%; max-height: 60%; filter: brightness(0) invert(1); }
.netmap-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  width: 9.5rem;
  color: var(--c-ink);
  text-decoration: none;
  opacity: 0;
  animation: netmap-in .5s ease-out forwards;
  animation-delay: calc(var(--i) * 120ms + 550ms);
}
.netmap-dot {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--c-surface);
  border: 1px solid var(--c-stone);
  box-shadow: var(--shadow-soft);
  color: var(--c-lime-ink);
  transition: background-color .2s, transform .2s;
}
.netmap-node:hover .netmap-dot,
.netmap-node:focus-visible .netmap-dot { background: var(--c-lime); transform: scale(1.06); }
.netmap-label {
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.55;
  text-align: center;
  background: var(--c-pistachio-soft);
  padding: .1rem .4rem;
  border-radius: 6px;
}
@keyframes netmap-draw { to { stroke-dashoffset: 0; } }
@keyframes netmap-in { from { opacity: 0; transform: translate(-50%, -40%); } to { opacity: 1; transform: translate(-50%, -50%); } }

@media (max-width: 575.98px) {
  .netmap { max-width: 340px; }
  .netmap-label { display: none; }
  .netmap-dot { width: 52px; height: 52px; }
  .netmap-node { width: auto; }
}

/* ---------- Services (home list) ---------- */
.service-list {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 3rem;
}
@media (min-width: 768px) { .service-list { grid-template-columns: 1fr 1fr; } }
.service-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .25rem 1.25rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--c-stone);
  color: var(--c-ink);
  text-decoration: none;
}
.service-item h3 { font-size: var(--fs-h3); font-weight: 700; margin: .2rem 0 .35rem; }
.service-item p { color: var(--c-muted); font-size: .95rem; margin: 0; }
.service-item:hover .icon-tile { background: var(--c-lime); }
.service-item:hover h3 { color: var(--c-lime-ink); }

.icon-tile {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-sm);
  background: var(--c-lime-soft);
  color: var(--c-lime-ink);
  transition: background-color .2s;
}
.icon-tile-lg { width: 64px; height: 64px; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-block: 1px solid var(--c-stone);
}
@media (min-width: 992px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 1.75rem 1.5rem; }
.stat + .stat { border-inline-start: 1px solid var(--c-stone); }
@media (max-width: 991.98px) {
  .stat:nth-child(odd) { border-inline-start: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--c-stone); }
}
.stat-value { display: block; font-size: clamp(2rem, 1.4rem + 2vw, 2.9rem); font-weight: 800; line-height: 1.25; }
.stat-label { color: var(--c-muted); font-size: .95rem; }

/* ---------- Portfolio cards ---------- */
.project-card { color: var(--c-ink); }
.project-thumb {
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-stone);
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-card h3 { font-size: 1.1rem; font-weight: 700; margin: .55rem 0 .25rem; }
.project-card p { color: var(--c-muted); font-size: .925rem; margin: 0; }
.project-body { padding-top: .9rem; }

.chip {
  display: inline-block;
  padding: .1rem .75rem;
  border-radius: var(--r-pill);
  background: var(--c-mist);
  color: var(--c-ink);
  font-size: .8rem;
  font-weight: 600;
}

/* ---------- Features ---------- */
.feature .icon { color: var(--c-lime-ink); margin-bottom: .9rem; }
.feature h3 { font-size: var(--fs-h3); font-weight: 700; margin-bottom: .4rem; }
.feature p { color: var(--c-muted); font-size: .95rem; margin: 0; }

/* ---------- Testimonials ---------- */
.quote {
  height: 100%;
  margin: 0;
  padding: 1.5rem 1.75rem;
  background: var(--c-surface);
  border: 1px solid var(--c-stone);
  border-inline-start: 4px solid var(--c-lime-line);
  border-radius: var(--r-sm);
}
.quote blockquote { margin: 0 0 1.25rem; font-size: 1.02rem; line-height: 2; }
.quote figcaption strong { display: block; font-weight: 700; }
.quote figcaption span { color: var(--c-muted); font-size: var(--fs-small); }

/* ---------- Client logos ---------- */
.client-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem 3rem;
}
.client-logos img {
  max-height: 48px;
  width: auto;
  filter: grayscale(1);
  opacity: .7;
  transition: filter .2s, opacity .2s;
}
.client-logos a:hover img { filter: none; opacity: 1; }

/* ---------- Call-to-action band ---------- */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  padding: clamp(2rem, 5vw, 3.5rem);
  border-radius: var(--r-lg);
  background: var(--c-lime);
}
.cta-band h2 { font-size: var(--fs-h2); font-weight: 800; margin: 0; }
.cta-band p { margin: .5rem 0 0; color: #3b412c; max-width: 52ch; }

/* ---------- Inner page header ---------- */
.page-head {
  padding-block: clamp(2.25rem, 5vw, 3.75rem) clamp(2rem, 4vw, 3rem);
  background: var(--c-cream);
  border-bottom: 1px solid var(--c-stone);
}
.page-head h1 { font-size: var(--fs-h1); font-weight: 800; margin: .5rem 0 .75rem; }
.page-head .lead-text { color: var(--c-muted); font-size: 1.1rem; max-width: 60ch; margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; font-size: var(--fs-small); color: var(--c-muted); }
.crumbs a { color: var(--c-muted); text-decoration: none; }
.crumbs a:hover { color: var(--c-lime-ink); }
.crumbs li + li::before { content: "/"; margin-inline-end: .4rem; color: var(--c-taupe); }

/* ---------- Text blocks ---------- */
.prose { max-width: 70ch; font-size: 1.04rem; }
.prose p { margin-bottom: 1.15rem; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: .6rem; padding-block: .45rem; }
.checklist .icon { color: var(--c-lime-ink); margin-top: .3rem; }

/* ---------- Services page ---------- */
.service-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.5rem;
  padding-block: 2rem;
  border-top: 1px solid var(--c-stone);
}
.service-row:last-child { border-bottom: 1px solid var(--c-stone); }
.service-row h2 { font-size: 1.35rem; font-weight: 800; margin: .25rem 0 .5rem; }
.service-row h2 a { color: var(--c-ink); text-decoration: none; }
.service-row h2 a:hover { color: var(--c-lime-ink); }
.service-row p { color: var(--c-muted); margin: 0; max-width: 62ch; }
.service-row-action { grid-column: 2; }
@media (min-width: 768px) {
  .service-row { grid-template-columns: auto 1fr auto; align-items: center; }
  .service-row-action { grid-column: auto; }
}

.aside-card {
  position: sticky;
  top: 8.5rem; /* clears the sticky header with the large logo */
  padding: 1.75rem;
  border-radius: var(--r-md);
  background: var(--c-lime-soft);
  border: 1px solid #dfe7b8;
}
.aside-card h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: .5rem; }
.aside-card p { color: var(--c-muted); font-size: .95rem; }

.detail-image { border-radius: var(--r-md); width: 100%; margin-bottom: 2rem; }

.link-list { list-style: none; padding: 0; margin: 0; }
.link-list a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-block: .8rem;
  border-bottom: 1px solid var(--c-stone);
  color: var(--c-ink);
  text-decoration: none;
  font-weight: 600;
}
.link-list a:hover { color: var(--c-lime-ink); }
.link-list .icon { color: var(--c-lime-ink); }

/* FAQ (Bootstrap accordion) */
.faq .accordion-item { background: transparent; border: 0; border-bottom: 1px solid var(--c-stone); }
.faq .accordion-item:first-child { border-top: 1px solid var(--c-stone); }
.faq .accordion-button {
  background: transparent;
  color: var(--c-ink);
  font-weight: 700;
  font-size: 1.02rem;
  padding: 1.25rem 0;
  box-shadow: none;
}
.faq .accordion-button:not(.collapsed) { color: var(--c-lime-ink); }
.faq .accordion-button:focus-visible { outline: 3px solid var(--c-lime-ink); }
.faq .accordion-body { padding: 0 0 1.25rem; color: var(--c-muted); }

/* ---------- Portfolio page ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.25rem; }
.filters a {
  padding: .4rem 1.1rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--c-stone);
  background: var(--c-surface);
  color: var(--c-ink);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}
.filters a:hover { border-color: var(--c-lime-ink); }
.filters a.active { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-on-ink); }

.empty-state {
  padding: 3rem 1.5rem;
  border: 1px dashed var(--c-taupe);
  border-radius: var(--r-md);
  color: var(--c-muted);
  text-align: center;
}

/* ---------- About ---------- */
.about-image { border-radius: var(--r-lg); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mission { padding: 1.75rem; border-radius: var(--r-md); background: var(--c-surface); border: 1px solid var(--c-stone); height: 100%; }
.mission h2 { font-size: 1.2rem; font-weight: 800; }
.mission p { color: var(--c-muted); margin: 0; }

/* ---------- Contact ---------- */
.info-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.info-list li { display: flex; gap: 1rem; align-items: flex-start; padding-block: 1rem; border-bottom: 1px solid var(--c-stone); }
.info-list .label { display: block; color: var(--c-muted); font-size: var(--fs-small); }
.info-list .value { font-weight: 700; color: var(--c-ink); text-decoration: none; }
.info-list a.value:hover { color: var(--c-lime-ink); }

.socials { display: flex; flex-wrap: wrap; gap: .5rem; }
.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--c-stone);
  color: var(--c-ink);
  transition: background-color .2s;
}
.socials a:hover { background: var(--c-lime); }

.form-panel {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--r-md);
  background: var(--c-surface);
  border: 1px solid var(--c-stone);
}
.form-panel h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 1.5rem; }
.form-label { font-weight: 600; font-size: .925rem; margin-bottom: .35rem; }
.form-control {
  border-radius: var(--r-sm);
  border-color: var(--c-stone);
  background: var(--c-bg);
  padding: .7rem .9rem;
  line-height: 1.8;
}
.form-control:focus {
  border-color: var(--c-lime-ink);
  background: var(--c-surface);
  box-shadow: 0 0 0 .2rem rgba(196, 214, 106, .45);
}
.form-control[dir="ltr"] { text-align: right; }
.form-control[dir="ltr"]:focus, .form-control[dir="ltr"]:not(:placeholder-shown) { text-align: left; }
.field-error { color: var(--c-error); font-size: var(--fs-small); margin-top: .35rem; }
.form-control.is-invalid { border-color: var(--c-error); }
.hp-field { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

.map-frame { width: 100%; height: 380px; border: 0; border-radius: var(--r-md); display: block; }

.notice {
  padding: 1rem 1.25rem;
  border-radius: var(--r-sm);
  margin-bottom: 1.5rem;
  font-weight: 600;
}
.notice-success { background: var(--c-lime-soft); border: 1px solid var(--c-lime-line); color: var(--c-ink); }
.notice-error { background: #f8eaea; border: 1px solid #e3b9b9; color: var(--c-error); }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-ink); color: var(--c-on-ink-muted); padding-top: 4rem; font-size: .95rem; }
.site-footer h2 { color: var(--c-on-ink); font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.site-footer a { color: var(--c-on-ink); text-decoration: none; }
.site-footer a:hover { color: var(--c-lime); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding-block: .3rem; }
.footer-brand { color: var(--c-on-ink); font-weight: 800; font-size: 1.15rem; }
.footer-brand img { height: 40px; width: auto; filter: brightness(0) invert(1); }
.footer-contact li { display: flex; gap: .6rem; align-items: flex-start; }
.footer-contact .icon { color: var(--c-lime); margin-top: .3rem; }
.site-footer .socials a { border-color: rgba(255, 255, 255, .18); color: var(--c-on-ink); }
.site-footer .socials a:hover { background: var(--c-lime); color: var(--c-ink); }
.footer-bottom { margin-top: 3rem; padding-block: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: var(--fs-small); }

/* ---------- 404 ---------- */
.not-found { padding-block: 6rem; text-align: center; }
.not-found .code { font-size: 5rem; font-weight: 800; color: var(--c-lime-line); line-height: 1; }

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .netmap-link { stroke-dashoffset: 0; }
  .netmap-node { opacity: 1; }
  .netmap-packet { display: none; }
  /* Keep only a very slow turn of the orbit line (beats the rule above by specificity) */
  .netmap-orbit { animation: netmap-spin 40s linear infinite !important; }
}
