/* Control Expertise link page (v4): one centred card, laser-made logo (reverse artwork on navy), laser-cutter background.
   Dark only, on purpose (like the reference). Tokens: docs/design/tokens-dark.json (contrast-checked). */

@font-face { font-family: "Plex"; src: url("fonts/plex-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url("fonts/plex-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("fonts/plex-arabic-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("fonts/plex-arabic-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #001E3B;
  --bg-2: #0B3558;
  --surface: #062843;
  --line: rgba(255, 255, 255, .14);
  --line-strong: rgba(255, 255, 255, .38);
  --text: #F3F6F9;
  --text-muted: #B4C3D3;
  --accent: #BAAE00;
  --accent-hover: #CDC012;
  --accent-text: #D9CC2E;
  --on-accent: #001E3B;
  --focus: #E6DA4A;
    --tbc-bg: #FFE600;
  --tbc-text: #000000;

  --font: "Plex", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ar: "Plex Arabic", "Plex", "Segoe UI", Tahoma, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(120% 70% at 50% 30%, var(--bg-2) 0%, var(--bg) 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
:root[lang="ar"] body { font-family: var(--font-ar); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 16px; top: -100px; z-index: 10; background: var(--accent); color: var(--on-accent); padding: 8px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 16px; }

/* laser-cutter background */
.bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: .8; }

/* the card */
.card {
  flex: 1;
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding-block: max(28px, env(safe-area-inset-top, 0px)) 28px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  text-align: center;
}

/* logo (reverse artwork straight on the navy) + laser canvas, which overhangs the logo by 16px for the sparks */
.plate {
  position: relative;
  width: min(100%, 300px);
  margin-top: 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.plate img { width: 100%; height: auto; transition: opacity 300ms var(--ease); }
.plate__fx { position: absolute; inset: -16px; width: calc(100% + 32px); height: calc(100% + 32px); pointer-events: none; transition: opacity 300ms var(--ease); }
html.js .plate img { opacity: 0; }
html.js .plate.is-engraved img { opacity: 1; }
.plate.is-engraved .plate__fx { opacity: 0; }

/* tagline (typed after the engraving) */
.tagline {
  position: relative;
  min-height: 2.6em;
  font-size: .8125rem; line-height: 1.3rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
}
.tagline__a { color: var(--text); }
.tagline__b { color: var(--accent-text); }
.tagline__a, .tagline__b { display: block; }
.tagline__type { display: inline-block; }
:root[lang="ar"] .tagline { font-size: 1rem; line-height: 1.6rem; letter-spacing: 0; text-transform: none; }
.caret { display: inline-block; width: 2px; height: 1em; margin-inline-start: 3px; vertical-align: -2px; background: var(--accent-text); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* divider */
.divider { width: 100%; display: flex; align-items: center; gap: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
.divider span { width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); }

/* primary action */
.cta {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  background: var(--accent); color: var(--on-accent);
  border-radius: 10px;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: background-color 150ms var(--ease), transform 150ms var(--ease);
}
.cta svg { width: 20px; height: 20px; }

/* soft gold glow on the buttons; it breathes slowly (opacity of a pseudo-element only, cheap to animate) */
.cta, .ico { position: relative; isolation: isolate; }
.cta::after, .ico::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  opacity: .55; animation: glow 3.2s ease-in-out infinite alternate;
}
.cta::after { box-shadow: 0 0 22px -2px rgba(214, 200, 40, .75), 0 0 6px rgba(214, 200, 40, .35); }
.ico::after { box-shadow: 0 0 14px rgba(217, 204, 46, .45), inset 0 0 10px rgba(217, 204, 46, .14); }
.icons li:nth-child(2n) .ico::after { animation-delay: -1.1s; }
.icons li:nth-child(3n) .ico::after { animation-delay: -2.2s; }
@keyframes glow { from { opacity: .35; } to { opacity: .9; } }
.cta:hover { background: var(--accent-hover); }
.cta:active { transform: translateY(1px); }

/* round icons */
.icons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.ico {
  position: relative;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text); background: rgba(0, 30, 59, .55);
  border: 1px solid rgba(217, 204, 46, .42);
  transition: border-color 150ms var(--ease), box-shadow 220ms var(--ease), transform 150ms var(--ease);
}
.ico svg { width: 20px; height: 20px; }
a.ico:hover { border-color: var(--accent-text); box-shadow: 0 0 0 3px rgba(217, 204, 46, .18), 0 0 18px -2px rgba(217, 204, 46, .45); transform: translateY(-2px); }
.ico.is-pending { cursor: default; }
.icons:has(> li:nth-child(7)) { max-width: 228px; } /* seven or eight icons wrap as 4 + 3, not 6 + 1 */

/* small phones: the six icons stay on one row down to 360px */
@media (max-width: 380px) {
  .card { gap: 18px; }
  .icons { gap: 8px; }
  .ico { width: 44px; height: 44px; }
  .icons:has(> li:nth-child(7)) { max-width: 200px; }
  .plate { width: min(100%, 260px); }
}
@media (max-width: 340px) {
  .icons { max-width: 160px; column-gap: 14px; row-gap: 12px; } /* six icons wrap as 3 + 3, not 5 + 1 */
  .icons:has(> li:nth-child(7)) { max-width: 218px; } /* seven: 4 + 3 */
}
@media (max-height: 680px) {
  .plate { width: min(100%, 240px); }
  .card { gap: 16px; padding-block: 12px 20px; }
}

.footer {
  padding-block: 0 max(20px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  font-size: .75rem; color: var(--text-muted);
}
.noscript { color: var(--text-muted); }

/* About page (about.html): same card, a little more text */
.about { gap: 20px; }
.about .plate { width: min(100%, 190px); cursor: default; }
.about h1 { font-size: 1.375rem; line-height: 1.75rem; font-weight: 600; }
.lead { color: var(--text-muted); font-size: .9375rem; line-height: 1.6; }
.sect { width: 100%; text-align: start; }
.sect h2 { margin: 0 0 10px; font-size: .75rem; line-height: 1rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }
.svc { display: grid; gap: 8px; }
.svc li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; line-height: 1.4; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 30, 59, .45); }
.svc li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: .45em; background: var(--accent); transform: rotate(45deg); }
.svc small { display: block; margin-top: 2px; font-size: .8125rem; color: var(--text-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 12px; font-size: .8125rem; color: var(--text-muted); border: 1px solid var(--line-strong); border-radius: 999px; }
.cta--ghost { background: transparent; color: var(--text); border: 1px solid rgba(217, 204, 46, .42); }
.cta--ghost:hover { background: rgba(217, 204, 46, .08); }
.cta--ghost::after { opacity: .35; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: .875rem; color: var(--text-muted); text-decoration: none; }
.back svg { width: 18px; height: 18px; }
.back:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .caret { display: none; }
}
