/* Cuisigo landing page */

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --paper: #f2f2f0; /* logo background */
  --card: #ffffff;
  --ink: #111111; /* logo ink */
  --ink-2: #5c5c58;
  --line: rgba(17, 17, 17, 0.14);
  --error: #b3261e;
  --rare: #bf3a33; /* RARE's red (the game's Rare doneness) */

  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1200px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Viewfinder brackets: colour, thickness, arm length */
  --c: var(--ink);
  --t: 2px;
  --a: 14px;

  color-scheme: light;
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1, h2, h3, p, ol, ul {
  margin: 0;
}

ol, ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

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

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

/* Both languages are in the HTML; only the active one is shown. */
html[lang="en"] body [lang="fr"],
html[lang="fr"] body [lang="en"] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.nw {
  white-space: nowrap;
}

/* The brand dot, used as a full stop in headlines. */
.period {
  display: inline-block;
  width: 0.2em;
  height: 0.2em;
  margin-left: 0.05em;
  border-radius: 50%;
  background: var(--ink);
  color: transparent;
  overflow: hidden;
  vertical-align: baseline;
}

/* Viewfinder brackets, drawn like the logo: four corners, no box. */
.frame::before,
.field::before,
.consent input {
  background:
    linear-gradient(var(--c) 0 0) 0 0 / var(--a) var(--t),
    linear-gradient(var(--c) 0 0) 0 0 / var(--t) var(--a),
    linear-gradient(var(--c) 0 0) 100% 0 / var(--a) var(--t),
    linear-gradient(var(--c) 0 0) 100% 0 / var(--t) var(--a),
    linear-gradient(var(--c) 0 0) 0 100% / var(--a) var(--t),
    linear-gradient(var(--c) 0 0) 0 100% / var(--t) var(--a),
    linear-gradient(var(--c) 0 0) 100% 100% / var(--a) var(--t),
    linear-gradient(var(--c) 0 0) 100% 100% / var(--t) var(--a);
  background-repeat: no-repeat;
}

.frame {
  position: relative;
}

.frame::before {
  content: "";
  position: absolute;
  inset: -16px;
  --t: 3px;
  --a: 26px;
  pointer-events: none;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: clamp(18px, 3vw, 30px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.mark {
  flex: none;
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.brand-name {
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* "Play Rare": the link to the daily food game, in the same lettering as EN / FR beside it. */
.game-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  margin-left: auto;
  padding: 0.55rem 0.6rem;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.game-link:hover {
  color: var(--ink-2);
}

/* Phones: a little less space between the header items. */
@media (max-width: 479px) {
  .site-header {
    gap: 0.5rem;
  }

  .game-link,
  .site-header .lang-switch button {
    padding-inline: 0.45rem;
  }

  .game-link {
    letter-spacing: 0.07em;
  }
}

/* Small phones: smaller logo, and the link reads just "Rare"
   (screen readers still hear "Play Rare" / "Joue à Rare"). */
@media (max-width: 379px) {
  .site-header .brand {
    gap: 0.5rem;
  }

  .site-header .mark {
    width: 22px;
    height: 22px;
  }

  .site-header .brand-name {
    font-size: 1.12rem;
  }

  .game-link-verb {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

.lang-switch {
  display: flex;
  margin-right: -0.6rem;
}

.lang-switch button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.6rem;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.lang-switch button::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  transform: scale(0);
  transition: transform 0.3s var(--ease);
}

.lang-switch button:hover,
.lang-switch button[aria-pressed="true"] {
  color: var(--ink);
}

.lang-switch button[aria-pressed="true"]::before {
  transform: scale(1);
}

/* Hero -------------------------------------------------------------------- */

.hero {
  display: grid;
  align-items: center;
  gap: clamp(64px, 9vw, 96px);
  padding-block: clamp(16px, 4vw, 40px) clamp(80px, 10vw, 128px);
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    min-height: calc(100svh - 92px);
  }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}

.display,
.display-2,
.display-xl {
  font-weight: 600;
  text-wrap: balance;
}

/* Sized so the first line ("Cook what you want" / "Cuisine ce que tu veux")
   never wraps: the headline always reads as two lines. */
.display {
  margin-top: 1.4rem;
  font-size: clamp(2.25rem, 10.2vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

html[lang="fr"] .display {
  font-size: clamp(2.1rem, 9.3vw, 3.9rem);
}

@media (min-width: 960px) {
  .display {
    font-size: min(5.3vw, 4.6rem);
  }

  html[lang="fr"] .display {
    font-size: min(4.85vw, 4.25rem);
  }
}

.display em,
.display-2 em,
.display-xl em,
.done-title,
.step-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.display em {
  display: block;
  font-size: 1.12em;
  line-height: 0.95;
}

.lede {
  max-width: 33rem;
  margin-top: 1.5rem;
  color: var(--ink-2);
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  line-height: 1.55;
  text-wrap: pretty;
}

/* Registration form ---------------------------------------------------------- */

.signup {
  max-width: 33rem;
  margin-top: 2.25rem;
}

.field {
  position: relative;
  display: flex;
  border: 1.5px solid var(--ink);
  background: var(--card);
  transition: border-color 0.2s ease;
}

.field::before {
  content: "";
  position: absolute;
  inset: -18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, inset 0.45s var(--ease);
}

.field:focus-within::before {
  inset: -9px;
  opacity: 1;
}

.field:has(input[aria-invalid="true"]) {
  border-color: var(--error);
}

.field input {
  flex: 1;
  min-width: 0;
  height: 3.75rem;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  outline: none;
}

.field input::placeholder {
  color: #75756f;
  opacity: 1;
}

.field input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px var(--card) inset;
  -webkit-text-fill-color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3.75rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background: #2b2b2a;
}

.btn .arrow {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: transform 0.35s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.field .btn {
  flex: none;
  min-height: 0;
}

.field .btn:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: -6px;
}

.is-busy .btn {
  cursor: progress;
  opacity: 0.8;
}

.is-busy .btn .arrow {
  animation: nudge 0.9s var(--ease) infinite;
}

@media (max-width: 459px) {
  .field {
    flex-direction: column;
  }

  .field input {
    flex: none;
    height: 3.5rem;
  }

  .field .btn {
    min-height: 3.4rem;
  }
}

.form-msg {
  margin-top: 0.7rem;
  color: var(--error);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-msg:empty {
  margin-top: 0;
}

.form-msg.is-status {
  color: var(--ink-2);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-top: 1.15rem;
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.45;
  cursor: pointer;
}

.consent:hover {
  color: var(--ink);
}

/* Checkbox = the logo: empty brackets, the dot appears when checked. */
.consent input {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  margin: -1px 0 0;
  border-radius: 0;
  --t: 2.3px;
  --a: 7px;
  cursor: pointer;
}

.consent input::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 7.5px;
  height: 7.5px;
  margin: auto;
  border-radius: 50%;
  background: var(--ink);
  transform: scale(0);
  transition: transform 0.3s var(--ease);
}

.consent input:checked::after {
  transform: scale(1);
}

/* Required box left unticked: red brackets. */
.consent input[aria-invalid="true"] {
  --c: var(--error);
}

.form-note {
  margin-top: 0.9rem;
  color: var(--ink-2);
  font-size: 0.82rem;
}

.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.signup-done {
  padding: 1.6rem 1.6rem 1.4rem;
  border: 1.5px solid var(--ink);
  background: var(--card);
  outline: none;
}

.signup-done .mark {
  width: 34px;
  height: 34px;
}

.done-title {
  margin-top: 1rem;
  font-size: clamp(1.9rem, 1.5rem + 1.2vw, 2.4rem);
  line-height: 1.05;
}

.done-text {
  margin-top: 0.55rem;
  color: var(--ink-2);
}

.done-text strong {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.link-btn {
  margin-top: 1rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* App screenshots ------------------------------------------------------------ */

.shot {
  width: 100%;
  aspect-ratio: 1170 / 2532;
  border-radius: 12% / 5.55%;
  background: #e4e4e1;
  box-shadow:
    0 0 0 1px rgba(17, 17, 17, 0.08),
    0 14px 28px -14px rgba(17, 17, 17, 0.18),
    0 40px 70px -40px rgba(17, 17, 17, 0.38);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.duo {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 100 / 128;
}

@media (min-width: 960px) {
  .duo {
    width: min(100%, 470px, calc((100svh - 160px) * 100 / 128));
  }
}

.duo-back {
  position: absolute;
  top: 0;
  left: 3%;
  width: 47%;
}

.duo-front {
  position: absolute;
  right: 3%;
  bottom: 0;
  width: 53%;
}

.duo-front.frame::before {
  inset: -18px;
}

/* How it works ----------------------------------------------------------- */

.how {
  padding-block: clamp(80px, 10vw, 136px);
  border-top: 1px solid var(--line);
}

.display-2 {
  margin-top: 1rem;
  font-size: clamp(2.3rem, 1.2rem + 3.6vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.display-2 em {
  font-size: 1.1em;
}

.steps-scroller {
  margin-top: clamp(32px, 5vw, 56px);
  padding-block: 24px;
}

.steps-scroller:focus-visible {
  outline-offset: -2px;
}

.steps {
  display: grid;
  gap: 32px;
}

.step .frame {
  width: min(100%, 280px);
}

.step-copy {
  max-width: 23rem;
  margin-top: 2.25rem;
}

.step-label {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.step-num {
  color: var(--ink);
  font-size: 1.5rem;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

.step h3 {
  margin-top: 0.7rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.step h3 + p {
  margin-top: 0.6rem;
  color: var(--ink-2);
}

/* Desktop: three columns. Phones and small tablets: swipe through the steps. */
@media (min-width: 860px) {
  .steps-scroller {
    width: 100%;
    max-width: calc(var(--max) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(32px, 4vw, 56px);
  }
}

@media (max-width: 859px) {
  .steps-scroller {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }

  .steps-scroller::-webkit-scrollbar {
    display: none;
  }

  .steps {
    grid-auto-flow: column;
    grid-auto-columns: min(74vw, 300px);
    gap: 40px;
    width: max-content;
    padding-inline: var(--gutter);
  }

  .step {
    scroll-snap-align: start;
  }

  .step .frame {
    width: 86%;
    margin-left: 16px;
  }
}

/* Promise ------------------------------------------------------------------- */

.promise {
  padding-block: clamp(88px, 12vw, 168px);
  border-top: 1px solid var(--line);
  text-align: center;
}

.promise .eyebrow {
  justify-content: center;
}

.display-xl {
  margin-top: 1.25rem;
  font-size: clamp(3.2rem, 1rem + 8.5vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.display-xl em {
  font-size: 1.1em;
}

.promise .lede {
  max-width: 36rem;
  margin-inline: auto;
}

.pillars {
  display: grid;
  gap: 2rem;
  margin-top: clamp(56px, 8vw, 96px);
  text-align: left;
}

@media (min-width: 760px) {
  .pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(24px, 4vw, 56px);
  }
}

.pillars li {
  padding-top: 1.1rem;
  border-top: 1.5px solid var(--ink);
}

.pillars h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.pillars p {
  margin-top: 0.45rem;
  color: var(--ink-2);
}

/* Closing call to action -------------------------------------------------- */

.cta {
  padding-bottom: clamp(88px, 12vw, 160px);
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 60rem;
  margin-inline: auto;
  padding: clamp(56px, 9vw, 112px) clamp(24px, 6vw, 80px);
  text-align: center;
}

.cta-inner.frame::before {
  inset: 0;
  --t: 4px;
  --a: clamp(32px, 5vw, 60px);
}

.cta .display-2 {
  max-width: 15em;
  margin-top: 0;
}

.cta .lede {
  margin-inline: auto;
}

.cta .btn {
  margin-top: 2.25rem;
}

/* Footer ------------------------------------------------------------------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.75rem 2.25rem;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.85rem;
}

.site-footer .brand {
  color: var(--ink);
}

.brand-sm .mark {
  width: 20px;
  height: 20px;
}

.brand-sm .brand-name {
  font-size: 1.05rem;
}

/* Motion: everything comes into focus. ---------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .hero .eyebrow {
    animation: rise 0.8s var(--ease) both;
  }

  .hero .display {
    animation: focus-in 1.1s var(--ease) both 0.1s;
  }

  .hero .display .period {
    animation: pop 0.55s var(--ease) both 1.05s;
  }

  .hero .lede {
    animation: rise 0.9s var(--ease) both 0.3s;
  }

  .hero .signup {
    animation: rise 0.9s var(--ease) both 0.45s;
  }

  .duo-back {
    animation: focus-in 1.2s var(--ease) both 0.35s;
  }

  .duo-front {
    animation: rise 1s var(--ease) both 0.55s;
  }

  .duo-front.frame::before {
    animation: lock 0.8s var(--ease) both 1.1s;
  }

  .signup-done:not([hidden]) .mark-corners {
    transform-box: fill-box;
    transform-origin: center;
    animation: corners-in 0.7s var(--ease) both;
  }

  .signup-done:not([hidden]) .mark-dot {
    transform-box: fill-box;
    transform-origin: center;
    animation: pop 0.5s var(--ease) both 0.45s;
  }

  .js .reveal {
    transition: opacity 0.8s var(--ease), filter 0.9s var(--ease), transform 0.9s var(--ease);
  }

  .js .reveal:not(.is-visible) {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(18px);
  }

  .js .reveal .frame::before,
  .js .reveal.frame::before {
    transition: opacity 0.5s ease 0.3s, transform 0.9s var(--ease) 0.3s;
  }

  .js .reveal:not(.is-visible) .frame::before,
  .js .reveal.frame:not(.is-visible)::before {
    opacity: 0;
    transform: scale(1.08);
  }

  .steps .reveal:nth-child(2),
  .pillars .reveal:nth-child(2) {
    transition-delay: 0.1s;
  }

  .steps .reveal:nth-child(3),
  .pillars .reveal:nth-child(3) {
    transition-delay: 0.2s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes focus-in {
  from {
    opacity: 0;
    filter: blur(14px);
  }
}

@keyframes pop {
  0% {
    transform: scale(0);
  }
  65% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes lock {
  from {
    opacity: 0;
    inset: -44px;
  }
}

@keyframes corners-in {
  from {
    opacity: 0;
    transform: scale(1.45);
  }
}

@keyframes nudge {
  50% {
    transform: translateX(4px);
  }
}

/* Privacy policy ------------------------------------------------------------- */

.legal {
  max-width: 44rem;
  padding-block: clamp(48px, 8vw, 96px) clamp(64px, 10vw, 120px);
}

.legal h1 {
  margin-top: 1.2rem;
  font-size: clamp(2.25rem, 7vw, 3.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.legal-updated {
  margin-top: 1rem;
  color: var(--ink-2);
  font-size: 0.9rem;
}

.legal h2 {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.legal p,
.legal ul {
  margin-top: 0.9rem;
  color: var(--ink-2);
  line-height: 1.65;
  text-wrap: pretty;
}

.legal ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.legal li + li {
  margin-top: 0.4rem;
}

.legal strong {
  color: var(--ink);
  font-weight: 600;
}

.legal a {
  color: var(--ink);
  text-underline-offset: 0.18em;
}
