@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
@font-face { font-family: 'Leilei'; src: url('../img/mycarddeck/fonts/Leilei-Regular.otf') format('opentype'); font-display: swap; }

:root {
  --ink: #0b0c10;
  --paper: #f3f1ed;
  --muted: #a9acb6;
  --line: rgba(255, 255, 255, .14);
  --blue: #91adff;
  --blue-bright: #b5c7ff;
  --content: min(1180px, calc(100% - 64px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body.mycarddeck-page { margin: 0; background: var(--ink); color: var(--paper); font-family: 'DM Sans', sans-serif; font-size: 16px; line-height: 1.55; overflow-x: hidden; }
body.mycarddeck-page main { display: flex; flex-direction: column; }
body.mycarddeck-page main > section:nth-child(1) { order: 1; }
body.mycarddeck-page main > section:nth-child(2) { order: 2; }
body.mycarddeck-page main > section:nth-child(3) { order: 3; }
body.mycarddeck-page main > section:nth-child(4) { order: 5; }
body.mycarddeck-page main > section:nth-child(5) { order: 4; }
body.mycarddeck-page main > section:nth-child(6) { order: 6; }
body.mycarddeck-page main > section:nth-child(7) { order: 7; }
body.mycarddeck-page main > section:nth-child(8) { order: 8; }
body.mycarddeck-page main > section:nth-child(9) { order: 9; }
body.mycarddeck-page main > section:nth-child(10) { order: 10; }
.mycarddeck-page a { color: inherit; text-decoration: none; }
.mycarddeck-page img { display: block; max-width: 100%; }


.mcd-hero { position: relative; min-height: 78svh; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr); align-items: center; gap: 48px; width: var(--content); margin: 0 auto; padding-top: 80px; }
.mcd-hero::before { content: ''; position: absolute; z-index: -1; top: 13%; right: -10vw; width: 46vw; height: 46vw; border-radius: 50%; background: radial-gradient(circle, rgba(65, 85, 170, .26), transparent 67%); filter: blur(10px); }
.mcd-kicker, .mcd-label { color: var(--blue); font-size: 14px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.mcd-hero h1 { max-width: 680px; margin: 18px 0 24px; color: var(--paper); font-family: 'Space Grotesk', sans-serif; font-size: var(--hero-size); font-weight: 500; letter-spacing: var(--hero-tracking); line-height: var(--hero-leading-tight); }
.mcd-hero h1 span { color: var(--blue-bright); }
.mcd-hero__intro { max-width: 490px; color: #d7d8de; font-size: 18px; line-height: 1.55; }
.mcd-hero__meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 42px; color: var(--muted); font-size: 14px; }
.mcd-hero__meta strong { display: block; color: var(--paper); font-weight: 500; }
.mcd-hero__meta a { display: block; }
.mcd-hero__meta a:hover strong { color: var(--blue-bright); }
.mcd-hero__meta span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
.mcd-hero__visual { position: relative; min-height: 620px; display: grid; place-items: center; }
.mcd-hero__visual img { width: 70%; filter: drop-shadow(0 40px 45px rgba(0,0,0,.48)); transform: rotate(4deg); transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.mcd-hero__visual:hover img { transform: rotate(1deg) translateY(-10px); }
.mcd-scroll-cue { position: absolute; bottom: 31px; left: 0; display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 14px; letter-spacing: .15em; text-transform: uppercase; }
.mcd-scroll-cue::before { content: ''; width: 38px; height: 1px; background: var(--blue); }

.mcd-section { padding: 92px 0; }
.mcd-section--paper { background: var(--paper); color: var(--ink); }
.mcd-wrap { width: var(--content); margin: 0 auto; }
.mcd-section h2 { max-width: 790px; margin: 15px 0 28px; font-family: 'Space Grotesk', sans-serif; font-size: var(--h2-size); font-weight: 500; letter-spacing: var(--h2-tracking); line-height: var(--h2-leading); }
.mcd-section p { max-width: 610px; margin: 0; color: #bfc1ca; font-size: 18px; line-height: 1.65; }
.mcd-section--paper p { color: #43444a; }
.mcd-section--paper .mcd-label, .mcd-section--blue .mcd-label { color: #263b87; }
.mcd-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr); gap: 72px; align-items: end; }
.mcd-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 56px; border-top: 1px solid rgba(0,0,0,.25); border-bottom: 1px solid rgba(0,0,0,.25); }
.mcd-step { min-height: 180px; padding: 24px 24px 24px 0; border-right: 1px solid rgba(0,0,0,.25); }
.mcd-step + .mcd-step { padding-left: 24px; }
.mcd-step:last-child { border: 0; }
.mcd-step__number { color: #263b87; font-family: 'Leilei', serif; font-size: 34px; }
.mcd-step strong { display: block; margin: 22px 0 8px; color: var(--ink); font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 500; letter-spacing: -.04em; }
.mcd-step p { color: #353740; font-size: 14px; line-height: 1.5; }
/* Inside the story grid the row gap already separates these, so their own
   top margin would stack on top of it and double the space. */
.mcd-story .mcd-steps { grid-column: 1 / -1; margin-top: 0; }

.mcd-process { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 64px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mcd-process__item { min-height: 230px; padding: 30px 25px 25px 0; border-right: 1px solid var(--line); }
.mcd-process__item + .mcd-process__item { padding-left: 25px; }
.mcd-process__item:last-child { border: 0; }
.mcd-process__number { color: var(--blue); font-family: 'Space Grotesk', sans-serif; font-size: 44px; line-height: 1; }
.mcd-process h3 { margin: 34px 0 11px; color: var(--paper); font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 500; letter-spacing: -.04em; }
.mcd-process p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.mcd-before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; margin-top: 56px; }
.mcd-story .mcd-before-after { grid-column: 1 / -1; margin-top: 0; }
.mcd-before-after figure { margin: 0; padding: 28px; background: #fff; }
.mcd-before-after figure:last-child { background: #dfe5f4; }
.mcd-before-after img { width: 100%; height: 440px; margin: 0 auto; object-fit: contain; }
.mcd-before-after figcaption { margin-top: 20px; color: #353740; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.mcd-before-after figcaption strong { display: block; margin-bottom: 5px; color: var(--ink); font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 500; letter-spacing: -.04em; text-transform: none; }
.mcd-before-after__output { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.mcd-before-after__output figure, .mcd-before-after__output figure:last-child { margin: 0; padding: 0; background: transparent; }
.mcd-before-after__output img { width: 100%; height: auto; aspect-ratio: 825 / 1125; padding: 6px; background: #fff; object-fit: contain; }
.mcd-before-after__output figcaption { margin-top: 7px; font-size: 14px; text-align: center; }

.mcd-styles { margin-top: 64px; }
.mcd-styles__intro { display: block; }
.mcd-styles__intro h2 { margin-bottom: 0; }
.mcd-styles__intro p { max-width: 620px; margin-top: 20px; font-size: 15px; }

.mcd-brand-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 16px; margin-top: 70px; }
.mcd-brand-panel { min-height: 420px; padding: 45px; display: flex; align-items: center; justify-content: center; background: #101116; }
.mcd-brand-panel--type { align-items: flex-start; justify-content: flex-start; background: #dfe5f4; color: var(--ink); }
.mcd-brand-panel img { width: 100%; max-width: 390px; }
.mcd-type-specimen { width: 100%; }
.mcd-type-specimen__word { margin: 0 0 28px; font-family: 'Leilei', serif; font-size: clamp(3.6rem, 8vw, 7.8rem); letter-spacing: .02em; line-height: .85; }
.mcd-type-specimen__row { display: flex; justify-content: space-between; padding-top: 16px; border-top: 1px solid rgba(11,12,16,.24); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.mcd-type-specimen__row span:last-child { color: #59627c; }
.mcd-type-specimen p { margin-top: 28px; color: #30333c; font-size: 15px; line-height: 1.55; }
.mcd-type-alphabet { margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(11,12,16,.24); color: #18213e; font-family: 'Leilei', serif; font-size: clamp(1.6rem, 3.1vw, 3.5rem); letter-spacing: .04em; line-height: 1.18; overflow-wrap: anywhere; }
.mcd-type-alphabet span { display: block; margin-top: 8px; color: #59627c; font-family: 'DM Sans', sans-serif; font-size: 14px; letter-spacing: .13em; text-transform: uppercase; }

.mcd-cover-section { background: #111218; }
.mcd-cover-intro { display: block; }
.mcd-cover-intro h2 { margin-bottom: 0; }
.mcd-cover-intro p { max-width: 620px; margin-top: 20px; font-size: 15px; }
.mcd-cover-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; align-items: start; margin-top: 68px; }
.mcd-cover { margin: 0; text-align: center; }
.mcd-cover img { width: 100%; height: auto; aspect-ratio: 825 / 1125; object-fit: contain; transition: transform .55s cubic-bezier(.23,1,.32,1); }
.mcd-cover:hover img { transform: translateY(-10px) rotate(-2deg); }
.mcd-cover figcaption { margin-top: 14px; color: var(--muted); font-size: 14px; letter-spacing: .11em; text-transform: uppercase; }

.mcd-card-grid-wrap { --gutter: max(32px, calc((100vw - 1180px) / 2)); --gap: 24px; width: 100vw; margin: 48px 0 0 calc(50% - 50vw); }
.mcd-card-grid { display: flex; gap: var(--gap); align-items: start; padding: 0 var(--gutter) 24px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-padding-left: var(--gutter); scroll-snap-type: x proximity; scrollbar-width: none; }
.mcd-card-grid::-webkit-scrollbar { display: none; }
.mcd-card { flex: 0 0 calc((100vw - var(--gutter) - var(--gap) * 4) / 4.5); margin: 0; padding: 14px; background: #fff; box-shadow: 0 16px 30px rgba(11,12,16,.12); scroll-snap-align: start; }
.mcd-card img { width: 100%; height: auto; aspect-ratio: 825 / 1125; object-fit: contain; filter: drop-shadow(0 12px 10px rgba(0,0,0,.16)); transition: transform .55s cubic-bezier(.23,1,.32,1); }
.mcd-card:hover img { transform: translateY(-9px); }
.mcd-card figcaption { margin-top: 14px; color: #a9acb6; font-size: 14px; letter-spacing: .11em; text-align: center; text-transform: uppercase; }
.mcd-video-hero { max-width: 980px; margin: 48px auto 0; }
.mcd-video-frame { position: relative; overflow: hidden; background: #101116; box-shadow: 0 24px 50px rgba(11,12,16,.2); }
.mcd-video-hero video { display: block; width: 100%; height: auto; background: #101116; }
.mcd-video-hero figcaption { margin-top: 12px; color: #a9acb6; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
.mcd-video-placeholder { position: absolute; top: 50%; left: 50%; width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.92) center / 26px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230b0c10' d='M8 5v14l11-7z'/%3E%3C/svg%3E"); box-shadow: 0 8px 24px rgba(0,0,0,.3); pointer-events: none; transform: translate(-50%, -50%); transition: opacity .2s ease; }
.mcd-video-frame.is-playing .mcd-video-placeholder { opacity: 0; }

.mcd-video-frame { margin: 0; overflow: hidden; background: #101116; }
.mcd-video-frame video { display: block; width: 100%; height: auto; }
.mcd-video-frame figcaption { padding: 12px; color: var(--muted); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }

.mcd-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 76px; border-top: 1px solid rgba(0,0,0,.25); border-bottom: 1px solid rgba(0,0,0,.25); }
.mcd-flow__item { min-height: 230px; padding: 24px 20px 25px 0; border-right: 1px solid rgba(0,0,0,.25); }
.mcd-flow__item + .mcd-flow__item { padding-left: 20px; }
.mcd-flow__item:last-child { border: 0; }
.mcd-flow__item strong { display: block; margin-bottom: 32px; color: var(--ink); font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 500; letter-spacing: -.04em; }
.mcd-flow__item p { color: #585960; font-size: 14px; line-height: 1.55; }
.mcd-email { margin-top: 65px; display: grid; grid-template-columns: 1fr .8fr; gap: 24px; align-items: stretch; }
.mcd-email__window { padding: 26px; background: #fff; color: var(--ink); box-shadow: 0 22px 50px rgba(0,0,0,.12); }
.mcd-email__chrome { display: flex; justify-content: space-between; padding-bottom: 17px; border-bottom: 1px solid #e5e5e5; color: #5c5f68; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.mcd-email__window h3 { margin: 38px 0 12px; font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 500; letter-spacing: -.05em; }
.mcd-email__window p { color: #63646b; font-size: 14px; }

.mcd-build { display: grid; grid-template-columns: .72fr 1.28fr; gap: 72px; align-items: start; }
.mcd-build h2 { margin-top: 0; }
.mcd-build__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 42px; border-top: 1px solid rgba(0,0,0,.25); }
.mcd-build__fact { padding: 20px 15px 22px 0; border-bottom: 1px solid rgba(0,0,0,.25); }
.mcd-build__fact:nth-child(even) { padding-left: 15px; border-left: 1px solid rgba(0,0,0,.25); }
/* Paper sections need dark label colours: --muted and the light greys above
   are tuned for the dark ground and wash out on cream. */
.mcd-section--paper .mcd-card figcaption,
.mcd-section--paper .mcd-cover figcaption,
.mcd-section--paper .mcd-video-hero figcaption,
.mcd-section--paper .mcd-video-frame figcaption,
.mcd-section--paper .mcd-hero__meta span { color: #55565c; }

.mcd-build__fact span { display: block; margin-bottom: 9px; color: #55565c; font-size: 14px; letter-spacing: .13em; text-transform: uppercase; }
.mcd-build__fact strong { color: var(--ink); font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 500; letter-spacing: -.03em; }

.mcd-related { background: var(--ink); color: var(--paper); }
.mcd-related h2 { color: var(--paper); }
.mcd-related .mcd-label { color: var(--blue-bright); }
.mcd-related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 55px; }
.mcd-related__item { display: block; overflow: hidden; }
.mcd-related__item img { width: 100%; aspect-ratio: 1.35; object-fit: cover; opacity: .82; transition: opacity .25s ease, transform .5s cubic-bezier(.23,1,.32,1); }
.mcd-related__item:hover img { opacity: 1; transform: scale(1.03); }
.mcd-related__item strong { display: block; margin-top: 15px; color: var(--paper); font-family: 'Space Grotesk', sans-serif; font-size: 19px; font-weight: 500; letter-spacing: -.04em; }
.mcd-related__item span { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; }
.mcd-footer { display: flex; justify-content: space-between; gap: 20px; width: var(--content); margin: 0 auto; padding: 26px 0 34px; color: var(--muted); font-size: 14px; }
.mcd-footer a { color: var(--paper); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 800px) {
  :root { --content: min(calc(100% - 40px), 620px); }
  .mcd-hero { display: block; min-height: 0; padding-top: 150px; }
  .mcd-hero h1 { max-width: 500px; }
  .mcd-hero__intro { font-size: 16px; }
  .mcd-hero__meta { margin-top: 28px; }
  .mcd-hero__visual { min-height: 450px; margin-top: 64px; }
  .mcd-hero__visual img { width: 70%; }
  .mcd-scroll-cue { display: none; }
  .mcd-section { padding: 90px 0; }
  .mcd-section p { font-size: 16px; }
  .mcd-story, .mcd-build { display: block; }
  .mcd-steps { display: block; margin-top: 50px; }
  .mcd-step, .mcd-step + .mcd-step { min-height: 0; padding: 22px 0; border-right: 0; border-bottom: 1px solid rgba(0,0,0,.25); }
  .mcd-step:last-child { border-bottom: 0; }
  .mcd-process { display: block; margin-top: 58px; }
  .mcd-process__item, .mcd-process__item + .mcd-process__item { min-height: 0; padding: 25px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .mcd-process__item:last-child { border-bottom: 0; }
  .mcd-process h3 { margin-top: 20px; }
  .mcd-before-after { display: block; margin-top: 48px; }
  .mcd-before-after figure + figure { margin-top: 13px; }
  .mcd-before-after img { height: 320px; }
  .mcd-before-after__output { gap: 8px; }
  .mcd-before-after__output figure + figure { margin-top: 0; }
  .mcd-before-after__output img { height: auto; }
  .mcd-styles { margin-top: 70px; }
  .mcd-styles__intro { display: block; }
  .mcd-styles__intro p { margin-top: 20px; }
  .mcd-brand-grid, .mcd-video-layout, .mcd-email { display: block; }
  .mcd-brand-panel { min-height: 300px; padding: 28px; }
  .mcd-brand-panel + .mcd-brand-panel { margin-top: 13px; }
  .mcd-cover-intro { display: block; }
  .mcd-cover-intro p { margin-top: 20px; }
  .mcd-cover-grid { grid-template-columns: repeat(3, 1fr); gap: 24px 13px; margin-top: 44px; }
  .mcd-card-grid-wrap { --gutter: max(20px, calc((100vw - 620px) / 2)); --gap: 12px; margin-top: 44px; }
  .mcd-card { flex-basis: calc((100vw - var(--gutter) - var(--gap)) / 2.4); padding: 8px; }
    .mcd-video-hero { margin-top: 42px; }
  .mcd-flow { display: block; margin-top: 50px; }
  .mcd-flow__item, .mcd-flow__item + .mcd-flow__item { min-height: 0; padding: 24px 0; border-right: 0; border-bottom: 1px solid rgba(0,0,0,.25); }
  .mcd-flow__item:last-child { border-bottom: 0; }
  .mcd-flow__item strong { margin-bottom: 13px; }
  .mcd-email { margin-top: 42px; }
  .mcd-build__facts { margin-top: 55px; }
  .mcd-related__grid { display: block; margin-top: 40px; }
  .mcd-related__item { margin-bottom: 34px; }
  .mcd-footer { display: block; }
  .mcd-footer span { display: block; margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}