/* Vincent Rengier Design — glyph/ASCII editorial.
   Tokens first; every colour/size used below comes from here. */

@font-face { font-family: 'PT Serif'; src: url('/fonts/pt-serif-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'PT Serif'; src: url('/fonts/pt-serif-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'PT Serif'; src: url('/fonts/pt-serif-latin-700-italic.woff2') format('woff2'); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'PT Mono'; src: url('/fonts/pt-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --paper: #f6f6f3;
  --ink: #1e1b2e;
  --ink-soft: #55516a;
  --violet: #7a1cff;
  --violet-deep: #5a0fd1;
  --cyan: #1aa6dc;
  --cyan-soft: #9fd6ee;
  --line: rgba(122, 28, 255, 0.22);

  --serif: 'PT Serif', Georgia, 'Times New Roman', serif;
  --mono: 'PT Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --gutter: clamp(16px, 3vw, 40px);
  --max: 1440px;
  --fs-mono: clamp(12px, 0.95vw, 14px);
  --fs-body: clamp(17px, 1.2vw, 19px);
  --fs-lead: clamp(26px, 3.2vw, 46px);
  --fs-h2: clamp(40px, 6vw, 96px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: var(--fs-body); line-height: 1.55;
  overflow-x: clip; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--violet); color: var(--paper); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
em { font-style: italic; color: var(--violet); }

.mono { font-family: var(--mono); font-size: var(--fs-mono); letter-spacing: .02em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--violet); color: var(--paper); padding: 8px 12px; font-family: var(--mono); }
.skip:focus { left: 8px; }
.c-violet { color: var(--violet); }
.c-cyan { color: var(--cyan); }

/* ---------- ASCII art (inline SVG of glyph rows) ---------- */
.ascii { width: 100%; height: auto; color: var(--cyan); overflow: visible; }
.ascii g, .ascii text { white-space: pre; }
.ascii text { transition: transform .9s var(--ease), fill .4s; }
/* scan-in: rows appear top→bottom when the element scrolls into view */
.js [data-split] .ascii text { opacity: 0; }
.js [data-split].in .ascii text { animation: scan .5s steps(3) both; animation-delay: calc(var(--r) * 9ms); }
@keyframes scan { 0% { opacity: 0; } 50% { opacity: .35; } 100% { opacity: 1; } }
/* interlace split driven by scroll (--split set by main.js, 0..1) */
[data-split] .ascii text:nth-child(odd) { transform: translateX(calc(var(--split, 0) * -60px)); }
[data-split] .ascii text:nth-child(even) { transform: translateX(calc(var(--split, 0) * 60px)); }
[data-split] .ascii text { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-split] .ascii text { opacity: 1; animation: none !important; transform: none !important; }
}

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px);
  padding: 18px var(--gutter);
  font-family: var(--mono); font-size: var(--fs-mono); text-transform: uppercase; letter-spacing: .08em;
  transition: background .3s, backdrop-filter .3s, padding .3s;
}
.site-header.scrolled { background: rgba(246, 246, 243, .95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding-block: 12px; }
.brand { margin-right: auto; text-decoration: none; color: var(--violet); white-space: nowrap; font-size: var(--fs-mono); }
.brand i { font-family: var(--serif); font-size: 1.35em; text-transform: none; letter-spacing: 0; }
.nav { display: flex; gap: clamp(16px, 2.4vw, 36px); }
.nav a, .lang a { text-decoration: none; position: relative; }
.nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -3px; height: 1px; background: currentColor; transition: right .35s var(--ease); }
.nav a:hover::after { right: 0; }
.lang { display: flex; gap: 6px; color: var(--ink-soft); }
.lang a { color: var(--cyan); }
.lang a:hover { color: var(--violet); }
.lang-cur { color: var(--violet); }
.menu-btn[aria-expanded="true"] { font-size: 28px; line-height: 1; padding: 0 4px; }
.menu-btn { display: none; font: inherit; text-transform: inherit; letter-spacing: inherit; color: var(--cyan); background: none; border: 0; padding: 6px 0; cursor: pointer; }

.menu {
  position: fixed; inset: 0; z-index: 49; background: var(--paper);
  padding: 96px var(--gutter) var(--gutter); display: flex; flex-direction: column; justify-content: space-between;
}
.menu[hidden] { display: none; }
.menu ol { list-style: none; margin: 0; padding: 0; }
.menu li a { display: flex; align-items: baseline; gap: 16px; text-decoration: none; color: var(--violet); font-style: italic; font-size: clamp(40px, 12vw, 72px); line-height: 1.15; border-bottom: 1px solid var(--line); padding: 8px 0; }
.menu li:nth-child(even) a { color: var(--cyan); }
.menu li a .mono { font-style: normal; color: var(--ink-soft); }
.menu-lang { font-family: var(--mono); font-size: 16px; }

@media (max-width: 860px) {
  .nav, .site-header > .lang { display: none; }
  .menu-btn { display: block; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; padding: 92px var(--gutter) var(--gutter);
  display: flex; flex-direction: column; align-items: flex-start; isolation: isolate;
}
.hero-iris {
  position: absolute; z-index: -1; right: -4vw; top: max(30svh, 260px); width: min(46vw, 760px);
  color: var(--cyan-soft); pointer-events: none;
}
.hero-iris .ascii { color: var(--cyan-soft); }
.hero-title { display: block; width: min(100%, 1100px); }
.wordmark .ascii { color: var(--cyan); }
.wordmark { display: block; }
.wm-sm { display: none; }
@media (max-width: 600px) { .wm-lg { display: none; } .wm-sm { display: block; } }
.cycle {
  display: grid; margin-top: clamp(4px, 1vw, 14px);
  font-style: italic; font-weight: 700; color: var(--violet);
  font-size: clamp(56px, 13vw, 210px); line-height: .9; letter-spacing: -.02em;
}
.cycle span { grid-area: 1 / 1; padding: 0 .12em .12em 0; opacity: 0; }
.cycle span:first-child { opacity: 1; }
/* with JS: words swap via a glyph-like letter-spacing/blur pulse; exit finishes before entry */
.js .cycle span { opacity: 0; transform: translateX(-.06em); filter: blur(10px); letter-spacing: .08em; transition: opacity .35s, filter .35s, letter-spacing .35s, transform .35s; }
.js .cycle span.on { opacity: 1; transform: none; filter: none; letter-spacing: -.02em; transition: opacity .5s .38s, filter .6s .38s var(--ease), letter-spacing .8s .38s var(--ease), transform .8s .38s var(--ease); }
@media (prefers-reduced-motion: reduce) { .js .cycle span { transition: none !important; } }
.hero-line {
  margin: clamp(18px, 3vw, 40px) 0 0; font-style: italic; color: var(--violet);
  font-size: var(--fs-lead); line-height: 1.12; max-width: 18ch;
}
.hero-line span { display: block; }
.hero-line span + span { color: var(--cyan); }
.hero-kicker { margin-top: 18px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .1em; }
.hero-cta {
  margin-top: auto; padding-top: 48px; max-width: 26ch;
  color: var(--violet); text-decoration: none; line-height: 1.45;
}
.hero-cta span { display: inline-block; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }
@media (max-width: 700px) {
  .hero { padding-top: 84px; }
  .hero-iris { right: -18vw; top: 42svh; width: 100vw; }
}

/* ---------- sections ---------- */
section { max-width: var(--max); margin-inline: auto; padding: clamp(80px, 12vw, 180px) var(--gutter) 0; position: relative; }
.hero, .page-intro, .about { overflow-x: clip; }
@supports not (overflow: clip) { .hero, .page-intro, .about { overflow-x: hidden; } }
.hero { max-width: none; }
.sec-head { display: flex; align-items: baseline; gap: clamp(12px, 2vw, 28px); margin-bottom: clamp(32px, 5vw, 72px); border-top: 1px solid var(--line); padding-top: 18px; }
.sec-head h2 { font-style: italic; color: var(--violet); font-size: var(--fs-h2); line-height: .95; letter-spacing: -.015em; }
.sec-no { color: var(--cyan); min-width: 2.5ch; }

/* reveal on scroll (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- work tiles ---------- */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 80px) clamp(20px, 6vw, 120px); }
.tile:nth-child(even) { margin-top: clamp(0px, 12vw, 200px); }
.tile:nth-child(odd):not(:first-child) { margin-top: calc(-1 * clamp(0px, 6vw, 100px)); }
.tile a, .tile-inner { display: block; text-decoration: none; color: inherit; }
.tile-art { aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.tile-art .ascii { width: 92%; color: var(--cyan); }
.tile-art .ascii text:nth-child(odd) { transition: transform .6s var(--ease); }
.tile a:hover .ascii, .tile a:focus-visible .ascii { color: var(--violet); }
.tile a:hover .ascii text:nth-child(odd), .tile a:focus-visible .ascii text:nth-child(odd) { transform: translateX(6px); }
.tile a:hover .ascii text:nth-child(3n), .tile a:focus-visible .ascii text:nth-child(3n) { transform: translateX(-9px); }
/* hover preview: real screenshot wipes in over the ASCII in stepped scanlines, then pans top → bottom */
.tile-art { position: relative; }
.tile-art .ascii { transition: opacity .35s; }
.tile-shot {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 0%;
  clip-path: inset(0 0 100% 0); opacity: 0;
  transition: clip-path .55s steps(11, end), opacity .2s, object-position .8s var(--ease);
}
@media (hover: hover) {
  .tile a:hover .tile-shot, .tile a:focus-visible .tile-shot {
    clip-path: inset(0); opacity: 1; object-position: 50% 100%;
    transition: clip-path .55s steps(11, end), opacity .1s, object-position 7s .55s cubic-bezier(.45, 0, .55, 1);
  }
  .tile a:hover .tile-art .ascii, .tile a:focus-visible .tile-art .ascii { opacity: 0; transition-delay: .3s; }
  .tile a:hover .tile-art { border-color: var(--violet); }
}
/* touch: no hover → play it once the tile is on screen, panning back and forth */
@media (hover: none) {
  .tile.in .tile-shot { clip-path: inset(0); opacity: 1; transition: clip-path .55s .9s steps(11, end), opacity .1s .9s; animation: pan 9s 1.6s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
  .tile.in .tile-art .ascii { opacity: 0; transition-delay: 1.2s; }
}
@keyframes pan { to { object-position: 50% 100%; } }
@media (prefers-reduced-motion: reduce) {
  .tile-shot { transition: opacity .2s !important; animation: none !important; object-position: 50% 0% !important; clip-path: inset(0) !important; }
  .tile.in .tile-shot { opacity: 0; }
  .tile a:hover .tile-shot { opacity: 1; }
}
.tile-meta { display: flex; justify-content: space-between; margin-top: 14px; color: var(--cyan); text-transform: uppercase; letter-spacing: .1em; }
.tile h3 { font-style: italic; color: var(--violet); font-size: clamp(28px, 2.6vw, 40px); line-height: 1.05; margin-top: 6px; }
.tile-text { color: var(--ink-soft); font-size: .92em; margin-top: 10px; }
.tile-link { color: var(--violet); border-bottom: 1px solid currentColor; }
@media (max-width: 860px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile:nth-child(n) { margin-top: 0; }
}

/* ---------- marquee band ---------- */
.marquee { overflow: hidden; margin-top: clamp(80px, 12vw, 180px); border-block: 1px solid var(--line); padding: clamp(8px, 1.4vw, 18px) 0; }
.marquee-track { display: flex; width: max-content; align-items: center; gap: .35em; font-style: italic; font-weight: 700; font-size: clamp(56px, 10vw, 160px); line-height: 1; animation: marquee 40s linear infinite; }
.marquee .star { font-style: normal; font-family: var(--mono); font-size: .4em; color: var(--cyan-soft); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.facts { margin: calc(var(--fs-lead) * .3) 0 0; position: sticky; top: 100px; } /* lines up with the lead's first line */
.facts div { border-top: 1px solid var(--line); padding: 12px 0; }
.facts dt { color: var(--cyan); text-transform: uppercase; letter-spacing: .1em; }
.facts dd { margin: 4px 0 0; color: var(--ink); }
.lead { font-style: italic; color: var(--violet); font-size: var(--fs-lead); line-height: 1.15; margin-bottom: .8em; }
.about-copy .lead { margin-bottom: 1.1em; }
/* three short paragraphs → one per column on wide screens (no orphaned lines) */
@media (min-width: 1100px) {
  .about-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
  .about-body p { margin: 0; font-size: .95em; }
}
@media (max-width: 1099px) { .about-body { max-width: 60ch; } }
.about-art { width: min(50vw, 640px); margin: clamp(40px, 6vw, 80px) 0 0 auto; }
.about-art .ascii { color: var(--cyan-soft); }
@media (max-width: 860px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .facts { position: static; }
  .about-art { width: 90vw; }
}

/* ---------- tiers ---------- */
.tiers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.tier { position: relative; padding: 28px clamp(16px, 2vw, 32px) 32px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.tier:first-child { padding-left: 0; }
.tier:last-child { border-right: 0; padding-right: 0; }
.tier-no { font-style: italic; font-weight: 700; color: var(--cyan-soft); font-size: clamp(64px, 8vw, 128px); line-height: .8; transition: color .4s; }
.tier:hover .tier-no { color: var(--violet); }
.tier h2, .tier h3 { font-style: italic; color: var(--violet); font-size: clamp(28px, 2.6vw, 40px); line-height: 1.05; }
.tier p { color: var(--ink-soft); margin: 0; }
.tier ul { list-style: none; padding: 0; margin: 4px 0 8px; }
.tier li { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.tier-kind { color: var(--cyan); text-transform: uppercase; letter-spacing: .1em; }
.tier-price { margin-top: auto; color: var(--violet); font-size: clamp(15px, 1.2vw, 18px); padding-top: 12px; }
.more { display: inline-block; margin-top: 28px; color: var(--violet); text-decoration: none; border-bottom: 1px solid currentColor; }
@media (max-width: 860px) {
  .tiers { grid-template-columns: minmax(0, 1fr); }
  .tier, .tier:first-child, .tier:last-child { border-right: 0; border-bottom: 1px solid var(--line); padding-inline: 0; }
}

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 96px); align-items: start; }
.contact-art .ascii { color: var(--cyan); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.form .full { grid-column: 1 / -1; }
.form label { display: flex; flex-direction: column; gap: 6px; }
.form label > .mono { color: var(--cyan); text-transform: uppercase; letter-spacing: .1em; }
.form input, .form select, .form textarea {
  font: inherit; color: var(--ink); background: transparent; width: 100%;
  border: 0; border-bottom: 1px solid var(--violet); border-radius: 0; padding: 8px 0; -webkit-appearance: none; appearance: none;
}
.form select { background-image: linear-gradient(45deg, transparent 50%, var(--violet) 50%), linear-gradient(135deg, var(--violet) 50%, transparent 50%); background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 24px; }
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-bottom-width: 2px; border-bottom-color: var(--cyan); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 8px; }
.note { color: var(--ink-soft); }
.btn {
  font-family: var(--mono); font-size: var(--fs-mono); text-transform: uppercase; letter-spacing: .1em;
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer;
  padding: 14px 22px; border: 1px solid var(--violet); background: var(--violet); color: var(--paper);
  transition: background .25s, color .25s;
}
.btn:hover { background: transparent; color: var(--violet); }
.btn-ghost { background: transparent; color: var(--violet); }
.btn-ghost:hover { background: var(--violet); color: var(--paper); }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-art { width: 80%; }
  .form { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- services page ---------- */
.page-intro { padding-top: clamp(120px, 16vw, 220px); }
.page-intro h1 { font-style: italic; font-weight: 700; color: var(--violet); font-size: clamp(56px, 12vw, 200px); line-height: .9; letter-spacing: -.02em; margin: 10px 0 24px; }
.page-intro .lead { max-width: 24ch; }
.page-intro-art { position: absolute; z-index: -1; right: -8vw; top: 60px; width: min(55vw, 760px); pointer-events: none; }
.page-intro-art .ascii { color: var(--cyan-soft); }
.offer-full { padding-top: clamp(60px, 8vw, 120px); }
.addons-intro { max-width: 60ch; color: var(--ink-soft); }
.addon-list { list-style: none; padding: 0; margin: 32px 0 0; border-top: 1px solid var(--line); }
.addon-list li { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) minmax(0, 2fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline; transition: background .25s, padding .35s var(--ease); }
.addon-list li:hover { background: #fff; padding-inline: 12px; }
.addon-name { font-style: italic; color: var(--violet); font-size: 1.15em; }
.addon-desc { color: var(--ink-soft); }
.addon-price { color: var(--cyan); text-align: right; }
.vat { color: var(--ink-soft); margin-top: 16px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: clamp(48px, 7vw, 96px); }
.cta-row .lead { flex-basis: 100%; max-width: 28ch; }
@media (max-width: 700px) {
  .addon-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .addon-desc { grid-column: 1 / -1; grid-row: 2; }
  .page-intro-art { width: 90vw; opacity: .6; }
}

/* ---------- legal ---------- */
.page-legal h1 { font-size: clamp(44px, 8vw, 120px); }
.legal h2 { font-style: italic; color: var(--violet); font-size: clamp(28px, 3vw, 44px); margin: 32px 0 12px; }
.todo { color: var(--ink-soft); border-left: 2px solid var(--cyan); padding-left: 12px; }

/* ---------- footer ---------- */
.site-footer { max-width: var(--max); margin: clamp(100px, 14vw, 200px) auto 0; padding: 0 var(--gutter) var(--gutter); }
.footer-art { width: min(70vw, 720px); margin-left: auto; }
.footer-art .ascii { color: var(--cyan-soft); }
.footer-row { display: flex; flex-wrap: wrap; gap: 10px 28px; border-top: 1px solid var(--line); padding-top: 16px; color: var(--ink-soft); }
.footer-row a { color: var(--violet); text-decoration: none; }
.footer-row a:hover { text-decoration: underline; }
.footer-row span { margin-right: auto; }
