/* APForged: forged iron, brand purple, ember heat. */

:root {
  --iron-900: #0c0a12;
  --iron-800: #13111b;
  --iron-700: #1b1826;
  --iron-600: #2a2638;
  --text: #efedf6;
  --muted: #a39eb5;
  --purple: #7b5cf5;
  --purple-deep: #5b39c9;
  --pink: #f77ade;
  --ember: #ff9a4d;
  --heat: linear-gradient(100deg, #8f73ff 0%, #f77ade 55%, #ff9a4d 100%);
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --radius: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 17px/1.7 var(--body);
  color: var(--text);
  background: var(--iron-900);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, dl, dd { margin: 0; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 10px 16px; background: var(--purple); color: #fff; border-radius: 10px; }
.skip:focus { left: 8px; }

/* ---- shared pieces */
.eyebrow {
  font: 700 .74rem/1 var(--body);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 18px;
}
.heat { background: var(--heat); -webkit-background-clip: text; background-clip: text; color: transparent; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px;
  border: 1px solid var(--iron-600);
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  font: 700 .95rem/1 var(--body);
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .12s ease, box-shadow .18s ease;
}
.btn:hover { border-color: var(--purple); background: rgba(123, 92, 245, .12); }
.btn:active { transform: translateY(1px); }
.btn-solid { border-color: transparent; background: var(--purple-deep); box-shadow: 0 10px 30px -10px rgba(123, 92, 245, .8); }
.btn-solid:hover { background: var(--purple); border-color: transparent; box-shadow: 0 14px 36px -10px rgba(247, 122, 222, .7); }
.btn-small { padding: 11px 18px; font-size: .88rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---- header */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease;
}
.site-head.scrolled { background: rgba(12, 10, 18, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--iron-700); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.brand-word { font: 900 1.02rem/1 var(--display); letter-spacing: .02em; color: var(--text); }
.brand-word b { font-weight: 900; color: var(--purple); }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; transition: color .15s ease; }
.nav a:not(.btn):hover { color: var(--text); }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--iron-600); border-radius: 12px; background: var(--iron-800); cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 2px; margin: 4px auto; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---- hero */
.hero {
  position: relative;
  padding: 170px 0 70px;
  background:
    radial-gradient(900px 520px at 82% 8%, rgba(123, 92, 245, .30), transparent 62%),
    radial-gradient(700px 420px at 100% 62%, rgba(255, 154, 77, .13), transparent 60%),
    radial-gradient(600px 400px at 0% 0%, rgba(247, 122, 222, .10), transparent 60%);
}
.hero::before {
  /* faint forge-floor grid, fading out toward the bottom */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(#000, transparent 85%); mask-image: linear-gradient(#000, transparent 85%);
}
.hero > * { position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero h1 {
  font: 700 clamp(2.1rem, 4.6vw, 3.55rem)/1.12 var(--display);
  letter-spacing: -.02em;
  text-wrap: balance;
}
.lede { margin-top: 24px; max-width: 34em; font-size: 1.13rem; color: var(--muted); }

.forge {
  border: 1px solid var(--iron-600);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(27, 24, 38, .92), rgba(19, 17, 27, .92));
  box-shadow: 0 40px 80px -40px rgba(123, 92, 245, .55), 0 0 0 1px rgba(255, 255, 255, .02) inset;
  overflow: hidden;
  transform: rotate(1.2deg);
}
.forge-bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid var(--iron-600); }
.forge-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--iron-600); }
.forge-bar i:nth-child(1) { background: var(--ember); }
.forge-bar i:nth-child(2) { background: var(--pink); }
.forge-bar i:nth-child(3) { background: var(--purple); }
.forge-bar span { margin-left: 10px; font: 500 .8rem/1 var(--mono); color: var(--muted); }
.forge-body { margin: 0; padding: 22px 22px 26px; font: 500 .9rem/1.9 var(--mono); color: #d9d5e8; white-space: pre-wrap; overflow-wrap: anywhere; }
.forge-body .p { color: var(--purple); font-weight: 700; }
.forge-body .ok { color: var(--ember); }
.caret { display: inline-block; width: 9px; height: 1.1em; vertical-align: -3px; background: var(--pink); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: 84px;
  border: 1px solid var(--iron-600); border-radius: var(--radius);
  background: rgba(19, 17, 27, .7);
}
.stats div { padding: 28px 30px; }
.stats div + div { border-left: 1px solid var(--iron-600); }
.stats dt { font: 700 clamp(1.5rem, 3vw, 2.1rem)/1.1 var(--display); background: var(--heat); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats dd { margin-top: 8px; color: var(--muted); font-size: .95rem; }

/* ---- sections */
.section { padding: 110px 0; }
.section-alt { background: var(--iron-800); border-block: 1px solid var(--iron-700); }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head h2 { font: 700 clamp(1.6rem, 3.2vw, 2.4rem)/1.18 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.section-head h2 + p { margin-top: 22px; color: var(--muted); }

/* ---- about cards */
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.card {
  grid-column: span 2;
  padding: 30px 28px 32px;
  border: 1px solid var(--iron-600); border-radius: var(--radius);
  background: var(--iron-800);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.card:nth-child(4), .card:nth-child(5) { grid-column: span 3; }
.card:hover { border-color: var(--purple); background: var(--iron-700); transform: translateY(-3px); }
.card h3 { margin: 22px 0 10px; font: 700 1.02rem/1.3 var(--display); letter-spacing: -.01em; }
.card p { color: var(--muted); font-size: .97rem; }
.icon {
  display: block; width: 52px; height: 52px;
  background: var(--heat);
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat;
}
.icon-community { -webkit-mask-image: url(../img/icons/solution1.svg); mask-image: url(../img/icons/solution1.svg); }
.icon-experience { -webkit-mask-image: url(../img/icons/goal.svg); mask-image: url(../img/icons/goal.svg); }
.icon-optimised { -webkit-mask-image: url(../img/icons/project-management.svg); mask-image: url(../img/icons/project-management.svg); }
.icon-scalable { -webkit-mask-image: url(../img/icons/solution.svg); mask-image: url(../img/icons/solution.svg); }
.icon-codebase { -webkit-mask-image: url(../img/icons/planning.svg); mask-image: url(../img/icons/planning.svg); }

/* ---- work */
.project { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.project + .project { margin-top: 96px; }
.project-flip .project-media { order: 2; }
.project-media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--iron-600); box-shadow: 0 40px 70px -40px rgba(0, 0, 0, .9); }
.project-media img { width: 100%; }
.project-logo { width: 64px; height: 64px; margin-bottom: 18px; }
.tag { font: 700 .74rem/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.project-text h3 { font: 700 clamp(1.4rem, 2.6vw, 1.9rem)/1.2 var(--display); letter-spacing: -.02em; margin-bottom: 18px; }
.project-text p:not(.tag) { color: var(--muted); }
.project-text p:not(.tag) + p { margin-top: 14px; }

.tny { display: block; padding: 84px 28px; text-align: center; text-decoration: none; background: radial-gradient(520px 300px at 50% 0%, rgba(123, 92, 245, .28), transparent 70%), #0d0c12; transition: border-color .2s ease; }
.tny:hover { border-color: var(--purple); }
.tny > span { display: block; }
.tny-mark, .tny-chip { font-family: var(--mono); color: #f1eff8; }
.tny-mark { font-weight: 800; font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1; letter-spacing: -.05em; }
.tny-mark span, .tny-chip span { color: #a593ff; }
.tny-line { margin-top: 18px; color: var(--muted); }
.tny > .tny-chip { display: inline-block; margin-top: 28px; padding: 12px 22px; border-radius: 14px; background: #16151d; border: 1px solid #2a2836; font-size: 1.05rem; }

/* ---- team */
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.person { padding: 30px 28px; border: 1px solid var(--iron-600); border-radius: var(--radius); background: var(--iron-800); }
.person img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--iron-600); }
.person h3 { margin-top: 18px; font: 700 1.1rem/1.2 var(--display); }
.handle { margin-top: 10px; font: 600 1rem/1.3 var(--mono); color: var(--text); }
.handle::before { content: "@"; color: var(--purple); }
.id { margin-top: 4px; font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.person a { display: inline-block; margin-top: 18px; color: var(--ember); font-weight: 700; font-size: .92rem; text-decoration: none; }
.person a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---- footer */
.site-foot { border-top: 1px solid var(--iron-700); padding: 44px 0 36px; background: var(--iron-900); }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-foot .brand img { width: 30px; height: 30px; }
.site-foot .brand-word { font-size: .9rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.foot-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; }
.foot-nav a:hover { color: var(--text); }
.legal { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--iron-700); color: var(--muted); font-size: .82rem; }

/* ---- ease-in on scroll (only when the script is running) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .card.reveal.in:hover { transform: translateY(-3px); }

/* ---- smaller screens */
@media (max-width: 980px) {
  .hero { padding-top: 140px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .forge { transform: none; max-width: 560px; }
  .card, .card:nth-child(4), .card:nth-child(5) { grid-column: span 3; }
  .card:nth-child(5) { grid-column: span 6; }
  .project, .project-flip { grid-template-columns: 1fr; gap: 32px; }
  .project-flip .project-media { order: 0; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .section { padding: 76px 0; }
  .head-row { height: 68px; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 68px; left: 12px; right: 12px;
    display: none; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px;
    border: 1px solid var(--iron-600); border-radius: 16px;
    background: var(--iron-800);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9);
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 12px 14px; border-radius: 10px; }
  .nav a:not(.btn):hover { background: var(--iron-700); }
  .nav .btn { margin-top: 6px; }
  .stats { grid-template-columns: 1fr; margin-top: 56px; }
  .stats div + div { border-left: 0; border-top: 1px solid var(--iron-600); }
  .cards { grid-template-columns: 1fr; }
  .card, .card:nth-child(4), .card:nth-child(5) { grid-column: auto; }
  .people { grid-template-columns: 1fr; }
  .project + .project { margin-top: 64px; }
  .tny { padding: 56px 20px; }
  .foot-row { flex-direction: column; align-items: flex-start; }
}

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