/* --------------------------------------------------------------------------
   JobsEye holding site. A frozen snapshot of the frontend-v6 design system
   (frontend-v6/DESIGN.md), deliberately standalone: no build step, no JS, no
   API surface. Deleted at the v2 flip, so tokens are copied here rather than
   imported from frontend-v6/src/index.css.
   -------------------------------------------------------------------------- */

/* Self-hosted brand type (the same woff2 files frontend-v6 ships). */
@font-face {
  font-family: "Clash Display";
  src: url("/fonts/clash-display-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("/fonts/general-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("/fonts/general-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* Dark is the default canvas (frontend-v6 ships html.dark). */
:root {
  --bg: 26 18% 5%;
  --surface-2: 28 12% 17%;
  --border: 30 11% 24%;
  --fg: 40 32% 97%;
  --fg-muted: 32 13% 74%;
  --fg-subtle: 32 12% 64%;
  --gold: 33 100% 60%;
  --ring: 33 100% 60%;
  --glow-a: hsl(30 85% 42% / 0.55);
  --glow-b: hsl(8 64% 38% / 0.42);
  --grain-opacity: 0.06;
  --radius: 0.625rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}

/* The shared warm light palette (DESIGN.md section 1: dual theme always).
   Glow alphas drop because the same blobs over a cream canvas read as mud at
   dark-mode strength. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: 38 40% 97%;
    --surface-2: 38 22% 96%;
    --border: 32 18% 88%;
    --fg: 26 20% 9%;
    --fg-muted: 28 8% 40%;
    --fg-subtle: 28 10% 44%;
    --gold: 26 96% 38%;
    --ring: 26 96% 40%;
    --glow-a: hsl(30 92% 56% / 0.24);
    --glow-b: hsl(8 74% 58% / 0.16);
    --grain-opacity: 0.045;
    color-scheme: light;
  }
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  background: hsl(var(--bg));
  color: hsl(var(--fg));
  font-family: "General Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- Background: the locked aurora, one layer, one variant ---------------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-aurora::before,
.bg-aurora::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(54px);
  will-change: transform;
}

.bg-aurora::before {
  width: 46rem;
  height: 40rem;
  left: -12%;
  top: -22%;
  background: radial-gradient(closest-side, var(--glow-a), transparent);
  animation: drift-a 24s ease-in-out infinite;
}

.bg-aurora::after {
  width: 42rem;
  height: 38rem;
  right: -14%;
  top: -8%;
  background: radial-gradient(closest-side, var(--glow-b), transparent);
  animation: drift-b 30s ease-in-out infinite;
}

@keyframes drift-a {
  50% {
    transform: translate(10%, 14%) scale(1.12);
  }
}
@keyframes drift-b {
  50% {
    transform: translate(-9%, 11%) scale(1.06);
  }
}

/* Real texture over the glow: the anti-flat signature. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--grain);
  opacity: var(--grain-opacity);
}

/* --- Hero composition (index and 404) ------------------------------------ */
main {
  position: relative;
  z-index: 1;
}

main.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 2rem;
}

/* The brand object: one instance, gold under-glow, slow breathe. The wrapper
   carries the pointer tilt (set as custom properties by the inline script) so
   the breathe animation on the image below is never fighting it. */
.mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 8.5rem;
  height: 8.5rem;
  transform: perspective(700px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 300ms var(--ease);
}

.mark::before {
  content: "";
  position: absolute;
  inset: -28%;
  border-radius: 50%;
  background: radial-gradient(closest-side, hsl(var(--gold) / 0.28), transparent 70%);
}

.mark img {
  position: relative;
  width: 100%;
  height: auto;
  animation: logo-breathe 6s ease-in-out infinite;
}

/* Brand embers: the one celebration-tier moment on the page. Four of them, one
   shot on load, gone inside the 1200ms budget. Never a loop, never a status
   dot. Same vocabulary as the appliedSeal moment in DESIGN.md section 7. */
/* Wider than the mark and starting below it, so the embers lift past the loop
   against dark canvas instead of dissolving into its own glow. */
.embers {
  position: absolute;
  inset: -30% -45%;
  pointer-events: none;
}

.embers span {
  position: absolute;
  bottom: 14%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: hsl(var(--gold));
  box-shadow: 0 0 8px 1px hsl(var(--gold) / 0.7);
  opacity: 0;
}

.embers span:nth-child(1) {
  left: 16%;
  --rise: -6rem;
}
.embers span:nth-child(2) {
  left: 37%;
  --rise: -8rem;
}
.embers span:nth-child(3) {
  left: 62%;
  --rise: -6.75rem;
}
.embers span:nth-child(4) {
  left: 83%;
  --rise: -8.5rem;
}

@keyframes logo-breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.035);
  }
}

/* Wordmark: live text, bold serif, Eye in gold (never an image). */
.wordmark {
  margin: 1.25rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  color: hsl(var(--fg));
}

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

.wordmark span {
  color: hsl(var(--gold));
}

main.hero h1 {
  margin: 1.5rem 0 0;
  font-family: "Clash Display", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.25rem, 7vw, 3.75rem);
  line-height: 1.02;
  /* Relaxed from the -0.025em base-layer value: this line runs far larger than
     any in-app h1, where that tracking closes up "Version 2 is". */
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 22ch;
}

/* The golden thread: one gold element, drawn not decorated. A gradient
   hairline rather than an SVG stroke, because var() does not resolve in SVG
   presentation attributes like stop-color. */
.thread {
  width: min(18rem, 70%);
  height: 1.5px;
  margin: 1.75rem 0 0;
  background: linear-gradient(90deg, hsl(var(--gold) / 0), hsl(var(--gold)) 50%, hsl(var(--gold) / 0));
}

.lede {
  margin: 1.75rem 0 0;
  max-width: 40ch;
  font-size: clamp(1.0625rem, 2.4vw, 1.1875rem);
  font-weight: 500;
  color: hsl(var(--fg));
  text-wrap: pretty;
}

.sub {
  margin: 0.75rem 0 0;
  max-width: 46ch;
  color: hsl(var(--fg-muted));
  text-wrap: pretty;
}

.contact {
  margin: 2.25rem 0 0;
  font-size: 0.9375rem;
  color: hsl(var(--fg-subtle));
  /* A long address must never push the narrow viewport sideways. */
  overflow-wrap: anywhere;
}

/* --- Links and footer ---------------------------------------------------- */
a {
  color: hsl(var(--gold));
  text-decoration-color: hsl(var(--gold) / 0.4);
  text-underline-offset: 3px;
  border-radius: 0.25rem;
  transition: text-decoration-color 120ms var(--ease);
}

@media (hover: hover) {
  a:hover {
    text-decoration-color: hsl(var(--gold));
  }
}

a:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* One quiet line. No rule above it: a single word does not need a bar to sit
   on, and the border made a one-screen moment look like an app chrome. */
footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  padding: 1.5rem;
  font-size: 0.8125rem;
  color: hsl(var(--fg-subtle));
}

footer a {
  color: hsl(var(--fg-subtle));
  text-decoration-color: hsl(var(--fg-subtle) / 0.35);
}

@media (hover: hover) {
  footer a:hover {
    color: hsl(var(--fg));
  }
}

/* --- Entrance choreography -----------------------------------------------
   Base styles are the FINAL state, so nothing depends on an animation firing.
   The stagger exists only inside the no-preference guard and the whole
   sequence lands inside the 700ms choreography budget. */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: fade-up 260ms var(--ease) backwards;
  }
  .mark {
    animation-delay: 0ms;
  }
  .wordmark {
    animation-delay: 50ms;
  }
  main.hero h1 {
    animation-delay: 110ms;
  }
  .lede {
    animation-delay: 240ms;
  }
  .sub {
    animation-delay: 290ms;
  }
  .contact {
    animation-delay: 340ms;
  }
  footer {
    animation-delay: 380ms;
  }
  /* clip-path is as cheap as transform, so the thread draws left to right.
     Base state is fully drawn, so reduced motion loses nothing. */
  .thread {
    animation: draw 700ms var(--ease) 170ms backwards;
  }
  .embers span {
    animation: ember 900ms var(--ease) forwards;
  }
  .embers span:nth-child(2) {
    animation-delay: 90ms;
  }
  .embers span:nth-child(3) {
    animation-delay: 180ms;
  }
  .embers span:nth-child(4) {
    animation-delay: 270ms;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes draw {
  from {
    clip-path: inset(0 100% 0 0);
  }
}

@keyframes ember {
  0% {
    opacity: 0;
    transform: translateY(0.75rem) scale(0.4);
  }
  18% {
    opacity: 1;
  }
  62% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translateY(var(--rise, -6rem)) scale(1);
  }
}

/* Low-end mobile: freeze the one GPU-expensive ambient, keep the glow. */
@media (max-width: 640px) {
  .bg-aurora::before,
  .bg-aurora::after {
    animation: none;
    filter: blur(40px);
  }
  main.hero {
    padding-top: 3rem;
  }
  .mark {
    width: 7rem;
    height: 7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-aurora::before,
  .bg-aurora::after,
  .mark img {
    animation: none;
  }
  /* The script never sets a tilt under reduced motion; this is the belt to
     that braces, so no stray custom property can animate the mark. */
  .mark {
    transition: none;
  }
}
