/* Hinoka, showcase site. Colours and type come from the app's tokens
   (apps/mobile/src/design/tokens.ts): the morning paper, the cacao ink, the olive of « pour vous ». */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-500Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("/fonts/inter-tight-400Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("/fonts/inter-tight-500Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("/fonts/inter-tight-600SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #eeddc5;
  --bg: #f7f1ea;
  --ink: #2b1c17;
  --ink-soft: rgba(43, 28, 23, 0.72);
  --line: rgba(43, 28, 23, 0.14);
  --cream: #fff7ef;
  --cream-soft: rgba(255, 247, 239, 0.82);
  --cream-line: rgba(255, 247, 239, 0.2);
  --olive: #606436;
  --olive-deep: #4f5330;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --text: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

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

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.1;
}

p {
  margin: 0;
}

.body {
  color: var(--ink-soft);
  max-width: 34em;
  margin-top: 18px;
  text-wrap: pretty;
}

/* Hero: the welcome screen of the app, its paper and its loop */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 20%;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(238, 221, 197, 0.1) 0%,
    rgba(238, 221, 197, 0.55) 55%,
    var(--bg) 100%
  );
}

.top {
  position: relative;
  display: flex;
  justify-content: flex-end;
  padding-top: 24px;
  font-size: 15px;
  font-weight: 500;
}

.top a {
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-in {
  position: relative;
  margin-top: auto;
  padding-top: 40px;
  padding-bottom: clamp(56px, 12vh, 120px);
}

.hero h1 img {
  width: clamp(220px, 44vw, 520px);
  height: auto;
}

.hero-sub {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(24px, 3.4vw, 38px);
  line-height: 1.15;
  max-width: 16em;
  margin-top: clamp(20px, 4vh, 36px);
  text-wrap: balance;
}

.hero-note {
  margin-top: 20px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

/* Manifesto */

.manifesto {
  padding-top: clamp(72px, 12vw, 140px);
  padding-bottom: clamp(48px, 8vw, 96px);
}

.manifesto p:first-child {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(26px, 3.8vw, 44px);
  line-height: 1.2;
  max-width: 22em;
  text-wrap: pretty;
}

/* Features: two columns of plain articles, a rule above each */

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(48px, 7vw, 96px) clamp(32px, 6vw, 88px);
  padding-top: clamp(40px, 6vw, 72px);
  padding-bottom: clamp(72px, 10vw, 128px);
}

.feature {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.levels {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.levels li {
  font-size: 14px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

.levels.answer .l1 {
  background: var(--olive);
  border-color: var(--olive);
  color: var(--cream);
}

.levels.answer .l2 {
  background: rgba(96, 100, 54, 0.16);
  border-color: rgba(96, 100, 54, 0.3);
}

.levels.health li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.levels.health li::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}

.levels.health .l1::before {
  background: #2f6b3c;
}
.levels.health .l2::before {
  background: #8fb35a;
}
.levels.health .l3::before {
  background: #e08a2c;
}
.levels.health .l4::before {
  background: #b3261e;
}

/* The olive of everything « pour vous » */

.olive {
  position: relative;
  color: var(--cream);
  background:
    linear-gradient(
      180deg,
      rgba(58, 64, 38, 0.45),
      rgba(52, 58, 32, 0.62) 45%,
      rgba(48, 54, 30, 0.78)
    ),
    url("/img/foliage.jpg") center / cover no-repeat,
    #7e8560;
}

.olive-in,
.cacao-in {
  padding-top: clamp(88px, 13vw, 168px);
  padding-bottom: clamp(88px, 13vw, 168px);
}

.olive .body,
.cacao .body {
  color: var(--cream-soft);
}

.olive h2,
.cacao h2 {
  font-size: clamp(36px, 6vw, 68px);
  max-width: 14em;
}

/* Noki */

.noki {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 72px);
  padding-top: clamp(80px, 11vw, 144px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

.noki img {
  width: clamp(120px, 18vw, 200px);
  height: auto;
  border-radius: 50%;
}

/* Cacao: the method */

.cacao {
  background: var(--ink);
  color: var(--cream);
}

/* Closing */

.closing {
  text-align: center;
  padding-top: clamp(88px, 12vw, 152px);
  padding-bottom: clamp(72px, 10vw, 120px);
}

.closing img {
  margin: 0 auto 28px;
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 18px 40px -18px rgba(43, 28, 23, 0.45);
}

.closing-line {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.15;
  max-width: 16em;
  margin: 0 auto;
  text-wrap: balance;
}

.disclaimer {
  max-width: 44em;
  margin: 56px auto 0;
  font-size: 14px;
  color: var(--ink-soft);
}

/* Footer */

.footer {
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.footer-in {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px 40px;
  padding-top: 36px;
  padding-bottom: 44px;
}

.footer-mark img {
  width: 96px;
  height: auto;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 28px;
}

.footer-nav a {
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-legal {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: 13px;
}

/* Legal pages */

.legal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
  font-size: 15px;
  font-weight: 500;
}

.legal-top img {
  width: 120px;
  height: auto;
}

.legal {
  max-width: 760px;
  padding-top: clamp(32px, 6vw, 72px);
  padding-bottom: clamp(72px, 10vw, 120px);
  font-size: 17px;
}

.legal h1 {
  font-size: clamp(34px, 5.4vw, 54px);
  line-height: 1.08;
  margin-bottom: 12px;
}

.legal h2 {
  font-size: clamp(22px, 2.8vw, 28px);
  line-height: 1.2;
  margin: 56px 0 14px;
}

.legal h3 {
  font-family: var(--text);
  font-size: 17px;
  font-weight: 600;
  margin: 28px 0 8px;
}

.legal p,
.legal li {
  color: rgba(43, 28, 23, 0.86);
}

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

.legal ul {
  padding-left: 22px;
  margin: 10px 0;
}

.legal li + li {
  margin-top: 6px;
}

.legal .updated {
  color: var(--ink-soft);
  font-size: 15px;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}

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

.legal th {
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
}

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }
  .features {
    grid-template-columns: 1fr;
  }
  .noki {
    grid-template-columns: 1fr;
  }
  .footer-in {
    grid-template-columns: 1fr;
  }
  .footer-nav {
    justify-content: flex-start;
  }
  .hero-media {
    object-position: 60% 30%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-media {
    display: none;
  }
  .hero {
    background: var(--paper) url("/img/welcome-poster.jpg") 70% 20% / cover no-repeat;
  }
}
