/* ============================================================
   LoopLink Consulting: dune-at-dusk edition
   Pixel display type + boxed glass chrome over the dunes
   ============================================================ */

@font-face {
  font-family: 'Silkscreen';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/Silkscreen-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2191, U+2193;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/SpaceGrotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F;
}

:root {
  --bg: #0f1113;
  --panel: rgba(18, 21, 20, 0.6);
  --panel-solid: rgba(20, 23, 20, 0.92);
  --border: rgba(255, 255, 255, 0.14);
  --border-soft: rgba(255, 255, 255, 0.12);
  --rule: rgba(255, 255, 255, 0.10);
  --text-body: #a9aeaa;
  --text-sub: #c3c8c4;
  --text-strip: #b7bcb7;
  --text-dim: #7e847f;
  --blue: #9edbf7;
  --blue-deep: #2a78d6;
  --red: #f2a5a2;
  --red-deep: #d64541;
  --pixel: 'Silkscreen', monospace;
  --body: Helvetica, Arial, sans-serif;
  --glass-blur: blur(12px) saturate(1.15);
  --scanlines: repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 4px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--body);
  overflow-x: hidden;
}

::selection { background: rgba(158, 219, 247, 0.3); color: #fff; }

/* ============================================================
   Dune-at-dusk backdrop (fixed; sections slide over it)
   ============================================================ */

.dusk {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg);
}

.dune-bg {
  position: absolute;
  inset: -6% 0 0 0;
  height: 112%;
  background: url('assets/dune-bg.jpg') center 62% / cover no-repeat;
  will-change: transform;
}

.dune-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 16, 0.18);
}

#starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Sand drift layer: sits above content, subtle and pointer-transparent */
#sandfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  pointer-events: none;
}

/* ============================================================
   Glass recipes
   ============================================================ */

.glass {
  background: var(--panel-solid);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  position: relative;
}
.glass::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--scanlines);
  pointer-events: none;
  opacity: 0.7;
}

.glass-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 18px 50px rgba(0, 0, 0, 0.35);
}

/* Glass plates behind headline words */
.plate {
  display: inline-block;
  padding: 2px 16px 7px;
  border-radius: 6px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  position: relative;
}
.plate::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 6px;
  background: var(--scanlines);
  pointer-events: none;
}
.plate-blue {
  color: var(--blue);
  background: linear-gradient(180deg, rgba(158, 219, 247, 0.18), rgba(158, 219, 247, 0.05));
  border: 1px solid rgba(158, 219, 247, 0.38);
  text-shadow: 0 0 20px rgba(130, 205, 245, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 30px rgba(42, 120, 214, 0.28);
}
.plate-red {
  color: var(--red);
  background: linear-gradient(180deg, rgba(240, 163, 163, 0.18), rgba(240, 163, 163, 0.05));
  border: 1px solid rgba(240, 163, 163, 0.4);
  text-shadow: 0 0 20px rgba(230, 100, 95, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 30px rgba(214, 69, 65, 0.28);
}

/* Headline separator: the two-link glyph stands in for the comma */
.comma { display: none; }
.sep-link {
  display: inline-flex;
  align-items: center;
  margin-left: 0.32em;
  vertical-align: baseline;
}
.sep-link i {
  display: block;
  width: 0.62em; height: 0.48em;
  border-radius: 0.18em;
  border: 0.09em solid rgba(158, 219, 247, 0.85);
  box-shadow: 0 0 0.36em rgba(130, 205, 245, 0.4);
}
.sep-link .sep-b {
  margin-left: -0.22em;
  border-color: rgba(240, 163, 163, 0.85);
  box-shadow: 0 0 0.36em rgba(230, 100, 95, 0.4);
}

/* ============================================================
   Boxed chrome: logo + nav
   ============================================================ */

.chrome {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 50px 0;
  pointer-events: none;
  transition: padding 0.35s ease;
}
.chrome.scrolled { padding-top: 14px; padding-bottom: 14px; }
.chrome > * { pointer-events: auto; }

/* Full-width glass shelf behind the boxes once scrolling starts */
.chrome::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    var(--scanlines),
    linear-gradient(180deg, rgba(12, 14, 13, 0.88), rgba(12, 14, 13, 0.66));
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.chrome.scrolled::before { opacity: 1; }

.logo-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.wordmark {
  font-family: var(--pixel);
  font-size: 15px;
  color: #fff;
  letter-spacing: 1px;
}

/* Animated mark: two links, orbiting glow dots */
.mark { display: flex; align-items: center; }
.link {
  position: relative;
  display: block;
  width: 34px; height: 27px;
  border-radius: 8px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.45), inset 0 -2px 3px rgba(0, 0, 0, 0.35);
}
.link-b { margin-left: -9px; border-color: rgba(255, 255, 255, 0.5); }
.orbit-dot {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  offset-rotate: 0deg;
  offset-path: inset(1px round 6px);
}
.dot-blue {
  background: var(--blue);
  box-shadow: 0 0 8px 3px rgba(130, 205, 245, 0.75);
  animation: llTrack 7s linear infinite;
}
.dot-red {
  background: #f0a3a3;
  box-shadow: 0 0 8px 3px rgba(220, 90, 90, 0.75);
  animation: llTrackR 9s linear infinite;
}
@keyframes llTrack  { from { offset-distance: 0%; }   to { offset-distance: 100%; } }
@keyframes llTrackR { from { offset-distance: 100%; } to { offset-distance: 0%; } }

.nav-box {
  display: flex;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.nav-item {
  font-family: var(--body);
  font-size: 16px;
  color: #c8ccc8;
  text-decoration: none;
  padding: 13px 26px;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  position: relative;
  z-index: 1;
}
.nav-item:hover, .nav-blue:hover { color: var(--blue); }
.nav-red:hover { color: var(--red); }
.nav-item.active {
  background: #31362f;
  border-color: rgba(255, 255, 255, 0.14);
  color: #f2f4f2;
}

/* Mobile hamburger */
.menu-btn {
  display: none;
  width: 46px; height: 46px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.menu-btn span {
  display: block;
  width: 18px; height: 2px;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(11, 14, 16, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-menu.open { opacity: 1; }
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.mm-item {
  font-family: var(--pixel);
  font-size: 19px;
  color: #e8ebe8;
  text-decoration: none;
  padding: 14px 30px;
  border: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.mm-item:hover, .mm-blue:hover { color: var(--blue); border-color: rgba(158, 219, 247, 0.35); }
.mm-red:hover { color: var(--red); border-color: rgba(240, 163, 163, 0.35); }
.mm-mail {
  margin-top: 26px;
  font-family: var(--pixel);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--blue);
  text-decoration: none;
}

/* ============================================================
   Hero
   ============================================================ */

main { position: relative; z-index: 1; }

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-copy {
  padding: 0 72px 64px;
  max-width: 1100px;
}

.hero-title {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: clamp(27px, 4vw, 57px);
  line-height: 1.32;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
  margin-bottom: 30px;
}

.hero-sub {
  font-size: 22px;
  line-height: 1.55;
  color: var(--text-sub);
  max-width: 580px;
  margin-bottom: 40px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}

.btn {
  display: inline-block;
  font-family: var(--body);
  font-size: 19px;
  color: #fff;
  text-decoration: none;
  padding: 20px 34px;
  background: rgba(96, 101, 97, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.btn:hover {
  background: rgba(158, 219, 247, 0.18);
  border-color: rgba(158, 219, 247, 0.55);
  box-shadow: 0 0 30px rgba(130, 205, 245, 0.25);
  transform: translateY(-2px);
}

/* Clickable services strip */
.strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(10, 12, 11, 0.42);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.strip-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px 8px 24px;
  text-decoration: none;
  border-left: 1px solid var(--border-soft);
  transition: background 0.2s ease;
}
.strip-cell:first-child { border-left: none; }
.strip-cell svg {
  width: 24px; height: 24px;
  fill: none;
  stroke: var(--text-strip);
  stroke-width: 1.5;
  stroke-linecap: square;
  transition: stroke 0.2s ease, transform 0.25s ease, filter 0.25s ease;
}
.strip-cell svg .fill { fill: var(--text-strip); stroke: none; transition: fill 0.2s ease; }
.strip-cell span {
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--text-strip);
  text-transform: uppercase;
  text-align: center;
  transition: color 0.2s ease;
}
.strip-cell:hover { background: rgba(158, 219, 247, 0.06); }
.strip-cell:hover svg {
  stroke: var(--blue);
  transform: translateY(-3px);
  filter: drop-shadow(0 0 8px rgba(130, 205, 245, 0.55));
}
.strip-cell:hover svg .fill { fill: var(--blue); }
.strip-cell:hover span { color: var(--blue); }

/* ============================================================
   Sections (solid floor slides over the fixed dunes)
   ============================================================ */

.section {
  border-top: 1px solid var(--rule);
  position: relative;
  background: var(--bg);
}
.section-inner {
  padding: 110px 72px 100px;
  max-width: 1440px;
  margin: 0 auto;
}

.section-services {
  background: linear-gradient(180deg, rgba(158, 219, 247, 0.03), transparent 40%), var(--bg);
}

.eyebrow {
  display: flex;
  gap: 16px;
  font-family: var(--pixel);
  font-size: 13px;
  letter-spacing: 3px;
  margin-bottom: 26px;
}
.num-blue { color: var(--blue); }
.num-red { color: var(--red); }
.eyelabel { color: var(--text-dim); text-transform: uppercase; }

.section h2 {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: clamp(19px, 2.4vw, 33px);
  line-height: 1.4;
  color: #fff;
  text-transform: uppercase;
  max-width: 1120px;
  margin-bottom: 22px;
}

.lede {
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-body);
  max-width: 620px;
  margin-bottom: 54px;
}

/* Bordered glass grids */
.grid-3, .grid-4 { display: grid; margin-top: 54px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.cell {
  padding: 40px 34px;
  border-left: 1px solid var(--border-soft);
  transition: background 0.25s ease;
}
.cell:first-child { border-left: none; }
.cell:hover { background: rgba(158, 219, 247, 0.05); }

.tag {
  font-family: var(--pixel);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.cell h3, .card h3 {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.5;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.cell p, .card p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-body);
}

.roman {
  font-family: var(--pixel);
  font-size: 20px;
  color: var(--blue);
  margin-bottom: 16px;
}
.roman-red { color: var(--red); }
.grid-4 .cell h3 { font-size: 18px; }
.grid-4 .cell p { font-size: 15.5px; }

/* Service cards */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 54px;
}
.card {
  padding: 40px 34px;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  background: rgba(158, 219, 247, 0.05);
  border-color: rgba(158, 219, 247, 0.45);
  transform: translateY(-4px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(130, 205, 245, 0.10);
}

.chip {
  width: 48px; height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
}
.chip::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 8px;
  background: var(--scanlines);
  pointer-events: none;
}
.chip svg { width: 24px; height: 24px; fill: none; stroke-width: 1.5; }
.chip-blue {
  background: linear-gradient(180deg, rgba(158, 219, 247, 0.18), rgba(158, 219, 247, 0.05));
  border: 1px solid rgba(158, 219, 247, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 6px 20px rgba(42, 120, 214, 0.25);
}
.chip-blue svg { stroke: var(--blue); }
.chip-blue svg .fill { fill: var(--blue); stroke: none; }
.chip-red {
  background: linear-gradient(180deg, rgba(240, 163, 163, 0.18), rgba(240, 163, 163, 0.05));
  border: 1px solid rgba(240, 163, 163, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 6px 20px rgba(214, 69, 65, 0.25);
}
.chip-red svg { stroke: var(--red); }
.chip-red svg .fill { fill: var(--red); stroke: none; }

/* ============================================================
   Contact (warm dune-floor glow per the design)
   ============================================================ */

.section-contact {
  background: radial-gradient(ellipse 70% 60% at 50% 100%, rgba(196, 90, 40, 0.16), transparent 70%), var(--bg);
}
.contact-inner {
  padding: 150px 72px 160px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.eyebrow-center { justify-content: center; }
.contact-title {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: clamp(23px, 3.1vw, 44px);
  line-height: 1.4;
  color: #fff;
  margin-bottom: 28px;
}
.contact-body {
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 640px;
  margin-bottom: 44px;
}
.mail-link {
  margin-top: 30px;
  font-family: var(--pixel);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--blue);
  text-decoration: none;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}
.mail-link:hover { color: #fff; text-shadow: 0 0 16px rgba(130, 205, 245, 0.6); }

/* ============================================================
   Footer
   ============================================================ */

.footer {
  display: flex;
  justify-content: space-between;
  padding: 30px 72px;
  border-top: 1px solid var(--rule);
  background: var(--bg);
  font-family: var(--pixel);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
}

/* ============================================================
   Scroll reveal
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  transition-delay: var(--stagger, 0s);
}
.reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .orbit-dot { animation: none; }
  .btn:hover, .card:hover, .strip-cell:hover svg { transform: none; }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 .cell:nth-child(3) { border-left: none; }
  .grid-4 .cell:nth-child(n+3) { border-top: 1px solid var(--border-soft); }
  .cards-3 { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(4, 1fr); }
  .strip-cell:nth-child(5) { border-left: none; }
  .strip-cell:nth-child(n+5) { border-top: 1px solid var(--border-soft); }
}

@media (max-width: 860px) {
  .nav-box { display: none; }
  .menu-btn { display: flex; }
  .chrome { padding: 18px 22px 0; align-items: center; }
  .logo-box { padding: 10px 16px; gap: 10px; }
  .wordmark { font-size: 12px; }
  .link { width: 26px; height: 21px; border-width: 2.5px; border-radius: 6px; }
  .link-b { margin-left: -7px; }

  .hero-copy { padding: 0 22px 44px; }
  .hero-sub { font-size: 15px; margin-bottom: 30px; }
  .btn { font-size: 15px; padding: 14px 22px; }

  .strip { grid-template-columns: repeat(3, 1fr); }
  .strip-cell { padding: 14px 4px 12px; gap: 7px; }
  .strip-cell span { font-size: 8px; }
  .strip-cell svg { width: 18px; height: 18px; }
  .strip-cell:nth-child(4) { border-left: none; }
  .strip-cell:nth-child(n+4) { border-top: 1px solid var(--border-soft); }
  .strip-cell:nth-child(7) { display: none; }

  .section-inner { padding: 64px 22px 56px; }
  .eyebrow { font-size: 11px; }
  .lede { font-size: 15px; margin-bottom: 34px; }

  .grid-3, .grid-4 { grid-template-columns: 1fr; margin-top: 34px; }
  .cell { padding: 26px 22px; border-left: none; }
  .cell + .cell, .grid-4 .cell:nth-child(n+2) { border-top: 1px solid var(--border-soft); }
  .cell p, .card p { font-size: 14px; }
  .card { padding: 26px 22px; }
  .cards-3 { gap: 14px; margin-top: 34px; }

  .grid-4 .cell { display: grid; grid-template-columns: 34px 1fr; column-gap: 16px; }
  .grid-4 .roman { grid-row: 1 / span 2; margin-bottom: 0; }

  .contact-inner { padding: 96px 22px 110px; }
  .contact-body { font-size: 15px; margin-bottom: 34px; }
  .mail-link { font-size: 8.5px; }

  .footer {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 26px 22px;
    font-size: 8px;
    text-align: center;
  }
}
