/* Bernard Review site: fonts served by this server, and the responsive layer over the pages' inline styles
   (the pages come from the 1440 px design canvas; these rules fold them for tablets and phones). */
@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-latinext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/InstrumentSerif-Italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root { --wipe: 50%; }
html, body { margin: 0; background: #0A0B0D; }
body { font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif; color: #ECEEF0; -webkit-font-smoothing: antialiased; }
:lang(zh) body, body:lang(zh) { font-family: "Geist", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
:lang(ja) body, body:lang(ja) { font-family: "Geist", "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif; }
a { color: #ECEEF0; text-decoration: none; }
a:hover { color: #8FB0FF; }
a:focus-visible, input:focus-visible { outline: 2px solid #8FB0FF; outline-offset: 3px; }
input[type=range] { accent-color: #ECEEF0; }
img { max-width: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* The canvas root is 1440 px wide with a fixed height: let it flow. */
.page > div { width: auto !important; max-width: 1440px; height: auto !important; margin: 0 auto; overflow: visible !important; }
/* The A|B wipe: a band that keeps the canvas proportions at every width. */
.page section[style*="height: 603px"] { width: 100% !important; height: auto !important; aspect-ratio: 1440 / 603; }
.page section[style*="height: 603px"] img { width: 100% !important; height: 100% !important; object-fit: cover; }

.lang { display: flex; gap: 10px; font-family: "Geist Mono", monospace; font-size: 12px; flex-wrap: wrap; }
.lang a { color: #8B939C; }
.lang a[aria-current="true"] { color: #ECEEF0; }

@media (max-width: 1180px) {
  .page nav, .page section, .page footer { padding-left: 24px !important; padding-right: 24px !important; }
  .page section[style*="margin:"], .page section[style*="margin: "] { margin-left: 24px !important; margin-right: 24px !important; }
  .page [style*="repeat(12"] { grid-template-columns: minmax(0, 1fr) !important; row-gap: 28px !important; }
  .page [style*="grid-column"] { grid-column: auto !important; }
  .page [style*="repeat(5"], .page [style*="repeat(4"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .page nav > div:nth-child(2) { display: none !important; }
  .page h1 { font-size: clamp(44px, 8.5vw, 112px) !important; letter-spacing: -0.03em !important; }
  .page h2 { font-size: clamp(30px, 5.6vw, 56px) !important; }
}
@media (max-width: 720px) {
  .page nav, .page section, .page footer { padding-left: 16px !important; padding-right: 16px !important; }
  .page section[style*="margin:"], .page section[style*="margin: "] { margin-left: 16px !important; margin-right: 16px !important; padding-left: 0 !important; padding-right: 0 !important; }
  .page section[style*="padding: 150px"], .page section[style*="padding: 160px"], .page section[style*="padding: 110px"] { padding-top: 72px !important; }
  .page [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .page [style*="display: flex"][style*="justify-content: space-between"] { flex-wrap: wrap; gap: 16px; }
  .page [style*="height: 280px"], .page [style*="height: 120px"], .page [style*="height: 118px"] { height: auto !important; min-height: 96px; }
  .page [style*="height: 500px"] { height: 300px !important; }
  .page [style*="width: 260px"] { width: 100% !important; }
  .page [style*="font-size: 92px"], .page h1 { font-size: clamp(40px, 11vw, 64px) !important; line-height: 1.02 !important; }
  .page h2 { font-size: clamp(28px, 8vw, 40px) !important; }
  .page pre, .page code { white-space: pre-wrap; word-break: break-word; }
  .page [style*="border-right: 1px solid"] { border-right: 0 !important; border-bottom: 1px solid #1C2025; }
}

/* The wipe band is dragged directly: no text selection, no page scroll while dragging sideways. */
.wipe-band { cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.wipe-band img { -webkit-user-drag: none; pointer-events: none; }

/* Motion (added by wipe.js only, so the page reads fully without it; none under reduced motion). */
.rise { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.rise.in { opacity: 1; transform: none; }
.grow { width: 0 !important; transition: width 1.2s cubic-bezier(.2,.7,.2,1) .15s; }
.grow.in { width: var(--w) !important; }
.live-pulse { animation: livepulse 1.8s ease-in-out infinite; }
@keyframes livepulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.page a[style*="background: #ECEEF0"], .page a[style*="background: #8FB0FF"] { transition: transform .15s ease, background-color .15s ease; }
.page a[style*="background: #ECEEF0"]:hover, .page a[style*="background: #8FB0FF"]:hover { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .rise, .grow, .live-pulse { transition: none !important; animation: none !important; opacity: 1 !important; transform: none !important; } }
