/* Blueprint sheet: near-black drawing paper, hairline furniture, and one
   orange dimension line that escapes the frame. Pinned to the viewport — this
   page never scrolls, and it deliberately ignores the console's light theme
   rather than reading the shared tokens. */

.landing {
  --bp-ground: #08090b;
  --bp-ink: #ece9e1;
  --bp-accent: #ff7800;

  --bp-line: rgba(236, 233, 225, 0.19);
  --bp-line-strong: rgba(236, 233, 225, 0.26);
  --bp-grid-fine: rgba(236, 233, 225, 0.028);
  --bp-grid-coarse: rgba(236, 233, 225, 0.055);

  /* viewport edge -> frame, frame -> content, frame corner -> bracket */
  --bp-margin: clamp(16px, 3.2vw, 40px);
  --bp-pad: clamp(20px, 5.5vw, 78px);
  --bp-bracket: 18px;

  position: fixed;
  inset: 0;
  display: block;
  /* Clipped at the viewport edge, where the trail is meant to run off. Scrolls
     vertically only when the projects block does not fit (short screens). */
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--bp-ground);
  color: var(--bp-ink);
}

.sheet {
  position: absolute;
  inset: 0;
}

/* ---------- paper ---------- */

/* Fine ruling over coarse, the way engineering paper stacks. The vignette is
   listed first because background layers paint front-to-back. */
.paper {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 78% 72% at 50% 46%, transparent 36%, rgba(3, 4, 6, 0.82) 100%),
    linear-gradient(var(--bp-grid-coarse) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-grid-coarse) 1px, transparent 1px),
    linear-gradient(var(--bp-grid-fine) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-grid-fine) 1px, transparent 1px);
  background-size: 100% 100%, 160px 160px, 160px 160px, 32px 32px, 32px 32px;
}

/* The only ambient motion on the page, and slow enough to be deniable. */
.glow {
  /* Fixed, not absolute: it bleeds 20% past the viewport, and an absolute
     child would make .landing (overflow-y: auto) scrollable. */
  position: fixed;
  inset: -20%;
  background-image:
    radial-gradient(ellipse 50% 45% at 22% 18%, rgba(236, 233, 225, 0.05), transparent 70%),
    radial-gradient(ellipse 45% 40% at 86% 90%, rgba(255, 120, 0, 0.07), transparent 70%);
  animation: bp-breathe 16s ease-in-out infinite alternate;
}

/* ---------- sheet frame and edge ruling ---------- */

.frame {
  position: absolute;
  inset: var(--bp-margin);
  border: 1px solid var(--bp-line);
  animation: bp-fade 1s ease 0.1s both;
}

/* Minor graduation every 40px, major every 200px, drawn as two stacked
   repeating gradients so both sit flush against the frame edge. */
.ruling {
  position: absolute;
  background-repeat: no-repeat;
}

.ruling--top,
.ruling--bottom {
  left: 0;
  right: 0;
  height: 11px;
  background-image:
    repeating-linear-gradient(90deg, var(--bp-line-strong) 0 1px, transparent 1px 200px),
    repeating-linear-gradient(90deg, var(--bp-line) 0 1px, transparent 1px 40px);
  background-size: 100% 11px, 100% 5px;
}

.ruling--top {
  top: 0;
  background-position: left top, left top;
}

.ruling--bottom {
  bottom: 0;
  background-position: left bottom, left bottom;
}

.ruling--left,
.ruling--right {
  top: 0;
  bottom: 0;
  width: 11px;
  background-image:
    repeating-linear-gradient(180deg, var(--bp-line-strong) 0 1px, transparent 1px 200px),
    repeating-linear-gradient(180deg, var(--bp-line) 0 1px, transparent 1px 40px);
  background-size: 11px 100%, 5px 100%;
}

.ruling--left {
  left: 0;
  background-position: left top, left top;
}

.ruling--right {
  right: 0;
  background-position: right top, right top;
}

.bracket {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 0 solid var(--bp-line-strong);
  animation: bp-fade 1s ease 0.5s both;
}

.bracket--tl {
  top: calc(var(--bp-margin) + var(--bp-bracket));
  left: calc(var(--bp-margin) + var(--bp-bracket));
  border-top-width: 1px;
  border-left-width: 1px;
}

.bracket--tr {
  top: calc(var(--bp-margin) + var(--bp-bracket));
  right: calc(var(--bp-margin) + var(--bp-bracket));
  border-top-width: 1px;
  border-right-width: 1px;
}

.bracket--bl {
  bottom: calc(var(--bp-margin) + var(--bp-bracket));
  left: calc(var(--bp-margin) + var(--bp-bracket));
  border-bottom-width: 1px;
  border-left-width: 1px;
}

/* ---------- the line ---------- */

.field {
  position: absolute;
  inset: var(--bp-margin);
  padding: var(--bp-pad);
  /* Extra room underneath so the title never crowds the title block. */
  padding-bottom: calc(var(--bp-pad) + 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: safe center;
}

.title {
  /* min() keeps the type off the floor on short landscape viewports. */
  font-size: clamp(2.25rem, min(7.2vw, 14vh), 5.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--bp-ink);
  margin: 0;
}

.title__line {
  display: block;
  animation: bp-rise 1.1s cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.title__line--b {
  animation-delay: 0.16s;
}

.title__line--c {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3.5vw, 48px);
  animation-delay: 0.32s;
}

.title__beyond {
  color: var(--bp-accent);
}

/* Runs from the last word, through the frame, off the edge of the sheet. The
   negative margin is exactly the inset it has to cancel to reach the viewport. */
.trail {
  position: relative;
  flex: 1 1 auto;
  min-width: 40px;
  height: 1px;
  margin-right: calc(-1 * (var(--bp-margin) + var(--bp-pad)));
  background: linear-gradient(
    90deg,
    var(--bp-accent) 0%,
    rgba(255, 120, 0, 0.5) 42%,
    rgba(255, 120, 0, 0) 100%
  );
  transform-origin: left center;
  animation: bp-draw 1.4s cubic-bezier(0.16, 0.8, 0.24, 1) 1s both;
}

/* Witness mark where the dimension starts. */
.trail::before {
  content: '';
  position: absolute;
  left: 0;
  top: -5px;
  width: 1px;
  height: 11px;
  background: var(--bp-accent);
}

/* ---------- title block ---------- */

.cartouche {
  position: absolute;
  right: var(--bp-margin);
  bottom: var(--bp-margin);
  display: flex;
  align-items: center;
  padding: 16px 22px 14px 30px;
  border-top: 1px solid var(--bp-line-strong);
  border-left: 1px solid var(--bp-line-strong);
  /* Sits on the vignetted corner, so it has to be at least as dark as the
     ground or the block reads as a lit panel instead of ruling. */
  background: rgba(4, 5, 7, 0.92);
  animation: bp-fade 1.2s ease 1.5s both;
}

/* ---------- plot ---------- */

@keyframes bp-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bp-rise {
  from { opacity: 0; transform: translateY(0.34em); }
  to { opacity: 1; transform: none; }
}

@keyframes bp-draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes bp-breathe {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

@media (max-width: 640px) {
  .landing {
    --bp-pad: 22px;
    --bp-bracket: 13px;
  }

  .bracket {
    width: 14px;
    height: 14px;
  }

  .cartouche {
    padding: 12px 16px 10px 20px;
  }
}

/* Every element above is authored at its finished state, so dropping the
   animations lands the whole sheet already plotted. */
@media (prefers-reduced-motion: reduce) {
  .glow,
  .frame,
  .bracket,
  .title__line,
  .trail,
  .cartouche {
    animation: none;
  }
}

/* ---------- static site additions ---------- */

/* The Angular app set this globally (styles.css); the static page has to. */
*, *::before, *::after { box-sizing: border-box; }

body.landing-page { margin: 0; background: #08090b; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

.brand-logo { display: block; width: auto; }
.brand-logo .block { fill: #fff; }
.brand-logo .block--rogue { fill: #fff; fill-opacity: 0.7; }
.brand-logo .word { font-family: 'Inter', system-ui, sans-serif; fill: #fff; }
.brand-logo .word--solid { font-size: 48px; font-weight: 700; letter-spacing: -1px; }
.brand-logo .word--ops { font-size: 30px; font-weight: 400; letter-spacing: 1px; }

/* ---------- language ---------- */

/* EN / FR inside the top-right bracket, set like a drawing reference. */
.lang {
  position: absolute;
  z-index: 1;
  top: calc(var(--bp-margin) + var(--bp-bracket) + 8px);
  right: calc(var(--bp-margin) + var(--bp-bracket) + 30px);
  display: flex;
  gap: 12px;
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: rgba(236, 233, 225, 0.62);
  animation: bp-fade 1s ease 0.5s both;
}
.lang [aria-current] { color: var(--bp-accent); }
.lang a { color: inherit; text-decoration: none; }
.lang a:hover, .lang a:focus-visible { color: var(--bp-ink); }
@media (prefers-reduced-motion: reduce) { .lang { animation: none; } }

/* Legal notice, along the bottom edge next to the lower-left bracket. */
.legal {
  position: absolute;
  z-index: 1;
  bottom: calc(var(--bp-margin) + var(--bp-bracket) + 2px);
  left: calc(var(--bp-margin) + var(--bp-bracket) + 30px);
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(236, 233, 225, 0.62);
  text-decoration: none;
  animation: bp-fade 1s ease 0.5s both;
}
.legal:hover, .legal:focus-visible { color: var(--bp-ink); }
@media (prefers-reduced-motion: reduce) { .legal { animation: none; } }

/* ---------- projects ---------- */

/* Annotated like a drawing callout: a mono label on a hairline, then the
   tiles: a project's icon, its name and one line. */
.projects {
  margin-top: clamp(28px, 6vh, 64px);
  animation: bp-fade 1.2s ease 1.7s both;
}

.projects__label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236, 233, 225, 0.62);
}

.projects__label::after {
  content: '';
  flex: 0 1 160px;
  height: 1px;
  background: var(--bp-line-strong);
}

.projects__list {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.projects__list > li {
  flex: 0 1 24rem;
  min-width: 0;
}

.tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 16px 20px 16px 16px;
  background: rgba(4, 5, 7, 0.92);
  border: 1px solid var(--bp-line-strong);
  color: var(--bp-ink);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

/* One accent corner, the drawing's bracket in orange. */
.tile::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 12px;
  height: 12px;
  border-top: 1px solid var(--bp-accent);
  border-left: 1px solid var(--bp-accent);
}

.tile:hover,
.tile:focus-visible {
  border-color: var(--bp-accent);
  transform: translateY(-2px);
}

.tile__icon {
  flex: none;
  width: 44px;
  height: auto;
}

.tile__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tile__name {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tile__text {
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(236, 233, 225, 0.7);
}

@media (prefers-reduced-motion: reduce) {
  .projects { animation: none; }
  .tile { transition: none; }
}
