/* keegan.sucks
   Light = Keegan's cream Omarchy overlay. Dark = Omarchy Matte Black.
   One accent (bronze / amber phosphor). Libron small caps throughout. */

@font-face { font-family: "Libron"; src: url("fonts/Libron-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libron"; src: url("fonts/Libron-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Libron"; src: url("fonts/Libron-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* light: cream (omarchy-setup cream overlay) + Catppuccin Latte ink */
  --bg: #f7eecf;
  --panel: #f0e4c4;
  --panel-2: #ebe2c4;
  --line: #ccc5b2;
  --text: #4c4f69;
  --hi: #2f3146;
  --dim: #5f6278;
  --accent: #8c4a06;
  --grid: rgba(140, 74, 6, 0.22);
  --grain: 0.06;
  --grain-blend: multiply;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --panel: #161616; --panel-2: #1e1e1e; --line: #333333;
    --text: #bebebe; --hi: #ece6da; --dim: #8a8a8a; --accent: #e68e0d;
    --grid: rgba(230, 142, 13, 0.32); --grain: 0.4; --grain-blend: overlay;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121212; --panel: #161616; --panel-2: #1e1e1e; --line: #333333;
  --text: #bebebe; --hi: #ece6da; --dim: #8a8a8a; --accent: #e68e0d;
  --grid: rgba(230, 142, 13, 0.32); --grain: 0.4; --grain-blend: overlay;
  color-scheme: dark;
}

:root {
  --gap: 10px;                 /* Hyprland gaps */
  --radius: 0px;               /* Omarchy windows are square */
  --gutter: clamp(16px, 4vw, 48px);
  --track: 0.16em;             /* Hazeltine-wide label tracking */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Libron", Georgia, "Times New Roman", serif;
  font-variant-caps: small-caps;
  font-size: clamp(17px, 0.35vw + 15.5px, 20px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--bg); padding: 6px 12px; }
.skip:focus { left: 8px; }

/* film grain over everything, like the Hazeltine sites */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: var(--grain);
  mix-blend-mode: var(--grain-blend);
}

/* labels: tiny, all small caps, wide tracked */
.margin, .win-bar, .bar, .triad {
  font-variant-caps: all-small-caps;
  letter-spacing: var(--track);
}

/* the mark, as a mask so it takes the current accent */
.mark {
  display: inline-block; width: 1em; height: 1em;
  background: var(--accent);
  -webkit-mask: url("mark.svg") center / contain no-repeat;
          mask: url("mark.svg") center / contain no-repeat;
}

/* ---------- top bar (waybar-ish) ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 44px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  font-size: 0.82rem;
  color: var(--dim);
}
.workspaces { display: flex; gap: 4px; }
.workspaces a {
  display: inline-flex; align-items: center; gap: .5em;
  height: 26px; padding: 0 .6em; border: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.workspaces a { font-variant-numeric: lining-nums; }
.workspaces a:hover { color: var(--hi); }
.workspaces a.active { color: var(--accent); border-color: var(--accent); }
.bar-mark { justify-self: center; font-size: 22px; line-height: 0; }
.bar-right { justify-self: end; display: flex; align-items: center; gap: 14px; }
.clock { font-variant-numeric: tabular-nums lining-nums; }
.theme-toggle {
  display: grid; place-items: center; width: 28px; height: 26px;
  background: none; border: 1px solid var(--line); color: var(--dim); cursor: pointer;
  transition: color .2s, border-color .2s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 14px; height: 14px; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: grid; place-items: center;
  padding: 96px var(--gutter) 18vh;
  overflow: hidden; isolation: isolate;
}
.hero-inner {
  display: grid; justify-items: center; text-align: center;
  grid-template-columns: 1fr auto 1fr; column-gap: clamp(16px, 3vw, 48px);
  max-width: 1400px; width: 100%;
}
.hero h1 {
  grid-column: 2; grid-row: 1;
  font-weight: 400; color: var(--hi);
  font-size: clamp(2.8rem, 8vw, 8rem);
  line-height: .95; letter-spacing: -0.01em;
  white-space: nowrap;
}
.cursor {
  display: inline-block; width: .42em; height: .62em; margin-left: .08em;
  vertical-align: baseline;
  background: var(--accent);
  -webkit-mask: url("mark.svg") center / contain no-repeat;
          mask: url("mark.svg") center / contain no-repeat;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.margin { grid-row: 1; align-self: end; padding-bottom: .9em; color: var(--accent); font-size: .78rem; white-space: nowrap; }
.margin-l { grid-column: 1; justify-self: end; }
.margin-r { grid-column: 3; justify-self: start; }
.lede {
  grid-column: 1 / -1; max-width: 34em; margin-top: clamp(28px, 4vw, 48px);
  font-size: clamp(1rem, .6vw + .85rem, 1.25rem); color: var(--text);
}
.triad {
  grid-column: 1 / -1; display: flex; gap: clamp(28px, 9vw, 140px);
  margin-top: clamp(48px, 8vw, 96px);
  font-style: italic; font-size: clamp(1.15rem, 1.6vw, 1.6rem); letter-spacing: .12em;
}
.triad a { color: var(--hi); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.triad a:hover { color: var(--accent); border-color: var(--accent); }

/* future-retro horizon grid: still, so nothing shimmers */
.floor {
  position: absolute; z-index: -1; left: -50%; right: -50%; bottom: 0; height: 40%;
  background-image:
    linear-gradient(var(--grid) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--grid) 1.5px, transparent 1.5px);
  background-size: 96px 96px; background-position: center bottom;
  transform: perspective(420px) rotateX(62deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.5) 35%, transparent 80%);
          mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.5) 35%, transparent 80%);
  opacity: 1;
}

/* ---------- sections ---------- */
.ws { --pad: clamp(72px, 12vw, 160px); padding: var(--pad) var(--gutter) 0; max-width: 1400px; margin: 0 auto; }
/* jumps (1/2/3, links) land on the content, not on the empty padding above it */
.ws:not(.contact) { scroll-margin-top: calc(-1 * var(--pad)); }

/* ---------- windows (Hyprland tiles) ---------- */
.tiles { display: grid; gap: var(--gap); }
.win {
  position: relative; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
a.win:hover, a.win:focus-visible { border-color: var(--accent); background: var(--panel-2); outline: none; }
.win-bar {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 14px; border-bottom: 1px solid var(--line);
  font-size: .72rem; color: var(--dim);
  transition: border-color .25s var(--ease), color .25s;
}
a.win:hover .win-bar, a.win:focus-visible .win-bar { border-color: var(--accent); color: var(--accent); }
.win-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-meta { flex: none; white-space: nowrap; }
.win-body { display: flex; flex-direction: column; gap: 6px; padding: clamp(18px, 2.2vw, 28px); flex: 1; }
.win-h { color: var(--hi); font-size: 1.3rem; line-height: 1.15; }
.win-p { color: var(--dim); font-style: italic; }

/* the two companies: logos only */
.tiles-ventures { grid-template-columns: 1fr 1fr; align-items: center; min-height: clamp(416px, calc(58vh + 36px), 636px); }
/* compact windows, each centered in its half, so the logos stay where they were */
.win-venture { justify-self: center; width: min(100%, clamp(280px, 27vw, 380px)); }
.win-venture .win-body { aspect-ratio: 1; align-items: center; justify-content: center; }
.logo {
  width: clamp(130px, 15vw, 220px); aspect-ratio: 1;
  background: var(--hi); opacity: .85;
  -webkit-mask: var(--logo) center / contain no-repeat;
          mask: var(--logo) center / contain no-repeat;
  transition: background-color .3s var(--ease), scale .6s var(--ease), opacity .3s;
}
.logo-firebird { --logo: url("partners/firebird.webp"); }
.logo-lmg { --logo: url("partners/lmg.svg"); width: clamp(110px, 12.5vw, 180px); }
.win-venture:hover .logo, .win-venture:focus-visible .logo, .win-venture.focused .logo { background: var(--accent); scale: 1.04; opacity: 1; }
/* Fire / Fandom focus one window, Hyprland-style: bronze border on it, the other dims */
.win-venture { transition: border-color .25s var(--ease), background-color .25s var(--ease), opacity .5s var(--ease); }
.win-venture.focused { border-color: var(--accent); background: var(--panel-2); }
.win-venture.focused .win-bar { border-color: var(--accent); color: var(--accent); }
.win-venture.dimmed, .js .win-venture.reveal.dimmed { opacity: .35; }

/* code */
.slop {
  font-weight: 400; font-style: italic; color: var(--hi);
  font-size: clamp(2.2rem, 5.5vw, 4.8rem); line-height: 1;
  margin: 0 0 clamp(28px, 4vw, 56px);
}
.tiles-code { grid-template-columns: repeat(3, 1fr); }
.tiles-code .win-body { min-height: 150px; justify-content: flex-end; }
@media (min-width: 1101px) { .tiles-code .win:last-child:nth-child(3n+1) { grid-column: 1 / -1; } }

/* contact */
.contact { display: grid; justify-items: center; text-align: center; padding-top: clamp(120px, 18vw, 240px); padding-bottom: clamp(120px, 18vw, 240px); }
.mark-lg { font-size: 44px; margin-bottom: 32px; }
.mail { color: var(--hi); font-size: clamp(1.6rem, 4.6vw, 3.6rem); line-height: 1.1; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; overflow-wrap: anywhere; }
.mail:hover { color: var(--accent); border-color: var(--accent); }

/* scroll reveal (only when JS is running, so nothing is ever stuck hidden) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .hero .reveal:nth-child(2) { transition-delay: .1s; }
.js .hero .reveal:nth-child(3) { transition-delay: .2s; }
.js .hero .reveal:nth-child(4) { transition-delay: .45s; }
.tiles .reveal:nth-child(3n+2) { transition-delay: .06s; }
.tiles .reveal:nth-child(3n) { transition-delay: .12s; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .tiles-code { grid-template-columns: 1fr 1fr; }
  .tiles-code .win:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero h1 { grid-column: 1; grid-row: 2; }
  .margin { grid-column: 1; justify-self: center; padding: 0; }
  .margin-l { grid-row: 1; margin-bottom: 18px; }
  .margin-r { grid-row: 3; margin-top: 16px; }
}
@media (max-width: 760px) {
  .bar { grid-template-columns: auto 1fr auto; }
  .hero h1 { white-space: normal; font-size: clamp(3rem, 17vw, 5.5rem); }
  .triad { gap: 32px; }
  .tiles-ventures, .tiles-code { grid-template-columns: 1fr; }
  .tiles-ventures { min-height: 0; }
  .win-venture { width: min(100%, 240px); }
  .tiles-code .win-body { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
