/* =============================================================
   Arabian Link Technical Services LLC — company site
   Design language: Anthropic-style editorial layout, shared with
   the Aurogen Innovations design system: warm off-white ground,
   blue-black ink, blue-violet accent. Serif display (Fraunces) +
   grotesk body (Hanken Grotesk). No photography: all visuals are
   CSS / inline SVG.
   To re-theme, edit only the colour tokens below.
   ============================================================= */

/* ---------- Tokens ---------- */
:root {
  --ivory:       #F3F1EC;   /* page background (warm off-white) */
  --ivory-deep:  #E9E6DE;   /* alternating section background */
  --paper:       #FBFAF7;   /* cards / inputs */
  --ink:         #16181D;   /* primary text (blue-black) */
  --ink-soft:    #3E4149;   /* body text */
  --ink-faint:   #6B6E77;   /* muted / labels */
  --line:        rgba(22,24,29, 0.12);
  --line-strong: rgba(22,24,29, 0.24);
  --accent:      #1E5FD8;   /* Arabian Link blue */
  --accent-deep: #1A4FB0;   /* hover / links */
  --accent-wash: #DCE6FB;   /* tints */
  --warm-2:      #C98A4B;   /* sand: avatar / accent variety */

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans:  "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --wrap:      1180px;
  --wrap-tight: 780px;
  --gutter:    clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(4rem, 9vw, 8.5rem);
  --radius:    12px;
  --radius-sm: 8px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  color: var(--ink);
  font-weight: 460;
  line-height: 1.12;
  letter-spacing: -0.018em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.7rem); line-height: 1.04; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 1.6vw, 1.4rem); font-weight: 500; letter-spacing: -0.01em; }
h4 { font-family: var(--font-sans); font-size: 0.8rem; font-weight: 600;
     text-transform: uppercase; letter-spacing: 0.13em; color: var(--ink-faint); }

p { text-wrap: pretty; }
a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

strong { color: var(--ink); font-weight: 600; }

svg { display: block; }

::selection { background: var(--accent); color: var(--ivory); }

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

/* ---------- Utilities ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--tight { max-width: var(--wrap-tight); }

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

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-deep);
  display: inline-block;
  margin-bottom: 1.1rem;
}

.lead {
  font-size: clamp(1.15rem, 1.7vw, 1.35rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: min(46ch, 100%);
}

.muted { color: var(--ink-faint); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--ivory);
  --btn-bd: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); color: var(--btn-fg); }
.btn::after { content: "\2192"; font-weight: 400; transition: transform 0.2s var(--ease); }
.btn:hover::after { transform: translateX(3px); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line-strong);
}
.btn--ghost:hover { --btn-bg: rgba(22,24,29,0.05); }

.btn--accent { --btn-bg: var(--accent); --btn-fg: #fff; --btn-bd: var(--accent); }
.btn--accent:hover { --btn-bg: var(--accent-deep); --btn-bd: var(--accent-deep); }

.btn--sm { padding: 0.6rem 1.05rem; font-size: 0.9rem; }
.btn--sm::after { content: none; }

.btn--invert { --btn-bg: var(--ivory); --btn-fg: var(--ink); --btn-bd: var(--ivory); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }

/* ---------- Site header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--ivory) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark-mark {
  display: block;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.wordmark-mark svg,
.wordmark-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--ink); }
.site-nav a.btn,
.site-nav a.btn:hover { color: var(--btn-fg); }
.site-nav a:not(.btn)[aria-current="page"] { color: var(--ink); }
.site-nav a:not(.btn)[aria-current="page"]::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--accent);
  margin-top: 2px;
}

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  margin: 2px auto;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section--alt { background: var(--ivory-deep); }
.section--ink { background: var(--ink); color: rgba(244,241,234,0.72); border-top: 0; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--ivory); }
.section--ink .eyebrow { color: #8FB4F0; }
.section--accent { background: var(--accent); color: rgba(255,255,255,0.85); border-top: 0; }
.section--accent h1, .section--accent h2 { color: #fff; }
.section--accent .eyebrow { color: rgba(255,255,255,0.8); }

.section-head { max-width: 42rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head p { margin-top: 1rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(4rem, 11vw, 9rem) var(--section-y);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 430px); }
}
.hero-inner { max-width: 42ch; }
.hero-inner h1 { margin-bottom: 1.5rem; }
.hero-inner .lead { max-width: 44ch; }

/* ---------- Hero figure: animated line-art motifs ---------- */
.hero-figure { width: 100%; max-width: 430px; margin-inline: auto; }
.hero-figure svg { width: 100%; height: auto; color: var(--ink); overflow: visible; }
@media (max-width: 719px) { .hero-figure { display: none; } }

.hf-struct { stroke: currentColor; stroke-opacity: 0.4; }
.hf-accent { stroke: var(--accent); }
.hf-accent-fill { fill: var(--accent); }
.hf-panel { fill: var(--paper); stroke: currentColor; stroke-opacity: 0.4; }
.hf-label {
  fill: var(--ink-faint);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
}

@keyframes hf-spin  { to { transform: rotate(360deg); } }
@keyframes hf-flow  { to { stroke-dashoffset: -20; } }
@keyframes hf-led   { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes hf-rise1 { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(-42px); opacity: 0; } }
@keyframes hf-rise2 { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(-40px); opacity: 0; } }
@keyframes hf-pulse { 0%, 100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.18); opacity: 1; } }
@keyframes hf-scan  { 0% { transform: translateX(0); opacity: 0; } 10% { opacity: 0.5; } 90% { opacity: 0.5; } 100% { transform: translateX(272px); opacity: 0; } }

.hf-ring   { animation: hf-spin 24s linear infinite; transform-box: fill-box; transform-origin: center; }
.hf-flow   { stroke-dasharray: 3 6; animation: hf-flow 1s linear infinite; }
.hf-led    { animation: hf-led 2.6s ease-in-out infinite; }
.hf-rise1  { transform-box: fill-box; animation: hf-rise1 2.4s ease-in infinite; }
.hf-rise2  { transform-box: fill-box; animation: hf-rise2 2.4s ease-in infinite 1.2s; }
.hf-hub    { transform-box: fill-box; transform-origin: center; animation: hf-pulse 3s ease-in-out infinite; }
.hf-scan   { transform-box: fill-box; animation: hf-scan 4.5s ease-in-out infinite; }

/* ---------- Stat / capability band ---------- */
.stat-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: var(--ivory);
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.section--alt .stat { background: var(--ivory-deep); }
.stat-num {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.stat-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

/* ---------- Grids ---------- */
.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.grid > * { min-width: 0; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Feature (icon motif + copy) ---------- */
.feature-icon {
  width: 46px; height: 46px;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.feature h3 { margin-bottom: 0.5rem; }
.feature p { font-size: 0.98rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
a.card, .card--link { text-decoration: none; color: inherit; display: block; }
a.card:hover, .card--link:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 40px -22px rgba(22,24,29,0.35);
}
.card h3 { margin-bottom: 0.4rem; }
.card p { font-size: 0.96rem; }
.card-tag {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--ink-faint);
}

/* ---------- Icon checklist (service sub-points) ---------- */
.icon-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.icon-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.icon-list li::before {
  content: "";
  flex-shrink: 0;
  width: 6px; height: 6px;
  margin-top: 0.55em;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Value band (LINK core values) ---------- */
.value-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
}
.value-row:last-child { border-bottom: 1px solid var(--line); }
.value-letter {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: var(--accent);
  line-height: 1;
}
.value-row h3 { margin-bottom: 0.35rem; }
.value-row p { font-size: 0.96rem; }

/* ---------- Timeline (reused for profile "why choose us" numbering) ---------- */
.timeline { position: relative; margin-top: 1rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--line-strong);
}
.timeline-item {
  position: relative;
  padding-left: 2.75rem;
  padding-bottom: 2.75rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--ivory);
  border: 3px solid var(--accent);
}
.section--alt .timeline-item::before { background: var(--ivory-deep); }
.timeline-year {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--ink);
}
.timeline-item h3 { margin: 0.15rem 0 0.35rem; }
.timeline-item p { font-size: 0.98rem; max-width: 54ch; }

/* ---------- Profile summary table ---------- */
.profile-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}
.profile-meta div {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--line);
}
.profile-meta div:first-child { border-top: 0; }
.profile-meta dt {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.profile-meta dd { color: var(--ink); font-weight: 500; }

/* ---------- Quotes ---------- */
.quote {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.quote-text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--ink);
}
.quote-text::before { content: "\201C"; }
.quote-text::after  { content: "\201D"; }
.quote-attr { margin-top: 1rem; font-size: 0.9rem; color: var(--ink-faint); }
.quote-attr strong { display: block; color: var(--ink); font-family: var(--font-sans); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.form-field { margin-bottom: 1.25rem; }
.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.95rem;
}
.form-field textarea { min-height: 150px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.form-toast {
  display: none;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid #2E8B57;
  background: rgba(46,139,87,0.08);
  color: #1F6B41;
  font-size: 0.92rem;
}

.contact-detail { margin-bottom: 1.6rem; }
.contact-detail h4 { margin-bottom: 0.35rem; }
.contact-detail a, .contact-detail p { font-size: 0.98rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ivory-deep);
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 6vw, 5rem) 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}
.footer-brand p { font-size: 0.92rem; margin-top: 1rem; max-width: 32ch; }
.footer-col { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col h4 { margin-bottom: 0.4rem; }
.footer-col a { font-size: 0.92rem; color: var(--ink-soft); text-decoration: none; }
.footer-col a:hover { color: var(--ink); }
.footer-legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-faint);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid--2 { grid-template-columns: 1fr; gap: 2rem; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .profile-meta div { grid-template-columns: 1fr; gap: 0.25rem; }
}

@media (max-width: 640px) {
  .nav-toggle { display: grid; }
  .site-nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.5rem;
    transform: translateY(-120%);
    transition: transform 0.3s var(--ease);
  }
  .site-nav.is-open { transform: none; }
  .site-nav a { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a.btn { margin-top: 1rem; justify-content: center; border-bottom: 1px solid var(--ink); }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-legal { flex-direction: column; }
  .value-row { grid-template-columns: 40px minmax(0, 1fr); }
  .value-letter { font-size: 1.8rem; }
}

/* ---------- Motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hf-ring, .hf-flow, .hf-led, .hf-rise1, .hf-rise2, .hf-hub, .hf-scan {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .hf-scan { opacity: 0 !important; }
}
