/* Bernard Engine site (bernardengine.com). Same family as bernardreview.com: dark, Geist, Instrument Serif italic,
   Geist Mono labels. Bernard's own accent is the yellow of his glasses. Static, no script, no third party. */
@font-face { font-family: "Geist"; src: url("fonts/Geist-Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/Geist-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/Geist-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/Geist-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Regular.ttf") format("truetype"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/InstrumentSerif-Italic-latin.woff2") format("woff2"); }

:root { --bg: #0D0D0F; --bg2: #121215; --panel: #17171B; --line: #25252B; --text: #EEEBE4; --muted: #A09D96;
  --dim: #6F6C66; --accent: #FFC94A; --accent-ink: #1A1408; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 17px/1.6 "Geist", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.k { font: 12px/1.4 "Geist Mono", monospace; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.serif { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; }
.y { color: var(--accent); }

/* Mockup banner: removed before publication. */
.proto { background: var(--accent); color: var(--accent-ink); text-align: center; font: 12px "Geist Mono", monospace;
  letter-spacing: 1px; padding: 6px 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(13,13,15,.86); border-bottom: 1px solid #1C1C21;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nav { display: flex; align-items: center; gap: 30px; padding: 14px 40px; max-width: 1400px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 17px; white-space: nowrap; }
.brand b { font-weight: 600; } .brand span { font-weight: 300; color: var(--muted); }
.brand:hover { color: var(--text); }
.links { display: flex; gap: 24px; font-size: 14px; }
.links a { color: #B3B0A9; } .links a:hover, .links a[aria-current="page"] { color: var(--text); }
.actions { margin-left: auto; display: flex; gap: 12px; align-items: center; font-size: 14px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 3px; font-weight: 500;
  font-size: 15px; white-space: nowrap; border: 1px solid transparent; }
.btn-main { background: var(--accent); color: var(--accent-ink); }
.btn-main:hover { background: #FFD978; color: var(--accent-ink); }
.btn-ghost { border-color: #3A3A42; color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.nav .btn { padding: 9px 14px; font-size: 14px; }

/* Hero */
.hero { padding: 96px 0 40px; position: relative; overflow: hidden; }
.hero h1 { font-size: clamp(44px, 7vw, 92px); line-height: 1; letter-spacing: -2.5px; font-weight: 500; margin: 22px 0 10px; }
.hero h1 .serif { display: block; letter-spacing: -1px; color: #CFCBC2; }
.hero p.lead { font-size: 20px; color: #C9C5BD; max-width: 640px; margin: 26px 0 34px; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-mark { position: absolute; right: 40px; top: 70px; width: 240px; opacity: .95; }
.hero-mark figcaption { font: 12px "Geist Mono", monospace; color: var(--dim); text-align: center; margin-top: 10px; }

.shot { margin: 56px 0 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.shot img { width: 100%; }
.shot figcaption { padding: 12px 16px; font: 12px "Geist Mono", monospace; color: var(--dim); letter-spacing: 1px;
  text-transform: uppercase; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; }

/* Sections */
section.block { padding: 110px 0; border-top: 1px solid #18181D; }
.block h2 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -1.2px; font-weight: 500; margin: 14px 0 20px; max-width: 900px; }
.block h2 .serif { color: #CFCBC2; }
.block p.intro { color: #C2BEB6; font-size: 19px; max-width: 720px; margin: 0 0 48px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--bg); padding: 30px 28px 34px; }
.card h3 { font-size: 19px; font-weight: 500; margin: 12px 0 8px; }
.card p { color: var(--muted); font-size: 15.5px; margin: 0; }
.card em { color: var(--text); font-style: normal; font-family: "Geist Mono", monospace; font-size: 14px; }
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: center; }
.split.rev { grid-template-columns: 1.25fr 1fr; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 13px 0; border-bottom: 1px solid var(--line); color: #CFCBC2; font-size: 16px; }
.list li b { color: var(--text); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chip { border: 1px solid #33333A; border-radius: 40px; padding: 8px 16px; font-size: 14px; color: #D2CEC6; }

/* States strip: the state machine, drawn in CSS */
.states { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 28px 0 8px; font: 13px "Geist Mono", monospace; }
.st { padding: 7px 12px; border-radius: 4px; color: #111; font-weight: 500; }
.st.w { background: #5B5F66; color: #EEE; } .st.r { background: #22C1D6; } .st.wip { background: #F2A12E; }
.st.p { background: #A79B86; } .st.d { background: #7DB443; } .st.f { background: #D2483C; color: #fff; }
.arrow { color: var(--dim); }

/* Bernard himself */
.bernard { background: var(--bg2); }
.quote { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.2; margin: 0; color: var(--text); }
.quote-by { margin-top: 18px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 10px; }
.facts div { border-top: 1px solid var(--line); padding-top: 14px; color: var(--muted); font-size: 15.5px; }
.facts b { display: block; color: var(--text); font-weight: 500; font-size: 17px; margin-bottom: 4px; }

/* Open source band */
.oss { border: 1px solid #3A3220; background: linear-gradient(120deg, #1A1609, #0D0D0F 60%); border-radius: 8px; padding: 48px; }
.oss h2 { margin-top: 10px; }
.badge { display: inline-block; font: 11px "Geist Mono", monospace; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent); padding: 4px 8px; border-radius: 3px; vertical-align: middle; }
.badge.soon { background: transparent; color: var(--accent); border: 1px solid #6A5520; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.plan { border: 1px solid var(--line); border-radius: 6px; padding: 28px 24px; background: var(--bg); display: flex; flex-direction: column; }
.plan.reco { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan .price { font-size: 44px; font-weight: 500; letter-spacing: -1px; margin: 14px 0 0; }
.plan .price small { font-size: 16px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.plan .sub { color: var(--muted); font-size: 14px; min-height: 44px; margin: 4px 0 16px; }
.plan .who { color: #CFCBC2; font-size: 15px; margin-bottom: 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; font-size: 14.5px; color: #CFCBC2; flex: 1; }
.plan li { padding: 7px 0 7px 20px; position: relative; border-bottom: 1px solid #1D1D22; }
.plan li::before { content: "●"; position: absolute; left: 0; top: 7px; font-size: 9px; color: var(--accent); }
.plan .btn { justify-content: center; }
.note { color: var(--muted); font-size: 14px; margin-top: 22px; }
.compare { width: 100%; border-collapse: collapse; margin-top: 30px; font-size: 15px; }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: right; }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare th { font: 11px "Geist Mono", monospace; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.compare tr.us td { color: var(--accent); font-weight: 500; }
.faq dt { font-weight: 500; margin-top: 24px; } .faq dd { margin: 6px 0 0; color: var(--muted); }

/* Footer */
.foot { border-top: 1px solid #18181D; padding: 56px 0 64px; color: var(--muted); font-size: 14px; }
.foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot h4 { font: 11px "Geist Mono", monospace; letter-spacing: 1.4px; text-transform: uppercase; color: var(--dim); margin: 0 0 12px; font-weight: 400; }
.foot a { display: block; color: #B3B0A9; padding: 3px 0; } .foot a:hover { color: var(--accent); }
.foot .tag { margin-top: 14px; font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: 18px; color: #CFCBC2; }

@media (max-width: 1100px) {
  .links { display: none; } .hero-mark { display: none; }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .split, .split.rev { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 760px) {
  .wrap, .nav { padding-left: 20px; padding-right: 20px; }
  .nav .btn-ghost { display: none; }
  .grid, .grid.two, .facts, .plans, .foot .cols { grid-template-columns: 1fr; }
  section.block { padding: 72px 0; } .oss { padding: 28px; }
  .compare { font-size: 13px; } .compare th, .compare td { padding: 9px 6px; }
}
@media (max-width: 420px) { .nav .brand span { display: none; } .nav .btn { padding: 8px 12px; font-size: 13px; } }

/* ------------------------------------------------------------------ 2026-11-07: humour, open source, workflow */
/* Open source, right under the hero */
.oss-top { border-top: 1px solid #2A2414; border-bottom: 1px solid #2A2414; background: linear-gradient(90deg, #17130A, #0D0D0F 70%); }
.oss-top .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.oss-top h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; letter-spacing: -1px; font-weight: 500; margin: 14px 0 14px; }
.oss-top p { color: #C9C5BD; margin: 0 0 22px; }
.oss-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: #2A2414; border: 1px solid #2A2414; }
.oss-points li { background: #0F0E0B; padding: 16px 18px; color: #CFCBC2; font-size: 15.5px; }
.oss-points b { color: var(--accent); font-weight: 500; display: block; font-size: 13px; font-family: "Geist Mono", monospace; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.hero .badge-oss { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 8px 14px; border: 1px solid #6A5520;
  border-radius: 40px; color: var(--accent); font: 13px "Geist Mono", monospace; letter-spacing: .8px; }
.hero .badge-oss:hover { background: #1A1609; }

/* Corporate-film dialogue cards (dubbed 1970s institutional film, deadpan) */
.film { position: relative; margin: 40px 0 0; border: 1px solid #3A3222; border-radius: 6px; overflow: hidden;
  background: radial-gradient(ellipse at 30% 20%, #2B2516 0%, #15130D 55%, #0E0D0A 100%); }
.film::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 3px); }
.film-head { display: flex; justify-content: space-between; gap: 16px; padding: 12px 18px; border-bottom: 1px solid #3A3222;
  font: 11px "Geist Mono", monospace; letter-spacing: 1.6px; text-transform: uppercase; color: #B9A77A; }
.film-body { padding: 26px 28px 30px; }
.film p { margin: 0 0 12px; font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: clamp(21px, 2.2vw, 27px);
  line-height: 1.3; color: #F1E6C8; }
.film p:last-child { margin-bottom: 0; }
.film p .who { font-family: "Geist Mono", monospace; font-style: normal; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase;
  color: #B9A77A; margin-right: 10px; vertical-align: 3px; }
.film .stage { font-family: "Geist Mono", monospace; font-style: normal; font-size: 13px; color: #8E8063; }
.film-foot { padding: 10px 18px; border-top: 1px solid #3A3222; font: 11px "Geist Mono", monospace; color: #8E8063; letter-spacing: 1px; }

/* The workflow, drawn */
.wf { margin-top: 40px; border: 1px solid var(--line); border-radius: 8px; background: #101013; padding: 22px 22px 14px; overflow-x: auto; }
.wf svg { width: 100%; min-width: 760px; height: auto; display: block; }
.wf-caption { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font: 12px "Geist Mono", monospace; color: var(--muted); }
.wf-caption span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; background: var(--c); }
.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 40px; }
.rule { background: var(--bg); padding: 28px; }
.rule .num { font: 12px "Geist Mono", monospace; color: var(--accent); letter-spacing: 1.4px; }
.rule h3 { font-size: 21px; font-weight: 500; margin: 10px 0 10px; }
.rule p { color: var(--muted); margin: 0 0 14px; font-size: 15.5px; }
.rule .states { margin: 4px 0 0; }
.vs { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vs div { border: 1px solid var(--line); border-radius: 6px; padding: 22px 24px; }
.vs div:last-child { border-color: #6A5520; }
.vs h4 { margin: 0 0 8px; font: 12px "Geist Mono", monospace; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.vs div:last-child h4 { color: var(--accent); }
.vs p { margin: 0; color: #CFCBC2; }
@media (max-width: 1100px) { .oss-top .wrap { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .rules, .vs { grid-template-columns: 1fr; } .film-body { padding: 20px; } }
@media (max-width: 1100px) { #roles .grid { grid-template-columns: repeat(2,1fr) !important; } }
@media (max-width: 760px) { #roles .grid { grid-template-columns: 1fr !important; } }

/* 2026-11-07: shoot photos, 1970s grade; t-shirt logo in the hero */
.hero-mark.tee { width: 380px; top: 40px; right: 30px; opacity: 1; }
.hero-mark.tee figcaption { margin-top: 6px; }
.archive { margin: 0; border: 1px solid #3A3222; border-radius: 6px; overflow: hidden; background: #15130D; }
.archive img { width: 100%; height: 100%; object-fit: cover; }
.archive figcaption { padding: 10px 14px; font: 11px "Geist Mono", monospace; letter-spacing: 1.2px; text-transform: uppercase;
  color: #B9A77A; border-top: 1px solid #3A3222; display: flex; justify-content: space-between; gap: 12px; }
.archives { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 16px; margin-top: 40px; align-items: stretch; }
.archives .archive { display: flex; flex-direction: column; }
.archives .archive img { flex: 1; min-height: 0; height: 340px; }
.free { display: inline-block; margin-left: 10px; font: 11px "Geist Mono", monospace; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent); padding: 4px 8px; border-radius: 3px; vertical-align: 1px; }
.review-shot { margin-top: 44px; }
@media (max-width: 1100px) { .archives { grid-template-columns: 1fr 1fr; } .archives .archive:last-child { grid-column: 1 / -1; } }
@media (max-width: 760px) { .archives { grid-template-columns: 1fr; } }
.hero h1, .hero p.lead { max-width: 760px; }
.hero h1 { font-size: clamp(44px, 6vw, 82px); }
.hero-mark.tee { width: 400px; top: 56px; right: max(24px, calc((100vw - 1240px) / 2 - 40px)); }
@media (min-width: 1101px) { .hero .shot { margin-top: 250px; } }

/* 2026-11-07: cathode-ray TV look over the shoot photos (scanlines, phosphor stripes, curved tube, flicker) */
.crt { position: relative; display: block; overflow: hidden; border-radius: 22px / 16px; background: #000; }
.crt img { display: block; }
.crt::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.28) 0 1px, rgba(0,0,0,0) 1px 3px),
    repeating-linear-gradient(90deg, rgba(255,40,40,.045) 0 1px, rgba(40,255,90,.035) 1px 2px, rgba(60,90,255,.045) 2px 3px);
  mix-blend-mode: multiply; }
.crt::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; border-radius: inherit;
  background: radial-gradient(ellipse at 50% 45%, rgba(255,230,170,.07) 0%, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%);
  box-shadow: inset 0 0 70px rgba(0,0,0,.65), inset 0 0 6px rgba(0,0,0,.8); }
@media (prefers-reduced-motion: no-preference) {
  .crt::after { animation: crt-flicker 6s infinite steps(1); }
  @keyframes crt-flicker { 0%, 100% { opacity: 1; } 47% { opacity: .93; } 48% { opacity: 1; } 81% { opacity: .96; } 82% { opacity: 1; } }
}
.archive .crt { border-radius: 18px / 13px; margin: 8px 8px 0; }
.archives .archive .crt { flex: 1; min-height: 0; }
.hero-mark.tee .crt, .shot .crt { border-radius: 0; }
.hero-mark.tee { top: 112px; }
@media (min-width: 1101px) { .hero .shot { margin-top: 300px; } }
@media (min-width: 1101px) { .hero .shot { margin-top: 64px; } }

/* 2026-11-07: hero in two columns, the logo vertically centred on the text block */
.hero-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
.hero-top .hero-mark.tee { position: static; width: 100%; max-width: 360px; margin: 0; }
@media (min-width: 1101px) { .hero .shot { margin-top: 56px; } }

/* 2026-11-07 mobile fix: two columns only on wide screens; below, one column, the logo under the text */
@media (min-width: 1101px) { .hero-top { grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; } }
@media (max-width: 1100px) { .hero-top .hero-mark.tee { display: block; margin: 0 auto; } }
@media (max-width: 760px) { .hero-top .hero-mark.tee { max-width: 300px; } .hero h1 { letter-spacing: -1px; } }

/* 2026-11-07: a little life on the TV photos: the scanlines crawl, a brighter roll bar passes from top to bottom,
   and the picture jumps by a pixel now and then. Transform and background-position only; nothing moves for
   visitors who turned animations off (prefers-reduced-motion). */
@media (prefers-reduced-motion: no-preference) {
  .crt::before { animation: crt-crawl 0.6s linear infinite; }
  @keyframes crt-crawl { from { background-position: 0 0, 0 0; } to { background-position: 0 3px, 0 0; } }
  .crt::after {
    background:
      linear-gradient(to bottom, rgba(255,240,205,0) 0%, rgba(255,240,205,.075) 45%, rgba(255,255,255,.11) 50%, rgba(255,240,205,.075) 55%, rgba(255,240,205,0) 100%) 0 -40% / 100% 22% no-repeat,
      radial-gradient(ellipse at 50% 45%, rgba(255,230,170,.07) 0%, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%);
    animation: crt-roll 7s linear infinite, crt-flicker 6s infinite steps(1);
  }
  @keyframes crt-roll { 0% { background-position: 0 -40%, 0 0; } 70%, 100% { background-position: 0 140%, 0 0; } }
  .crt img { animation: crt-jitter 5.3s infinite steps(1); }
  @keyframes crt-jitter {
    0%, 100% { transform: none; }
    61% { transform: translate(-1px, 1px); } 62% { transform: none; }
    88% { transform: translate(1px, 0); } 88.6% { transform: translate(0, -1px); } 89.2% { transform: none; }
  }
  .crt:nth-of-type(odd)::after, .archive:nth-child(2) .crt::after { animation-delay: -2.4s, -1s; }
  .archive:nth-child(3) .crt::after { animation-delay: -4.6s, -3s; }
  .archive:nth-child(2) .crt img { animation-delay: -1.7s; }
  .archive:nth-child(3) .crt img { animation-delay: -3.9s; }
}

/* Easter egg: the footer's « moustache » leads to the 1975 version, looking like plain text. */
.foot .tag a.egg { display: inline; padding: 0; color: inherit; text-decoration: none; cursor: pointer; }
.foot .tag a.egg:hover { color: var(--accent); }
