@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/instrument-serif-italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Onest;
  src: url("assets/fonts/onest-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --background: #e6e6e6;
  --cover: #cdcdcd;
  --ink: #191919;
  --secondary: #666;
  --accent: #1458d4;
  --gutter: 20px;
  --column-gap: 12px;
  /* Outer corner radius / phone width: 52px on the 328px desktop mockup. */
  --phone-radius-ratio: 0.1586;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body {
  margin: 0;
  padding: var(--gutter);
  background: var(--background);
  color: var(--ink);
  font-family: Onest, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
p, h1, h2, ul { margin: 0; }
ul { padding: 0; list-style: none; }

.site-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--column-gap);
  align-items: center;
}
.navigation { display: flex; flex-wrap: wrap; gap: 12px 30px; }
.identity { text-align: right; }
.identity-name { display: inline-block; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 24px; margin-top: 0; }

.intro { margin: 110px 0 42px; }
.intro h1 {
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
  font-size: clamp(30px, 2.8vw, 44px);
  font-weight: 400;
  line-height: 1.13;
  letter-spacing: -0.045em;
}
.intro-accent {
  color: var(--accent);
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.16em;
  line-height: 1;
  letter-spacing: -0.015em;
  font-synthesis: none;
}
/* Each incoming case slides over the previous case, which stays underneath. */
.home {
  --frame-gap: 32px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: var(--frame-gap);
  padding-block: var(--gutter);
}
.home main { display: grid; gap: 32px; }
.home .intro { margin: 0; padding-top: 0; }
.home .intro h1 { font-size: 36px; line-height: 1.15; letter-spacing: -0.035em; }
.case-slider { display: grid; gap: 16px; }
.projects {
  display: grid;
  grid-template-columns: calc((94% - 2 * var(--gutter)) / 2);
  margin-right: calc(-1 * var(--gutter));
  overflow: hidden;
  touch-action: pan-y;
}
.project {
  /* Shared grid cell keeps the stacking animation in normal document flow.
     Cover height now follows its width rather than the remaining viewport. */
  grid-area: 1 / 1;
  min-width: 0;
  background: var(--background);
  transform: translateX(calc(var(--offset, 0) * (100% + var(--gutter))));
  transition: transform 700ms cubic-bezier(.22, 1, .36, 1);
}
.project:nth-child(2) { --offset: 1; }
.project:nth-child(3) { --offset: 2; }
.project:nth-child(4) { --offset: 3; }
.project:nth-child(5) { --offset: 4; }
.project-cover { position: relative; overflow: hidden; width: 100%; aspect-ratio: 6 / 5; max-height: var(--cover-height, none); background: var(--cover); border-radius: 0; }
.project-cover--soon { display: grid; place-items: center; color: var(--ink); font-size: 16px; font-weight: 400; }
.project-cover img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.project h2, .work-card h2 { margin-top: 12px; font-size: 16px; font-weight: 400; line-height: 1.4; }
.project p, .work-card p { margin-top: 2px; color: #595959; font-size: 14px; }
.project:not(.is-visible) h2, .project:not(.is-visible) p { visibility: hidden; }
.slider-controls { display: flex; align-items: center; justify-content: space-between; }
.slider-controls[hidden] { display: none; }
.slider-arrows { display: flex; gap: 8px; }
.slider-arrow {
  display: grid; place-items: center; width: 44px; height: 44px;
  padding: 0; border: 1px solid var(--ink); border-radius: 50%;
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background 150ms, color 150ms;
}
.slider-arrow:hover:not(:disabled) { background: var(--ink); color: var(--background); }
.slider-arrow:disabled { opacity: .25; cursor: default; }
.slider-arrow:focus-visible { outline: 2px solid #1368a1; outline-offset: 4px; }
.slider-arrow svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; }
/* Offset the heavier arrowheads within the circular controls. */
.slider-arrow:is([data-direction="previous"], [data-story-direction="previous"]) svg { transform: translateX(1px); }
.slider-arrow:is([data-direction="next"], [data-story-direction="next"]) svg { transform: translateX(-1px); }
.slider-arrow[data-story-direction].is-replay svg { transform: translate(.5px, .75px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.home .site-footer { margin-top: 0; padding-top: 0; }
.home .skip-link { z-index: 10; }
@media (prefers-reduced-motion: reduce) { .project, .slider-arrow { transition: none; } }
@media (min-width: 601px) and (max-width: 1100px) {
  .home .intro h1 { font-size: 28px; }
}
/* Basic fit while the full mobile art direction is still to be agreed. */
@media (max-width: 600px) {
  .home { --frame-gap: 24px; font-size: 12px; }
  body { --gutter: 16px; }
  .site-bar { font-size: 12px; }
  .site-bar .navigation { gap: 8px 14px; }
  .site-bar .contact-links { gap: 12px; }
  .home .intro h1 { font-size: 20px; }
  .home main { gap: 24px; }
  .project h2, .work-card h2 { font-size: 14px; min-height: 0; }
  .project p, .work-card p { font-size: 12px; min-height: 0; margin-top: 4px; }
}
.site-footer { margin-top: 120px; padding-top: 22px; }
.skip-link { position: absolute; left: 20px; top: -100px; background: var(--ink); color: white; padding: 12px; }
.skip-link:focus { top: 10px; }
/* Mobile composition is a separate, upcoming design pass. */





.case-link { display: block; }
.case-link:hover { text-decoration: none; }
.case-link:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.case-link:focus-visible { outline-offset: -2px; }
.case-page { min-height: 100dvh; display: flex; flex-direction: column; padding-block: var(--gutter); }
.case-placeholder { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 80px 0; }
.case-placeholder h1 { max-width: 900px; font-size: clamp(28px, 2.8vw, 36px); font-weight: 400; line-height: 1.15; letter-spacing: -0.035em; }
.case-placeholder p { margin-top: 24px; color: var(--secondary); }
.case-placeholder .back-link { margin-top: 32px; text-decoration: underline; text-underline-offset: 4px; }
.case-page .site-footer { margin-top: 0; padding-top: 0; }


/* Each story supplies its palette; navigation and controls inherit the ink. */
.stories-case {
  background: var(--background);
  isolation: isolate;
}
.stories-case[data-story="service"],
.story-background[data-story="service"] {
  --background: #252627;
  --ink: #ffffff;
  --secondary: #d4c9c9;
  --story-glow: 158, 48, 48;
  --story-screen: #252627;
  color-scheme: dark;
}
.stories-case[data-story="credit"],
.story-background[data-story="credit"] {
  --background: #d5d0f2;
  --ink: #191919;
  --secondary: #51476d;
  --story-glow: 151, 137, 214;
  --story-screen: #d5d0f2;
  color-scheme: light;
}
.stories-case[data-story="service-payments"],
.story-background[data-story="service-payments"] {
  --background: #353a40;
  --ink: #ffffff;
  --secondary: #d6d3e4;
  --story-glow: 118, 99, 184;
  --story-screen: #353a40;
  color-scheme: dark;
}
.stories-case[data-story="credit-card"],
.story-background[data-story="credit-card"] {
  --background: #262c30;
  --ink: #ffffff;
  --secondary: #d5ddcf;
  --story-glow: 99, 133, 43;
  --story-screen: #262c30;
  color-scheme: dark;
}
.stories-case[data-story="reciept"],
.story-background[data-story="reciept"] {
  --background: #a292e5;
  --ink: #191919;
  --secondary: #44385f;
  --story-glow: 105, 83, 187;
  --story-screen: #a292e5;
  color-scheme: light;
}
.stories-case[data-story="black-friday"],
.story-background[data-story="black-friday"] {
  --background: #2c3136;
  --ink: #ffffff;
  --secondary: #d6d3e4;
  --story-glow: 100, 82, 166;
  --story-screen: #2c3136;
  color-scheme: dark;
}
.stories-case[data-story="referal"],
.story-background[data-story="referal"] {
  --background: #cee4f5;
  --ink: #191919;
  --secondary: #455b70;
  --story-glow: 126, 177, 222;
  --story-screen: #cee4f5;
  color-scheme: light;
}
.stories-case[data-story="documents-for-goverment"],
.story-background[data-story="documents-for-goverment"] {
  --background: #e9e2ff;
  --ink: #191919;
  --secondary: #51476d;
  --story-glow: 145, 112, 245;
  --story-screen: #e9e2ff;
  color-scheme: light;
}
.stories-case::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 66% 38%, rgba(var(--story-glow), .42) 0%, rgba(var(--story-glow), .14) 30%, transparent 62%),
    radial-gradient(ellipse at 48% 65%, rgba(var(--story-glow), .14), transparent 55%);
}
.stories-case .skip-link { background: var(--ink); color: var(--background); z-index: 3; }
.stories-showcase, .cashback-stage {
  --story-phone-width: clamp(230px, calc((100svh - 190px) * 1500 / 3248), 360px);
}
.stories-showcase {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(var(--story-phone-width) + 136px) minmax(0, 1fr);
  align-items: center;
  align-content: start;
  padding: 32px 0;
  gap: 20px 72px;
}
.story-heading {
  justify-self: end;
  width: max-content;
  max-width: 100%;
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}
.story-heading h1 { font-size: 24px; font-weight: 400; line-height: 1.25; }
.story-heading p { margin-top: 0; }
.case-title-accent {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-optical-sizing: auto;
  font-synthesis: none;
}
.work-main > h1 .case-title-accent { color: var(--accent); }
.story-description {
  grid-column: 3;
  justify-self: start;
  grid-row: 1;
  align-self: center;
  max-width: 400px;
  font-family: Onest, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.5;
  text-align: center;
}
.story-description p:first-child { font-weight: 600; }
.story-credits h2 { font-size: inherit; font-weight: 600; margin: 0 0 12px; }
.story-credits p { text-wrap: balance; }
@media (min-width: 768px) {
  .story-credits p > span { white-space: nowrap; }
}
.story-credits p + p { margin-top: 4px; }
@media (width < 768px) {
  .story-credits h2 { margin-bottom: 2px; }
  .story-credits p + p { margin-top: 0; }
}
.story-summary p + p { margin-top: 16px; }
.stories-showcase .story-figure { grid-column: 2; grid-row: 1; }
.stories-showcase .stories-back { grid-column: 2; grid-row: 2; justify-self: center; }
/* The artwork itself defines the screen proportions: no crop or letterboxing. */
.story-figure {
  --story-control-gap: 24px;
  margin: 0;
  width: min(100%, calc(var(--story-phone-width) + 88px + 2 * var(--story-control-gap)));
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  column-gap: var(--story-control-gap);
}
.story-phone {
  --phone-radius: calc(100cqw * var(--phone-radius-ratio));
  width: 100%;
  min-width: 0;
  /* 10px from shell to display on the 328px desktop mockup. */
  --phone-bezel: 3.05cqw;
  container-type: inline-size;
  display: flow-root;
  position: relative;
  --phone-shadow: 0 0 0 1px #171819, inset 0 0 0 1px #252729, 0 24px 48px rgba(0, 0, 0, .36);
}
.story-phone::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #555759;
  border-radius: var(--phone-radius);
  background: #090909;
  box-shadow: var(--phone-shadow);
  pointer-events: none;
}
.phone-display {
  position: relative;
  margin: var(--phone-bezel);
  --screen-radius: calc(var(--phone-radius) - var(--phone-bezel));
  border-radius: var(--screen-radius);
  /* Explicitly clip blended opacity layers to the screen throughout Safari transitions. */
  clip-path: inset(0 round var(--screen-radius));
  overflow: hidden;
  background: var(--story-screen);
}
.story-artwork { display: block; width: 100%; height: auto; border-radius: inherit; }
.story-artwork[hidden] { display: none; }
.stories-back { font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 600px) {
  .stories-showcase { padding: 28px 0; gap: 20px; }

}

@media (max-width: 420px) {
  .story-figure { --story-control-gap: 16px; }
}

@media (max-width: 1100px) {
  .stories-showcase { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .story-heading { justify-self: center; width: min(100%, 600px); }
  .story-description { grid-column: 1; grid-row: 3; justify-self: center; width: min(100%, 600px); max-width: 600px; }
  .stories-showcase .story-figure { grid-column: 1; grid-row: 2; justify-self: center; }
  .stories-showcase .stories-back { grid-column: 1; grid-row: 4; }
}

/* One synchronized, interruptible crossfade for artwork, palette and interface. */
.stories-case {
  --story-duration: 250ms;
  --story-ease: cubic-bezier(0.23, 1, 0.32, 1);
}
.story-viewer-ready { background: #252627; transition: color var(--story-duration) var(--story-ease); }
.story-viewer-ready::before { content: none; }
.story-backdrops { position: fixed; inset: 0; z-index: -1; pointer-events: none; isolation: isolate; }
.story-background {
  position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(ellipse at 66% 38%, rgba(var(--story-glow), .42), rgba(var(--story-glow), .14) 30%, transparent 62%),
    radial-gradient(ellipse at 48% 65%, rgba(var(--story-glow), .14), transparent 55%), var(--background);
  transition: opacity var(--story-duration) var(--story-ease);
  mix-blend-mode: plus-lighter;
}
.story-viewer-ready .phone-display { display: grid; isolation: isolate; background: transparent; }
.story-viewer-ready .story-artwork {
  grid-area: 1 / 1; min-width: 0; opacity: 0; pointer-events: none;
  transition: opacity var(--story-duration) var(--story-ease);
  mix-blend-mode: plus-lighter;
}
.story-background.is-active, .story-viewer-ready .story-artwork.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .stories-case { --story-duration: 120ms; } }
.stories-case[data-story-motion="instant"] { --story-duration: 0ms; }

/* Each page entry: the phone leads, controls follow, then the two text blocks. */
.story-intro-pending :is(.story-phone, .story-arrow, .story-progress, .story-heading, .story-description, .stories-back, .stories-case .site-footer) {
  opacity: 0;
}
.story-intro-playing :where(.story-phone, .story-arrow, .story-progress, .story-heading, .story-description, .stories-back, .stories-case .site-footer) {
  animation: story-enter-fade 650ms var(--story-ease) both;
}
.story-intro-playing .story-phone {
  animation-name: story-enter-phone;
  animation-duration: 800ms;
}
.story-intro-playing :is(.story-arrow, .story-progress) { animation-delay: 400ms; }
.story-intro-playing .story-heading { animation-name: story-enter-text; animation-delay: 750ms; }
.story-intro-playing .story-description { animation-name: story-enter-text; animation-delay: 1050ms; }
.story-intro-playing :is(.stories-case .site-footer, .stories-back) { animation-delay: 400ms; }
@keyframes story-enter-phone {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
}
@keyframes story-enter-text {
  from { opacity: 0; transform: translateY(6px); }
}
@keyframes story-enter-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .story-intro-playing :is(.story-phone, .story-arrow, .story-progress, .story-heading, .story-description, .stories-back, .stories-case .site-footer) {
    animation-name: story-enter-fade;
    animation-duration: 120ms;
    animation-delay: 0ms;
  }
}

/* Homepage entrance: separate from the stacking slider's transforms. */
:root { --entrance-ease: cubic-bezier(0.23, 1, 0.32, 1); }
.home-intro-pending .home :is(.intro h1, .projects, .slider-controls, .site-footer) { opacity: 0; }
.home-intro-playing .home :where(.intro h1, .projects, .slider-controls, .site-footer) {
  animation: home-enter-fade 650ms var(--entrance-ease) both;
}
.home-intro-playing .home .intro h1 { animation-name: home-enter-title; animation-duration: 1100ms; animation-delay: 120ms; }
.home-intro-playing .home .projects { animation-duration: 800ms; animation-delay: 400ms; }
.home-intro-playing .home .slider-controls { animation-delay: 750ms; }
.home-intro-playing .home .site-footer { animation-delay: 1050ms; }
@keyframes home-enter-title { from { opacity: 0; transform: translateY(12px); } }
@keyframes home-enter-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .home-intro-playing .home :is(.intro h1, .projects, .slider-controls, .site-footer) {
    animation-name: home-enter-fade;
    animation-duration: 120ms;
    animation-delay: 0ms;
  }
}

/* Work: project content and footer enter beneath the persistent header. */
.work-intro-pending .work-page :is(.work-main > h1, .work-grid, .site-footer) { opacity: 0; }
.work-intro-playing .work-page :where(.work-main > h1, .work-grid, .site-footer) {
  animation: work-enter-fade 800ms var(--entrance-ease) both;
}
.work-intro-playing .work-page .work-main > h1 { animation-name: work-enter-title; }
.work-intro-playing .work-page .site-footer { animation-duration: 650ms; animation-delay: 1050ms; }
@keyframes work-enter-title { from { opacity: 0; transform: translateY(12px); } }
@keyframes work-enter-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .work-intro-playing .work-page :is(.work-main > h1, .work-grid, .site-footer) {
    animation-name: work-enter-fade;
    animation-duration: 120ms;
    animation-delay: 0ms;
  }
}

/* Bridge document backgrounds without changing each page's entrance timeline. */
html.page-arriving body::after, .page-exit-overlay {
  position: fixed;
  inset: 0;
  z-index: 99; /* Keep the sticky header above the transition. */
  pointer-events: none;
  background: var(--previous-page-background);
}
html.page-arriving body::after { content: ''; }
@media (prefers-reduced-motion: no-preference) {
  .illustrations, .case-page > .site-footer {
    animation: story-enter-fade 400ms var(--entrance-ease) both;
  }
}
html.page-arriving.page-arrival-ready body::after {
  animation: page-background-arrival 400ms var(--entrance-ease) both;
}
@keyframes page-background-arrival { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html.page-arriving.page-arrival-ready body::after { animation-duration: 120ms; }
}

/* Homepage layout: desktop/tablet slider, vertical catalogue below 768px. */
.home .case-slider { --visible-slides: 2; }
.home .intro h1 { font-size: clamp(28px, 2.6vw, 36px); text-wrap: balance; }
@media (min-width: 768px) and (max-width: 1100px) {
  .home { --frame-gap: 28px; }
  .home main { gap: 28px; }
  .home .intro h1 { max-width: 30ch; line-height: 1.2; }
  .home .projects {
    grid-template-columns: calc((100% - var(--gutter)) / 2);
    margin-right: 0;
  }
}
@media (width < 768px) {
  .home { --frame-gap: 24px; }
  .home main { gap: 24px; }
  .home .intro h1 {
    max-width: 28ch;
    font-size: clamp(22px, 3.5vw, 28px);
    line-height: 1.22;
    letter-spacing: -0.025em;
  }
  .home .projects {
    grid-template-columns: minmax(0, 1fr);
    margin-right: 0;
    gap: 48px;
    overflow: visible;
    touch-action: auto;
  }
  .home .project { grid-area: auto; transform: none; transition: none; }
  .home .project-cover { aspect-ratio: 6 / 5; max-height: none; }
  .home .project h2, .home .project p { visibility: visible; }
  .home .project h2 { min-height: 0; }
  .home .slider-controls { display: none; }
}
@media (max-width: 480px) {
  .home .intro h1 { max-width: 25ch; }
}

/* Shared sticky header; Stories uses the transparent exception below. */
html { scroll-padding-top: calc(var(--header-height, 64px) + 16px); }
body > header.site-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  margin-inline: calc(-1 * var(--gutter));
  margin-block: calc(-1 * var(--gutter));
  padding: var(--gutter);
  background-color: color-mix(in srgb, var(--background) 72%, transparent);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  transition: background-color 250ms var(--entrance-ease);
}
body > .skip-link { z-index: 101; }
.stories-case > .skip-link { z-index: 101; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body > header.site-bar { background-color: var(--background); }
}
@media (prefers-reduced-motion: reduce) {
  body > header.site-bar { transition-duration: 120ms; }
}

/* Keep the story background uninterrupted, including while switching stories. */
body.stories-case > header.site-bar {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* Header contacts right; footer contacts left and credit right. */
body > header.site-bar { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
header.site-bar .contact-links { margin-inline-end: -8px; }
.site-bar .navigation a, .footer-credit { text-box: trim-both cap alphabetic; }
body > footer.site-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
body > footer.site-footer .contact-links {
  justify-content: flex-start;
  /* 8px hit-area inset + 1.25px empty space inside the envelope SVG. */
  margin-inline-start: -9.25px;
}
.footer-credit { font-size: inherit; font-weight: 400; text-align: right; white-space: nowrap; }
.site-bar .contact-links {
  --icon-size: 20px;
  --target-height: 48px;
  /* Align the visible icon to the gutter while preserving its full hit area. */
  margin-block: calc((var(--icon-size) - var(--target-height)) / 2);
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 0;
  flex-shrink: 0;
}
.contact-icon-link {
  display: grid;
  place-items: center;
  width: 36px;
  height: var(--target-height);
  color: inherit;
}
.contact-icon-link:hover { text-decoration: none; opacity: .7; }
.contact-icon {
  display: block;
  width: var(--icon-size);
  height: var(--icon-size);
  background-color: currentColor;
  -webkit-mask: var(--contact-icon) center / contain no-repeat;
  mask: var(--contact-icon) center / contain no-repeat;
}
.contact-icon--mail { --contact-icon: url("assets/icons/mail-solid.svg"); }
.contact-icon--telegram { --contact-icon: url("assets/icons/telegram.svg"); }
@media (max-width: 600px) {
  body > header.site-bar { gap: 12px; text-align: left; font-size: 14px; }
  body > footer.site-footer { font-size: 14px; }
  body > header.site-bar .navigation { justify-content: flex-start; gap: 8px 24px; }
}


/* Mobile Stories: native horizontal scroll, centered phones and a one-third preview. */
.mobile-story-track, .story-progress { display: none; }
@media (width < 768px) {
  .story-viewer-ready .story-figure {
    display: block;
    width: calc(100% + 2 * var(--gutter));
    max-width: none;
    min-width: 0;
    container-type: inline-size;
  }
  .story-viewer-ready .story-figure > .story-phone,
  .story-viewer-ready .story-arrow { display: none; }
  :is(.story-viewer-ready, .cashback-mobile) .mobile-story-track {
    position: relative;
    display: flex;
    gap: 16px;
    width: 100%;
    /* P = (W - 2*gap)*3/5 gives exactly P/3 of the next phone. */
    padding: 2px calc(20cqw + 9.6px);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-story-track::-webkit-scrollbar { display: none; }
  /* Keep the image strip free of a browser focus frame during dragging and key navigation. */
  .mobile-story-track:focus { outline: none; }
  .mobile-story-phone {
    /* No outer shadow: the scroll viewport would cut it into a visible band. */
    --phone-shadow: 0 0 0 1px #171819, inset 0 0 0 1px #252729;
    flex: 0 0 calc(60cqw - 19.2px);
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  .mobile-story-artwork {
    display: block;
    width: 100%;
    height: auto;
    border-radius: inherit;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
  }
}

@media (width < 768px) {
  .stories-showcase { row-gap: 24px; }
  .story-heading h1 { font-size: 26px; line-height: 32px; }
  .story-heading p { margin-top: 4px; font-size: 14px; line-height: 21px; }
  .story-description { max-width: 38ch; font-size: 14px; line-height: 22px; }
  .story-progress {
    display: block;
    position: relative;
    width: 100px;
    height: 2px;
    margin: 24px auto 0;
    border-radius: 2px;
    overflow: hidden;
  }
  .story-progress::before {
    content: "";
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: .25;
  }
  .story-progress-fill {
    display: block;
    width: 100%;
    height: 100%;
    background: currentColor;
    transform-origin: left center;
    transition: transform 250ms var(--story-ease);
  }
}
@media (prefers-reduced-motion: reduce) {
  .story-progress-fill { transition: none; }
}

@media (width < 768px) and (any-hover: hover) and (any-pointer: fine) {
  .mobile-story-track { cursor: grab; user-select: none; }
  .mobile-story-track.is-dragging { cursor: grabbing; }
}
@media (width < 768px) {
  :is(.story-viewer-ready, .cashback-mobile) .mobile-story-track.is-dragging { scroll-snap-type: none; }
}
