/* paradigmsystems.ro — one quiet light page.
   The first screen: the mark and one sentence in the middle, the sections as small capitals
   at the top, the six things we build at the bottom; hovering one of them turns the middle
   into a slowly turning object made of points. Everything below reads in the same voice:
   lowercase headings, a lot of air, thin rules. Geist everywhere.
   Motion lives in assets/site.js; with JavaScript off or reduced motion, everything is simply there. */
:root {
  --bg: #FBFBFB; --ink: #0B0B0C; --soft: #3B3E44; --mute: #8B9099; --rule: #E6E6E6; --hair: #EFEFEF;
  --dot: #16181C; --spark: #FF6A33; --veil: rgba(11,11,12,.04);
  --f: "Geist", "Helvetica Neue", Arial, sans-serif;
  --fm: "Geist Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
/* dark: whatever the device is set to, unless the corner button chose otherwise */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0A0A0B; --ink: #F1F1EF; --soft: #B9BDC4; --mute: #80858E; --rule: #27292D; --hair: #1A1B1E; --dot: #ECECEA; --veil: rgba(255,255,255,.045); color-scheme: dark }
}
:root[data-theme="dark"] { --bg: #0A0A0B; --ink: #F1F1EF; --soft: #B9BDC4; --mute: #80858E; --rule: #27292D; --hair: #1A1B1E; --dot: #ECECEA; --veil: rgba(255,255,255,.045); color-scheme: dark }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal }
.theming, .theming *, .theming *::before, .theming *::after { transition: background-color .5s ease, color .5s ease, border-color .5s ease, fill .5s ease, stroke .5s ease !important }
* { box-sizing: border-box }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100% }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f); -webkit-font-smoothing: antialiased; font-size: 16px }
a { color: inherit }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 4px }
.caps { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; font-weight: 400 }

/* ---------- top: the sections, small capitals ---------- */
.top { position: fixed; inset: 0 0 auto; z-index: 10; padding: max(18px, env(safe-area-inset-top)) 16px 14px; background: linear-gradient(180deg, var(--bg) 60%, transparent) }
.top ul { list-style: none; margin: 0 auto; padding: 0; display: flex; justify-content: center; gap: 30px; overflow-x: auto; scrollbar-width: none; white-space: nowrap }
.top ul::-webkit-scrollbar { display: none }
.top a { text-decoration: none; color: var(--ink); opacity: .82 }
.top a { position: relative; transition: opacity .2s }
.top a:hover, .top a[aria-current="true"] { opacity: 1 }
.top a[aria-current="true"]::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: var(--spark) }
.top .lang { opacity: .5 }
@media (max-width: 640px) { .top ul { gap: 15px } .top .caps { font-size: 9.5px; letter-spacing: .6px } }
@media (max-width: 370px) { .top ul { justify-content: flex-start; gap: 13px } }

/* ---------- first screen ---------- */
.hero { position: relative; height: 100svh; min-height: 560px; display: grid; place-items: center; padding: 0 16px; overflow: hidden }
.hero .field { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none }
.center { position: relative; display: grid; justify-items: center; gap: 22px; text-align: center; transform: translateY(calc(-2vh - var(--p, 0) * 70px)); opacity: calc(1 - var(--p, 0) * 1.3) }
.stage { position: relative; width: 44px; height: 44px; transition: width .5s cubic-bezier(.2,.7,.2,1), height .5s cubic-bezier(.2,.7,.2,1) }
.hero.showing .stage { width: min(62vw, 340px); height: min(62vw, 340px) }
.stage .mark { color: var(--ink); position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; transition: opacity .25s }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .35s }
.stage .ember { position: absolute; inset: 13%; opacity: 0; transform: scale(.55) translateY(14px); transition: opacity .3s, transform .8s cubic-bezier(.34,1.56,.64,1) }
.stage .ember svg, .glass svg { display: block; width: 100%; height: 100%; overflow: visible; animation: float 5s ease-in-out infinite }
.hero.showing .mark { opacity: 0 }
.hero.showing.scene canvas { opacity: 1 }
.stage .ember { pointer-events: none }
.hero.showing.ember-on .ember { opacity: 1; transform: none; pointer-events: auto }
@keyframes float { 50% { transform: translateY(-6px) } }
.hero h1 { margin: 0; font-weight: 400; font-size: clamp(21px, 2.1vw, 26px); line-height: 1.26; letter-spacing: .2px; max-width: 19ch; text-wrap: balance; min-height: 3.8em }
.hero h1 > span { display: block; transition: opacity .14s, filter .14s }
.hero h1 > span.out { opacity: 0; filter: blur(4px) }
.hero h1 .w { display: inline-block; animation: word .8s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--d, .55s) + var(--i) * 40ms) }
@keyframes word { from { opacity: 0; transform: translateY(.55em); filter: blur(8px) } }

/* the first seconds: the mark draws itself, the words rise, the edges arrive */
.js .stage .mark path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.2s cubic-bezier(.6,.1,.2,1) forwards }
.js .stage .mark path:nth-child(2) { animation-delay: .14s }
.js .stage .mark path:nth-child(3) { animation-delay: .28s }
@keyframes draw { to { stroke-dashoffset: 0 } }
.js .top li, .js .shelf li { animation: arrive .9s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(1s + var(--i, 0) * 60ms) }
.js .shelf li { --y: 8px }
@keyframes arrive { from { opacity: 0; transform: translateY(var(--y, -6px)) } }
.hero .go { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; text-decoration: none; opacity: 0; transition: opacity .25s; pointer-events: none; margin-top: -8px }
.hero.showing .go { opacity: .6; pointer-events: auto }
.hero.showing .go:hover { opacity: 1 }

/* the six things, bottom */
.shelf { position: absolute; left: 0; right: 0; bottom: max(26px, env(safe-area-inset-bottom)); padding: 0 16px }
.shelf ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 30px }
.shelf a { position: relative; display: inline-block; text-decoration: none; opacity: .82; transition: opacity .2s }
.shelf a:hover { opacity: 1 }
.shelf a.on { font-weight: 600; opacity: 1 }
.shelf a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2,.7,.2,1) }
.shelf a.on::after { transform: none }
.shelf a.on.auto::after { animation: fill var(--dur, 3.6s) linear both }
@keyframes fill { from { transform: scaleX(0) } }
/* on a phone the six sit a little higher, clear of the two buttons in the corner */
@media (max-width: 640px) { .js .shelf { bottom: calc(max(26px, env(safe-area-inset-bottom)) + 40px) } .js .foot { padding-bottom: 72px } }
@media (max-width: 640px) { .shelf ul { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; justify-items: center; gap: 14px 26px } }

/* ---------- sections ---------- */
.sec { padding: clamp(110px, 16vh, 180px) 16px; border-top: 1px solid var(--hair) }
.wrap { max-width: 1040px; margin: 0 auto }
.eyebrow { color: var(--mute) }
.sec h2 { margin: 16px auto 0; font-weight: 400; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.12; letter-spacing: -.01em; max-width: 22ch; text-wrap: balance }
.head { text-align: center; margin-bottom: clamp(48px, 7vh, 80px) }
.head .hint { margin-top: 14px; color: var(--mute); font-size: 14px }

/* rows that open (services) */
.rows { border-top: 1px solid var(--rule) }
.row { border-bottom: 1px solid var(--rule) }
.row > summary { display: grid; grid-template-columns: 56px 1fr 1.25fr 20px; gap: 18px 32px; align-items: baseline; padding: 30px 0; cursor: pointer; list-style: none }
.row > summary::-webkit-details-marker { display: none }
.row .ix { font: 400 11px var(--fm); color: var(--mute) }
.row h3 { margin: 0; font-weight: 400; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.01em; transition: transform .5s cubic-bezier(.2,.7,.2,1) }
.row > summary:hover h3 { transform: translateX(8px) }
.row .ix { transition: color .3s }
.row > summary:hover .ix, .row[open] .ix { color: var(--spark) }
.row > summary p { margin: 0; color: var(--soft); font-size: 16px; line-height: 1.6; max-width: 48ch }
@media (max-width: 760px) { .row > summary { grid-template-columns: 34px 1fr 18px } .row > summary p { grid-column: 2 } .row > summary .pm { grid-column: 3; grid-row: 1 } }
.pm { width: 14px; height: 14px; position: relative; align-self: center; justify-self: end }
.pm::before, .pm::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--ink); transition: transform .3s }
.pm::after { transform: rotate(90deg) }
details[open] > summary .pm::after { transform: rotate(0) }
.more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; padding: 0 38px 34px 88px }
@media (max-width: 1000px) { .more { grid-template-columns: 1fr 1fr } }
@media (max-width: 760px) { .more { grid-template-columns: 1fr; padding: 0 0 26px 52px } }
.more div { border-top: 1px solid var(--hair); padding: 14px 0 16px }
.more h4 { margin: 0 0 4px; font-weight: 500; font-size: 15px }
.more p { margin: 0; color: var(--mute); font-size: 14px; line-height: 1.55 }
details[open] > .more > div { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(.06s + var(--i, 0) * 50ms) }
@keyframes rise { from { opacity: 0; transform: translateY(10px) } }
/* where the browser can animate to auto height, opening and closing glide */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords }
  details::details-content { height: 0; overflow: clip; transition: height .5s cubic-bezier(.2,.7,.2,1), content-visibility .5s allow-discrete }
  details[open]::details-content { height: auto }
}

/* cards that open (expertise) */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; align-items: start }
@media (max-width: 1000px) { .cards { grid-template-columns: 1fr 1fr } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr } }
.cards details { border-top: 1px solid var(--rule) }
.cards summary { display: block; position: relative; padding: 22px 30px 28px 0; cursor: pointer; list-style: none }
.cards summary::-webkit-details-marker { display: none }
.cards summary .pm { position: absolute; right: 0; top: 26px }
.cards .tag { color: var(--mute) }
.cards h3 { margin: 14px 0 10px; font-weight: 400; font-size: 21px; letter-spacing: -.005em; transition: transform .5s cubic-bezier(.2,.7,.2,1) }
.cards summary:hover h3 { transform: translateX(6px) }
.cards summary p { margin: 0; color: var(--soft); font-size: 15px; line-height: 1.6 }
.cards .more { grid-template-columns: 1fr; padding: 0 0 22px }
.cards .more div { padding: 12px 0 }

/* ember */
.ember-sec .wrap { display: grid; justify-items: center; text-align: center }
.ember-sec .glass { width: 136px; height: 136px }
.eyes { transition: transform .35s cubic-bezier(.2,.7,.2,1) }
.lids { transform-box: fill-box; transform-origin: center; animation: blink 6s infinite }
.stage .lids { animation-delay: -2.2s }
@keyframes blink { 0%, 93%, 100% { transform: none } 95.5% { transform: scaleY(.08) } }
.ember-sec p { margin: 22px auto 0; max-width: 54ch; color: var(--soft); font-size: 16px; line-height: 1.65 }
.facts { list-style: none; margin: 34px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px; color: var(--mute) }
.facts b { color: var(--ink); font-weight: 400; font-variant-numeric: tabular-nums }
.link { display: inline-block; margin-top: 30px; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px }

/* method */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 32px; border-top: 1px solid var(--rule) }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr } }
.steps div { padding: 20px 0 26px }
.steps b { font: 400 11px var(--fm); color: var(--mute) }
.steps h4 { margin: 12px 0 6px; font-weight: 400; font-size: 19px }
.steps p { margin: 0; color: var(--mute); font-size: 14.5px; line-height: 1.55 }

/* contact */
.contact { text-align: center }
.contact .mail { position: relative; display: inline-block; margin-top: 30px; font-size: clamp(24px, 3.4vw, 40px); letter-spacing: -.01em; text-decoration: none; border-bottom: 1px solid var(--rule) }
.contact .mail::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.2,.7,.2,1) }
.contact .mail:hover::after { transform: none }
.contact .addr { margin-top: 18px; color: var(--mute); font-size: 14px }

/* legal footer */
.foot { border-top: 1px solid var(--hair); padding: 34px 16px max(34px, env(safe-area-inset-bottom)); text-align: center; color: var(--mute); display: grid; gap: 10px }
.sign { width: 100%; max-width: 1180px; height: clamp(120px, 22vw, 300px); margin: 10px auto 34px; touch-action: pan-y }
.sign canvas { display: block; width: 100%; height: 100% }
.foot .legal { text-transform: none; letter-spacing: 0; font-size: 12px }

/* ---------- arriving on scroll (only once site.js is running) ---------- */
.io .rv { opacity: 0; transform: translateY(26px); transition: opacity .9s ease var(--d, 0s), transform 1.1s cubic-bezier(.2,.7,.2,1) var(--d, 0s) }
.io .rv.in { opacity: 1; transform: none }
.io .sec h2 .m { display: inline-block; overflow: hidden; vertical-align: top; padding: .12em 0 .16em; margin: -.12em 0 -.16em }
.io .sec h2 .m > i { display: inline-block; font-style: normal; transform: translateY(112%); transition: transform 1.05s cubic-bezier(.2,.7,.2,1) calc(var(--i) * 55ms) }
.io .sec h2.in .m > i { transform: none }
/* the thin rules draw from the left */
.io .rows, .io .steps { border-top-color: transparent; position: relative }
.io .row { border-bottom-color: transparent; position: relative }
.io .cards details { border-top-color: transparent; position: relative }
.io .rows::before, .io .steps::before, .io .row::after, .io .cards details::before { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--rule); transform: scaleX(0); transform-origin: left; transition: transform 1.3s cubic-bezier(.2,.7,.2,1) var(--d, 0s) }
.io .rows::before, .io .steps::before, .io .cards details::before { top: -1px }
.io .row::after { bottom: -1px }
.io .rows.in::before, .io .steps.in::before, .io .row.in::after, .io .cards details.in::before { transform: none }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; transition-delay: 0s !important }
  .center { transform: translateY(-2vh); opacity: 1 }
}

/* ---------- corner: sound and theme ---------- */
.ctl { display: none }
.js .ctl { position: fixed; z-index: 30; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); display: flex; gap: 8px; animation: arrive .9s cubic-bezier(.2,.7,.2,1) 1.4s both; --y: 8px }
.ctl button { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 50%; background: var(--bg); color: var(--ink); cursor: pointer; transition: border-color .3s, transform .4s cubic-bezier(.2,.7,.2,1) }
.ctl button:hover { border-color: var(--ink) }
.thm svg { width: 15px; height: 15px; transition: transform .7s cubic-bezier(.2,.7,.2,1) }
:root[data-theme="dark"] .thm svg { transform: rotate(180deg) }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .thm svg { transform: rotate(180deg) } }
.snd { grid-auto-flow: column; gap: 2px; align-items: center; justify-content: center }
.snd i { display: block; width: 1.5px; height: 10px; background: currentColor; border-radius: 1px; transform-origin: center; transform: scaleY(.25); transition: transform .3s }
.snd[aria-pressed="true"] i { animation: eq 1.1s ease-in-out infinite }
.snd[aria-pressed="true"] i:nth-child(2) { animation-delay: -.35s; animation-duration: .9s }
.snd[aria-pressed="true"] i:nth-child(3) { animation-delay: -.7s; animation-duration: 1.25s }
.snd[aria-pressed="true"] i:nth-child(4) { animation-delay: -.2s; animation-duration: 1s }
@keyframes eq { 0%, 100% { transform: scaleY(.3) } 50% { transform: scaleY(1) } }

/* ---------- the technologies, running between sections ---------- */
.band { overflow: hidden; border-top: 1px solid var(--hair); padding: 26px 0; color: var(--mute); white-space: nowrap; -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent) }
.track { display: inline-flex; gap: 0; will-change: transform }
.track span { font-size: clamp(22px, 3vw, 38px); letter-spacing: -.01em; padding: 0 .55em; transition: color .3s }
.track span::after { content: "·"; margin-left: 1.1em; color: var(--rule) }
.track span:hover { color: var(--ink) }

/* ---------- a soft fill sweeps under a row on hover ---------- */
.row > summary, .cards summary { position: relative; isolation: isolate }
.row > summary::before { content: ""; position: absolute; inset: 0 -14px; z-index: -1; background: var(--veil); transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.2,.7,.2,1) }
.row > summary:hover::before { transform: none }

/* ---------- Ember jumps when clicked ---------- */
.glass, .stage .ember { cursor: pointer }
.boop svg { animation: boop .7s cubic-bezier(.2,.7,.2,1) !important }
@keyframes boop { 0% { transform: none } 18% { transform: scale(1.14, .86) translateY(6px) } 42% { transform: scale(.92, 1.1) translateY(-14px) } 66% { transform: scale(1.04, .97) } 100% { transform: none } }

/* ---------- a ring that follows the cursor (mouse only) ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 40; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1px solid var(--ink); border-radius: 50%; opacity: 0; pointer-events: none; transition: opacity .3s, width .35s cubic-bezier(.2,.7,.2,1), height .35s cubic-bezier(.2,.7,.2,1), margin .35s cubic-bezier(.2,.7,.2,1), background-color .35s, border-color .35s }
.cursor.on { opacity: .28 }
.cursor.link { width: 58px; height: 58px; margin: -29px 0 0 -29px; background: var(--veil); opacity: .5 }
.cursor.down { width: 26px; height: 26px; margin: -13px 0 0 -13px }
