/* Maahes — maahes.io | on-chain & OSINT investigations */
:root {
    --bg: #141A17;
    --panel: #1B2420;
    --cell: #243029;
    --line: #34403A;
    --text-2: #A2A79C;
    --text-1: #E7E3D6;
    --accent: #86B8A2;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Manrope', system-ui, sans-serif;
    --pad: clamp(24px, 8.4vw, 120px);
    --rail: clamp(12px, 4.45vw, 64px);
    --block: clamp(70px, 8vw, 116px);
    --h1: clamp(42px, 6.4vw, 92px);
    --h2: clamp(34px, 4.2vw, 60px);
    --h3: clamp(22px, 1.95vw, 28px);
    --body: clamp(15px, 1.2vw, 17px);
    --lead: clamp(16px, 1.25vw, 18px);
    --gut: 24px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-1);
    font-family: var(--sans);
    font-size: var(--body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased
}

img, svg {
    display: block
}

a {
    color: var(--text-1);
    text-decoration: none
}

h1, h2, h3, p, figure, blockquote {
    margin: 0
}

ul {
    margin: 0;
    padding: 0;
    list-style: none
}

/* ---------- typography ---------- */
.h1 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: var(--h1);
    line-height: 1.1;
    letter-spacing: -.01em
}

.h2 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: var(--h2);
    line-height: 1.04;
    letter-spacing: -.01em
}

.h3 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: var(--h3);
    line-height: 1.15
}

.serif-num {
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1;
    font-variant-numeric: lining-nums;
    color: var(--text-2);
    font-size: 50px
}

.lead {
    font-size: var(--lead);
    color: var(--text-2)
}

.muted {
    color: var(--text-2)
}

.caps {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text-2)
}

.quote {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    line-height: 1.14
}

.label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text-2)
}

.label::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--accent);
    flex: none
}

.label--center {
    justify-content: center
}

/* ---------- layout ---------- */
.band {
    position: relative;
    padding: var(--block) var(--pad)
}

.band--panel {
    background: var(--panel)
}

.band::before, .band::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--line);
    pointer-events: none
}

.band::before {
    left: var(--rail)
}

.band::after {
    right: var(--rail)
}

.band--node > .node {
    position: absolute;
    top: -4px;
    width: 9px;
    height: 9px;
    border: 1px solid var(--line);
    background: var(--bg);
    z-index: 2
}

.band--panel.band--node > .node {
    background: var(--panel)
}

.node--l {
    left: calc(var(--rail) - 4px)
}

.node--r {
    right: calc(var(--rail) - 4px)
}

.inner {
    max-width: 1200px;
    margin: 0 auto
}

.grid {
    display: grid;
    grid-template-columns:repeat(12, minmax(0, 1fr));
    column-gap: var(--gut)
}

.stack {
    display: flex;
    flex-direction: column
}

.gap-s {
    gap: 14px
}

.gap-m {
    gap: 22px
}

.gap-l {
    gap: 28px
}

.center {
    text-align: center;
    align-items: center
}

/* ---------- buttons & links ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 54px;
    padding: 0 28px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .02em;
    border: 1px solid transparent;
    transition: background .2s, color .2s, border-color .2s
}

.btn--primary {
    background: var(--accent);
    color: var(--bg)
}

.btn--primary:hover {
    background: var(--text-1)
}

.btn--ghost {
    border-color: var(--accent);
    color: var(--text-1)
}

.btn--ghost:hover {
    border-color: var(--text-1);
    color: var(--text-1)
}

.btn--block {
    width: 100%
}

.btn--sm {
    height: 44px;
    padding: 0 22px;
    font-size: 14px;
    letter-spacing: .06em
}

.tlink {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-size: 15px;
    font-weight: 600;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
    transition: color .2s, border-color .2s
}

.tlink:hover {
    color: var(--text-1);
    border-color: var(--accent)
}

.arrow {
    flex: none
}

/* ---------- ornament ---------- */
svg .a {
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.2;
    stroke-linecap: square;
    stroke-linejoin: miter
}

svg .l {
    fill: none;
    stroke: var(--line);
    stroke-width: 1;
    stroke-linecap: square
}

svg .w {
    fill: none;
    stroke: var(--line);
    stroke-width: 1.4;
    stroke-linecap: square
}

svg .c {
    fill: none;
    stroke: var(--cell);
    stroke-width: 1
}

svg .nf {
    fill: none
}

svg .fa {
    fill: var(--accent);
    stroke: none
}

svg .fl {
    fill: var(--line);
    stroke: none
}

svg .fp {
    fill: var(--panel);
    stroke: none
}

svg .fb {
    fill: var(--bg);
    stroke: none
}

svg .fc {
    fill: var(--cell);
    stroke: none
}

svg .fcl {
    fill: var(--cell);
    stroke: var(--line);
    stroke-width: 1
}

.frieze {
    position: relative;
    height: 24px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background-image: var(--frieze);
    background-repeat: repeat-x;
    background-position: left center;
    margin: 0 var(--rail)
}

.frieze__cap {
    position: absolute;
    top: -1px;
    bottom: -1px;
    width: 24px;
    background: var(--bg);
    border: 1px solid var(--line);
    display: grid;
    place-items: center
}

.frieze__cap--l {
    left: 0
}

.frieze__cap--r {
    right: 0
}

.rune-box {
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    background: var(--cell);
    flex: none
}

.rune-box--plain {
    background: transparent
}

.frame {
    position: absolute;
    inset: 0;
    border: 1px solid var(--line);
    pointer-events: none
}

.frame::after {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid var(--accent)
}

.frame__c {
    position: absolute;
    width: 44px;
    height: 44px;
    background: var(--frame-bg, var(--bg))
}

.frame__c--tl {
    top: -1px;
    left: -1px
}

.frame__c--tr {
    top: -1px;
    right: -1px;
    transform: scaleX(-1)
}

.frame__c--bl {
    bottom: -1px;
    left: -1px;
    transform: scaleY(-1)
}

.frame__c--br {
    bottom: -1px;
    right: -1px;
    transform: scale(-1)
}

/* ---------- seams between sections ---------- */
.seam {
    position: relative;
    background: var(--seam-bg, var(--bg));
    z-index: 2;
}

.seam__line {
    position: absolute;
    left: var(--rail);
    right: var(--rail);
    top: 0;
    height: 1px;
    background: var(--line)
}

.seam__ticks {
    position: absolute;
    left: var(--rail);
    right: var(--rail);
    top: 1px;
    height: 10px;
    background-image: var(--ticks);
    background-repeat: repeat-x;
    opacity: .9
}

.seam__gate {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    background: var(--seam-bg, var(--bg));
    border: 1px solid var(--accent)
}

.seam__gate::before {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid var(--line)
}

.seam__tags {
    position: absolute;
    left: var(--pad);
    right: var(--pad);
    top: 26px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text-2)
}

.seam__tags .is-next {
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 12px
}

.seam__tags .is-next::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--accent)
}

.trail {
    position: relative;
    z-index: 2;
    height: 120px;
    margin-bottom: -56px;
    background: var(--seam-bg, var(--bg));
    display: flex;
    justify-content: center
}

.trail__col {
    position: relative;
    width: 32px;
    margin-top: -15px;
}

.trail__cell {
    position: absolute;
    left: 0;
    width: 32px;
    height: 32px;
    background: var(--cell);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    opacity: 0;
    transform: none;
    transition: opacity .5s ease
}

.trail__cell::after {
    content: "";
    width: 3px;
    height: 3px;
    background: var(--accent);
    opacity: 0
}

.trail__cell:nth-child(odd)::after {
    opacity: 1
}

.is-in .trail__cell {
    opacity: 1
}

@media (prefers-reduced-motion: reduce) {
    .trail__cell {
        opacity: 1;
        transition: none
    }
}

.trail + .band {
    padding-top: calc(var(--block) + 40px)
}

.trail__node {
    position: absolute;
    left: -8px;
    bottom: -8px;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid var(--accent);
    background: var(--seam-bg, var(--bg))
}

/* ---------- header ---------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 30px 0
}

.topbar__right {
    display: flex;
    align-items: center;
    gap: clamp(10px, 3vw, 44px)
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px
}

.brand__name {
    font-family: var(--serif);
    font-size: clamp(20px, 1.9vw, 26px);
    font-weight: 600;
    letter-spacing: .32em
}

.nav {
    display: flex;
    gap: clamp(10px, 1.6vw, 24px);
    font-size: 14px;
    letter-spacing: .04em
}

.nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-2);
    transition: color .2s
}

.nav a::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--accent);
    flex: none;
    opacity: 0;
    transition: opacity .2s
}

.nav a:hover {
    color: var(--text-1)
}

.nav a[aria-current="true"] {
    color: var(--accent)
}

.nav a[aria-current="true"]::before {
    opacity: 1
}

.sticky {
    position: fixed;
    inset: 0 0 auto;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 72px;
    padding: 0 var(--rail);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    transform: translateY(-100%);
    transition: transform .3s ease;
    will-change: transform
}

.sticky.is-on {
    transform: none
}

.burger {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
    place-items: center
}

.menu {
    position: fixed;
    inset: 0;
    z-index: 50;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    /* clip, not hidden: a scroll container would get scrolled to the focused (off-screen) link on showModal */
    overflow: hidden;
    overflow: clip;
    display: none;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --ease-in-out: cubic-bezier(.65, 0, .25, 1)
}

.menu[open] {
    display: block
}

.menu::backdrop {
    background: transparent
}

/* staggered menu: coloured layers sweep in from the right, then the panel, then the items */
.menu__layers span,
.menu__panel {
    position: absolute;
    inset: 0;
    transform: translateX(100%);
    transition: transform .55s var(--ease-in-out);
    will-change: transform
}

.menu__layers span:nth-child(1) {
    background: var(--accent);
    transition-delay: .12s
}

.menu__layers span:nth-child(2) {
    background: var(--cell);
    transition-delay: .06s
}

.menu.is-open .menu__layers span {
    transition: transform .65s var(--ease-in-out)
}

.menu.is-open .menu__layers span:nth-child(1) {
    transition-delay: 0s
}

.menu.is-open .menu__layers span:nth-child(2) {
    transition-delay: .08s
}

.menu__panel {
    background: var(--bg);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 22px var(--pad) 24px;
    display: flex;
    flex-direction: column
}

.menu.is-open .menu__panel {
    transition: transform .7s var(--ease-in-out) .16s
}

.menu.is-open .menu__layers span,
.menu.is-open .menu__panel {
    transform: none
}

.menu__panel .burger svg {
    transition: transform .5s var(--ease);
    transform: rotate(-90deg)
}

.menu.is-open .menu__panel .burger svg {
    transform: none;
    transition: transform .7s var(--ease) .45s
}

.menu__list {
    margin-top: clamp(20px, 7svh, 76px);
    border-top: 1px solid var(--line)
}

.menu__list a {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: clamp(8px, 1.8svh, 16px) 0;
    border-bottom: 1px solid var(--line);
    overflow: hidden
}

.menu__list .i {
    width: 26px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .2em;
    color: var(--accent)
}

.menu__list .t {
    font-family: var(--serif);
    font-size: clamp(22px, min(8vw, 4.4svh), 32px);
    line-height: 1.25;
    font-weight: 500
}

.menu__list .i,
.menu__list .t {
    display: inline-block;
    transform: translateY(110%) rotate(4deg);
    transform-origin: left bottom;
    opacity: 0;
    transition: transform .2s ease-in, opacity .2s ease-in
}

.menu.is-open .menu__list .i,
.menu.is-open .menu__list .t {
    transform: none;
    opacity: 1;
    transition: transform .8s var(--ease), opacity .6s ease;
    transition-delay: calc(.45s + var(--i, 0) * .06s)
}

.menu.is-open .menu__list .i {
    transition-delay: calc(.52s + var(--i, 0) * .06s)
}

.menu__foot {
    margin-top: auto;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .2s, transform .2s
}

.menu.is-open .menu__foot {
    opacity: 1;
    transform: none;
    transition: opacity .6s ease .8s, transform .7s var(--ease) .8s
}

@media (prefers-reduced-motion: reduce) {
    .menu *,
    .menu.is-open * {
        transition: none !important
    }
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    padding: 40px;
    width: 100%;
    margin: 0 auto;
    --frame-bg: var(--bg)
}

.hero__scan {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none
}

.hero__frame {
    position: absolute;
    inset: 14px;
    z-index: 0
}

.hero > .inner {
    position: relative;
    z-index: 1;
    max-width: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 50px
}

.hero__grid {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
    align-content: center;
}

.hero__copy {
    display: flex;
    flex-direction: column;
    gap: 26px;
    max-width: 760px
}

.hero__copy p {
    max-width: 560px
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px
}

.hero__seal {
    display: flex;
    flex-direction: column;
    align-items: center
}

.hero__seal .stem {
    width: 1px;
    height: 48px;
    background: var(--line)
}

.hero__seal svg {
    width: clamp(220px, 22vw, 300px);
    height: auto
}

.hero__cards {
    position: relative;
    display: grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    border: 1px solid var(--line);
    background: var(--panel);
    margin-top: clamp(40px, 5vw, 64px)
}

.hero__card {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-left: 1px solid var(--line)
}

.hero__card:first-child {
    border-left: 0
}

.hero__card .num {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2em;
    color: var(--accent)
}

.hero__card .top {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.hero__card .name {
    font-family: var(--serif);
    font-size: clamp(22px, 1.9vw, 26px);
    font-weight: 500
}

.hero__card .txt {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-2)
}

/* ---------- services ---------- */
.reg {
    border-top: 1px solid var(--line)
}

.reg__row {
    display: grid;
    grid-template-columns:repeat(12, minmax(0, 1fr));
    column-gap: var(--gut);
    row-gap: 20px;
    padding: clamp(28px, 3vw, 44px) 0;
    border-bottom: 1px solid var(--line)
}

.reg__no {
    grid-column: span 2;
    display: flex;
    align-items: center;
    height: fit-content;
    gap: 20px
}

.reg__name {
    grid-column: span 3
}

.reg__txt {
    grid-column: span 4;
    padding-right: 24px;
    color: var(--text-2)
}

.reg__cov {
    grid-column: span 3
}


.cov li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid var(--line);
    font-size: 14px
}

/* Egyptian numerals: 1–4 "staff" strokes */
.cov li::before {
    content: "";
    width: 14px;
    height: 11px;
    background: repeating-linear-gradient(90deg, var(--text-2) 0 1.5px, transparent 1.5px 4px) center / var(--staffs, 1.5px) 100% no-repeat;
    flex: none
}

.cov li:nth-child(2)::before { --staffs: 5.5px }
.cov li:nth-child(3)::before { --staffs: 9.5px }
.cov li:nth-child(4)::before { --staffs: 13.5px }

.reg__foot {
    display: grid;
    grid-template-columns:repeat(12, minmax(0, 1fr));
    column-gap: var(--gut);
    row-gap: 20px;
    align-items: center;
    padding-top: 40px
}

.reg__foot .r {
    grid-column: span 2;
    display: flex;
    justify-content: flex-end
}

.reg__foot .q {
    grid-column: span 7;
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(22px, 2.1vw, 30px);
    line-height: 1.25
}

.reg__foot .a {
    grid-column: span 3
}

/* ---------- nile ---------- */
.nile {
    position: relative;
    z-index: 3; /* above the band rails, so a lifted card is never cut by them */
    margin: clamp(48px, 6vw, 88px) calc(var(--rail) - var(--pad)) 0
}

.nile svg {
    width: 100%;
    max-width: 1312px;
    height: auto;
    margin: 0 auto;
}

.nile--v {
    display: none
}

.cols3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: var(--gut);
    margin-top: clamp(48px, 6vw, 96px)
}

.method__osint {
    margin-top: clamp(48px, 6vw, 96px);
    padding-top: 28px;
    border-top: 1px solid var(--line)
}

.cols3 > div {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 28px;
    border-top: 1px solid var(--line)
}

/* ---------- research / blog ---------- */
.rows a {
    display: grid;
    grid-template-columns:110px minmax(0, 1fr) 20px;
    column-gap: var(--gut);
    align-items: center;
    padding: 26px 0;
    border-bottom: 1px solid var(--line);
    transition: color .2s
}

.rows a:hover {
    color: var(--accent)
}

.rows .d {
    font-size: 13px;
    color: var(--text-2)
}

.rows .t {
    font-family: var(--serif);
    font-size: clamp(20px, 1.9vw, 28px);
    font-weight: 500;
    line-height: 1.2
}

.tag {
    justify-self: start;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text-2);
    border: 1px solid var(--line);
    padding: 6px 10px
}

.rows__head {
    display: grid;
    grid-template-columns:110px minmax(0, 1fr) 20px;
    column-gap: var(--gut);
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line)
}

.mentions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 72px;
    padding: 36px 40px;
    background: var(--bg);
    border: 1px solid var(--line)
}

.band--panel .mentions {
    background: var(--bg)
}

.mentions__names {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
    font-family: var(--serif);
    font-size: clamp(26px, 2.6vw, 38px);
    font-weight: 500;
    line-height: 1
}

.mentions__names span:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    background: var(--accent);
    margin-left: 22px;
    vertical-align: middle
}

/* mentions as a stele: registers split by a glyph band, like the Rosetta Stone */
.stele {
    --stele-pad: 40px;
    position: relative;
    gap: 0;
    padding: 36px var(--stele-pad) 34px;
    background-image: repeating-linear-gradient(0deg, rgba(134, 184, 162, .025) 0 1px, transparent 1px 9px)
}

.stele__break {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 120px;
    height: 44px
}

.stele__reg {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 26px 0
}

.stele__reg:first-of-type {
    padding-top: 0
}

.stele__reg:last-child {
    padding-bottom: 0
}

.stele__label {
    display: flex;
    align-items: center;
    gap: 12px
}

.stele__label span {
    min-width: 22px;
    font-family: var(--serif);
    font-size: 15px;
    letter-spacing: .08em;
    color: var(--accent)
}

.stele .mentions__names {
    row-gap: 12px;
    column-gap: 16px;
    font-size: clamp(22px, 1.9vw, 28px)
}

.stele .mentions__names span:not(:last-child)::after {
    margin-left: 16px
}

.stele .mentions__names a {
    transition: color .2s
}

.stele .mentions__names a:hover {
    color: var(--accent)
}

.stele .mentions__names sup {
    display: inline-flex;
    gap: 5px;
    margin-left: 4px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    vertical-align: super;
    color: var(--text-2)
}

.stele__band {
    height: 24px;
    margin: 0 calc(var(--stele-pad) * -1);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background-image: var(--frieze);
    background-repeat: repeat-x;
    background-position: center;
    opacity: .7
}

.stele__greek {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .14em;
    line-height: 1.9;
    text-transform: uppercase;
    color: var(--text-2)
}

.cards {
    display: grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap: var(--gut)
}

.cards--4 {
    grid-template-columns:repeat(4, minmax(0, 1fr))
}

.cards--4 .card__title {
    font-size: clamp(22px, 1.7vw, 26px)
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    background: var(--panel);
    perspective: 2000px;
    transition: border-color .2s
}

.card:hover {
    border-color: var(--accent)
}

/* the cover swings open like a book, revealing the article's opening */
.card__leaf {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: var(--bg);
    transform-origin: left center;
    transition: transform .7s cubic-bezier(.22, 1, .36, 1), box-shadow .7s cubic-bezier(.22, 1, .36, 1), opacity .3s
}

.card__page {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px 28px 30px;
    opacity: 0;
    transition: opacity .3s
}

.card__excerpt {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--text-2);
    line-height: 1.6;
    -webkit-mask-image: linear-gradient(#000 60%, transparent);
    mask-image: linear-gradient(#000 60%, transparent)
}

.card__page .card__foot {
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent)
}

@media (hover: hover) {
    .card:hover, .card:focus-visible {
        z-index: 2
    }

    .card:hover .card__leaf, .card:focus-visible .card__leaf {
        transform: rotateY(-90deg);
        box-shadow: 12px 0 32px rgba(0, 0, 0, .45);
        /* fade out as it turns edge-on, so no sliver of the cover is left sticking out */
        opacity: 0;
        transition: transform .7s cubic-bezier(.22, 1, .36, 1), box-shadow .7s cubic-bezier(.22, 1, .36, 1), opacity .3s .25s
    }

    .card:hover .card__page, .card:focus-visible .card__page {
        opacity: 1;
        transition-delay: .1s
    }
}

@media (hover: hover) and (prefers-reduced-motion: reduce) {
    .card:hover .card__leaf, .card:focus-visible .card__leaf {
        transform: none;
        box-shadow: none;
        opacity: 0
    }
}

.card__cover svg {
    width: 100%;
    height: auto;
    border-bottom: 1px solid var(--line)
}

.card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 14px;
    padding: 26px 28px 30px
}

.card__body .card__foot {
    margin-top: auto
}

.card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text-2)
}

.card__meta span.dot {
    width: 4px;
    height: 4px;
    background: var(--line)
}

.card__title {
    font-family: var(--serif);
    font-size: clamp(26px, 2.4vw, 34px);
    font-weight: 500;
    line-height: 1.15
}

.card__foot {
    display: flex;
    justify-content: flex-end;
    padding-top: 6px
}

/* ---------- mission ---------- */
.mission__stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: clamp(320px, 42vw, 450px);
    margin-top: 48px
}

.mission__wm {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(280px, 46vw, 450px);
    height: auto;
    opacity: 1
}

.mission__quote {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .7em;
    max-width: 960px;
    text-align: center;
    font-size: clamp(24px, 2.8vw, 40px);
    line-height: 1.22
}

.principles {
    display: grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    column-gap: var(--gut);
    margin-top: clamp(56px, 7vw, 88px);
    padding-top: 48px;
    border-top: 1px solid var(--line)
}

.principles > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 8px 32px;
    text-align: center
}

.principles > div + div {
    border-left: 1px solid var(--line)
}

/* ---------- faq ---------- */
.faq__list {
    border-top: 1px solid var(--line)
}

.faq details {
    border-bottom: 1px solid var(--line)
}

.faq summary {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2vw, 28px);
    padding: clamp(22px, 2.4vw, 30px) 0;
    cursor: pointer;
    list-style: none
}

.faq summary::-webkit-details-marker {
    display: none
}

.faq summary .i {
    width: 44px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2em;
    color: var(--text-2)
}

.faq summary .q {
    flex: 1;
    font-size: clamp(17px, 1.5vw, 20px);
    font-weight: 500
}

.faq details[open] summary .i {
    color: var(--accent)
}

.faq .sign {
    position: relative;
    width: 20px;
    height: 20px;
    border: 1px solid var(--line);
    flex: none
}

.faq .sign::before, .faq .sign::after {
    content: "";
    position: absolute;
    background: var(--text-2);
    transition: opacity .2s
}

.faq .sign::before {
    left: 5px;
    right: 5px;
    top: 9px;
    height: 1px
}

.faq .sign::after {
    top: 5px;
    bottom: 5px;
    left: 9px;
    width: 1px
}

.faq details[open] .sign {
    border-color: var(--accent)
}

.faq details[open] .sign::before {
    background: var(--accent)
}

.faq details[open] .sign::after {
    opacity: 0
}

.faq__answer {
    padding: 0 44px 36px clamp(44px, 6vw, 72px);
    color: var(--text-2);
    max-width: 640px
}

/* ---------- cta ---------- */
.cta__plate {
    position: relative;
    background: var(--panel);
    padding: clamp(48px, 6vw, 88px);
    display: grid;
    grid-template-columns:minmax(0, 1fr) auto;
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
    --frame-bg: var(--panel)
}

.cta__plate > .cta__copy, .cta__plate > .cta__stamp {
    position: relative;
    z-index: 1
}

.cta__copy {
    display: flex;
    flex-direction: column;
    gap: 26px;
    max-width: 620px
}

.cta__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    padding-top: 8px
}

.cta__stamp svg {
    width: clamp(180px, 20vw, 300px);
    height: auto
}

/* ---------- footer ---------- */
.foot {
    position: relative;
    padding: 0 var(--pad) 0
}

.foot__in {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 64px 0 48px
}

.foot__meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 22px 0;
    border-top: 1px solid var(--line);
    font-size: 12px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text-2)
}

.foot__base {
    position: relative;
    height: 50px;
    margin: 0 calc(var(--pad) * -1)
}

.foot__base .rails {
    position: absolute;
    left: var(--rail);
    right: var(--rail);
    top: 0;
    height: 110px;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line)
}

.foot__base .sill {
    position: absolute;
    left: var(--rail);
    right: var(--rail);
    top: 110px;
    height: 1px;
    background: var(--line)
}

.foot__base .plinth {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 64px;
    border: 1px solid var(--line);
    border-top: 0
}

.foot__base .plinth::after {
    content: "";
    position: absolute;
    inset: 6px 6px 6px 6px;
    border: 1px solid var(--accent);
    border-top: 0
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
    .cards--4 {
        grid-template-columns:repeat(2, minmax(0, 1fr))
    }

    .cols3 {
        grid-template-columns:1fr 1fr;
        row-gap: 40px
    }

    .cols3 > div:last-child {
        grid-column: span 2
    }
}

@media (max-width: 980px) {
    .hero {
        padding: 40px 40px 64px
    }

    .nav {
        display: none
    }

    .burger {
        display: grid
    }

    .hero__grid {
        grid-template-columns:minmax(0, 1fr);
        gap: 40px;
        flex-direction: column;
    }

     .hero > .inner {
         padding: 0 20px;
     }
    .hero__seal {
        order: 2
    }

    .hero__cards {
        grid-template-columns:1fr
    }

    .hero__card {
        border-left: 0;
        border-top: 1px solid var(--line)
    }

    .hero__card:first-child {
        border-top: 0
    }

    .nile--h {
        display: none
    }

    .nile--v {
        display: block;
        max-width: 420px;
        margin-inline: auto
    }

    .cards {
        grid-template-columns:1fr;
        gap: 20px
    }

    .cta__plate {
        grid-template-columns:minmax(0, 1fr)
    }

    .cta__stamp {
        order: -1;
        display: flex;
        justify-content: center
    }

    .principles {
        grid-template-columns:1fr;
        row-gap: 0;
        padding-top: 0;
        border-top: 0
    }

    .principles > div {
        padding: 28px 8px;
        border-top: 1px solid var(--line)
    }

    .principles > div + div {
        border-left: 0
    }
}

@media (max-width: 860px) {
    .cols3 {
        grid-template-columns:1fr;
        row-gap: 36px
    }

    .cols3 > div:last-child {
        grid-column: auto
    }

    .trail {
        height: 96px;
        margin-bottom: -40px
    }

    .grid > * {
        grid-column: span 12 !important;
        padding-top: 0!important;
    }

    .grid {
        row-gap: 36px
    }

    .reg__row {
        grid-template-columns:1fr;
        row-gap: 16px
    }

    .reg__row > * {
        grid-column: auto !important;
        padding-right: 0
    }

    .reg__no {
        align-items: center;
        justify-content: space-between
    }

    .reg__foot {
        grid-template-columns:1fr;
        row-gap: 20px
    }

    .reg__foot > * {
        grid-column: auto !important;
        justify-content: center;
        text-align: center
    }

    .reg__foot .r {
        justify-content: center
    }

    .rows a, .rows__head {
        grid-template-columns:minmax(0, 1fr) auto;
        row-gap: 10px
    }

    .rows .t {
        grid-column: 1;
        order: 3
    }

    .rows .arrow {
        grid-column: 2;
        order: 4;
        justify-self: end;
        align-self: center
    }

    .rows__head {
        display: none
    }

    .mentions {
        margin-top: 40px;
        padding: 26px 22px
    }

    .stele {
        --stele-pad: 22px
    }

    .stele__break {
        width: 84px;
        height: 31px
    }

    .seam__tags {
        font-size: 11px;
        letter-spacing: .14em
    }

    .btn {
        width: 100%
    }

    .hero__cta .btn {
        width: 100%
    }
}

@media (max-width: 560px) {
    .hero {
        padding: 32px 20px 48px
    }

    .cta__plate {
        padding: 56px 28px
    }

    .brand {
        gap: 10px
    }

    .brand__name {
        font-size: 16px;
        letter-spacing: .18em
    }

    .btn--sm {
        height: 40px;
        padding: 0 12px;
        font-size: 12px;
        letter-spacing: .04em
    }

    .burger {
        width: 40px;
        height: 40px
    }

    .topbar {
        gap: 10px;
        padding: 15px 0 0;
    }
}

@media (max-width: 520px) {
    .frieze {
        margin: 0 var(--rail)
    }

    .foot__in {
        flex-direction: column;
        align-items: flex-start;
        gap: 28px
    }

    .foot__meta {
        flex-direction: column;
        gap: 8px
    }

    .seam__tags {
        position: static;
        display: flex;
        justify-content: space-between;
        padding-top: 26px
    }
}

/* svg text inside the Nile */
.nile-svg .nl-num {
    fill: #86B8A2;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .2em
}

.nile-svg .nl-name {
    fill: #E7E3D6;
    font-family: var(--serif);
    font-weight: 500
}

.nile-svg .nl-txt {
    fill: #A2A79C;
    font-family: var(--sans)
}

/* flowing hex glyphs in the Nile channel (script.js) */
.nile-svg .nl-flow text {
    fill: #86B8A2;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    text-anchor: middle;
    dominant-baseline: central;
    opacity: .1;
    pointer-events: none;
    user-select: none
}

.nile-svg .nl-flow text.is-head {
    fill: #D6F2E4
}

/* Nile step cards: a gentle lift on hover */
.nile-svg {
    overflow: visible
}

.nile-svg .nl-card {
    transform-box: fill-box;
    transform-origin: center;
    cursor: pointer;
    transition: transform .4s cubic-bezier(.2, .8, .2, 1)
}

.nile-svg .nl-card:hover {
    transform: scale(1.08)
}

@media (prefers-reduced-motion: reduce) {
    .nile-svg .nl-card {
        transition: none
    }
}

/* cursor-grid glow on the Nile lattice (script.js) */
.nile-svg .nl-glow rect {
    fill: rgba(134, 184, 162, .07);
    stroke: #86B8A2;
    stroke-width: 1;
    pointer-events: none
}

:root {
    --frieze: url('assets/frieze.svg');
    --frieze-v: url('assets/frieze-v.svg');
    --ticks: url('assets/ticks.svg')
}

/* ---------- hero glyph border ---------- */
.hero__panel {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 90px 70px
}

.glyphband {
    position: absolute;
    inset: 0;
    pointer-events: none
}

.glyphband__h {
    position: absolute;
    left: 22px;
    right: 22px;
    height: 22px
}

.glyphband__h--top {
    top: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line)
}

.glyphband__h--bottom {
    bottom: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line)
}

.glyphband__v {
    position: absolute;
    top: 22px;
    bottom: 22px;
    width: 22px
}

.glyphband__v--left {
    left: 0;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line)
}

.glyphband__v--right {
    right: 0;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line)
}

.glyphband__corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 1px solid var(--line);
    display: grid;
    place-items: center
}

.glyphband__corner--tl {
    top: 0;
    left: 0
}

.glyphband__corner--tr {
    top: 0;
    right: 0
}

.glyphband__corner--bl {
    bottom: 0;
    left: 0
}

.glyphband__corner--br {
    bottom: 0;
    right: 0
}

.glyphband__d {
    position: relative;
    width: 10px;
    height: 10px;
    border: 1px solid var(--accent);
    transform: rotate(45deg)
}

.glyphband__d::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 3px;
    background: var(--accent);
    transform: translate(-50%, -50%)
}

/* glyphs travel clockwise around the frame; one tile = 367.2px, so the loop is seamless */
.glyphband__h::before,
.glyphband__v::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .85;
    animation: var(--glyph-run) 24s linear infinite
}

.glyphband__h::before {
    background: var(--frieze) repeat-x left center;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent)
}

.glyphband__v::before {
    background: var(--frieze-v) repeat-y center top;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
    mask-image: linear-gradient(180deg, transparent, #000 48px, #000 calc(100% - 48px), transparent)
}

.glyphband__h--top {
    --glyph-run: glyph-right
}

.glyphband__v--right {
    --glyph-run: glyph-down
}

.glyphband__h--bottom {
    --glyph-run: glyph-left
}

.glyphband__v--left {
    --glyph-run: glyph-up
}

@keyframes glyph-right {
    from { background-position: 0 center }
    to { background-position: 367.2px center }
}

@keyframes glyph-left {
    from { background-position: 0 center }
    to { background-position: -367.2px center }
}

@keyframes glyph-down {
    from { background-position: center 0 }
    to { background-position: center 367.2px }
}

@keyframes glyph-up {
    from { background-position: center 0 }
    to { background-position: center -367.2px }
}

.glyphband__fly {
    position: absolute;
    left: -11px;
    top: -11px;
    width: 22px;
    height: 22px;
    opacity: 0;
    filter: drop-shadow(0 0 4px rgba(134, 184, 162, .55));
    will-change: transform, opacity
}

@media (prefers-reduced-motion: reduce) {
    .glyphband__h::before,
    .glyphband__v::before {
        animation: none
    }
}

@media (max-width: 980px) {
    .hero__panel {
        padding: 0
    }

    .glyphband {
        display: none
    }
}
