/* Colors follow bbbit.cc (navy #071428, cyan #16BED0). English text uses --font-en. */
:root {
  color-scheme: light dark;
  /* English text (name, title, headings, email). Change here to try another face. */
  --font-en: "Space Grotesk", sans-serif;
  --navy: #071428;
  --cyan: #16bed0;
  --canvas: #fafafa;
  --ink: #16191d;
  --muted: #5f6770;
  --line: #d3d7dc;
  --btn-bg: #fff;
  --floor: rgb(16 24 40 / 28%);

  /* ひらいた二つ折り名刺 (91 × 110mm) が画面の幅と高さの両方に収まる大きさにする。 */
  --w: min(88vw, 420px, calc((100dvh - 230px) * 91 / 110));
  --rx: 0deg;
  --ry: 0deg;
  --gx: 50%;
  --gy: 0%;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #101214;
    --ink: #e7e9ec;
    --muted: #a0a7af;
    --line: #383d45;
    --btn-bg: #1f2227;
    --floor: rgb(0 0 0 / 70%);
  }
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
html {
  overflow-x: clip;
}
body {
  margin: 0;
  background:
    radial-gradient(120% 70% at 50% 0%, rgb(22 190 208 / 9%), transparent 60%), var(--canvas);
  color: var(--ink);
  font-family: Manrope, "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

.stage {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: max(20px, env(safe-area-inset-top)) 12px max(20px, env(safe-area-inset-bottom));
}

/* ---------- Folded card ---------- */
/* The scene always reserves the opened size (91 x 110mm); each panel is 91 x 55mm. */
.scene {
  position: relative;
  width: var(--w);
  aspect-ratio: 91 / 110;
  perspective: 1400px;
  /* All inner sizes are in em so the card scales as one piece. */
  font-size: calc(var(--w) / 22);
  animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.tilt {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tilt.tracking {
  transition: transform 0.08s linear;
}
.book {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  /* Folded, the card sits in the lower half; lift it to the middle. */
  transform: translateY(-25%);
  transition: transform 0.9s cubic-bezier(0.3, 1.1, 0.4, 1);
  cursor: pointer;
  outline: none;
}
.scene[data-view="open"] .book {
  transform: none;
}
.scene[data-view="back"] .book {
  transform: translateY(-25%) rotateY(180deg);
}
.panel {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 50%;
  transform-style: preserve-3d;
}
/* The fold is the flap's top edge: it swings up and over to open. */
.flap {
  transform-origin: 50% 0;
  transform: translateZ(1px) rotateX(0deg);
  transition: transform 0.9s cubic-bezier(0.3, 1.1, 0.4, 1);
}
.scene[data-view="open"] .flap {
  transform: translateZ(0) rotateX(180deg);
}

.face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  padding: 1.5em 1.7em;
  display: flex;
  flex-direction: column;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.book:focus-visible .face {
  outline: 2px solid var(--cyan);
  outline-offset: -4px;
}
.inner-top {
  transform: rotateX(180deg);
}
.back-cover {
  transform: rotateY(180deg) translateZ(1px);
}

/* Faces turned away are hidden by backface-visibility; as a second guard (some
   browsers let a turned face's layered children show through), the faces not in
   view are also switched off once the card has turned past edge-on. */
.scene[data-view="back"] .cover,
.scene[data-view="back"] .inner,
.scene:not([data-view="back"]) .back-cover {
  visibility: hidden;
  transition: visibility 0s 0.2s;
}

/* The cyan corner square is the mark from the bbbit favicon. */
.corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 2.2em;
  height: 2.2em;
  background: var(--cyan);
}
.glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    60% 70% at var(--gx) var(--gy),
    rgb(255 255 255 / 16%),
    transparent 70%
  );
  mix-blend-mode: screen;
}

/* ---------- Outside: cover and back ---------- */
.dark {
  background: linear-gradient(160deg, #0d2140 0%, var(--navy) 55%, #040c19 100%);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 8%);
}
.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 6%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 6%) 1px, transparent 1px);
  background-size: 2.2em 2.2em;
  background-position: right top;
  -webkit-mask-image: linear-gradient(225deg, #000 5%, transparent 70%);
  mask-image: linear-gradient(225deg, #000 5%, transparent 70%);
}
.logo {
  position: relative;
  width: 6.2em;
  height: auto;
  color: #fff;
}
.cover {
  align-items: center;
  justify-content: center;
}
.cover .logo {
  width: 9em;
}
/* Laid out on the 2.2em grid: one cell of margin left and right, the QR tile
   three cells square, one cell of gap, then the text column. The text column is
   exactly as tall as the QR tile, so its first and last lines align with it. */
.back-cover {
  flex-direction: row;
  align-items: center;
  gap: 2.2em;
  padding: 0 2.2em;
}
.qr {
  position: relative;
  flex: none;
  width: 6.6em;
  height: 6.6em;
  padding: 0.3em;
  background: #fff;
}
.qr svg {
  display: block;
  width: 100%;
  height: 100%;
}
.back-info {
  position: relative;
  height: 6.6em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
}
/* What bbbit does, stated first. */
.trade {
  margin: 0;
  padding: 0.3em 0.7em;
  background: var(--cyan);
  color: var(--navy);
  font-size: 0.64em;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.domain {
  margin: 0;
  line-height: 1;
  font-family: var(--font-en);
  font-size: 0.8em;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgb(255 255 255 / 80%);
}
.domain a {
  color: inherit;
  text-decoration: none;
}
.domain a:hover,
.domain a:focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--cyan);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}
.catch {
  margin: 0;
  font-size: 1.05em;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
/* ---------- Inside spread ---------- */
.inner {
  background: #fff;
  color: var(--navy);
  box-shadow: inset 0 0 0 1px rgb(7 20 40 / 10%);
}
/* Soft shading along the fold. */
.inner-top::after,
.inner-bottom::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.4em;
  pointer-events: none;
}
.inner-top::after {
  bottom: 0;
  background: linear-gradient(transparent, rgb(7 20 40 / 9%));
}
.inner-bottom::before {
  top: 0;
  background: linear-gradient(rgb(7 20 40 / 9%), transparent);
}
/* Upper panel: who (avatar, name, title) above a rule, then where to find them
   (site on the left, social icons on the right), like the lower panel's last row.
   One grid cell of margin left and right; the avatar tile is two cells square. */
.inner-top {
  justify-content: center;
  padding: 0 2.2em;
}
.grid-light {
  background-image:
    linear-gradient(rgb(7 20 40 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(7 20 40 / 5%) 1px, transparent 1px);
}
.id-row,
.id-foot {
  position: relative;
  display: flex;
  align-items: center;
}
.id-row {
  gap: 1.3em;
}
.avatar {
  flex: none;
  width: 4.4em;
  height: 4.4em;
  background: #eef1f4;
  /* The drawing is a bust: keep it whole and standing on the tile's bottom edge. */
  object-fit: contain;
  object-position: 50% 100%;
  padding-top: 0.35em;
}
.id-foot {
  justify-content: flex-start;
  margin-top: 1.2em;
  padding-top: 1.1em;
  border-top: 1px solid rgb(7 20 40 / 14%);
}
.inner-name {
  margin: 0;
  font-family: var(--font-en);
  font-size: 1.6em;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.inner-role {
  margin: 0.75em 0 0;
  font-family: var(--font-en);
  font-size: 0.64em;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0c8a98;
}
.inner-bio {
  margin: 0.9em 0 0;
  font-size: 0.54em;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
  color: #4a5769;
}
/* Where he is based: a plate under the avatar, as wide as the avatar tile and on
   the same grey, in the same small caps as the title. The space around the letters
   is the same on all four sides (--pad), measured from the capitals themselves:
   their tops sit 0.1em below the line box and their feet 0.2em above its bottom. */
.base-in {
  --pad: 0.37em;
  position: absolute;
  left: 0;
  width: 4.4em;
  margin: 0;
  background: #eef1f4;
  font-family: var(--font-en);
  font-weight: 500;
  text-align: center;
  color: #5d6b7e;
}
.base-in span {
  display: block;
  /* 0.58em type: the paddings below are card ems divided by 0.58. */
  font-size: 0.58em;
  line-height: 1;
  padding: calc(var(--pad) / 0.58 - 0.1em) 0 calc(var(--pad) / 0.58 - 0.2em);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  /* Letter-spacing trails the last letter; pull it back so the word is centred. */
  text-indent: 0.12em;
}
/* Social links: bare icons on the right, each padded for an easier tap. */
.socials {
  display: flex;
  gap: 0.15em;
  list-style: none;
  /* Starts on the same line as the name: past the avatar (4.4em) and its gap (1.3em),
     less the links' own padding. */
  margin: -0.35em 0 -0.35em calc(4.4em + 1.3em - 0.35em);
  padding: 0;
}
.socials a,
.social-off {
  display: block;
  padding: 0.35em;
  color: var(--navy);
}
/* Not opened yet: shown faint, not a link. */
.social-off {
  color: #c3c9d1;
}
.socials svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
}
.socials .line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.socials a:hover,
.socials a:focus-visible {
  color: #0c8a98;
}

/* Lower panel: about bbbit, on the same navy as the cover. Same one-cell side
   margins as the panel above; the four letter columns are two cells wide each, so
   every glyph starts on a grid line. */
.inner-bottom {
  padding: 1.3em 2.2em 1.2em;
  background: linear-gradient(200deg, #0d2140 0%, var(--navy) 55%, #040c19 100%);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 8%);
}
.inner-bottom::before {
  z-index: 1;
  background: linear-gradient(rgb(0 0 0 / 40%), transparent);
}
.inner-bottom > h2,
.inner-bottom > p,
.inner-bottom > .rule,
.inner-bottom > .flow,
.inner-bottom > .about-foot {
  position: relative;
}
/* Heading as on bbbit.cc/about: white, with the question mark in cyan. */
.about-head {
  margin: 0;
  font-family: var(--font-en);
  font-size: 1.05em;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #fff;
}
.about-head {
  display: flex;
  align-items: baseline;
  gap: 0.32em;
}
/* The logo stands in for the word "bbbit", sized to the text's ascender height. */
.about-head svg {
  display: block;
  height: 0.86em;
  width: auto;
  /* The artwork has a little padding below the letters; sit it on the baseline. */
  transform: translateY(0.03em);
}
/* The question mark is ordinary type in cyan, enlarged so its height matches the
   logo's letters rather than the smaller "What is". */
.about-head .q {
  margin-left: -0.08em;
  font-size: 1.22em;
  line-height: 1;
  color: var(--cyan);
}
.about-lead {
  margin: 0.55em 0 0;
  font-size: 0.76em;
  font-weight: 600;
  line-height: 1.65;
  white-space: nowrap;
}
/* Marker on the key word, like the hero on bbbit.cc. */
.about-lead mark {
  background: linear-gradient(transparent 62%, rgb(22 190 208 / 55%) 62%);
  color: inherit;
}

/* Divider between the text and the diagram: short of both edges by one grid cell,
   with the brand's cyan square in the middle. */
.rule {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin: auto 2.2em 0;
}
.rule::before,
.rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgb(255 255 255 / 26%);
}
.rule span {
  width: 0.4em;
  height: 0.4em;
  background: var(--cyan);
}

/* Diagram: four tiles one grid cell (2.2em) square, spread across the 17.6em
   column and joined by arrows. The space between tiles is (17.6 - 8.8) / 3 em. */
.flow {
  --gap: 2.933em;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 2.2em);
  justify-content: space-between;
  margin-top: auto;
}
.node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
}
.tile {
  display: grid;
  place-items: center;
  width: 2.2em;
  height: 2.2em;
  border: 1px solid rgb(255 255 255 / 30%);
  background: rgb(255 255 255 / 7%);
}
.tile svg {
  display: block;
  height: 1.15em;
  width: auto;
  fill: #fff;
}
.tile .it-dot {
  fill: var(--cyan);
}
.node-it .tile {
  border-color: var(--cyan);
  background: rgb(22 190 208 / 16%);
}
.node-label {
  font-size: 0.56em;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
/* Arrow from the previous tile: a 1.6em line centred in the gap, with a head at this end. */
.node + .node::before,
.node + .node::after {
  content: "";
  position: absolute;
  top: 1.1em;
}
.node + .node::before {
  left: calc((var(--gap) + 1.6em) / -2);
  width: 1.6em;
  height: 1px;
  background: var(--cyan);
}
.node + .node::after {
  left: calc((var(--gap) - 1.6em) / -2 - 0.42em);
  width: 0.4em;
  height: 0.4em;
  border-top: 1px solid var(--cyan);
  border-right: 1px solid var(--cyan);
  transform: translateY(-50%) rotate(45deg);
  margin-top: 0.5px;
}

/* Bottom row: a note on the left, the "b = thumbs-up" legend on the right. */
.about-foot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  margin-top: auto;
  font-size: 0.52em;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgb(255 255 255 / 66%);
}
.about-note,
.legend {
  margin: 0;
  white-space: nowrap;
}
.legend {
  display: flex;
  align-items: center;
  gap: 0.4em;
  color: var(--cyan);
}
.legend svg {
  display: block;
  height: 1.5em;
  width: auto;
}
.legend-b {
  fill: #fff;
}
.legend-thumb {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- First-open reveal ---------- */
/* The first time the card opens, the inside is covered in navy cells on the card's
   grid (10 x 6 per panel, built by main.js) and a "laser" uncovers them one by one
   in a zigzag from the top edge down, each cell flashing cyan as it goes. */
.reveal {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(6, 1fr);
  pointer-events: none;
}
.reveal span {
  background: var(--navy);
  /* Hides hairline gaps between cells from sub-pixel rounding. */
  box-shadow: 0 0 0 0.5px var(--navy);
}
/* The fold stays visible while the inside is still covered. */
.inner-top .reveal .fold {
  background-image: linear-gradient(transparent 35%, rgb(0 0 0 / 45%));
}
.inner-bottom .reveal .fold {
  background-image: linear-gradient(rgb(0 0 0 / 45%), transparent 65%);
}
.scene.revealing .reveal span {
  animation: laser 0.12s linear both;
  animation-delay: var(--delay);
}
@keyframes laser {
  40% {
    background: var(--cyan);
    box-shadow: none;
    opacity: 1;
  }
  100% {
    background: var(--cyan);
    box-shadow: none;
    opacity: 0;
  }
}

/* ---------- Floor shadow ---------- */
.shadow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 21%;
  height: 7%;
  z-index: -1;
  border-radius: 50%;
  background: var(--floor);
  filter: blur(18px);
  transition: bottom 0.9s cubic-bezier(0.3, 1.1, 0.4, 1);
}
.scene[data-view="open"] .shadow {
  bottom: -4%;
}

/* ---------- Callout ---------- */
/* Shown on the cover only. A leader line grows out of the third grid cell from the
   right on the card's top edge (the cyan corner is the first): a diagonal one cell
   (2.2em) high going up-right, then a horizontal line to the right, exactly as
   wide as the label that sits on it. Sizes are in the card's em. */
.callout {
  position: absolute;
  /* The dot sits 0.3em in from the callout's left edge, on the centre of the
     third 2.2em cell from the right (16.5em from the card's left edge). */
  left: 16.2em;
  /* Folded, the card's top edge is a quarter of the way down the scene. */
  bottom: calc(75% - 0.4em);
  width: 2.7em;
  height: 2.6em;
  z-index: 2;
  pointer-events: none;
}
/* Narrow screens: start two cells further left (fifth cell from the right), so the
   label stays over the card instead of running to the edge of the screen. */
@media (max-width: 719.98px) {
  .callout-tap {
    left: 11.8em;
  }
  .flap > .callout-anchor {
    right: 9.9em;
  }
}
/* On the card: centre of the third cell from the right, just inside the top edge. */
.callout-anchor {
  position: absolute;
  right: 5.5em;
  top: 0.2em;
  width: 0;
  height: 0;
}
/* main.js moves the dot (and the diagonal's start) onto the anchor as the card tilts;
   this transform is where it rests when the card is flat. */
.callout-dot {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(0.3em, 2.4em) translate(-50%, -50%);
  width: 0.4em;
  height: 0.4em;
  background: var(--cyan);
  opacity: 0;
  /* Above the diagonal line, which itself is above the card. */
  z-index: 1;
}
.callout svg {
  position: absolute;
  left: 0;
  overflow: visible;
}
.callout-diag {
  top: 0;
  width: 100%;
  height: 100%;
}
/* Starts where the diagonal ends; the rule along its bottom is the horizontal line. */
.callout-label {
  position: absolute;
  left: 100%;
  bottom: 100%;
  padding-bottom: 0.4em;
  white-space: nowrap;
}
/* An SVG with no height draws nothing, so give it 2px and centre the line in it. */
.callout-rule {
  bottom: -1px;
  width: 100%;
  height: 2px;
}
/* Both lines are the same SVG stroke, so they are the same weight. */
.callout line {
  stroke: var(--ink);
  stroke-width: 1.2px;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.callout-text {
  display: block;
  font-size: 0.74em;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.04em;
  /* Letter-spacing adds a gap after the last glyph; keep the line flush with it. */
  margin-right: -0.04em;
  color: var(--ink);
  opacity: 0;
  transform: translateY(0.3em);
}

/* Hiding runs the reveal backwards, quickly: label, horizontal line, diagonal, dot. */
.callout-text {
  transition:
    opacity 0.1s,
    transform 0.1s;
}
.callout-rule line {
  transition: stroke-dashoffset 0.12s ease-in 0.06s;
}
.callout-diag line {
  transition: stroke-dashoffset 0.1s ease-in 0.18s;
}
.callout-dot {
  transition: opacity 0.08s 0.28s;
}
/* Once the card opens it would sit on top of the paper, so drop it at once. */
.callout {
  transition: opacity 0.1s;
}
.scene:not([data-view="cover"]) .callout-tap {
  opacity: 0;
}

/* Revealing "tap to open" on the cover: dot, diagonal, horizontal line, label. */
.scene.hinting[data-view="cover"] .callout-tap .callout-dot {
  opacity: 1;
  transition: opacity 0.15s;
}
.scene.hinting[data-view="cover"] .callout-tap .callout-diag line {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.25s ease-out;
}
.scene.hinting[data-view="cover"] .callout-tap .callout-rule line {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.3s ease-out 0.25s;
}
.scene.hinting[data-view="cover"] .callout-tap .callout-text {
  opacity: 1;
  transform: none;
  transition-duration: 0.3s;
  transition-delay: 0.5s;
}

/* ---------- Pager ---------- */
/* Three squares under the card: cover, inside, back. Not a control, only a sign
   that there are three faces and which one is showing. It follows the card's
   bottom edge, which is a quarter of the scene higher while the card is folded. */
.pager {
  position: absolute;
  left: 50%;
  top: calc(75% + 22px);
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
  transition: top 0.9s cubic-bezier(0.3, 1.1, 0.4, 1);
  pointer-events: none;
}
.scene[data-view="open"] .pager {
  top: calc(100% + 22px);
}
.pager span {
  width: 6px;
  height: 6px;
  background: var(--line);
  transition: background-color 0.3s;
}
.scene[data-view="cover"] .pager span:nth-child(1),
.scene[data-view="open"] .pager span:nth-child(2),
.scene[data-view="back"] .pager span:nth-child(3) {
  background: var(--cyan);
}

/* ---------- Controls ---------- */
/* The two buttons only appear while the card is open; on the cover and the back
   they are hidden (and out of the tab order), with their space kept so nothing
   jumps. They sit side by side, each as wide as the widest one. */
.actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 10px;
  width: max-content;
  margin-top: calc(14px + var(--w) * 0.08);
  transition:
    opacity 0.4s ease-out 0.45s,
    transform 0.4s ease-out 0.45s,
    visibility 0s 0.45s;
}
.scene:not([data-view="open"]) ~ .actions {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity 0.15s,
    transform 0.15s,
    visibility 0s 0.15s;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn:hover {
  border-color: var(--cyan);
}
.btn:active {
  transform: scale(0.96);
}
/* Both buttons are quiet: a pale tint of the card's navy, no outline, so the
   strongest colour on the page stays inside the card. */
.actions .btn {
  border-color: transparent;
  background: rgb(7 20 40 / 8%);
  color: var(--navy);
}
.actions .btn:hover {
  background: rgb(7 20 40 / 14%);
}
@media (prefers-color-scheme: dark) {
  .actions .btn {
    background: rgb(255 255 255 / 12%);
    color: #e7e9ec;
  }
  .actions .btn:hover {
    background: rgb(255 255 255 / 18%);
  }
}
.btn:focus-visible,
.socials a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px) rotate(-3deg) scale(0.94);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene {
    animation: none;
  }
  .book,
  .flap,
  .shadow,
  .pager,
  .actions,
  .tilt {
    transition-duration: 0.01s;
  }
  .callout,
  .callout line,
  .callout-dot,
  .callout-text {
    transition: none !important;
  }
}
