@font-face {
  font-family: "Rubik Dioni";
  src: url("assets/fonts/rubik-arabic-variable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --paper: #fdfbf9;
  --paper-raised: #fffefb;
  --ink: #2b1a07;
  --ink-soft: #705f4d;
  --marker: #e95c13;
  --mint: #5eead4;
  --mint-pale: #c8ffe3;
  --intro-y: 0vh;
  --story-y: 100vh;
  --story-x: 0vw;
  --story-opacity: 0;
  --header-cta-progress: 0;
  --notebook-layout-x: -4.5vw;
  --notebook-motion-x: -6vw;
  --notebook-y: 35vh;
  --notebook-rotate: 20deg;
  --notebook-scale: 0.86;
  --notebook-direction: -1;
  --notebook-exit-y: 0px;
  --reassurance-opacity: 0;
  --reassurance-heading-y: 0px;
  --reassurance-papers-y: 100vh;
  color-scheme: light;
  font-family: "Rubik Dioni", Tahoma, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
  cursor: inherit;
}

html {
  scroll-behavior: auto;
  background: var(--paper);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  cursor: url("assets/cursors/arrow-cursor.svg") 4 2, url("assets/cursors/arrow-cursor.png") 4 2, default;
  background:
    radial-gradient(circle at 12% 24%, rgb(255 128 104 / 0.045), transparent 22rem),
    radial-gradient(circle at 88% 68%, rgb(94 234 212 / 0.055), transparent 24rem),
    var(--paper);
  overflow-x: clip;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

a,
button,
[role="button"],
summary,
label[for],
select,
input[type="button"],
input[type="reset"],
input[type="submit"],
.cursor-pointer {
  cursor: url("assets/cursors/hand-cursor.svg") 12 4, url("assets/cursors/hand-cursor.png") 12 4, pointer;
}

.cursor-grab,
[draggable="true"] {
  cursor: url("assets/cursors/drag-cursor.svg") 14 12, url("assets/cursors/drag-cursor.png") 14 12, grab;
}

.cursor-grab:active,
[draggable="true"]:active,
.cursor-grabbing,
.active\:cursor-grabbing:active {
  cursor: url("assets/cursors/grab-cursor.svg") 12 8, url("assets/cursors/grab-cursor.png") 12 8, grabbing;
}

p,
span,
h1,
h2,
h3,
h4,
h5,
h6,
blockquote,
li,
td,
th,
.cursor-text {
  cursor: url("assets/cursors/text-cursor.svg") 11 16, url("assets/cursors/text-cursor.png") 11 16, text;
}

:is(a, button, [role="button"], .cursor-pointer, summary, label[for], select, input[type="button"], input[type="reset"], input[type="submit"]) :is(p, span, h1, h2, h3, h4, h5, h6, blockquote, li, td, th) {
  cursor: inherit;
}

img {
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.brand-mark {
  position: fixed;
  z-index: 50;
  top: clamp(1.75rem, 3vw, 3.5rem);
  right: clamp(1.25rem, 3.6vw, 4.5rem);
  left: auto;
  width: clamp(3.7rem, 4.9vw, 5.15rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  opacity: 1;
  transition: opacity 180ms ease;
}

.brand-mark:hover {
  transform: none;
  box-shadow: none;
  opacity: 1;
}

.brand-mark:focus-visible,
.download-button:focus-visible {
  outline: 4px solid var(--mint);
  outline-offset: 5px;
}

.brand-glyph {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  background: url("assets/dioni-mark-sticker-approved.lossless.webp?v=4") center / 158% auto no-repeat;
  filter: drop-shadow(0 2px 1px rgb(43 26 7 / 0.36));
}

.header-download {
  position: fixed;
  z-index: 50;
  top: clamp(1.75rem, 3vw, 3.5rem);
  left: clamp(1.25rem, 3.6vw, 4.5rem);
  right: auto;
  direction: rtl;
  visibility: hidden;
  opacity: var(--header-cta-progress);
  transform: translate3d(0, calc((1 - var(--header-cta-progress)) * -0.85rem), 0);
  pointer-events: none;
  transition: visibility 0s linear 180ms, opacity 160ms linear;
  will-change: opacity, transform;
}

:root[data-header-cta="visible"] .header-download {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.hero-scroll {
  position: relative;
  isolation: isolate;
  overflow: clip;
}

.hero-spacer {
  height: 150vh;
  height: 150svh;
}

@media (max-width: 1023px) {
  .hero-spacer {
    height: 320vh;
    height: 320svh;
  }
}

.hero-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.notebook-stage {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
  transform: translate3d(0, var(--notebook-exit-y), 0);
  will-change: transform;
}

.notebook-sequence {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: 127vh;
  aspect-ratio: 1920 / 1200;
  transform:
    translate3d(-50%, -50%, 0)
    translate3d(calc(var(--notebook-layout-x) + var(--notebook-motion-x)), var(--notebook-y), 0)
    rotate(var(--notebook-rotate))
    scale(var(--notebook-scale))
    scaleX(var(--notebook-direction));
  transform-origin: center;
  will-change: transform;
}

.notebook-screen-slot {
  position: absolute;
  z-index: 0;
  left: calc(55.59% - 4px);
  top: calc(13.88% - 4px);
  width: calc(26.52% + 8px);
  height: calc(67.69% + 8px);
  overflow: hidden;
  background: var(--paper-raised);
  transform: scaleX(var(--notebook-direction));
}

.notebook-poster,
.notebook-canvas {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.notebook-canvas {
  opacity: 0;
}

:root[data-notebook-ready="true"] .notebook-canvas {
  opacity: 1;
}

:root[data-notebook-ready="true"] .notebook-poster {
  visibility: hidden;
}

.copy-flow {
  position: absolute;
  inset: 0;
  z-index: 1;
  direction: ltr;
  pointer-events: none;
}

.copy-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(39vw, 43rem);
  right: clamp(6rem, 14vw, 17.5rem);
  direction: rtl;
  text-align: right;
}

.intro-copy {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-top: clamp(4.75rem, 10vh, 6.25rem);
  transform: translate3d(0, var(--intro-y), 0);
  will-change: transform;
}

.handwritten {
  margin: 0;
  color: var(--marker);
  font-style: normal;
  font-weight: 650;
  line-height: 1.55;
}

.intro-note {
  width: fit-content;
  margin-right: 0.4rem;
  margin-bottom: clamp(0.5rem, 1vh, 0.75rem);
  font-size: clamp(1.1rem, 1.5vw, 1.7rem);
  line-height: 1.45;
  transform: none;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: clamp(2rem, 4.5vh, 3rem);
  font-size: clamp(3.25rem, 4vw, 4.5rem);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: 0;
}

h1 span,
h1 strong {
  display: block;
  white-space: nowrap;
}

h1 strong {
  color: #211405;
  font-weight: 900;
}

.hero-summary {
  width: 100%;
  max-width: none;
  margin-bottom: 0;
  font-size: clamp(1.28rem, 1.72vw, 2.05rem);
  font-weight: 520;
  line-height: 1.68;
}

.hero-summary-line {
  display: block;
  white-space: nowrap;
}

.inline-accent {
  width: fit-content;
  margin-inline-start: 0;
  font-size: 1.08em;
  transform: none;
}

.hero-actions {
  width: fit-content;
  display: grid;
  justify-items: start;
  gap: 0.85rem;
  margin-top: 0;
  pointer-events: auto;
}

.intro-copy .hero-actions {
  position: absolute;
  right: 0;
  bottom: 8%;
  margin-top: 0;
}

.download-button {
  display: inline-block;
  padding: 0.25rem;
  color: var(--ink);
  border: 0;
  border-radius: 1.25rem;
  background: var(--paper);
  box-shadow: 0 1px 4px rgb(43 26 7 / 0.25);
  font: inherit;
  font-size: clamp(1.05rem, 1.22vw, 1.4rem);
  font-weight: 760;
  transform-origin: center;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 150ms ease, background-color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .download-button:hover {
    transform: scale(1.035);
    box-shadow: 0 2px 6px rgb(43 26 7 / 0.2);
  }
}

.download-button:active {
  transform: scale(0.985);
  box-shadow: 0 1px 2px rgb(43 26 7 / 0.22);
}

.download-button-frame {
  min-height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.65rem 1.15rem 0.72rem 1.35rem;
  border: 2.3px solid var(--ink);
  border-radius: 1rem;
  background: var(--paper-raised);
  transition: background-color 150ms ease;
}

.download-button:hover .download-button-frame {
  background: var(--mint-pale);
}

.download-button svg {
  width: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.download-note {
  margin: 0;
  color: #8a7b69;
  font-size: clamp(0.9rem, 1.05vw, 1.12rem);
  font-weight: 520;
  opacity: 1;
}

.download-note.is-active {
  color: #276652;
  font-weight: 650;
}

.story-copy {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(2.4rem, 5vh, 4rem);
  opacity: var(--story-opacity);
  transform: translate3d(var(--story-x), var(--story-y), 0);
  will-change: opacity, transform;
}

.story-preview {
  width: clamp(8rem, 10.5vw, 9.75rem);
  margin: 0 0 clamp(2.4rem, 5vh, 3.25rem) auto;
  transform: rotate(4.25deg);
}

.story-preview-card {
  padding: 0;
  border: 5px solid var(--paper);
  border-radius: 0.2rem;
  background: var(--paper);
  box-shadow: 0 1px 4px rgb(43 26 7 / 0.25);
}

.story-preview-screen {
  position: relative;
  aspect-ratio: 148 / 89;
  overflow: hidden;
  border: 2.3px solid var(--ink);
  border-radius: 0.2rem;
  background: #d9d2c7;
}

.story-preview-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: grayscale(1);
}

.preview-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(1.8rem, 2.4vw, 2.25rem);
  height: clamp(1.8rem, 2.4vw, 2.25rem);
  display: block;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

.story-copy h2 {
  max-width: 34rem;
  margin-bottom: clamp(2rem, 4.5vh, 3rem);
  font-size: clamp(2rem, 2.7vw, 3.25rem);
  font-weight: 820;
  line-height: 1.32;
}

.story-pyramid {
  width: 100%;
  max-width: 34rem;
  display: grid;
  justify-items: start;
  gap: clamp(0.5rem, 1vh, 0.75rem);
  margin-bottom: 0;
  font-size: clamp(1rem, 1.2vw, 1.28rem);
  font-weight: 500;
  line-height: 1.55;
}

.story-statement {
  display: block;
  text-align: right;
  white-space: nowrap;
}

.story-statement:nth-child(1) {
  width: 100%;
}

.story-statement:nth-child(2) {
  width: 82%;
}

.story-statement:nth-child(3) {
  width: 64%;
}

.story-signoff {
  width: fit-content;
  margin-top: clamp(2.5rem, 6vh, 4rem);
  font-size: clamp(1.35rem, 1.75vw, 2rem);
  transform: none;
}

.reassurance-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  visibility: hidden;
  opacity: var(--reassurance-opacity);
  background: var(--paper);
}

:root[data-reassurance-visible="true"] .reassurance-scene {
  visibility: visible;
}

.reassurance-heading {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  margin: 0;
  padding-inline: 1rem;
  color: var(--ink);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  transform: translate3d(0, var(--reassurance-heading-y), 0);
  will-change: transform;
}

.reassurance-heading > span {
  white-space: nowrap;
}

.reassurance-papers {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translate3d(-50%, var(--reassurance-papers-y), 0);
  mix-blend-mode: multiply;
  will-change: transform;
}

.reassurance-paper {
  flex: 0 0 auto;
  width: 320px;
  height: 320px;
  transform: translateY(40px);
  mix-blend-mode: multiply;
}

.reassurance-paper + .reassurance-paper {
  margin-left: -8px;
}

.reassurance-paper:nth-child(2) { transform: translateY(-15px); }
.reassurance-paper:nth-child(3) { transform: translateY(30px); }
.reassurance-paper:nth-child(4) { transform: translateY(-10px); }

.reassurance-paper img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .reassurance-paper { width: 260px; height: 260px; }
}

@media (max-width: 1023px) {
  .reassurance-heading { font-size: 32px; }
  .reassurance-papers {
    display: grid;
    grid-template-columns: repeat(2, 280px);
    gap: 32px;
  }
  .reassurance-paper { width: 280px; height: 280px; }
  .reassurance-paper + .reassurance-paper { margin-left: 0; }
}

@media (max-width: 767px) {
  .reassurance-heading { font-size: 26px; }
  .reassurance-papers { grid-template-columns: repeat(2, 220px); }
  .reassurance-paper { width: 220px; height: 220px; }
  .reassurance-paper:nth-child(n) { transform: none; }
}

@media (max-width: 639px) {
  .reassurance-papers { display: flex; flex-direction: column; gap: 24px; }
}

@media (max-width: 980px) {
  :root {
    --notebook-layout-x: -12vw;
    --notebook-scale: 1.39;
  }

  .copy-panel {
    width: min(44vw, 31rem);
    right: clamp(5.5rem, 12vw, 8rem);
  }

  .notebook-sequence {
    width: min(90vw, calc(75vh * 1920 / 1200));
    height: auto;
  }

  h1 {
    font-size: clamp(2.35rem, 5.3vw, 3.25rem);
  }

}

@media (max-width: 720px) {
  :root {
    --notebook-layout-x: 0vw;
    --notebook-scale: 0.98;
  }

  .brand-mark {
    top: 1rem;
    right: 1rem;
    left: auto;
    width: 3.65rem;
  }

  .header-download {
    top: 1rem;
    left: 1rem;
    right: auto;
  }

  .copy-panel {
    width: min(86vw, 35rem);
    right: 50%;
    transform-origin: center;
  }

  .intro-copy {
    min-height: 100%;
    padding-top: 9rem;
    transform: translate3d(50%, var(--intro-y), 0);
  }

  .notebook-sequence {
    width: auto;
    height: 80vh;
    margin-top: 6vh;
  }

  h1 {
    font-size: clamp(2.1rem, 9.1vw, 3.5rem);
    line-height: 1.22;
  }

  .hero-summary {
    width: 100%;
    max-width: none;
    font-size: 1.25rem;
  }

  .hero-summary-line {
    white-space: normal;
  }

  .story-copy {
    min-height: 100%;
    justify-content: center;
    padding: 4rem 1.2rem;
    border-radius: 2rem 2rem 0 0;
    background: linear-gradient(90deg, rgb(253 251 249 / 0.96), rgb(253 251 249 / 0.76));
    box-shadow: 0 -1px 0 rgb(43 26 7 / 0.08);
    transform: translate3d(calc(50% + var(--story-x)), var(--story-y), 0);
  }

  .story-copy h2 {
    font-size: clamp(2.45rem, 10vw, 4rem);
  }

  .story-pyramid {
    font-size: 1.05rem;
  }

  .story-statement,
  .story-statement:nth-child(1),
  .story-statement:nth-child(2),
  .story-statement:nth-child(3) {
    width: 100%;
    white-space: normal;
  }

}

@media (prefers-reduced-motion: reduce) {
  .download-button:hover,
  .download-button:active {
    transform: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .story-copy,
  .intro-copy,
  .notebook-sequence,
  .notebook-stage,
  .reassurance-heading,
  .reassurance-papers,
  .header-download {
    will-change: auto;
  }
}
