/* Corelink Group LLC — institutional site. Buildless, no external requests. */

@font-face {
  font-family: "Manrope";
  src: url("assets/manrope.ttf") format("truetype");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #090d0b;
  --bg-raised: #0e1612;
  --ink: #f7f8f7;
  --sage: #b6c3bc;
  --emerald: #008466;
  --emerald-bright: #00a17a;
  --rule: rgba(182, 195, 188, 0.24);
  --gutter: clamp(1.25rem, 4.45vw, 4rem);
  --measure: 90rem;
  --art-h: 22rem;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

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

[hidden] { display: none !important; }

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--emerald-bright);
}

::selection {
  background: var(--emerald);
  color: #fff;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

img { max-width: 100%; }

a {
  color: inherit;
  text-underline-offset: 0.25em;
}

:focus-visible {
  outline: 3px solid var(--emerald-bright);
  outline-offset: 4px;
}

main:focus { outline: none; }

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--emerald);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-300%);
}
.skip-link:focus { transform: none; }

.icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Transparent reversed brand application ---------- */

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(13.125rem, 18.75vw, 16.875rem);
  height: 5rem;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border-radius: 0;
  line-height: 0;
}
.brand img {
  display: block;
  flex: none;
  max-width: none;
  width: calc(118% - 28.32px);
  filter: invert(1) hue-rotate(180deg);
  height: auto;
}

/* ---------- Header (inside hero, not fixed) ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  padding-top: 2rem;
}
.site-header .wrap {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2.5rem;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
  transition: text-decoration-color 0.2s ease;
}
.site-nav a:hover { text-decoration-color: var(--emerald-bright); }

.menu-toggle {
  display: none;
  min-height: 2.75rem;
  padding: 0 1.125rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  background: rgba(9, 13, 11, 0.78);
  border: 1px solid rgba(247, 248, 247, 0.45);
  border-radius: 2px;
  cursor: pointer;
}
.menu-toggle:hover,
.menu-toggle[aria-expanded="true"] { border-color: var(--emerald-bright); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 820px;
  min-height: clamp(820px, 86svh, 900px);
  padding-top: clamp(10rem, 18vw, 16.25rem);
  padding-bottom: 6rem;
  background: var(--bg);
  overflow: hidden;
  isolation: isolate;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 38% 55% at 74% 50%, rgba(0, 132, 102, 0.28), transparent 70%),
    var(--bg);
}

.hero-art img {
  position: absolute;
  left: 0;
  top: -16px;
  width: 100%;
  height: calc(100% + 32px);
  object-fit: cover;
  object-position: center;
  transform: translate3d(0, -2px, 0) scale(1.006);
}

/* Bounded highlight, confined to the right-hand assembly */
.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 30% 42% at 74% 48%, rgba(0, 161, 122, 0.2), transparent 72%);
  mix-blend-mode: screen;
  opacity: 0.5;
}

/* Mild left, top and bottom scrims for contrast; the C stays clear */
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(9, 13, 11, 0.55), rgba(9, 13, 11, 0) 11rem),
    linear-gradient(0deg, var(--bg) 0, rgba(9, 13, 11, 0) 20%),
    linear-gradient(90deg, rgba(9, 13, 11, 0.82) 0%, rgba(9, 13, 11, 0.5) 32%, rgba(9, 13, 11, 0) 58%);
}

.hero-inner {
  position: relative;
  z-index: 3;
}

.hero h1 {
  max-width: 45rem;
  font-size: clamp(3rem, 6.1vw, 5.5rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.hero h1 span { display: block; }

.hero-lead {
  max-width: 36.875rem;
  margin-top: 2rem;
  font-size: clamp(1.25rem, 1.67vw, 1.5rem);
  line-height: 1.45;
  color: var(--sage);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
  margin-top: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0 2rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.005em;
  color: #fff;
  text-decoration: none;
  background: var(--emerald);
  border: 1px solid transparent;
  border-radius: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.btn:hover {
  background: #007659;
  border-color: var(--emerald-bright);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--emerald-bright);
  text-underline-offset: 0.35em;
}
.link-arrow .icon { transition: transform 0.2s ease; }
.link-arrow:hover .icon { transform: translateX(3px); }

.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  justify-content: flex-end;
  padding-bottom: 1.75rem;
  pointer-events: none;
}

.pause-toggle {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  background: rgba(9, 13, 11, 0.72);
  border: 1px solid rgba(247, 248, 247, 0.4);
  border-radius: 2px;
  cursor: pointer;
}
.pause-toggle:hover { border-color: var(--emerald-bright); }
.pause-toggle[data-paused="true"] .icon-pause,
.pause-toggle[data-paused="false"] .icon-play { display: none; }

/* ---------- Hero motion: one slow drift, enabled only after JS init ---------- */

@keyframes hero-drift {
  0%, 100% { transform: translate3d(0, -12px, 0) scale(1.045); }
  50%      { transform: translate3d(0, 10px, 0) scale(1.015); }
}
@keyframes hero-glow {
  0%, 100% { opacity: 0.15; }
  50%      { opacity: 0.95; }
}

.motion-on .hero-art img {
  will-change: transform;
  animation: hero-drift 9s ease-in-out infinite;
  animation-delay: -1.5s;
}
.motion-on .hero-art::before {
  animation: hero-glow 9s ease-in-out infinite;
  animation-delay: -1.5s;
}
.motion-on.is-paused .hero-art img,
.motion-on.is-paused .hero-art::before {
  animation-play-state: paused;
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(5rem, 10vw, 9rem);
}

.section h2 {
  font-size: clamp(2.25rem, 4.6vw, 4.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* Approach */

.approach { background: var(--bg); }

.approach-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 2rem;
  row-gap: 1.5rem;
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5.5rem);
}
.approach-head h2 { grid-column: 1 / span 7; }
.approach-intro {
  grid-column: 8 / span 5;
  max-width: 65ch;
  font-size: 1.125rem;
  color: var(--sage);
}

.rows { border-bottom: 1px solid var(--rule); }

.row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 2rem;
  row-gap: 0.75rem;
  padding-block: clamp(1.75rem, 3vw, 2.75rem);
  border-top: 1px solid var(--rule);
}
.row::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 3rem;
  height: 2px;
  background: var(--emerald-bright);
}
.row h3 {
  grid-column: 1 / span 7;
  font-size: clamp(1.5rem, 2.4vw, 2.125rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.row p {
  grid-column: 8 / span 5;
  max-width: 65ch;
  font-size: 1.125rem;
  color: var(--sage);
}

/* About */

.about {
  padding-block: clamp(6rem, 13vw, 12rem);
  background:
    radial-gradient(ellipse 50% 70% at 12% 0%, rgba(0, 132, 102, 0.12), transparent 70%),
    var(--bg-raised);
  border-block: 1px solid var(--rule);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 2rem;
  row-gap: 2.5rem;
  align-items: start;
}
.about-grid h2 {
  grid-column: 1 / span 6;
  max-width: 12em;
}
.about-grid h2::before {
  content: "";
  display: block;
  width: 4rem;
  height: 2px;
  margin-bottom: 2rem;
  background: var(--emerald-bright);
}
.about-body { grid-column: 8 / span 5; }
.about-body p {
  max-width: 65ch;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.55;
  color: var(--sage);
}

.diagram {
  display: block;
  width: 100%;
  max-width: 28rem;
  height: auto;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  overflow: visible;
}
.diagram * { vector-effect: non-scaling-stroke; }
.d-unit { fill: none; stroke: var(--sage); stroke-opacity: 0.55; stroke-width: 1; }
.d-link { fill: none; stroke: var(--sage); stroke-opacity: 0.55; stroke-width: 1; }
.d-base { fill: none; stroke: var(--emerald-bright); stroke-width: 2; }
.d-ground { fill: none; stroke: var(--sage); stroke-opacity: 0.25; stroke-width: 1; }
.d-joint { fill: var(--emerald-bright); }

/* Contact */

.contact {
  padding-block: clamp(6rem, 12vw, 11rem);
  background:
    radial-gradient(ellipse 55% 60% at 88% 115%, rgba(0, 132, 102, 0.2), transparent 70%),
    var(--bg);
}
.contact h2 {
  max-width: 11em;
  font-size: clamp(2.75rem, 7.5vw, 6.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
  min-height: 2.75rem;
  margin-top: clamp(2rem, 4vw, 3.5rem);
  font-size: clamp(1.25rem, 3.4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--emerald-bright);
  text-underline-offset: 0.25em;
  overflow-wrap: anywhere;
}
.contact-link .icon { transition: transform 0.2s ease; }
.contact-link:hover .icon { transform: translateX(4px); }
.contact-link:hover { text-decoration-color: var(--ink); }

/* Footer */

.site-footer {
  padding-block: 2.5rem;
  background: var(--bg);
  border-top: 1px solid var(--rule);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}
.brand-small { width: 10.5rem; height: 3.5rem; padding: 0; }
.footer-meta {
  display: grid;
  gap: 0.25rem;
  font-size: 0.9375rem;
  color: var(--sage);
}
.back-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--emerald-bright);
  text-underline-offset: 0.35em;
}

/* ---------- Responsive ---------- */

@media (max-width: 1200px) {
  .hero-art img { object-position: 64% center; }
}

@media (max-width: 900px) {
  :root { --art-h: 26rem; }

  .hero {
    min-height: 0;
    padding-top: calc(var(--art-h) - 2rem);
  }
  .hero-art {
    inset: 0 0 auto 0;
    height: var(--art-h);
  }
  .hero-art img { object-position: 70% center; }
  .hero-art::before {
    background: radial-gradient(ellipse 45% 50% at 72% 50%, rgba(0, 161, 122, 0.2), transparent 72%);
  }
  .hero-art::after {
    background:
      linear-gradient(180deg, rgba(9, 13, 11, 0.6), rgba(9, 13, 11, 0) 8rem),
      linear-gradient(0deg, var(--bg) 0, rgba(9, 13, 11, 0.6) 22%, rgba(9, 13, 11, 0) 52%);
  }

  .approach-head h2,
  .approach-intro,
  .row h3,
  .row p,
  .about-grid h2,
  .about-body { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  :root { --art-h: 22rem; }

  .site-header { padding-top: 1rem; }

  .brand { width: 13.125rem; height: 4rem; }

  .hero h1 {
    font-size: clamp(2.75rem, 12vw, 3.375rem);
  }
  .hero-lead { margin-top: 1.5rem; }
  .hero-art img { object-position: 82% center; }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 2rem;
  }
  .hero-actions .btn { width: 100%; }
  .hero-actions .link-arrow {
    justify-content: center;
    min-height: 3rem;
  }

  /* Without JS the links wrap beneath the logo; the collapse only applies once .js is set */
  .site-nav { width: 100%; }
  .site-nav ul { gap: 0 1.25rem; }
  .site-nav a { min-height: 2.75rem; }

  .js .menu-toggle { display: inline-flex; align-items: center; }
  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: var(--gutter);
    width: min(16rem, calc(100% - 2 * var(--gutter)));
    margin-top: 0.5rem;
    background: var(--bg-raised);
    border: 1px solid var(--rule);
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav li + li { border-top: 1px solid var(--rule); }
  .js .site-nav a {
    display: flex;
    width: 100%;
    min-height: 3rem;
    padding-inline: 1rem;
    font-size: 1rem;
  }

  .row { row-gap: 0.5rem; }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art img,
  .hero-art::before {
    animation: none !important;
    will-change: auto;
  }
  .pause-toggle { display: none !important; }
  *, *::before, *::after { transition: none !important; }
}

@media (min-width: 901px) {
  .approach { padding-top: 3.5rem; border-top: 1px solid var(--rule); }
}
