/* kiflada.com holding page. Tokens from docs/design.md §2 (Kiflada's own palette, light and dark). */

@font-face {
  font-family: "Readex Pro";
  src: url("/assets/fonts/ReadexPro-Variable.woff2") format("woff2");
  font-weight: 160 700;
  font-display: swap;
}
@font-face {
  font-family: "Alexandria";
  src: url("/assets/fonts/Alexandria-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --chaux: #f4f6fa;
  --blanc: #ffffff;
  --encre: #14213d;
  --encre-2: #56607a;
  --ligne: #dde2ec;
  --ligne-forte: #c3cad8;
  --casbah: #2156d9;
  --casbah-fonce: #1a45b0;
  --ambre: #f2a93b;
  --ambre-bord: #b97516;
  --card: #ffffff;
  --card-line: #56607a;
  --slot-ring: #c3cad8;
  --card-shadow: 0 18px 40px -16px rgb(20 33 61 / 0.35);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --chaux: #0d1524;
    --blanc: #141e31;
    --encre: #e8ecf4;
    --encre-2: #a3adc2;
    --ligne: #24304a;
    --ligne-forte: #34425f;
    --casbah: #6b95ff;
    --casbah-fonce: #8daeff;
    --ambre: #f5b656;
    /* The card is a physical object: it stays white in dark mode. */
    --card-shadow: 0 24px 48px -18px rgb(0 0 0 / 0.7);
  }
}

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

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

body {
  margin: 0;
  background: var(--chaux);
  color: var(--encre);
  font-family: "Readex Pro", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--casbah);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover {
  color: var(--casbah-fonce);
}
:focus-visible {
  outline: 2px solid var(--casbah);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  inset-inline-start: 16px;
  inset-block-start: -100px;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: 8px;
}
.skip:focus {
  inset-block-start: 12px;
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* Header: the lockup, with its clear space (0.26 × the icon). */
.top {
  padding-block: 28px 8px;
}
.brand {
  display: inline-flex;
  color: var(--encre);
  /* 44 px tap target at the 124 px lockup; the negative margin keeps the layout of 7 px padding. */
  padding: 8px 0;
  margin-block: -1px;
  border-radius: 6px;
}
.lockup {
  display: block;
  width: 124px;
  height: auto;
}

/* Home */
.hero {
  flex: 1;
  display: grid;
  align-content: center;
  gap: 48px;
  padding-block: 40px 56px;
}
.copy {
  max-width: 34rem;
}
h1 {
  font-family: "Alexandria", "Readex Pro", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2.375rem, 1.6rem + 3.6vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  text-wrap: balance;
}
[dir="rtl"] h1 {
  letter-spacing: 0;
  line-height: 1.3;
}
.lead {
  margin: 0;
  font-size: clamp(1.0625rem, 0.98rem + 0.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--encre-2);
  max-width: 30rem;
  text-wrap: pretty;
}
.contact {
  margin: 36px 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contact-label {
  font-size: 0.875rem;
  color: var(--encre-2);
}
.contact a {
  font-size: 1.125rem;
  font-weight: 500;
  align-self: flex-start;
  padding-block: 8px;
  margin-block: -8px;
}

/* The card: Kiflada's own basic kit card. Points are the logo's ambre point. */
.art {
  display: flex;
  justify-content: center;
  padding-block: 8px 24px;
}
.card {
  width: min(100%, 320px);
  aspect-ratio: 1.586;
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  rotate: -4deg;
}
[dir="rtl"] .card {
  rotate: 4deg;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-icon {
  width: 36px;
  height: 36px;
  display: block;
}
.card-line {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--card-line);
}
.slots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px 12px;
}
.slot {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid var(--slot-ring);
}
.slot.on {
  background: var(--ambre);
  border-color: var(--ambre);
}

/* Privacy and 404 */
.doc {
  flex: 1;
  max-width: 40rem;
  padding-block: 40px 64px;
}
.doc h1 {
  font-size: clamp(2rem, 1.6rem + 1.8vw, 2.75rem);
  margin-block-end: 12px;
}
.doc-intro {
  font-size: 1.125rem;
  color: var(--encre-2);
  margin: 0 0 32px;
}
.doc-body {
  border-block-start: 1px solid var(--ligne);
}
.doc-body p {
  margin: 0;
  padding-block: 18px;
  border-block-end: 1px solid var(--ligne);
}
.doc-body b {
  font-weight: 600;
}
/* 404: the inline home links get a 44 px tap target without moving the text. */
.doc-intro a {
  display: inline-block;
  padding-block: 8px;
  margin-block: -8px;
}
.doc-note {
  margin: 24px 0 0;
  font-size: 0.875rem;
  color: var(--encre-2);
}

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px 28px;
  border-block-start: 1px solid var(--ligne);
  font-size: 0.875rem;
  color: var(--encre-2);
}
.legal,
.langs {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
}
.foot a {
  color: var(--encre-2);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.foot a:hover {
  color: var(--encre);
}
.lang[aria-current] {
  color: var(--encre);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (min-width: 880px) {
  .page {
    padding-inline: 40px;
  }
  .top {
    padding-block-start: 40px;
  }
  .lockup {
    width: 148px;
  }
  .hero {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: 64px;
    padding-block: 64px 96px;
  }
  .card {
    width: 360px;
    padding: 26px 28px;
  }
  .card-icon {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .card {
    transition: rotate 300ms ease;
  }
  .art:hover .card {
    rotate: -2deg;
  }
  [dir="rtl"] .art:hover .card {
    rotate: 2deg;
  }
}
