/* Nocturne Foundry site. Iron ground, Metropolis headlines, Geist body, Geist Mono data. One ember accent per view. */
@font-face { font-family: "Metropolis"; font-weight: 600; font-display: swap; src: url("../fonts/metropolis-latin-600-normal.woff2") format("woff2") }
@font-face { font-family: "Metropolis"; font-weight: 800; font-display: swap; src: url("../fonts/metropolis-latin-800-normal.woff2") format("woff2") }
@font-face { font-family: "Geist"; font-weight: 400; font-display: swap; src: url("../fonts/geist-sans-latin-400-normal.woff2") format("woff2") }
@font-face { font-family: "Geist"; font-weight: 500; font-display: swap; src: url("../fonts/geist-sans-latin-500-normal.woff2") format("woff2") }
@font-face { font-family: "Geist"; font-weight: 600; font-display: swap; src: url("../fonts/geist-sans-latin-600-normal.woff2") format("woff2") }
@font-face { font-family: "Geist Mono"; font-weight: 400; font-display: swap; src: url("../fonts/geist-mono-latin-400-normal.woff2") format("woff2") }
@font-face { font-family: "Geist Mono"; font-weight: 500; font-display: swap; src: url("../fonts/geist-mono-latin-500-normal.woff2") format("woff2") }

:root {
  color-scheme: dark;
  --iron: #121314; --graphite: #2A2C2F; --steel: #8A8F96; --ash: #E6E7E3; --ember: #FF5A1F;
  --panel: #18191b; --line: #26282b; --line-2: #34373b; --text: #E6E7E3; --muted: #8A8F96; --soft: #c9cac6;
  --display: "Metropolis", "Arial Black", system-ui, sans-serif;
  --body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
  --max: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
}
*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth }
html, body { margin: 0; background: var(--iron); color: var(--text) }
body { font-family: var(--body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility }
img, svg { max-width: 100%; display: block }
a { color: inherit }
p { margin: 0 }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -.015em; line-height: 1.04; text-wrap: balance }
::selection { background: var(--ember); color: var(--iron) }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ash); color: var(--iron); padding: 8px 12px; z-index: 100 }
.skip:focus { left: 8px }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)) }
.lbl { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted) }
.lbl.em { color: var(--ember) }
.muted { color: var(--muted) }

/* header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(18, 19, 20, .86); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--line) }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--iron) }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px }
.brand { display: inline-flex; align-items: center; text-decoration: none }
.brand img { height: 40px; width: auto }
.nav { display: flex; align-items: center; gap: 28px; font-size: 14px }
.nav a { text-decoration: none; color: var(--soft) }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text) }
.nav .cta { color: var(--iron); background: var(--ash); padding: 9px 16px; font-weight: 500 }
.nav .cta:hover { background: #fff; color: var(--iron) }
.menu-btn { display: none; background: none; border: 1px solid var(--line-2); color: var(--text); font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 9px 12px; cursor: pointer }

/* hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line) }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 30%, transparent 75%); opacity: .55; pointer-events: none }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(32px, 6vw, 96px); align-items: center; padding-block: clamp(56px, 10vw, 140px) clamp(48px, 8vw, 110px) }
.hero h1 { font-size: clamp(42px, 6.6vw, 96px) }
.hero h1 .dim { color: var(--muted) }
.hero-copy { display: grid; gap: 28px }
.hero-copy p.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--soft); max-width: 54ch }
.actions { display: flex; flex-wrap: wrap; gap: 12px }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 20px; font-weight: 500; font-size: 15px; text-decoration: none; border: 1px solid var(--line-2) }
.btn.primary { background: var(--ember); border-color: var(--ember); color: var(--iron) }
.btn.primary:hover { background: #ff6d38 }
.btn:not(.primary):hover { border-color: var(--steel) }
.btn .arr { font-family: var(--mono) }
.hero-tile { justify-self: end; width: min(100%, 420px); perspective: 900px }
.hero-tile img { width: 100%; height: auto; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s cubic-bezier(.2, .7, .2, 1); filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .5)) }
.hero-meta { position: relative; display: flex; flex-wrap: wrap; gap: 10px 32px; padding-bottom: 28px }

/* sections */
.sec { padding-block: clamp(64px, 9vw, 128px); border-bottom: 1px solid var(--line) }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px) }
.sec-head h2 { font-size: clamp(32px, 4.4vw, 58px) }
.sec-head p { color: var(--soft); max-width: 58ch; font-size: 17px }
.sec-head .lbl { grid-column: 1 / -1 }

/* what we do */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-2) }
.pillar { padding: 32px 28px 36px 0; display: grid; gap: 16px; align-content: start; border-right: 1px solid var(--line) }
.pillar + .pillar { padding-left: 28px }
.pillar:last-child { border-right: 0 }
.pillar h3 { font-size: 26px }
.pillar p { color: var(--soft) }
.pillar ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line) }
.pillar li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; display: flex; justify-content: space-between; gap: 12px }
.pillar li span { font-family: var(--mono); font-size: 11.5px; color: var(--muted) }

/* element table */
.table { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px }
.el { position: relative; aspect-ratio: 1; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; display: grid; grid-template-rows: auto 1fr auto; transition: border-color .2s, transform .2s }
.el:hover { border-color: var(--steel); transform: translateY(-2px) }
.el .top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; color: var(--muted) }
.el .sym { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 3.6vw, 48px); line-height: 1; align-self: center; letter-spacing: -.02em }
.el .name { font-size: 12.5px; line-height: 1.3; color: var(--soft) }
.el.g-soft { background: #1d1f22 }
.el.g-crea { background: #16171a; border-style: dashed }
.el.hot { background: var(--ember); border-color: var(--ember); color: var(--iron) }
.el.hot .top, .el.hot .name { color: var(--iron) }
.table-key { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 22px; font-size: 13px; color: var(--muted) }
.table-key i { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--line-2); border-radius: 3px; margin-right: 8px; vertical-align: -1px }

/* companies */
.cos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2) }
.co { padding: 28px 24px 30px; border-right: 1px solid var(--line); display: grid; gap: 10px; align-content: start; min-height: 220px }
.co:first-child { padding-left: 0 }
.co:last-child { border-right: 0 }
.co .k { font-family: var(--mono); font-size: 11.5px; color: var(--muted) }
.co h3 { font-family: var(--display); font-size: 22px; letter-spacing: .01em }
.co p { color: var(--soft); font-size: 15px }
.co .tag { margin-top: auto; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ember) }

/* process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: s }
.step { background: var(--panel); border: 1px solid var(--line); padding: 26px 24px; display: grid; gap: 12px; align-content: start; counter-increment: s }
.step::before { content: "0" counter(s); font-family: var(--mono); font-size: 12px; color: var(--ember) }
.step h3 { font-size: 21px }
.step p { color: var(--soft); font-size: 15px }

/* work */
.work { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 12px }
.case { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--line); padding: 28px; min-height: 260px; display: grid; align-content: space-between; gap: 30px }
.case::after { content: "NDA"; position: absolute; right: -10px; bottom: -34px; font-family: var(--display); font-weight: 800; font-size: 150px; line-height: 1; color: #ffffff06; pointer-events: none }
.case h3 { font-size: clamp(22px, 2.4vw, 30px); max-width: 22ch }
.case .meta { display: flex; flex-wrap: wrap; gap: 8px }
.chip { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line-2); padding: 5px 9px; color: var(--soft) }
.case-stack { display: grid; gap: 12px }
.case-stack .case { min-height: 0 }

/* software band */
.sw-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center }
.sw-list { display: grid; border-top: 1px solid var(--line-2) }
.sw-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line) }
.sw-item img { width: 48px; height: 48px }
.sw-item b { font-family: var(--display); font-weight: 800; font-size: 18px; display: block }
.sw-item span { font-size: 14px; color: var(--muted) }
.sw-item .st { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); border: 1px solid var(--line-2); padding: 4px 8px; white-space: nowrap }
.publisher { background: var(--panel); border: 1px solid var(--line); padding: 26px; display: grid; gap: 14px }
.publisher dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 14.5px }
.publisher dt { color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; padding-top: 2px }
.publisher dd { margin: 0 }

/* contact */
.contact { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 96px); align-items: start }
.contact h2 { font-size: clamp(36px, 5.4vw, 76px) }
.contact-card { border: 1px solid var(--line-2); padding: 28px; display: grid; gap: 18px }
.contact-card .mail { font-family: var(--display); font-weight: 600; font-size: clamp(20px, 2.2vw, 28px); text-decoration: none; overflow-wrap: anywhere }
.contact-card .mail:hover { color: var(--ember) }
.contact-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--soft); font-size: 15px }
.contact-card li::before { content: "—"; color: var(--ember); margin-right: 10px }
.copy-btn { justify-self: start; background: none; border: 1px solid var(--line-2); color: var(--text); font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 9px 12px; cursor: pointer }
.copy-btn:hover { border-color: var(--steel) }

/* page (inner) */
.page-hero { padding-block: clamp(56px, 8vw, 110px) clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--line); display: grid; gap: 22px }
.page-hero h1 { font-size: clamp(40px, 6vw, 84px); max-width: 16ch }
.page-hero p { color: var(--soft); font-size: 18px; max-width: 60ch }
.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); padding-block: clamp(48px, 7vw, 96px) }
.doc-nav { position: sticky; top: 100px; align-self: start; display: grid; gap: 10px; font-size: 14px }
.doc-nav a { color: var(--muted); text-decoration: none } .doc-nav a:hover { color: var(--text) }
.doc-body { display: grid; gap: 48px; max-width: 74ch }
.doc-body section { display: grid; gap: 14px; scroll-margin-top: 100px }
.doc-body h2 { font-size: clamp(24px, 2.6vw, 32px) }
.doc-body p, .doc-body li { color: var(--soft) }
.doc-body ul { margin: 0; padding-left: 20px; display: grid; gap: 6px }
.facts { margin: 0; display: grid; grid-template-columns: minmax(140px, auto) 1fr; border-top: 1px solid var(--line-2) }
.facts dt, .facts dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line) }
.facts dt { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); padding-right: 20px }
.ph { color: var(--ember) }

/* footer */
.site-foot { padding-block: 56px calc(40px + env(safe-area-inset-bottom, 0px)) }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px }
.foot-grid img { height: 38px; width: auto }
.foot-grid h4 { margin: 0 0 12px; font: 500 11.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted) }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px }
.foot-grid a { text-decoration: none; color: var(--soft) } .foot-grid a:hover { color: var(--text) }
.foot-base { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted) }

/* reveal (content is visible by default; motion only enhances) */
@media (prefers-reduced-motion: no-preference) {
  .rv { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both }
  .rv.d1 { animation-delay: .08s } .rv.d2 { animation-delay: .16s } .rv.d3 { animation-delay: .24s }
  @keyframes rise { from { transform: translateY(14px); opacity: .001 } to { transform: none; opacity: 1 } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } .hero-tile img { transition: none } }

/* responsive */
@media (min-width: 1800px) { :root { --max: 1440px } body { font-size: 17px } }
@media (max-width: 1080px) {
  .table { grid-template-columns: repeat(4, minmax(0, 1fr)) }
  .cos { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .co:nth-child(2) { border-right: 0 } .co:nth-child(3) { padding-left: 0 } .co:nth-child(-n+2) { border-bottom: 1px solid var(--line) }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) } .foot-grid > :first-child { grid-column: 1 / -1 }
}
@media (max-width: 860px) {
  .menu-btn { display: inline-block }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; gap: 0; background: var(--iron); border-bottom: 1px solid var(--line); padding: 8px max(var(--gutter), env(safe-area-inset-left, 0px)) 18px }
  .nav.open { display: flex }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line) }
  .nav .cta { margin-top: 14px; text-align: center; border: 0 }
  .hero-grid { grid-template-columns: minmax(0, 1fr) }
  .hero-tile { justify-self: start; width: min(70%, 300px); order: -1 }
  .sec-head, .sw-band, .contact, .work { grid-template-columns: minmax(0, 1fr) }
  .pillars { grid-template-columns: minmax(0, 1fr) }
  .pillar, .pillar + .pillar { padding: 28px 0; border-right: 0; border-bottom: 1px solid var(--line) }
  .doc { grid-template-columns: minmax(0, 1fr) } .doc-nav { position: static; display: flex; flex-wrap: wrap; gap: 8px 18px }
}
@media (max-width: 560px) {
  .table { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px }
  .el { padding: 9px 10px; border-radius: 8px } .el .top { font-size: 10px } .el .name { font-size: 11px }
  .cos { grid-template-columns: minmax(0, 1fr) } .co, .co:nth-child(3) { padding-left: 0; border-right: 0; border-bottom: 1px solid var(--line); min-height: 0 }
  .steps { grid-template-columns: minmax(0, 1fr) }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .sw-item { grid-template-columns: 40px minmax(0, 1fr) } .sw-item img { width: 40px; height: 40px } .sw-item .st { grid-column: 2; justify-self: start }
  .facts { grid-template-columns: minmax(0, 1fr) } .facts dt { border-bottom: 0; padding-bottom: 0 }
}

/* contact form */
.contact-form { display: grid; gap: 18px; border: 1px solid var(--line-2); padding: clamp(20px, 3vw, 32px); background: var(--panel) }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px }
.field { display: grid; gap: 8px; min-width: 0 }
.field > span, .topics legend { font: 500 11.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted) }
.field em { font-style: normal; text-transform: none; letter-spacing: 0; color: #63676d; margin-left: 6px }
.field input, .field select, .field textarea { width: 100%; font: 400 16px var(--body); color: var(--text); background: var(--iron); border: 1px solid var(--line-2); border-radius: 0; padding: 12px 14px; appearance: none; -webkit-appearance: none }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px }
.field textarea { resize: vertical; min-height: 130px; line-height: 1.5 }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ember) }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #e5484d }
.field ::placeholder { color: #5f636a }
.topics { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px }
.topics legend { margin-bottom: 10px; padding: 0 }
.topics label { position: relative; cursor: pointer }
.topics input { position: absolute; opacity: 0; inset: 0; cursor: pointer }
.topics span { display: inline-block; padding: 8px 12px; border: 1px solid var(--line-2); font-size: 14px; color: var(--soft) }
.topics input:checked + span { background: var(--ash); border-color: var(--ash); color: var(--iron) }
.topics input:focus-visible + span { outline: 2px solid var(--ember); outline-offset: 2px }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap }
.form-foot .btn { cursor: pointer; font-family: var(--body) }
.form-foot .btn[disabled] { opacity: .6; cursor: progress }
.form-status { font-size: 14px; color: var(--soft) }
.form-status.ok { color: var(--ash) } .form-status.err { color: #ff8a80 }
.contact-form.sent .field, .contact-form.sent .field-row, .contact-form.sent .topics { opacity: .45; pointer-events: none }
@media (max-width: 560px) { .field-row { grid-template-columns: minmax(0, 1fr) } }
