/* ==========================================================================
   Macom Trading PLC — Design System
   Palette: indigo (institutional), ochre (Africa/trade), paper, ink, teal (data)
   Type: Fraunces (display) + Inter (body/UI)
   ========================================================================== */

:root {
  --indigo:        #1B2A4A;
  --indigo-deep:   #142544;
  --indigo-bright: #2D5FA8;
  --ochre:         #E08A2E;
  --ochre-light:   #FFB454;
  --teal:          #1C9E8E;
  --teal-bright:   #22C7B0;
  --paper:         #FCFBF6;
  --paper-dim:     #F3EEE0;
  --ink:           #20201C;
  --ink-soft:      #4A473E;
  --line:          rgba(32, 32, 28, 0.12);
  --line-on-dark:  rgba(246, 243, 236, 0.18);

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 1rem;
  line-height: 1.6;
}

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

h1, h2, h3, h4, .display-font {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--indigo-deep);
  letter-spacing: -0.01em;
}

p { max-width: 68ch; }

a { color: var(--indigo); }
a:hover { color: var(--ochre); }

::selection { background: var(--ochre-light); color: var(--indigo-deep); }

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

/* ---------- Layout helpers ---------- */
.container-narrow { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5.5rem 0; }
.section-tight { padding: 3rem 0; }
.rule { border: none; border-top: 1px solid var(--line); margin: 0; }
.rule-dark { border-top: 1px solid var(--line-on-dark); }

.eyebrow-plain {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--teal);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* ---------- Top contact bar ---------- */
.top-bar {
  background: var(--indigo-deep);
  color: rgba(246,243,236,0.85);
  font-size: 0.82rem;
  padding: 0.5rem 0;
}
.top-bar .container-narrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.top-bar .top-bar-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.top-bar a {
  color: rgba(246,243,236,0.85);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.15s ease;
}
.top-bar a:hover { color: var(--ochre-light); }
.top-bar svg {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  color: var(--teal-bright);
}
.top-bar .top-bar-address {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(246,243,236,0.7);
}
@media (max-width: 767px) {
  .top-bar .top-bar-address { display: none; }
}
@media (max-width: 480px) {
  .top-bar .top-bar-links { gap: 0.9rem; }
  .top-bar span.divider { display: none; }
}

/* ---------- Navbar ---------- */
.navbar-macom {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
  transition: padding 0.25s ease, box-shadow 0.25s ease;
}
.navbar-macom.is-scrolled {
  padding: 0.6rem 0;
  box-shadow: 0 8px 24px rgba(20, 37, 68, 0.1);
}
.navbar-macom .navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--indigo-deep);
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.navbar-macom .navbar-brand small {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--ochre);
  letter-spacing: 0.06em;
}
.navbar-macom .nav-link {
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0 0.6rem;
  position: relative;
}
.navbar-macom .nav-link.active,
.navbar-macom .nav-link:hover {
  color: var(--indigo-deep);
}
.navbar-macom .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--ochre);
}
.btn-macom {
  background: linear-gradient(135deg, var(--ochre) 0%, var(--ochre-light) 100%);
  color: var(--indigo-deep);
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 0.6rem 1.4rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(224, 138, 46, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.btn-macom:hover {
  color: var(--indigo-deep);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(224, 138, 46, 0.4);
  filter: brightness(1.05);
}
.btn-macom:active { transform: translateY(0); }
.btn-macom-outline {
  background: rgba(34, 199, 176, 0.08);
  color: var(--paper);
  border: 1px solid var(--line-on-dark);
  border-radius: 3px;
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.btn-macom-outline:hover {
  border-color: var(--teal-bright);
  color: var(--teal-bright);
  background: rgba(34, 199, 176, 0.14);
  transform: translateY(-2px);
}

/* ---------- Hero (manifest stamp motif) ---------- */
.hero {
  background: var(--indigo-deep);
  color: var(--paper);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 991px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero h1 {
  color: var(--paper);
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.08;
  margin-bottom: 1.2rem;
}
.hero p.lead {
  color: rgba(246, 243, 236, 0.82);
  font-size: 1.1rem;
  max-width: 52ch;
}
.hero-meta {
  display: flex;
  gap: 2rem;
  margin-top: 2.2rem;
  flex-wrap: wrap;
}
.hero-meta div {
  border-left: 2px solid var(--ochre);
  padding-left: 0.8rem;
}
.hero-meta .num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--ochre-light);
  display: block;
  line-height: 1;
}
.hero-meta .lbl {
  font-size: 0.8rem;
  color: rgba(246,243,236,0.7);
}

/* Manifest stamp panel */
.manifest-stamp {
  border: 1px solid var(--line-on-dark);
  padding: 1.6rem 1.6rem 1.4rem;
  position: relative;
  opacity: 0;
  transform: translateY(10px) rotate(-1deg);
  animation: stampIn 0.7s 0.25s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes stampIn {
  to { opacity: 1; transform: translateY(0) rotate(-1deg); }
}
@media (prefers-reduced-motion: reduce) {
  .manifest-stamp { opacity: 1; transform: translateY(0) rotate(-1deg); animation: none; }
}
.manifest-stamp .stamp-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--ochre-light);
  border-bottom: 1px dashed var(--line-on-dark);
  padding-bottom: 0.6rem;
  margin-bottom: 0.8rem;
}
.manifest-stamp dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1rem;
  font-size: 0.86rem;
  margin: 0;
}
.manifest-stamp dt { color: rgba(246,243,236,0.6); }
.manifest-stamp dd { margin: 0; color: var(--paper); text-align: right; }
.manifest-stamp .stamp-seal {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--line-on-dark);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ochre-light);
  font-size: 0.95rem;
  text-align: right;
}

/* ---------- Cards / services ---------- */
.svc-card {
  border: 1px solid var(--line);
  padding: 2rem 1.7rem;
  height: 100%;
  background: var(--paper);
  transition: border-color 0.15s ease;
}
.svc-card:hover { border-color: var(--ochre); }
.svc-card .idx {
  font-family: var(--font-display);
  color: var(--ochre);
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  display: block;
}
.svc-card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.svc-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0; }

/* ---------- Manifest / experience table ---------- */
.manifest-table-wrap {
  border: 1px solid var(--line);
  background: var(--paper);
  overflow-x: auto;
}
table.manifest {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 720px;
}
table.manifest thead th {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--paper);
  background: var(--indigo-deep);
  text-align: left;
  padding: 0.8rem 1rem;
}
table.manifest thead th.num-col,
table.manifest td.num-col { text-align: right; }
table.manifest tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.manifest tbody tr:hover { background: var(--paper-dim); }
table.manifest td.year {
  font-family: var(--font-display);
  color: var(--ochre);
  font-weight: 600;
  white-space: nowrap;
}
table.manifest td.value {
  font-variant-numeric: tabular-nums;
  color: var(--teal);
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Timeline (strength/principle lists as ledger) ---------- */
.ledger-list { list-style: none; padding: 0; margin: 0; }
.ledger-list li {
  display: flex;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.ledger-list li:first-child { border-top: 1px solid var(--line); }
.ledger-list .li-mark {
  font-family: var(--font-display);
  color: var(--ochre);
  font-size: 0.9rem;
  flex: 0 0 2rem;
}

/* ---------- Stats strip ---------- */
.stats-strip {
  background: var(--paper-dim);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat-block { text-align: left; padding: 2.4rem 0; }
.stat-block .num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--indigo-deep);
  line-height: 1;
}
.stat-block .lbl { color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.4rem; }

/* ---------- Vision / mission panels ---------- */
.vm-panel {
  border-left: 3px solid var(--ochre);
  padding: 0 0 0 1.5rem;
  height: 100%;
}
.vm-panel h3 { font-size: 1.3rem; margin-bottom: 0.7rem; }
.vm-panel p { color: var(--ink-soft); }

/* ---------- Offices ---------- */
.office-card {
  border: 1px solid var(--line);
  padding: 1.8rem;
  background: var(--paper);
}
.office-card h4 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.office-card .tag {
  font-size: 0.75rem;
  color: var(--ochre);
  font-weight: 600;
  margin-bottom: 0.6rem;
  display: inline-block;
}
.office-card address { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 0.3rem; }

/* ---------- Contact form ---------- */
.contact-panel {
  background: var(--indigo-deep);
  color: var(--paper);
  padding: 3rem;
}
@media (max-width: 767px) { .contact-panel { padding: 2rem 1.3rem; } }
.contact-panel h2 { color: var(--paper); }
.contact-panel .form-label {
  color: rgba(246,243,236,0.8);
  font-size: 0.85rem;
  font-weight: 500;
}
.contact-panel .form-control,
.contact-panel .form-select {
  background: rgba(246,243,236,0.06);
  border: 1px solid var(--line-on-dark);
  color: var(--paper);
  border-radius: 2px;
  padding: 0.65rem 0.9rem;
}
.contact-panel .form-control::placeholder { color: rgba(246,243,236,0.35); }
.contact-panel .form-control:focus,
.contact-panel .form-select:focus {
  background: rgba(246,243,236,0.1);
  border-color: var(--ochre);
  color: var(--paper);
  box-shadow: none;
}
.contact-panel .form-control:focus-visible,
.contact-panel .form-select:focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 2px;
}
#formStatus { font-size: 0.92rem; margin-top: 1rem; display: none; }
#formStatus.success { color: var(--ochre-light); display: block; }
#formStatus.error { color: #E38686; display: block; }

.spinner-inline {
  width: 1rem; height: 1rem;
  border: 2px solid rgba(246,243,236,0.4);
  border-top-color: var(--paper);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
  margin-right: 0.5rem;
  vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--indigo-deep);
  color: rgba(246,243,236,0.75);
  padding: 3rem 0 1.5rem;
  font-size: 0.9rem;
}
footer.site-footer h5 {
  font-family: var(--font-body);
  color: var(--paper);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
footer.site-footer a { color: rgba(246,243,236,0.75); text-decoration: none; }
footer.site-footer a:hover { color: var(--ochre-light); }
footer.site-footer .foot-bottom {
  border-top: 1px solid var(--line-on-dark);
  margin-top: 2rem;
  padding-top: 1.3rem;
  font-size: 0.8rem;
  color: rgba(246,243,236,0.5);
}

/* ---------- Page header (interior pages) ---------- */
.page-header {
  background: var(--indigo-deep);
  color: var(--paper);
  padding: 3.2rem 0;
}
.page-header.has-image {
  position: relative;
  padding: 4.5rem 0;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.page-header.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(18,29,51,0.92) 0%, rgba(18,29,51,0.78) 45%, rgba(18,29,51,0.5) 100%);
}
.page-header.has-image .container { position: relative; z-index: 1; }
.page-header h1 { color: var(--paper); margin-bottom: 0.4rem; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.page-header .crumb { color: rgba(246,243,236,0.6); font-size: 0.85rem; }
.page-header .crumb a { color: rgba(246,243,236,0.75); }

/* ---------- Hero carousel (background image slider) ---------- */
.hero-carousel {
  position: relative;
  background: var(--indigo-deep);
}
.hero-carousel .carousel-item {
  height: 86vh;
  min-height: 540px;
  max-height: 820px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-carousel .slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(105deg, rgba(18,29,51,0.94) 0%, rgba(18,29,51,0.80) 38%, rgba(18,29,51,0.42) 72%, rgba(18,29,51,0.28) 100%);
}
.hero-carousel .slide-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 0 6rem;
}
.hero-carousel .slide-content .eyebrow-plain { color: var(--ochre-light); }
.hero-carousel h1 {
  color: var(--paper);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.1;
  max-width: 16ch;
  margin-bottom: 1.1rem;
}
.hero-carousel p.lead {
  color: rgba(246,243,236,0.85);
  font-size: 1.08rem;
  max-width: 46ch;
}
.hero-carousel .carousel-indicators {
  bottom: auto;
  top: 1.75rem;
  right: 0;
  left: auto;
  margin: 0 1.5rem 0 0;
  justify-content: flex-end;
  gap: 0.4rem;
  z-index: 3;
}
.hero-carousel .carousel-indicators [data-bs-target] {
  width: 26px;
  height: 3px;
  border: none;
  border-radius: 0;
  background-color: rgba(246,243,236,0.35);
  opacity: 1;
}
.hero-carousel .carousel-indicators .active { background-color: var(--ochre); }
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  width: 3.2rem;
  height: 3.2rem;
  top: auto;
  bottom: 1.75rem;
  border: 1px solid var(--line-on-dark);
  opacity: 1;
  background: rgba(18,29,51,0.4);
  z-index: 3;
}
.hero-carousel .carousel-control-prev { left: auto; right: 5.4rem; }
.hero-carousel .carousel-control-next { right: 1.5rem; }
.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
  width: 1.1rem;
  height: 1.1rem;
}
.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
  background: rgba(18,29,51,0.7);
  border-color: var(--ochre-light);
}
@media (max-width: 767px) {
  .hero-carousel .carousel-item { height: 78vh; min-height: 500px; }
  .hero-carousel .carousel-control-prev,
  .hero-carousel .carousel-control-next { display: none; }
  .hero-carousel .carousel-indicators { top: auto; bottom: 1.25rem; right: 1.25rem; }
}

/* Trust bar: overlaps the bottom edge of the carousel */
.trust-bar {
  position: relative;
  z-index: 4;
  margin-top: -5.5rem;
  margin-bottom: 2rem;
}
.trust-bar-inner {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 24px 48px rgba(18, 29, 51, 0.18);
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
}
@media (max-width: 991px) {
  .trust-bar-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575px) {
  .trust-bar-inner { grid-template-columns: 1fr; }
  .trust-bar { margin-top: -3.5rem; }
}
.trust-bar .manifest-mini {
  padding: 1.6rem 1.7rem;
  border-right: 1px solid var(--line);
  background: var(--indigo-deep);
  color: var(--paper);
}
@media (max-width: 991px) { .trust-bar .manifest-mini { grid-column: 1 / -1; border-right: none; border-bottom: 1px solid var(--line-on-dark); } }
.trust-bar .manifest-mini .stamp-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--ochre-light);
  border-bottom: 1px dashed var(--line-on-dark);
  padding-bottom: 0.5rem;
  margin-bottom: 0.6rem;
}
.trust-bar .manifest-mini dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1rem;
  font-size: 0.82rem;
  margin: 0;
}
.trust-bar .manifest-mini dt { color: rgba(246,243,236,0.6); }
.trust-bar .manifest-mini dd { margin: 0; text-align: right; }
.trust-bar .trust-stat {
  padding: 1.6rem 1.5rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.trust-bar .trust-stat:last-child { border-right: none; }
@media (max-width: 991px) { .trust-bar .trust-stat:nth-child(3) { border-right: none; } }
.trust-bar .trust-stat .num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--indigo-deep);
  line-height: 1;
}
.trust-bar .trust-stat .lbl { color: var(--ink-soft); font-size: 0.85rem; margin-top: 0.3rem; }

/* ---------- Continent motif images ---------- */
.continent-figure {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}
.continent-figure img {
  width: 100%;
  max-width: 380px;
  height: auto;
  display: block;
  filter: drop-shadow(0 22px 34px rgba(18, 29, 51, 0.28));
}
.continent-figure::before {
  content: "";
  position: absolute;
  inset: 8% 10%;
  background: radial-gradient(circle, rgba(193, 127, 42, 0.16), transparent 70%);
  z-index: 0;
}
.continent-figure img { position: relative; z-index: 1; }

.globe-figure {
  display: flex;
  justify-content: center;
  align-items: center;
}
.globe-figure img {
  width: 100%;
  max-width: 240px;
  height: auto;
  filter: drop-shadow(0 14px 24px rgba(18, 29, 51, 0.22));
}

/* ---------- CTA strip (bright gradient) ---------- */
.cta-strip {
  position: relative;
  background: linear-gradient(120deg, var(--indigo-deep) 0%, var(--indigo-bright) 100%);
  overflow: hidden;
}
.cta-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 30%, rgba(34, 199, 176, 0.25), transparent 55%);
  pointer-events: none;
}
.cta-strip .container { position: relative; z-index: 1; }

/* ---------- Designer credit ---------- */
.foot-bottom {
  flex-wrap: wrap;
}
.designer-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(246,243,236,0.65);
  text-decoration: none;
  font-size: 0.78rem;
  transition: opacity 0.15s ease, transform 0.15s ease;
  margin-left: auto;
  max-width: 100%;
  flex-shrink: 0;
}
.designer-credit:hover { opacity: 0.85; transform: translateY(-1px); }
.designer-credit .logo-pill {
  display: inline-flex;
  align-items: center;
  background: var(--paper);
  border-radius: 999px;
  padding: 0.3rem 0.85rem 0.3rem 0.3rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.22);
}
.designer-credit .logo-pill img {
  height: 26px;
  width: auto;
  display: block;
}
@media (max-width: 575px) {
  .designer-credit {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
}

/* ---------- Utility ---------- */
.text-ochre { color: var(--ochre) !important; }
.bg-indigo-deep { background: var(--indigo-deep) !important; }
.divider-vert { width: 1px; background: var(--line); }

/* ---------- Scroll reveal ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
}
.reveal {
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; }
  .reveal { transition: none; }
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ochre), var(--ochre-light));
  color: var(--indigo-deep);
  box-shadow: 0 10px 26px rgba(224, 138, 46, 0.38);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, bottom 0.2s ease;
  z-index: 60;
  cursor: pointer;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.back-to-top:hover { filter: brightness(1.06); transform: translateY(-3px) scale(1.03); }
.back-to-top svg { width: 1.2rem; height: 1.2rem; }

/* ---------- Icon badges (service cards) ---------- */
.icon-badge {
  width: 3rem;
  height: 3rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  background: rgba(34, 199, 176, 0.12);
  color: var(--teal);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.icon-badge svg { width: 1.4rem; height: 1.4rem; stroke-width: 1.8; }
.svc-card:hover .icon-badge {
  background: linear-gradient(135deg, var(--ochre), var(--ochre-light));
  color: var(--indigo-deep);
  transform: rotate(-4deg) scale(1.06);
}

/* ---------- Filter chips (experience page) ---------- */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.filter-chip {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}
.filter-chip:hover { border-color: var(--teal-bright); color: var(--teal); transform: translateY(-1px); }
.filter-chip.active {
  background: linear-gradient(135deg, var(--indigo-deep), var(--indigo-bright));
  border-color: transparent;
  color: var(--paper);
}
table.manifest tbody tr {
  transition: opacity 0.25s ease, transform 0.25s ease;
}
table.manifest tbody tr.is-hidden {
  display: none;
}
.filter-empty {
  display: none;
  padding: 2rem;
  text-align: center;
  color: var(--ink-soft);
}
.filter-empty.is-visible { display: block; }

/* ---------- Tabs (about page) ---------- */
.macom-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink-soft);
  font-weight: 600;
  padding: 0.7rem 1.1rem 0.7rem 0;
  margin-right: 1.2rem;
  border-radius: 0;
  background: transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.macom-tabs .nav-link:hover { color: var(--indigo-deep); }
.macom-tabs .nav-link.active {
  color: var(--indigo-deep);
  background: transparent;
  border-bottom-color: var(--ochre);
}
.macom-tabs { border-bottom: 1px solid var(--line); }
.tab-pane .ledger-list li {
  opacity: 0;
  transform: translateX(-8px);
  animation: tabItemIn 0.4s ease forwards;
}
@keyframes tabItemIn { to { opacity: 1; transform: translateX(0); } }
.tab-pane .ledger-list li:nth-child(1) { animation-delay: 0.02s; }
.tab-pane .ledger-list li:nth-child(2) { animation-delay: 0.07s; }
.tab-pane .ledger-list li:nth-child(3) { animation-delay: 0.12s; }
.tab-pane .ledger-list li:nth-child(4) { animation-delay: 0.17s; }
.tab-pane .ledger-list li:nth-child(5) { animation-delay: 0.22s; }
.tab-pane .ledger-list li:nth-child(6) { animation-delay: 0.27s; }
.tab-pane .ledger-list li:nth-child(7) { animation-delay: 0.32s; }
.tab-pane .ledger-list li:nth-child(8) { animation-delay: 0.37s; }
@media (prefers-reduced-motion: reduce) {
  .tab-pane .ledger-list li { opacity: 1; transform: none; animation: none; }
}

/* ---------- Hover lift for panel cards ---------- */
.office-card, .vm-panel { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.office-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(20,37,68,0.1); }

/* ---------- Contact toast ---------- */
#formStatus {
  font-size: 0.92rem;
  margin-top: 1rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
  border-radius: 4px;
  padding: 0 0.9rem;
}
#formStatus.success {
  color: #0B3B33;
  background: rgba(34, 199, 176, 0.18);
  max-height: 6rem;
  opacity: 1;
  margin-top: 1rem;
  padding: 0.7rem 0.9rem;
}
#formStatus.error {
  color: #4A0E0E;
  background: rgba(227, 134, 134, 0.22);
  max-height: 6rem;
  opacity: 1;
  margin-top: 1rem;
  padding: 0.7rem 0.9rem;
}
.char-counter {
  font-size: 0.75rem;
  color: rgba(246,243,236,0.55);
  text-align: right;
  margin-top: 0.3rem;
}
.char-counter.is-near-limit { color: var(--ochre-light); }

/* ---------- Scroll cue on hero ---------- */
.scroll-cue {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: rgba(246,243,236,0.75);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.scroll-cue .dot {
  width: 1px;
  height: 22px;
  background: linear-gradient(var(--ochre-light), transparent);
  animation: scrollCue 1.6s ease-in-out infinite;
}
@keyframes scrollCue {
  0% { transform: translateY(-6px); opacity: 0.2; }
  50% { opacity: 1; }
  100% { transform: translateY(10px); opacity: 0.2; }
}
@media (max-width: 767px) { .scroll-cue { display: none; } }
@media (prefers-reduced-motion: reduce) { .scroll-cue .dot { animation: none; } }
