/* Dark theme layered over the copied reading pages so they match the 3D homepage.
   It only overrides; the pages' own stylesheets stay as they are on the live site. */
:root {
  color-scheme: dark;
  --paper: #030509;
  --bg: rgb(8 13 22 / 0.55);
  --card: rgb(12 19 32 / 0.6);
  --ink: #eef4ff;
  --sub: #a3b3ca;
  --indigo: #63ffc4;
  --indigo-soft: rgb(99 255 196 / 0.1);
  --mist: #16202f;
  --line: rgb(255 255 255 / 0.14);
  --display: 'Satoshi', system-ui, sans-serif;
  --body: 'Satoshi', system-ui, sans-serif;
  --mono: 'Satoshi', system-ui, sans-serif;
}

html {
  background:
    radial-gradient(110vw 80vh at 68% 18%, #06102a, transparent 72%),
    radial-gradient(90vw 70vh at 10% 100%, rgb(4 17 15 / 0.8), transparent 70%),
    var(--paper);
  background-attachment: fixed;
  scrollbar-color: #2a3a52 var(--paper);
}

body {
  background: transparent;
  color: var(--ink);
}

::selection {
  background: var(--indigo);
  color: #04121a;
}

/* header: glass bar and a text wordmark, since the image wordmark is drawn for light backgrounds */
header.bar {
  background: rgb(4 6 10 / 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

/* some pages print the name as text beside the image; hide both and draw one wordmark */
.logo,
.logo:has(.b) {
  width: auto;
  height: auto;
  font-size: 0;
  background: none;
  filter: none;
}

.logo > *,
.logo img {
  display: none !important;
}

.logo::after {
  content: 'bisyri.co';
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: #fff;
}

.bar nav a,
.mnav a {
  color: var(--sub);
}

.bar nav a:hover,
.bar nav a.active {
  color: #fff;
}

.mnav {
  background: #08101c;
}

.burger span {
  background: #fff;
}

/* primary actions read as mint with dark text */
.btn-primary,
.hero .btn-primary,
.sl-cta-btn,
button[type='submit'] {
  background: var(--indigo);
  color: #04121a;
  border-color: transparent;
}

.btn-primary:hover,
.sl-cta-btn:hover,
button[type='submit']:hover {
  background: #8dffd6;
  color: #04121a;
}

.btn-ghost,
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: #33435c;
}

a {
  color: inherit;
}

main a:not(.btn):not(.btn-primary):not(.btn-ghost):not(.post-card):not(.proj):not(.article-back) {
  text-decoration-color: rgb(99 255 196 / 0.5);
}

/* surfaces that are hard-coded white on the live site */
input,
textarea,
select {
  background: #0a1220;
  color: var(--ink);
  border-color: var(--line);
}

input::placeholder,
textarea::placeholder {
  color: #6f8099;
}

pre,
code,
kbd {
  background: #0a1422;
  color: #d6e6ff;
  border-color: var(--line);
}

table {
  border-color: var(--line);
}

th {
  background: #0d1828;
  color: var(--ink);
}

td,
th {
  border-color: var(--line);
}

blockquote {
  border-color: var(--indigo);
  color: #d7e3f6;
}

hr {
  border-color: var(--line);
}

img {
  border-radius: inherit;
}

footer,
.site-footer {
  background: transparent;
  border-color: var(--line);
  color: var(--sub);
}

/* blog post leftovers: author avatar and the closing call-to-action box */
.avatar {
  background: var(--indigo);
  color: #04121a;
}

.article-cta {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
}

.article-cta h2,
.article-cta h3,
.article-cta strong {
  color: #fff;
}

.article-cta p {
  color: var(--sub);
}

.btn.primary,
.aeo-submit {
  background: var(--indigo);
  color: #04121a;
}

/* the tools' own buttons and badges were white text on the brand colour; on mint that reads as blank */
.roi-calc-btn, .roi-scenario-badge,
.mg-generate, .og-generate, .rg-generate, .sg-generate, .sg-download-btn,
.wpf-submit, .mcp-ch-badge.primary, .svc-badge, .skip,
.aeo-submit, .btn.primary, .btn-primary, .sl-cta-btn {
  color: #04121a !important;
}

/* the tools' closing "let's talk" boxes were a solid brand-colour slab with a white button; on this site they are
   the same glass card as the articles' closing box, with the mint button as the one bright thing */
.roi-cta, .wpf-cta {
  background: var(--card) !important;
  border: 1px solid var(--line);
  color: var(--ink) !important;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.roi-cta h2, .wpf-cta h2 { color: #fff; }
.roi-cta p, .wpf-cta p { color: var(--sub); opacity: 1; }
.roi-cta-btn, .wpf-cta-btn {
  background: var(--indigo) !important;
  color: #04121a !important;
  border-radius: 999px !important;
}
.roi-cta-btn:hover, .wpf-cta-btn:hover { background: #8dffd6 !important; }

/* A light aurora band at the top of every reading page. Pure CSS, so posts and tools stay fast. */
body::before {
  content: '';
  position: fixed;
  top: -120px;
  left: -10vw;
  right: -10vw;
  height: 460px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 60% at 22% 40%, rgb(99 255 196 / 0.22), transparent 70%),
    radial-gradient(34% 55% at 58% 30%, rgb(70 150 255 / 0.2), transparent 70%),
    radial-gradient(30% 50% at 84% 46%, rgb(160 110 255 / 0.16), transparent 70%);
  filter: blur(34px);
  animation: aurora-drift 22s ease-in-out infinite alternate;
}

html.has-backdrop body::before {
  display: none;
}

@keyframes aurora-drift {
  from {
    transform: translate3d(-3%, 0, 0) scaleY(0.9);
    opacity: 0.75;
  }
  to {
    transform: translate3d(3%, 14px, 0) scaleY(1.12);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
}

/* ---------- homepage look: type, pills, glass, light ---------- */
/* the pages' own stylesheets set heavier headings with more specific selectors, hence the override */
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 500 !important;
  letter-spacing: -0.035em !important;
  text-wrap: balance;
}
/* Work page group labels are h2 for document order, but keep their small label look */
h2.grp {
  font-family: var(--body);
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  line-height: inherit;
}

h1 {
  line-height: 1.02;
}

.btn,
.btn-primary,
.btn-ghost,
.btn-secondary,
.sl-cta-btn,
.aeo-submit,
button[type='submit'] {
  border-radius: 999px;
}

/* cards let the light through instead of sitting on it as solid blocks */
.post-card,
.proj,
.tool-card,
.card,
.article-cta {
  background: var(--card);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition:
    transform 0.35s cubic-bezier(0.2, 0, 0, 1),
    border-color 0.25s;
}

.post-card:hover,
.proj:hover,
.tool-card:hover,
.card:hover {
  transform: translateY(-4px);
  border-color: rgb(99 255 196 / 0.5);
}

/* the cloud of light behind the page, and a little shade so long text stays easy to read */
.page-light {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.7;
  animation: light-in 1.6s ease-out both;
}

html.has-light body::before {
  display: none;
}

html.has-light body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* shade over the reading column, clear toward the right edge where the light sits */
  background: linear-gradient(90deg, rgb(3 5 9 / 0.55) 0%, rgb(3 5 9 / 0.62) 50%, rgb(3 5 9 / 0.3) 78%, transparent 100%);
}

@keyframes light-in {
  from {
    opacity: 0;
  }
}

/* content rises into place as it scrolls into view */
.lr {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s cubic-bezier(0.2, 0, 0, 1);
}

.lr.lr-in {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .page-light {
    opacity: 0.55;
  }
}

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

  .page-light {
    animation: none;
  }

  .post-card,
  .proj,
  .tool-card,
  .card {
    transition: none;
  }
}

/* portfolio pictures: a flat screenshot under the card's own browser bar, the same frame for every project */
.shot {
  height: auto;
  aspect-ratio: 7 / 4;
  background: rgb(6 10 18 / 0.7);
  border-bottom-color: var(--line);
}

.shot img {
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s cubic-bezier(0.2, 0, 0, 1);
}

.proj:hover .shot img {
  transform: scale(1.05);
}

/* the few projects with no screenshot keep their mockup, shown whole on the dark card */
.shot img[src*='/dark/'] {
  object-fit: contain;
  object-position: center;
  padding: 14px 16px 6px;
}

.chrome {
  background: rgb(255 255 255 / 0.04);
  border-bottom-color: var(--line);
}

@media (prefers-reduced-motion: reduce) {
  .shot img {
    transition: none;
  }
}

/* Cards: the live pages draw these as flat rows with no inner spacing. On the dark site they are boxes,
   so the text needs room from the edge and the corners need rounding. */
.post-card {
  border-radius: 16px !important;
  overflow: hidden;
}

.post-body {
  padding: 26px 28px 28px !important;
}

@media (max-width: 640px) {
  .post-body {
    padding: 22px 20px 24px !important;
  }
}

/* Work cards: same fix. Text gets room from the edge, and each screenshot sits under a small browser bar. */
.proj .body {
  padding: 22px 24px 26px !important;
}

.proj .chrome {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgb(255 255 255 / 0.04);
  border-bottom: 1px solid var(--line);
}

.proj .chrome .dots {
  display: flex;
  gap: 5px;
}

.proj .chrome .dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.22);
}

.proj .chrome .addr {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .proj .body {
    padding: 20px 20px 24px !important;
  }
}

/* case study cover: a flat screenshot now, so it gets the same frame as the Work cards */
.case-cover img {
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px -40px rgb(0 0 0 / 0.8);
}

@media (max-width: 900px) {
  html.has-light body::after {
    background: rgb(3 5 9 / 0.5);
  }
}

/* legal pages: the cookie table gets room to breathe and scrolls sideways on a phone instead of squeezing */
.legal-wrap .table-wrap {
  overflow-x: auto;
  margin: 18px 0 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.legal-wrap table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
}

.legal-wrap th,
.legal-wrap td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.legal-wrap tr:last-child td {
  border-bottom: 0;
}

.legal-wrap th {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sub);
}

.legal-wrap td:first-child {
  width: 22%;
  font-weight: 500;
  color: var(--ink);
}

.legal-wrap h2 {
  margin-top: 40px;
}

/* 404 page */
.nf-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.nf-links .btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid #33435c;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink);
}

.nf-links .btn-primary {
  background: var(--indigo);
  border-color: transparent;
  color: #04121a !important;
}

.nf-links .btn-ghost:hover {
  border-color: var(--indigo);
}

/* article slide decks: chip text readable on the dark slide, dots keep their look but get a 24px tap area */
.aeo-slides .sl-chip { color: #a3adbd; }
.aeo-slides .slide-dot {
  width: 24px;
  height: 24px;
  padding: 8.5px;
  box-sizing: border-box;
  background-clip: content-box;
}

/* "calculate again" in the tools: a real button (it runs code, it goes nowhere) dressed as a quiet text link */
.link-btn {
  font: inherit;
  font-size: 13.5px;
  color: var(--sub);
  background: none;
  border: 0;
  border-bottom: 1px dashed var(--line);
  padding: 4px 0;
  min-height: 24px;
  cursor: pointer;
}
.link-btn:hover,
.link-btn:focus-visible { color: var(--ink); }
