/* ============================================================================
 * components.css — Reusable component styles
 * ----------------------------------------------------------------------------
 * Consumes design tokens from tokens.css and primitives from base.css.
 * Organized by component group; navigate with the `=== ... ===` banners.
 *
 * State conventions:
 *   .is-visible | .open | .scrolled | .hidden  — runtime state flips set by
 *   main.js. Components define both the resting and the state-applied
 *   visuals.
 * ========================================================================== */


/* === Site header & navigation ============================================
 * Sticky translucent bar. Adds .scrolled past 8px and .hidden when
 * scrolling down past 80px (see main.js → initStickyHeader).
 * ------------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  background: rgba(11, 31, 58, 0.72);
  border-bottom: 1px solid var(--color-border);
  transform: translateY(0);
  transition:
    transform var(--dur-base) var(--ease),
    background var(--dur-base) var(--ease),
    box-shadow var(--dur-base) var(--ease);
  will-change: transform;
}
.site-header.scrolled {
  background: rgba(11, 31, 58, 0.92);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.site-header.scrolled .site-navigation { padding-block: var(--s-2); }
.site-header.scrolled .site-brand img { height: 44px; width: 44px; }
@media (min-width: 960px) {
  .site-header.scrolled .site-brand img { height: 56px; width: 56px; }
}
.site-header.hidden { transform: translateY(-100%); }

.site-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  padding-block: var(--s-4);
  /* Animate the collapse so .scrolled padding change isn't a snap. */
  transition: padding-block var(--dur-base) var(--ease);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: var(--fs-20);
  letter-spacing: 0.02em;
}
/* Brand mark transitions size in lockstep with the header collapse. */
.site-brand img {
  height: 64px;
  width: 64px;
  transition:
    height var(--dur-base) var(--ease),
    width var(--dur-base) var(--ease);
}
.site-brand-name { display: none; }
@media (min-width: 720px) { .site-brand-name { display: inline; } }
@media (min-width: 960px) { .site-brand img { height: 110px; width: 110px; } }

.primary-nav-list {
  display: none;
  list-style: none;
  margin: 0; padding: 0;
  gap: var(--s-2);
}
.primary-nav-list li { margin: 0; }
.primary-nav-list a {
  display: inline-block;
  padding: var(--s-2) var(--s-4);
  color: var(--color-text);
  font-size: var(--fs-14);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius-pill);
  transition:
    background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease);
}
.primary-nav-list a:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.04);
}
.primary-nav-list a[aria-current="page"] {
  color: var(--color-white);
  background: rgba(201, 168, 76, 0.12);
  box-shadow: inset 0 0 0 1px var(--color-border-strong);
}
@media (min-width: 880px) { .primary-nav-list { display: flex; } }

.navigation-tools {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}


/* === Language switcher ===================================================
 * Pill button + dropdown menu of <a> links to /coming-soon/:lang.
 * Open state toggled in main.js → initLanguageSwitchers.
 * ------------------------------------------------------------------------ */
.language-switcher { position: relative; }

.language-switcher-button {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text);
  font-size: var(--fs-12);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid var(--color-border);
  transition:
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease);
}
.language-switcher-button:hover {
  color: var(--color-white);
  border-color: var(--color-border-strong);
  background: rgba(255, 255, 255, 0.04);
}
.language-switcher-button svg { transition: transform var(--dur-fast) var(--ease); }
.language-switcher.open .language-switcher-button svg { transform: rotate(180deg); }

.language-switcher-menu {
  position: absolute;
  top: calc(100% + var(--s-2));
  right: 0;
  min-width: 160px;
  list-style: none;
  margin: 0;
  padding: var(--s-2);
  background: rgba(11, 31, 58, 0.96);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: none;
  z-index: 60;
}
.language-switcher.open .language-switcher-menu { display: block; }
.language-switcher-menu li { margin: 0; }
.language-switcher-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  font-size: var(--fs-14);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.language-switcher-menu a:hover {
  background: rgba(201, 168, 76, 0.12);
  color: var(--color-white);
}


/* === Mobile navigation ===================================================
 * Hamburger button shown below 880px; toggles .mobile-navigation .open.
 * ------------------------------------------------------------------------ */
.mobile-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.mobile-nav-toggle:hover {
  color: var(--color-white);
  border-color: var(--color-border-strong);
}
@media (min-width: 880px) { .mobile-nav-toggle { display: none; } }

.mobile-navigation {
  display: none;
  border-top: 1px solid var(--color-border);
  padding-block: var(--s-3);
}
.mobile-navigation.open { display: block; }
.mobile-navigation ul {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: var(--s-1);
}
.mobile-navigation a {
  display: block;
  padding: var(--s-3) var(--s-2);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.mobile-navigation a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-white);
}


/* === Buttons =============================================================
 * .button         — solid accent (primary CTA).
 * .button-ghost   — outlined transparent (secondary CTA).
 * .action-row     — flex container for stacking 2-3 buttons inline.
 * ------------------------------------------------------------------------ */
.button {
  --bg: var(--color-accent);
  --fg: var(--brand-bg-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-6);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--fg);
  font-weight: 600;
  font-size: var(--fs-14);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition:
    background var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
  box-shadow: 0 6px 18px rgba(201, 168, 76, 0.18);
}
.button:hover {
  background: var(--color-accent-hover);
  color: var(--brand-bg-primary);
  transform: translateY(-1px);
}
.button:active { transform: translateY(0); }

.button-ghost {
  --bg: transparent;
  --fg: var(--color-white);
  border-color: var(--color-border-strong);
  box-shadow: none;
}
.button-ghost:hover {
  background: rgba(201, 168, 76, 0.08);
  color: var(--color-white);
}

.action-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-6);
}
.action-row .button {
  padding: var(--s-3) var(--s-5);
  font-size: var(--fs-12);
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex: 0 1 auto;
}
@media (max-width: 720px) {
  .action-row { flex-wrap: wrap; }
  .action-row .button { flex: 1 1 auto; }
}


/* === Hero =================================================================
 * Top section on homepage. Decorative slow-spinning brand mark sits to the
 * right behind the copy. Disabled under prefers-reduced-motion.
 * ------------------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(60px, 8vw, 80px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 320px at 90% 10%, rgba(201, 168, 76, 0.18), transparent 60%),
    radial-gradient(900px 420px at 10% 90%, rgba(22, 60, 106, 0.55), transparent 60%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }

.hero-background-mark {
  position: absolute;
  top: 50%;
  right: 0;
  left: auto;
  width: min(110vmin, 1200px);
  height: auto;
  max-width: none;
  background: transparent;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
  transform-origin: 50% 50%;
  animation: heroBackgroundSpin 120s linear infinite;
  will-change: transform;
}
@keyframes heroBackgroundSpin {
  from { transform: translateY(-50%) rotate(0deg); }
  to   { transform: translateY(-50%) rotate(360deg); }
}
@media (max-width: 720px) {
  .hero-background-mark { right: -30%; width: 130vmin; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-background-mark { animation: none; transform: translateY(-50%); }
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-10);
  align-items: center;
}


/* === Cards & grid =========================================================
 * .grid + .grid-2/3/4 — responsive equal-column grids.
 * .card               — bordered surface with hover lift.
 * .service-card-number — large gold numeral above a card title.
 * ------------------------------------------------------------------------ */
.grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
}
@media (min-width: 720px)  { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1080px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  position: relative;
  padding: var(--s-6);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition:
    border-color var(--dur-base) var(--ease),
    transform var(--dur-base) var(--ease),
    background var(--dur-base) var(--ease);
}
.card:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(201, 168, 76, 0.05), rgba(255, 255, 255, 0));
}
.service-card-number {
  font-family: var(--font-display);
  font-size: var(--fs-32);
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--s-3);
}
.card h3 { margin-bottom: var(--s-2); }
.card p,
.card ul { color: var(--color-text); }


/* === Value pillars strip =================================================
 * Four-up "Originate / Structure / Implement / Scale" row on the homepage.
 * ------------------------------------------------------------------------ */
.value-pillars {
  border-block: 1px solid var(--color-border);
  background: linear-gradient(180deg, rgba(22, 60, 106, 0.35), rgba(11, 31, 58, 0.35));
}
.value-pillars-grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
  padding-block: var(--s-10);
}
@media (min-width: 720px) { .value-pillars-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .value-pillars-grid { grid-template-columns: repeat(4, 1fr); } }
.value-pillar-title {
  font-family: var(--font-display);
  font-size: var(--fs-40);
  color: var(--color-white);
  line-height: 1;
}
.value-pillar-caption {
  color: var(--color-text-muted);
  font-size: var(--fs-14);
  margin-top: var(--s-2);
}


/* === Call-to-action banner ===============================================
 * Heading + copy on the left, CTA buttons on the right (stacks on mobile).
 * ------------------------------------------------------------------------ */
.action-banner {
  border: 1px solid var(--color-border-strong);
  background:
    radial-gradient(600px 260px at 20% 0%, rgba(201, 168, 76, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(22, 60, 106, 0.6), rgba(11, 31, 58, 0.6));
  border-radius: var(--radius-lg);
  padding: clamp(var(--s-8), 4vw, var(--s-12));
  display: grid;
  gap: var(--s-6);
  align-items: center;
}
@media (min-width: 880px) {
  .action-banner { grid-template-columns: 1.4fr auto; }
}


/* === Site footer ========================================================== */
.site-footer {
  margin-top: var(--s-16);
  border-top: 1px solid var(--color-border);
  background: linear-gradient(180deg, rgba(12, 21, 32, 0), rgba(12, 21, 32, 0.6));
}
.footer-grid {
  display: grid;
  gap: var(--s-8);
  grid-template-columns: 1fr;
  padding-block: var(--s-12);
}
@media (min-width: 880px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}
.footer-grid h4 {
  color: var(--color-white);
  margin-bottom: var(--s-3);
  font-size: var(--fs-14);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.footer-grid a { color: var(--color-text); }
.footer-grid a:hover { color: var(--color-accent-hover); }
.footer-list {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: var(--s-2);
}
.footer-bottom {
  padding-block: var(--s-5);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  justify-content: space-between;
  color: var(--color-text-muted);
  font-size: var(--fs-12);
}


/* === Contact form =========================================================
 * .contact-form         — outer form wrapper (single grid column).
 * .form-field           — label + input pair.
 * .form-row-pair        — two fields side-by-side on tablet+.
 * .form-status-message  — inline ok/err feedback (revealed by main.js).
 * ------------------------------------------------------------------------ */
.contact-form {
  display: grid;
  gap: var(--s-4);
  background: rgba(12, 21, 32, 0.55);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--s-6), 3vw, var(--s-10));
}
.form-field { display: grid; gap: var(--s-2); }
.form-field label {
  font-size: var(--fs-12);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 600;
}
.required-mark {
  color: var(--color-accent);
  margin-left: 2px;
  font-weight: 700;
}
.form-required-note {
  margin: 0 0 var(--s-2);
  font-size: var(--fs-12);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}
.form-field input,
.form-field select,
.form-field textarea {
  background: rgba(11, 31, 58, 0.55);
  color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--s-3) var(--s-4);
  font: inherit;
  transition:
    border-color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease);
}
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(240, 232, 216, 0.35);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--color-accent);
  background: rgba(11, 31, 58, 0.85);
}
.form-field textarea { min-height: 140px; resize: vertical; }

.form-row-pair {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .form-row-pair { grid-template-columns: 1fr 1fr; }
}

.form-status-message {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius-md);
  font-size: var(--fs-14);
  display: none;
}
.form-status-message.show { display: block; }
.form-status-message.ok {
  background: rgba(76, 201, 130, 0.12);
  color: #B6E7C9;
  border: 1px solid rgba(76, 201, 130, 0.3);
}
.form-status-message.err {
  background: rgba(217, 90, 90, 0.12);
  color: #F2BABA;
  border: 1px solid rgba(217, 90, 90, 0.3);
}


/* === Info card ============================================================
 * Sidekick to the contact form: company / location / email definitions.
 * ------------------------------------------------------------------------ */
.info-card {
  background: linear-gradient(180deg, rgba(22, 60, 106, 0.5), rgba(11, 31, 58, 0.5));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--s-6), 3vw, var(--s-10));
  display: grid;
  gap: var(--s-4);
}
.info-card dt {
  font-size: var(--fs-12);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--s-1);
}
.info-card dd {
  margin: 0;
  color: var(--color-white);
  font-size: var(--fs-18);
}


/* === Checklist ============================================================
 * Replaces default <ul> bullets with a short gold rule, for value lists.
 * ------------------------------------------------------------------------ */
.checklist {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: var(--s-3);
}
.checklist li {
  position: relative;
  padding-left: var(--s-8);
  color: var(--color-text);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 18px; height: 1px;
  background: var(--color-accent);
}


/* === Page intro ===========================================================
 * Title section at the top of about / services / partners / contact.
 * ------------------------------------------------------------------------ */
.page-intro {
  padding-block: clamp(60px, 7vw, 80px);
  border-bottom: 1px solid var(--color-border);
}
.page-intro h1 { max-width: 22ch; }
.page-intro .lead-text { margin-top: var(--s-4); }


/* === Scroll reveal ========================================================
 * Elements start invisible and slide into place when entering the viewport.
 * The .is-visible class is applied by main.js → initScrollReveal via
 * IntersectionObserver. Falls back to visible if IO is unsupported.
 * ------------------------------------------------------------------------ */
.scroll-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity var(--dur-slow) var(--ease),
    transform var(--dur-slow) var(--ease);
}
.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
