/* Yumclip : le site. Jetons « Jaune d'œuf » (packages/yumclip_design_system, docs/DESIGN.md). */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url(/assets/fonts/bricolage-800.woff2) format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url(/assets/fonts/inter-400.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url(/assets/fonts/inter-700.woff2) format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #ffc62e;
  --surface: #fffdf6;
  --surface-muted: #f5eedc;
  --border: #e9dfc4;
  --ink: #1a1a17;
  --ink-muted: #6b6352;
  --heading: #1a1a17;
  --tomato: #ee4b26;
  --tomato-text: #d23a15;
  --chive: #4e9a3a;
  --night: #1b160f;
  --night-ink: #fff6e3;
  --night-heading: #ffc62e;
  --night-muted: #b3a68c;
  --frame: #1a1a17;
  --frame-edge: #4a4237;
  --rest: 0 1px 2px rgb(107 58 0 / 0.12), 0 6px 18px rgb(154 106 0 / 0.18);
  --raised: 0 2px 4px rgb(107 58 0 / 0.15), 0 12px 28px rgb(154 106 0 / 0.22);
  --phone-shadow: 0 3px 8px rgb(107 58 0 / 0.22), 0 34px 60px -14px rgb(107 58 0 / 0.5);
  --float: drop-shadow(0 3px 4px rgb(107 58 0 / 0.2)) drop-shadow(0 18px 22px rgb(154 106 0 / 0.3));
  --glow: 0 2px 4px rgb(168 48 15 / 0.25), 0 8px 18px rgb(238 75 38 / 0.35);
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --text: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 5vw, 56px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b160f;
    --surface: #2a2219;
    --surface-muted: #352b20;
    --border: #463a2b;
    --ink: #fff6e3;
    --ink-muted: #b3a68c;
    --heading: #ffc62e;
    --tomato-text: #ff8a66;
    --chive: #7cc461;
    --frame: #0f0c08;
    --frame-edge: #5a4c39;
    --rest: 0 0 0 1px #463a2b, 0 8px 22px rgb(0 0 0 / 0.4);
    --raised: 0 0 0 1px #463a2b, 0 14px 32px rgb(0 0 0 / 0.5);
    --phone-shadow: 0 0 0 1px #463a2b, 0 34px 60px -12px rgb(0 0 0 / 0.75);
    --float: drop-shadow(0 3px 4px rgb(0 0 0 / 0.45)) drop-shadow(0 20px 24px rgb(0 0 0 / 0.55));
    --glow: 0 2px 4px rgb(0 0 0 / 0.4), 0 8px 20px rgb(238 75 38 / 0.3);
  }
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--ink-muted) transparent;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg) url(/assets/img/grain.png);
  background-size: 96px;
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  overflow-x: clip;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.028em;
  color: var(--heading);
  text-wrap: balance;
}

p,
ul,
ol {
  margin: 0;
}

p {
  text-wrap: pretty;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 3px;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 74rem);
  margin-inline: auto;
}

/* Header and footer */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font: 800 1.5rem/1 var(--display);
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.logo img {
  width: 40px;
  height: 39px;
}

.top nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 18px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--rest);
  font-weight: 700;
  text-decoration: none;
}

.foot {
  padding-block: 40px 48px;
  font-size: 0.9375rem;
}

.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  padding: 0;
  list-style: none;
}

.foot ul a {
  display: inline-block;
  padding-block: 10px;
  font-weight: 700;
}

.foot p {
  margin-top: 12px;
  max-width: 60ch;
}

/* The phone: drawn in CSS, the screen inside, the cutouts that leave it */

.stage {
  --pw: clamp(212px, 60vw, 290px);
  position: relative;
  width: var(--pw);
  margin: 0 auto;
  view-timeline: --stage;
}

.tilt {
  position: relative;
  transform-style: preserve-3d;
  transform: perspective(1500px) rotateX(calc(var(--ty, 0) * -7deg)) rotateY(calc(var(--tx, 0) * 9deg));
  transition: transform 0.7s var(--ease-out);
}

.phone {
  position: relative;
  padding: calc(var(--pw) * 0.034);
  border-radius: calc(var(--pw) * 0.16);
  background: var(--frame);
  box-shadow: inset 0 0 0 1.5px var(--frame-edge), inset 0 0 0 4px var(--frame), var(--phone-shadow);
}

/* the side button */
.phone::before {
  content: "";
  position: absolute;
  right: -3px;
  top: 24%;
  width: 3px;
  height: 11%;
  border-radius: 0 3px 3px 0;
  background: var(--frame-edge);
}

/* the island */
.phone::after {
  content: "";
  position: absolute;
  top: calc(var(--pw) * 0.064);
  left: 50%;
  width: 29%;
  height: calc(var(--pw) * 0.082);
  border-radius: 999px;
  background: #000;
  translate: -50% 0;
}

.phone picture,
.pop {
  display: block;
}

.phone img,
.pop img {
  display: block;
  width: 100%;
  height: auto;
}

.phone img {
  border-radius: calc(var(--pw) * 0.128);
  background: var(--bg);
}

/* the home indicator, over the shot's last 34 pt */
.phone picture {
  position: relative;
}

.phone picture::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(var(--pw) * 0.019);
  width: 34%;
  height: calc(var(--pw) * 0.012);
  border-radius: 999px;
  background: var(--ink);
  translate: -50% 0;
}

.band .phone picture::after {
  background: var(--night-ink);
}

/* A cutout starts on its element in the screen, at its size: --x, --y and --w, in phone widths,
   measured on the 780 × 1688 shot (0.034 + px × 0.932 / 780). Then it lifts: --dx and --dy past the
   frame, --f bigger, enough to keep its element hidden underneath (no ghost of it beside the cutout). */
.pop {
  position: absolute;
  z-index: 1;
  left: calc(var(--pw) * var(--x));
  top: calc(var(--pw) * var(--y));
  width: calc(var(--pw) * var(--w));
  transform: translate3d(calc(var(--pw) * var(--dx)), calc(var(--pw) * var(--dy)), var(--z, 50px)) rotate(var(--rot)) scale(var(--f));
  filter: var(--float);
}

/* Accueil: « Ce soir, on cuisine ? », the week since Monday, the first recipe added */
.pop--ce-soir {
  --x: 0.0675;
  --y: 0.457;
  --w: 0.8667;
  --dx: -0.08;
  --dy: 0.01;
  --f: 1.2;
  --rot: -3deg;
  --z: 80px;
}

.pop--depuis-lundi {
  --x: 0.0698;
  --y: 0.727;
  --w: 0.8603;
  --dx: 0.1;
  --dy: 0.02;
  --f: 1.26;
  --rot: 2.5deg;
}

.pop--recette {
  --x: 0.0651;
  --y: 1.2408;
  --w: 0.3752;
  --dx: -0.06;
  --dy: 0.1;
  --f: 1.42;
  --rot: -5deg;
  --z: 90px;
}

/* The recipe: the link it came from, drawn over the top of the screen */
.pop--lien {
  --x: -0.02;
  --y: 0.2;
  --w: 1.04;
  --dx: -0.1;
  --dy: -0.06;
  --f: 1.08;
  --rot: -2deg;
}

/* Cook mode: the timer at the bottom */
.pop--minuteur {
  --x: 0.0722;
  --y: 1.6387;
  --w: 0.8555;
  --dx: 0.12;
  --dy: -0.04;
  --f: 1.3;
  --rot: 3deg;
  --z: 90px;
}

/* Shopping: « Il te restera » at the top; the dairy aisle, further down the list, rises from the bottom */
.pop--il-te-restera {
  --x: 0.0675;
  --y: 0.3435;
  --w: 0.8667;
  --dx: -0.08;
  --dy: 0.02;
  --f: 1.2;
  --rot: -2.5deg;
  --z: 70px;
}

.pop--rayon {
  --x: 0.0675;
  --y: 1.15;
  --w: 0.8667;
  --dx: 0.28;
  --dy: 0.2;
  --f: 0.92;
  --rot: 2.5deg;
}

/* The link field, drawn in code like the app's (COMPONENTS: champ de lien) */
.link-field {
  display: flex;
  align-items: center;
  gap: calc(var(--pw) * 0.03);
  padding: calc(var(--pw) * 0.02);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 700 calc(var(--pw) * 0.05) / 1.2 var(--text);
  white-space: nowrap;
}

.link-field b,
.link-field i {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(var(--pw) * 0.13);
  height: calc(var(--pw) * 0.13);
  border-radius: 50%;
}

.link-field b {
  background: var(--surface-muted);
}

.link-field svg {
  width: 52%;
  height: 52%;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.link-field b svg {
  fill: none;
  stroke: var(--ink-muted);
}

.link-field span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-field i {
  background: var(--tomato) linear-gradient(rgb(255 255 255 / 0.25), rgb(255 255 255 / 0) 34%, rgb(107 58 0 / 0) 60%, rgb(107 58 0 / 0.14));
  box-shadow: var(--glow);
}

.link-field i svg {
  fill: #fff;
  stroke: var(--tomato);
  stroke-width: 2;
}

/* Motion: one orchestrated moment on arrival (the hero), then the cutouts ride out of each
   screen as it crosses the viewport: each one starts on its element, flat and at its size.
   Transform only; nothing loops; static under reduced motion. */
@keyframes leave-screen {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero .pop {
    animation: leave-screen 0.9s var(--ease-out) 0.3s both;
  }

  .hero .pop--depuis-lundi {
    animation-delay: 0.42s;
  }

  .hero .pop--recette {
    animation-delay: 0.54s;
  }

  @supports (animation-timeline: view()) {
    .scene .pop {
      animation: leave-screen linear both;
      animation-timeline: --stage;
      animation-range: entry 20% cover 42%;
    }
  }
}

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

/* Hero */

.hero {
  display: grid;
  gap: 44px;
  padding-block: clamp(20px, 5vw, 48px) clamp(84px, 12vw, 120px);
}

.hero h1 {
  font-size: clamp(2.75rem, 11.5vw, 5.75rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  max-width: 11ch;
}

.lead {
  margin-top: 20px;
  max-width: 36ch;
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 28px;
}

.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 20px 6px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
}

.soon img {
  width: 34px;
  height: 33px;
}

.actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

.hero .stage {
  --pw: clamp(212px, 62vw, 300px);
}

/* The egg white: the sheet that holds the scenes, its top edge waving like the app's cards */

.sheet,
.band {
  padding-block: clamp(72px, 12vw, 136px);
}

.sheet,
.band,
.yolk {
  position: relative;
}

.yolk {
  background: var(--bg) url(/assets/img/grain.png);
  background-size: 96px;
}

.sheet {
  background: var(--surface);
}

.band {
  background: var(--night) url(/assets/img/grain.png);
  background-size: 96px;
  color: var(--night-ink);
}

.sheet::before,
.band::before,
.yolk::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 22px;
  background: inherit;
  -webkit-mask: url(/assets/img/vague.svg) repeat-x 0 0 / 520px 22px;
  mask: url(/assets/img/vague.svg) repeat-x 0 0 / 520px 22px;
}

/* At night the depth is black under a rim, never amber on brown (DESIGN, Profondeur). */
.band {
  --frame: #0f0c08;
  --frame-edge: #5a4c39;
  --phone-shadow: 0 0 0 1px #463a2b, 0 34px 60px -12px rgb(0 0 0 / 0.75);
  --float: drop-shadow(0 3px 4px rgb(0 0 0 / 0.45)) drop-shadow(0 20px 24px rgb(0 0 0 / 0.55));
  --glow: 0 2px 4px rgb(0 0 0 / 0.4), 0 8px 20px rgb(238 75 38 / 0.3);
}

.band::before {
  -webkit-mask-position: 160px 0;
  mask-position: 160px 0;
}

.yolk::before {
  -webkit-mask-position: 330px 0;
  mask-position: 330px 0;
}

.band h2 {
  color: var(--night-heading);
}

.band :focus-visible {
  outline-color: var(--night-ink);
}

.scenes {
  display: grid;
  gap: clamp(96px, 16vw, 168px);
}

.scene {
  display: grid;
  gap: 48px;
  align-items: center;
}

.scene h2 {
  font-size: clamp(2.125rem, 7vw, 3.5rem);
  line-height: 1;
  max-width: 14ch;
}

.scene p {
  margin-top: 18px;
  max-width: 40ch;
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
}

.scene p + p {
  margin-top: 12px;
}

.sheet .scene p + p {
  color: var(--ink-muted);
}

.band .scene p + p {
  color: var(--night-muted);
}

/* Prices */

.plans {
  padding-block: clamp(80px, 12vw, 136px) 0;
}

.plans > h2 {
  font-size: clamp(2.125rem, 7vw, 3.5rem);
  line-height: 1;
}

.plan-grid {
  display: grid;
  gap: 20px;
  margin-top: 36px;
}

.plan {
  padding: 26px 24px 28px;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--rest);
}

.plan h3 {
  font-size: 1.375rem;
  line-height: 1.2;
  color: inherit;
}

.price {
  margin-top: 10px;
  font: 800 clamp(2.75rem, 9vw, 3.5rem) / 1 var(--display);
  letter-spacing: -0.03em;
}

.price small {
  font: 700 1rem/1 var(--text);
  letter-spacing: 0;
}

.price-alt {
  margin-top: 6px;
  font-weight: 700;
}

.plan ul {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding: 18px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.plan li {
  position: relative;
  padding-left: 30px;
}

.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--chive);
  -webkit-mask: url(/assets/img/coche.svg) center / contain no-repeat;
  mask: url(/assets/img/coche.svg) center / contain no-repeat;
}

.plan--plus {
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--raised);
}

.plan--plus .price {
  color: var(--bg);
}

.plan--plus ul {
  border-color: rgb(255 253 246 / 0.18);
}

.plan--plus li::before {
  background: var(--bg);
}

.fine {
  margin-top: 22px;
  max-width: 60ch;
  font-weight: 700;
}

@media (prefers-color-scheme: dark) {
  .plan--plus {
    background: #ffc62e;
    color: #1a1a17;
  }

  .plan--plus .price {
    color: #1a1a17;
  }

  .plan--plus ul {
    border-color: rgb(26 26 23 / 0.2);
  }

  .plan--plus li::before {
    background: #1a1a17;
  }
}

/* Closing */

.close {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding-block: clamp(72px, 10vw, 112px) clamp(40px, 6vw, 64px);
  text-align: center;
}

.close img {
  width: 180px;
  height: 180px;
}

.close h2 {
  font-size: clamp(2.125rem, 7vw, 3.5rem);
  line-height: 1;
}

.close p {
  margin-top: 10px;
  max-width: 34ch;
}

.close a {
  font-weight: 700;
}

/* Reading pages: legal texts, help, 404 */

.doc .sheet {
  padding-block: clamp(56px, 9vw, 96px);
}

.prose {
  width: min(100% - 2 * var(--gutter), 44rem);
  margin-inline: auto;
}

.prose h1 {
  font-size: clamp(2.25rem, 8vw, 3.5rem);
  line-height: 1.02;
}

.prose h2 {
  margin-top: 2em;
  font-size: clamp(1.5rem, 4.4vw, 1.875rem);
  line-height: 1.15;
  scroll-margin-top: 24px;
}

.prose h3 {
  margin-top: 2em;
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  scroll-margin-top: 24px;
}

.prose p,
.prose ul,
.prose ol,
.prose table,
.prose blockquote,
.prose figure {
  margin-top: 1em;
}

.prose h2 + p,
.prose h3 + p {
  margin-top: 0.6em;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 0.35em;
}

.prose li::marker {
  color: var(--ink-muted);
  font-weight: 700;
}

.prose a {
  color: var(--tomato-text);
  font-weight: 700;
}

.prose strong {
  font-weight: 700;
}

.prose blockquote {
  margin-inline: 0;
  padding: 16px 20px;
  border-radius: 18px;
  background: var(--surface-muted);
}

.prose blockquote > :first-child {
  margin-top: 0;
}

.prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.prose th,
.prose td {
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prose th {
  font-weight: 700;
}

.prose code {
  font-size: 0.9em;
}

.prose hr {
  margin: 2.5em 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.toc {
  margin-top: 32px;
  padding: 20px 22px 22px;
  border-radius: 26px;
  background: var(--bg);
}

.toc h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--ink);
}

.toc ul {
  margin-top: 10px;
  padding-left: 0;
  list-style: none;
}

.toc li + li {
  margin-top: 0;
}

.toc a {
  display: inline-block;
  padding-block: 5px;
  color: var(--ink);
}

.toc ul ul {
  display: none;
}

/* The import sheet, in the same phone as the home page's */
.figure-import {
  --pw: 168px;
  float: right;
  width: var(--pw);
  margin: 0.4em 0 1em 28px;
}

@media (max-width: 559px) {
  .figure-import {
    --pw: 150px;
    float: none;
    margin: 1.4em auto 0;
  }
}

.lost {
  display: grid;
  justify-items: start;
  gap: 18px;
}

.lost img {
  width: 160px;
  height: 160px;
}

/* Wider screens */

@media (min-width: 720px) {
  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 52rem;
  }

  .plan {
    padding: 32px 32px 34px;
  }
}

@media (min-width: 1024px) {
  .stage {
    --pw: 280px;
  }

  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
    gap: 32px;
  }

  .hero h1 {
    font-size: clamp(3.5rem, 6.4vw, 5.75rem);
  }

  .hero .stage {
    --pw: 300px;
  }

  .scene {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
  }

  .scene--flip .stage {
    order: -1;
  }
}
