/* ============================================================
   CorvidSoft — "The Cache"
   Committed-dark obsidian palette; iridescent raven sheen
   reserved for the hero signature.
   ============================================================ */

/* ---- Fonts (self-hosted, OFL) ---- */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/bricolage-grotesque-700.woff2") format("woff2");
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/bricolage-grotesque-800.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-600.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2");
}

/* ---- Tokens ---- */
:root {
  --obsidian: #0b0c10;
  --raven: #14161c;
  --raven-2: #191c24;
  --slate: #23272f;
  --slate-2: #2d323c;
  --bone: #edece7;
  --ash: #8b919c;
  --ash-dim: #6b7079;

  --iris-violet: #6e5bf2;
  --iris-teal: #17b0a6;
  --iris-green: #37c871;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --container: 1080px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --radius: 16px;
  --hairline: 1px solid var(--slate);
}

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

* {
  margin: 0;
}

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

body {
  min-height: 100dvh;
  background: var(--obsidian);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Faint iridescent depth behind the fold, kept very low. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 60% at 78% -8%, rgba(110, 91, 242, 0.1), transparent 60%),
    radial-gradient(90% 50% at 12% 4%, rgba(23, 176, 166, 0.07), transparent 55%);
  pointer-events: none;
}

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

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

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.6rem 1rem;
  background: var(--bone);
  color: var(--obsidian);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  z-index: 10;
}
.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

/* ---- Shared type devices ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ash);
}
.eyebrow--accent {
  color: var(--iris-teal);
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
  border: 1px solid var(--slate-2);
  border-radius: 999px;
  padding: 0.28em 0.7em;
  white-space: nowrap;
}

/* ============================================================
   Topbar
   ============================================================ */
.topbar {
  max-width: var(--container);
  margin-inline: auto;
  padding: 1.5rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.wordmark__mark {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--iris-violet), var(--iris-teal), var(--iris-green));
  box-shadow: 0 0 10px rgba(23, 176, 166, 0.5);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.wordmark:hover .wordmark__mark {
  transform: rotate(135deg);
  box-shadow: 0 0 16px rgba(110, 91, 242, 0.6);
}
.wordmark__text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--bone);
}
.wordmark__text--sm {
  font-size: 1.25rem;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.topbar__link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ash);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}
.topbar__link:hover {
  color: var(--bone);
}
.topbar__link--cta {
  color: var(--bone);
  border: 1px solid var(--slate-2);
}
.topbar__link--cta:hover {
  background: var(--raven-2);
  border-color: var(--iris-teal);
}

/* ============================================================
   Hero + signature
   ============================================================ */
.hero {
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(3rem, 9vw, 6.5rem) var(--gutter) clamp(3.5rem, 8vw, 6rem);
}
.hero .eyebrow {
  margin-bottom: 1.4rem;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 8.5vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--bone);
}
.hero__lead {
  margin-top: 1.75rem;
  max-width: 46ch;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--ash);
}
.hero__lead strong {
  color: var(--bone);
  font-weight: 600;
}
.hero__actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* the one bold thing */
.signature {
  position: relative;
  display: inline-block;
}
.signature__word {
  background-image: linear-gradient(
    100deg,
    var(--iris-violet) 0%,
    var(--iris-teal) 34%,
    var(--iris-green) 52%,
    var(--iris-teal) 72%,
    var(--iris-violet) 100%
  );
  background-size: 220% 100%;
  background-position: 62% 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.signature.is-lit .signature__word {
  animation: sheen-sweep 1.9s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}
@keyframes sheen-sweep {
  0% {
    background-position: 165% 0;
  }
  100% {
    background-position: 62% 0;
  }
}
.signature__glint {
  position: absolute;
  top: 0.02em;
  right: -0.32em;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, var(--iris-teal) 42%, transparent 68%);
  filter: drop-shadow(0 0 7px rgba(23, 176, 166, 0.9));
  opacity: 0;
  transform: scale(0.2);
  pointer-events: none;
}
.signature.is-lit .signature__glint {
  animation: glint 1.7s ease-out 0.5s both;
}
@keyframes glint {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }
  55% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 0.55;
    transform: scale(0.7);
  }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  --btn-pad-y: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: var(--btn-pad-y) 1.35rem;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.2s ease,
    border-color 0.2s ease, color 0.2s ease;
}
.btn__arrow {
  transition: transform 0.2s ease;
}
.btn:hover .btn__arrow {
  transform: translateX(3px);
}
.btn--primary {
  background: var(--bone);
  color: var(--obsidian);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px -12px rgba(110, 91, 242, 0.75),
    0 0 0 1px rgba(23, 176, 166, 0.35);
}
.btn--ghost {
  color: var(--bone);
  border-color: var(--slate-2);
}
.btn--ghost:hover {
  border-color: var(--ash);
  background: var(--raven);
}

/* ============================================================
   Filum vault
   ============================================================ */
.filum {
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter);
}
.vault {
  position: relative;
  background: linear-gradient(180deg, var(--raven-2), var(--raven));
  border: var(--hairline);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 5vw, 3.25rem);
  overflow: hidden;
}
.vault::before {
  /* a thin iridescent seam along the top edge */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--iris-violet), var(--iris-teal), var(--iris-green), transparent);
  opacity: 0.7;
}
.vault__seal {
  position: absolute;
  top: 0;
  right: clamp(1.25rem, 5vw, 2.5rem);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem 0.45rem;
  background: var(--obsidian);
  border: 1px solid var(--slate-2);
  border-top: none;
  border-radius: 0 0 8px 8px;
}
.vault__seal::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: radial-gradient(circle, var(--iris-green), var(--iris-teal) 70%);
  box-shadow: 0 0 8px rgba(55, 200, 113, 0.6);
}
.vault__seal-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ash);
}
.filum__title {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--bone);
}
.filum__lead {
  margin-top: 0.9rem;
  max-width: 42ch;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--bone);
}
.filum__points {
  margin: 2.25rem 0;
  display: grid;
  gap: 1.5rem 2rem;
  grid-template-columns: repeat(3, 1fr);
}
.point {
  border-top: 1px solid var(--slate);
  padding-top: 1rem;
}
.point__head {
  font-weight: 600;
  color: var(--bone);
  margin-bottom: 0.4rem;
}
.point__body {
  font-size: 0.95rem;
  color: var(--ash);
}

/* ============================================================
   The cache (projects)
   ============================================================ */
.cache {
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(3rem, 7vw, 5rem) var(--gutter) clamp(4rem, 9vw, 7rem);
}
.cache__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.cache__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
  color: var(--bone);
}
.projects {
  border-top: var(--hairline);
}
.project {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding: 1.6rem 0.25rem 1.6rem 1.25rem;
  border-bottom: var(--hairline);
  transition: background 0.2s ease, padding-left 0.2s ease;
}
.project::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.6rem;
  bottom: 1.6rem;
  width: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.25s ease;
}
.project--flagship::before {
  background: linear-gradient(180deg, var(--iris-violet), var(--iris-teal), var(--iris-green));
}
.project:hover {
  background: var(--raven);
}
.project__meta {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.project__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--bone);
}
.project__tagline {
  grid-column: 1;
  color: var(--ash);
  font-size: 0.98rem;
  max-width: 52ch;
}
.project__link {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--bone);
  border: 1px solid var(--slate-2);
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  transition: border-color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.project__link:hover {
  border-color: var(--iris-teal);
  background: var(--raven-2);
}
.cache__more {
  margin-top: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--ash-dim);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: var(--hairline);
  margin-top: 2rem;
}
.site-footer__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.site-footer__line {
  margin-top: 0.6rem;
  max-width: 34ch;
  color: var(--ash);
  font-size: 0.95rem;
}
.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.site-footer__links a {
  color: var(--ash);
  transition: color 0.2s ease;
}
.site-footer__links a:hover {
  color: var(--bone);
}
.site-footer__legal {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0 var(--gutter) 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--ash-dim);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
  .filum__points {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .point {
    padding-block: 1rem;
  }
  .project {
    grid-template-columns: 1fr;
  }
  .project__link {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 0.5rem;
  }
}

@media (max-width: 460px) {
  .topbar {
    flex-wrap: wrap;
  }
  .topbar__link--cta {
    display: none;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---- Motion preferences ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
