/* ===========================================================================
   Sarago Mining Limited — shared shell and components
   ---------------------------------------------------------------------------
   The profile's visual grammar, turned into reusable parts:

     * a two-line section heading, white over amber ("Vision for / the Future")
     * pill labels ("Profile", "Contact")
     * cards either filled amber or outlined amber on the dark ground
     * outlined pill statements, as on the achievements page
     * a dot-grid motif in the corners

   Tokens live in variables.css. Nothing here hardcodes a colour.
   =========================================================================== */

/* --- Reset ---------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  background: var(--color-ink);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: var(--weight-light);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

/* The hidden attribute has to beat any display a component sets on itself.
   `.nav__dropdown-panel` sets `display: grid` for its layout, which silently
   outranks `hidden`'s `display: none` and left the services menu open on
   every page. Anything toggled with `hidden` — the apply and contact
   confirmations too — depends on this rule. */
[hidden] {
  display: none !important;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--color-amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

/* Visible focus everywhere, on the amber so it reads as part of the brand. */
:focus-visible {
  outline: 3px solid var(--color-amber);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: var(--z-dialog);
  padding: var(--space-3) var(--space-5);
  background: var(--color-amber);
  color: var(--color-on-amber);
  font-weight: var(--weight-semibold);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.skip-link:focus {
  top: 0;
}

/* --- Layout --------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section--deep {
  background: var(--color-ink-deep);
}

.grid {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 720px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 720px) and (max-width: 899px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Section heading ------------------------------------------------------
   The profile's signature: a white first line, an amber second. */

.heading {
  margin-bottom: var(--space-6);
}

.heading__eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-amber);
  margin-bottom: var(--space-4);
}

.heading__title {
  font-size: var(--text-4xl);
  font-weight: var(--weight-semibold);
}

.heading__title span {
  display: block;
  color: var(--color-amber);
}

.heading__lead {
  margin-top: var(--space-5);
  max-width: var(--max-prose);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.heading--centre {
  text-align: center;
}

.heading--centre .heading__lead {
  margin-inline: auto;
}

/* --- Pill label ------------------------------------------------------------ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
}

.pill--amber {
  background: var(--color-amber);
  color: var(--color-on-amber);
}

.pill--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  backdrop-filter: blur(6px);
}

/* An outlined pill statement, as the achievements page uses for its record. */
.pill-stat {
  display: block;
  padding: var(--space-4) var(--space-6);
  border: var(--border-card);
  border-radius: var(--radius-pill);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  text-align: center;
  transition: border-color var(--duration-base) var(--ease-out),
    background-color var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out);
}

.pill-stat:hover {
  border-color: var(--color-amber);
  background: var(--color-amber-soft);
  transform: translateX(6px);
}

/* --- Buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out),
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--color-amber);
  color: var(--color-on-amber);
}

.btn--primary:hover {
  background: var(--color-amber-dark);
  box-shadow: var(--shadow-amber);
}

.btn--ghost {
  border-color: var(--color-amber-line);
  color: var(--color-white);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--color-amber);
  background: var(--color-amber-soft);
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

/* --- Cards ----------------------------------------------------------------- */

.card {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  height: 100%;
  transition: transform var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

.card--outline {
  border: var(--border-card);
  background: var(--color-surface-glass);
}

.card--outline:hover {
  border-color: var(--color-amber);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.card--filled {
  background: var(--color-amber);
  color: var(--color-on-amber);
}

.card--filled:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-amber);
}

.card--filled .card__text {
  color: rgba(31, 32, 33, 0.82);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-amber);
  color: var(--color-on-amber);
  font-size: 28px;
}

.card--filled .card__icon {
  background: var(--color-ink);
  color: var(--color-amber);
}

.card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.card__text {
  color: var(--color-text-muted);
}

/* A card that leads with a photograph, as the "Why Choose us" page does. */
.card-photo {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: var(--border-card);
  background: var(--color-surface-glass);
  transition: transform var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.card-photo:hover {
  transform: translateY(-6px);
  border-color: var(--color-amber);
}

.card-photo__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-ink-raised);
}

.card-photo__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.card-photo:hover .card-photo__media img {
  transform: scale(1.06);
}

.card-photo__body {
  padding: var(--space-6);
}

.card-photo__title {
  font-size: var(--text-lg);
  color: var(--color-amber);
  margin-bottom: var(--space-3);
}

/* --- Dot motif -------------------------------------------------------------
   The profile scatters amber dot grids into its corners. Drawn rather than
   shipped as an image so it stays crisp and costs nothing. */

.dots {
  position: absolute;
  width: 180px;
  height: 180px;
  background-image: radial-gradient(var(--color-amber) 1.5px, transparent 1.6px);
  background-size: 18px 18px;
  opacity: 0.55;
  pointer-events: none;
}

.dots--tr {
  top: var(--space-7);
  right: var(--space-5);
}

.dots--br {
  bottom: var(--space-7);
  right: var(--space-5);
}

/* --- Navigation ------------------------------------------------------------ */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-nav);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: var(--nav-bg);
  color: var(--nav-text);
  box-shadow: 0 1px 0 var(--nav-hairline);
  transition: background-color var(--duration-base) var(--ease-out),
    height var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

.nav.is-scrolled,
.nav--solid {
  height: var(--nav-height-scrolled);
  background: var(--nav-bg-scrolled);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--nav-hairline), 0 8px 28px rgba(0, 0, 0, 0.32);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  width: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Sized in CSS only — an HTML height attribute would override this.
   The file is trimmed to the mark itself (534x336, no padding), so this
   height is the mark's real height, not a box it sits inside. */
.nav__logo img {
  height: 52px;
  width: auto;
  transition: height var(--duration-base) var(--ease-out);
}

.nav.is-scrolled .nav__logo img {
  height: 42px;
}

.nav__links {
  display: none;
  align-items: center;
  gap: var(--space-6);
  margin: 0;
}

.nav__link {
  position: relative;
  color: var(--nav-text);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.02em;
  padding-block: var(--space-2);
  white-space: nowrap;
}

/* The accent in the bar is the logo's purple, not the page's amber.
   Amber on #F5F5F6 is 1.9:1 and the darker amber only 2.9:1 — both below
   the 3:1 a UI mark needs — while the purple is 11.3:1 and is sitting
   right there in the logo beside it. */
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-purple);
  transition: width var(--duration-base) var(--ease-out);
}

.nav__link:hover::after,
.nav__link[aria-current="page"]::after {
  width: 100%;
}

.nav__link[aria-current="page"] {
  color: var(--color-purple);
  font-weight: var(--weight-semibold);
}

.nav__cta {
  display: none;
}

@media (min-width: 1040px) {
  .nav__links,
  .nav__cta {
    display: flex;
  }
}

/* Services dropdown. The close timer stops it snapping shut as the pointer
   crosses the gap between the trigger and the panel — do not simplify it. */
.nav__dropdown {
  position: relative;
}

.nav__dropdown-panel {
  position: absolute;
  top: calc(100% + var(--space-4));
  left: 50%;
  translate: -50% 0;
  min-width: 280px;
  padding: var(--space-3);
  background: var(--nav-bg);
  border: 1px solid var(--nav-hairline);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 2px;
}

.nav__dropdown-link {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  color: rgba(31, 32, 33, 0.78);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.nav__dropdown-link:hover {
  background: rgba(69, 37, 102, 0.08);
  color: var(--color-purple);
}

.nav__toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: none;
  color: var(--nav-text);
  border: 1px solid var(--nav-hairline);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 24px;
}

/* Hidden once the full menu fits.
   This MUST come after .nav__toggle's own display rule. The two have equal
   specificity, so the later one wins no matter what the media query says —
   with the order reversed the button sat in its bordered box beside the
   full desktop menu. */
@media (min-width: 1040px) {
  .nav__toggle {
    display: none;
  }
}

/* Mobile drawer */
.nav__drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(88vw, 400px);
  z-index: var(--z-menu);
  padding: var(--space-8) var(--space-6) var(--space-6);
  background: var(--color-ink-deep);
  border-left: 1px solid var(--color-hairline);
  translate: 100% 0;
  transition: translate var(--duration-base) var(--ease-out);
  overflow-y: auto;
}

.nav__drawer.is-open {
  translate: 0 0;
}

.nav__drawer-link {
  display: block;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-hairline);
  color: var(--color-white);
  text-decoration: none;
  font-size: var(--text-lg);
}

.nav__drawer-link--sub {
  padding-left: var(--space-5);
  font-size: var(--text-base);
  color: var(--color-text-muted);
}

.nav__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 28px;
}

.nav__scrim {
  position: fixed;
  inset: 0;
  z-index: var(--z-nav);
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}

.nav__scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* --- Page hero (inner pages) ----------------------------------------------- */

.page-hero {
  position: relative;
  padding-top: calc(var(--nav-height) + var(--space-8));
  padding-bottom: var(--space-8);
  overflow: hidden;
  isolation: isolate;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--scrim-left);
}

.page-hero__title {
  font-size: var(--text-4xl);
}

.page-hero__title span {
  display: block;
  color: var(--color-amber);
}

.page-hero__lead {
  margin-top: var(--space-5);
  max-width: var(--max-prose);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

/* Breadcrumbs */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-dim);
}

.crumbs a {
  color: var(--color-text-dim);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--color-amber);
}

/* --- Footer ---------------------------------------------------------------- */

.footer {
  background: var(--color-ink-deep);
  border-top: 1px solid var(--color-hairline);
  padding-block: var(--space-8) var(--space-6);
}

.footer__grid {
  display: grid;
  gap: var(--space-7);
  margin-bottom: var(--space-7);
}

@media (min-width: 720px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

@media (min-width: 1040px) {
  .footer__grid {
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  }
}

.footer__logo img {
  height: 56px;
  width: auto;
  margin-bottom: var(--space-5);
}

.footer__tagline {
  color: var(--color-text-muted);
  max-width: 34ch;
}

.footer__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-amber);
  margin-bottom: var(--space-5);
}

.footer__list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
}

.footer__list a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
}

.footer__list a:hover {
  color: var(--color-amber);
}

.footer__contact {
  display: grid;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.footer__contact-row {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.footer__contact-row i {
  color: var(--color-amber);
  font-size: 20px;
  flex-shrink: 0;
}

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

.footer__contact a:hover {
  color: var(--color-amber);
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-hairline);
  font-size: var(--text-xs);
  color: var(--color-text-dim);
}

.footer__base a {
  color: var(--color-text-dim);
  text-decoration: none;
}

.footer__base a:hover {
  color: var(--color-amber);
}

/* --- WhatsApp float --------------------------------------------------------- */

.whatsapp {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: var(--z-nav);
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  background: #25d366;
  color: #fff;
  font-size: 30px;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform var(--duration-base) var(--ease-out);
}

.whatsapp:hover {
  transform: scale(1.08);
}

/* --- Forms ------------------------------------------------------------------ */

.field {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.field__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.field__label .req {
  color: var(--color-amber);
}

.field__input,
.field__textarea,
.field__select {
  width: 100%;
  padding: var(--space-4);
  background: var(--color-surface-glass);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-md);
  color: var(--color-white);
  font-weight: var(--weight-light);
  transition: border-color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

.field__input:focus,
.field__textarea:focus,
.field__select:focus {
  border-color: var(--color-amber);
  background: rgba(255, 255, 255, 0.06);
}

.field__input::placeholder,
.field__textarea::placeholder {
  color: var(--color-text-dim);
}

.field__textarea {
  min-height: 150px;
  resize: vertical;
}

.field__hint {
  font-size: var(--text-xs);
  color: var(--color-text-dim);
}

.field__error {
  font-size: var(--text-xs);
  color: #ff8a7a;
  min-height: 1em;
}

.field.has-error .field__input,
.field.has-error .field__textarea {
  border-color: #ff8a7a;
}

/* The honeypot. Hidden with CSS, never with the hidden attribute or
   type="hidden" — a bot reads the markup, not the stylesheet. */
.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

.form-note--ok {
  background: var(--color-amber-soft);
  border: 1px solid var(--color-amber-line);
}

.form-note--bad {
  background: rgba(255, 138, 122, 0.1);
  border: 1px solid rgba(255, 138, 122, 0.45);
}

/* --- Action row -------------------------------------------------------------
   A row of buttons under a heading. Shared by the home hero, the page heroes
   and the closing call, so it lives here rather than in a page stylesheet. */

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-7);
}

/* --- Achievements -------------------------------------------------------------
   The profile's record, shown on the home page, the about page and every
   service page. */

.achievements {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.achievements__bg {
  position: absolute;
  inset: 0 0 auto 0;
  height: 62%;
  z-index: -2;
}

.achievements__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.achievements::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--scrim-bottom);
}

.achievements__inner {
  display: grid;
  gap: var(--space-7);
  padding-top: clamp(6rem, 18vw, 14rem);
}

@media (min-width: 900px) {
  .achievements__inner {
    grid-template-columns: 1fr 1.05fr;
    align-items: center;
    gap: var(--space-8);
  }
}

.achievements__list {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .achievements__list--wide {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Closing call --------------------------------------------------------- */

.cta {
  padding-block: var(--section-y);
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(255, 165, 31, 0.16) 0%, transparent 60%),
    var(--color-ink-deep);
  border-top: 1px solid var(--color-hairline);
  text-align: center;
}

.cta__inner {
  max-width: 720px;
  margin-inline: auto;
}

.cta__title {
  font-size: var(--text-3xl);
}

.cta__text {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

.cta .hero__actions {
  justify-content: center;
}

/* --- Prose ------------------------------------------------------------------ */

.prose p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  max-width: var(--max-prose);
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose--wide {
  font-size: var(--text-lg);
}

/* --- Scroll reveal ----------------------------------------------------------
   Progressive: without JS, or with reduced motion, everything is simply
   visible. The class is only ever added by main.js. */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ===========================================================================
   Interface polish — ui.js builds these; the markup is not in the pages.
   =========================================================================== */

/* --- Reading progress ------------------------------------------------------ */

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: calc(var(--z-nav) + 1);
  height: 3px;
  background: linear-gradient(90deg, var(--color-purple), var(--color-amber));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* --- Back to top ------------------------------------------------------------ */

.to-top {
  position: fixed;
  right: var(--space-5);
  /* Above the WhatsApp float, which owns the bottom-right corner. */
  bottom: calc(var(--space-5) + 56px + var(--space-3));
  z-index: var(--z-nav);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-amber-line);
  border-radius: var(--radius-pill);
  background: rgba(31, 32, 33, 0.82);
  backdrop-filter: blur(8px);
  color: var(--color-amber);
  font-size: 22px;
  cursor: pointer;
  opacity: 0;
  translate: 0 12px;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out),
    translate var(--duration-base) var(--ease-out),
    background-color var(--duration-base) var(--ease-out);
}

.to-top.is-visible {
  opacity: 1;
  translate: 0 0;
  pointer-events: auto;
}

.to-top:hover {
  background: var(--color-amber);
  color: var(--color-on-amber);
}

/* --- Gallery trigger --------------------------------------------------------- */

.gallery__trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  cursor: zoom-in;
}

.gallery__zoom {
  position: absolute;
  right: var(--space-2);
  bottom: var(--space-2);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: rgba(31, 32, 33, 0.78);
  color: var(--color-amber);
  font-size: 18px;
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
}

.gallery__trigger:hover .gallery__zoom,
.gallery__trigger:focus-visible .gallery__zoom {
  opacity: 1;
}

/* --- Lightbox ----------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-dialog);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-6);
  background: rgba(10, 10, 11, 0.94);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
}

.lightbox.is-open {
  opacity: 1;
}

.lightbox__figure {
  margin: 0;
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  scale: 0.98;
  transition: scale var(--duration-base) var(--ease-out);
}

.lightbox.is-open .lightbox__figure {
  scale: 1;
}

.lightbox__image {
  width: auto;
  max-width: 100%;
  max-height: 76vh;
  margin-inline: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox__caption {
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.lightbox__close,
.lightbox__nav {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-white);
  font-size: 24px;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: var(--color-amber);
  border-color: var(--color-amber);
  color: var(--color-on-amber);
}

.lightbox__close {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
}

@media (max-width: 640px) {
  .lightbox__nav {
    position: absolute;
    bottom: var(--space-6);
  }
  .lightbox__nav--prev { left: var(--space-6); }
  .lightbox__nav--next { right: var(--space-6); }
}

/* --- Character counter ---------------------------------------------------------- */

.field__count {
  display: block;
  text-align: right;
  font-size: var(--text-xs);
  color: var(--color-text-dim);
  font-variant-numeric: tabular-nums;
}

.field__count.is-near {
  color: var(--color-amber);
}

/* --- Print -----------------------------------------------------------------------
   A vacancy or a contact page is a thing people print and take to a meeting.
   Strip the furniture, put the ink back on white, and spell out link targets. */

@media print {
  .nav,
  .nav__drawer,
  .nav__scrim,
  .whatsapp,
  .to-top,
  .scroll-progress,
  .lightbox,
  .hero__actions,
  .cta,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .page-hero,
  .hero,
  .vacancy-head {
    padding-top: 0;
    background: none;
  }

  .page-hero__bg,
  .hero__bg,
  .achievements__bg,
  .services-home__bg {
    display: none;
  }

  .heading__title span,
  .heading__eyebrow,
  .card__title {
    color: #000;
  }

  .card,
  .pill-stat,
  .vacancy {
    border: 1px solid #999;
    break-inside: avoid;
  }

  a[href^="http"]::after,
  a[href^="mailto"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    word-break: break-all;
  }
}
