/* RYVESA LTD — company frame in black and white, taken from the RY mark.
   Colour only comes from the brands the company operates, each in its own identity. */

/* Archivo, cut down to what the site uses: weights 400 to 760, widths 100% to 125%,
   Latin and Western European characters. Rename the file if it changes (cached for a year). */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-sub.woff2") format("woff2");
  font-weight: 400 760;
  font-stretch: 100% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-ext-sub.woff2") format("woff2");
  font-weight: 400 760;
  font-stretch: 100% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Pirumi's own typeface, used only inside the Pirumi panel. */
@font-face {
  font-family: "Quicksand";
  src: url("/fonts/quicksand-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Quicksand";
  src: url("/fonts/quicksand-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #000000;
  --muted: #5e5e5e;
  --rule: rgb(0 0 0 / 0.14);
  /* One spacing scale for the whole site. */
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2.5rem;
  --space-xl: clamp(3.5rem, 9vw, 4.5rem);
  color-scheme: light dark;
}

@media screen and (prefers-color-scheme: dark) {
  :root {
    --paper: #000000;
    --ink: #ffffff;
    --muted: #a3a3a3;
    --rule: rgb(255 255 255 / 0.18);
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Text selection is opt-in, like on pirumi.cy: only what people copy can be selected.
   Labels, headings, brand panels and the footer stay unselectable. Links keep their
   long-press and right-click menu, so a URL can still be copied. */
body {
  -webkit-user-select: none;
  user-select: none;
}

/* Legal text and contact links select normally. */
.facts dd,
.doc p,
.doc li {
  -webkit-user-select: text;
  user-select: text;
}

/* A company value (name, number) selects whole with one click. */
.facts dd:not(:has(a)) {
  -webkit-user-select: all;
  user-select: all;
}

/* The address selects normally, so single parts can be copied: double-click a word,
   triple-click a line. Each line is its own <div> for that, which also keeps the lines
   apart when crawlers and AI tools read the page as plain text. */
.facts dd.address {
  -webkit-user-select: text;
  user-select: text;
}

img {
  -webkit-user-drag: none;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: var(--space-xl) clamp(1.25rem, 5vw, 2.5rem) var(--space-l);
}

.skip {
  position: absolute;
  left: -999rem;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--paper);
  padding: 0.5rem 0.75rem;
}

/* ---------- Home: the mark and the one-line description ---------- */

.hero {
  margin: 0 0 var(--space-xl);
}

.mark {
  display: block;
  width: clamp(6.5rem, 20vw, 10rem);
  height: auto;
  margin: 0 0 var(--space-l);
  fill: currentColor;
}

.hero h1 {
  margin: 0;
  max-width: 19ch;
  font-size: clamp(1.9rem, 5.2vw, 3rem);
  font-weight: 760;
  font-stretch: 125%;
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

/* ---------- Section headings in the company frame ---------- */

h2 {
  margin: 0 0 var(--space-m);
  font-size: 1.3125rem;
  font-weight: 700;
  font-stretch: 125%;
  line-height: 1.2;
}

section + section {
  margin-top: var(--space-xl);
}

/* ---------- Brand panels: each one wears its own brand ---------- */

.brands {
  display: grid;
  gap: var(--space-m);
}

.brand {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0 var(--space-m);
  align-items: start;
  padding: clamp(1.5rem, 4.5vw, 2.25rem);
}

.brand > img {
  width: 3.5rem;
  height: 3.5rem;
}

.brand h3 {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.75rem;
  line-height: 1.1;
}

.brand p {
  margin: 0 0 var(--space-s);
  max-width: 44ch;
}

.brand p:last-child {
  margin-bottom: 0;
}

/* Pirumi: its own light and dark themes, terracotta, Quicksand, lowercase voice.
   Values copied from pirumi's tokens (apps/web/src/styles/cocoon/tokens.css for light,
   .dark in apps/web/src/styles.css). Like pirumi.cy, it follows the system setting. */
.pirumi {
  --pirumi-paper: oklch(94.2% 0.016 82.8);
  --pirumi-ink: oklch(25.4% 0.012 78);
  --pirumi-ink-soft: oklch(44.6% 0.017 74.2);
  --pirumi-link: oklch(46% 0.142 37.7);
  background: var(--pirumi-paper);
  color: var(--pirumi-ink);
  font-family: "Quicksand", ui-rounded, system-ui, sans-serif;
  font-weight: 600;
  border-radius: 1.75rem;
}

@media screen and (prefers-color-scheme: dark) {
  .pirumi {
    --pirumi-paper: oklch(21.4% 0.015 66.9);
    --pirumi-ink: oklch(94.2% 0.016 82.8);
    --pirumi-ink-soft: oklch(80.2% 0.03 82.6);
    --pirumi-link: oklch(67.2% 0.131 38.8);
  }
}

.pirumi > img {
  border-radius: 0.8rem;
}

.pirumi h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pirumi p {
  color: var(--pirumi-ink-soft);
}

/* Links in the brand panels go without an underline; it only shows on hover.
   Colour and weight already mark them as links. */
.pirumi a {
  color: var(--pirumi-link);
  font-weight: 700;
  text-decoration-line: none;
}

.pirumi a:hover {
  text-decoration-line: underline;
}

/* The whole panel opens pirumi.cy: the domain link stretches over it, and the
   store badges sit above that layer. Links cannot nest, so this is done in CSS. */
.pirumi {
  position: relative;
}

.pirumi .site::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* Apple's badge rules: the official artwork unmodified, in the page's language (English),
   at least 40 px high, App Store first in a row of store badges
   (https://developer.apple.com/app-store/marketing/guidelines/). The file is pirumi's
   apps/web/public/brand/app-store/en.svg. */
.store-badges {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.store-badges a {
  display: block;
  border-radius: 8px;
}

.store-badges img {
  display: block;
  height: 40px;
  width: auto;
}

/* ricarda: the haze and lilac of the channel picture. */
.ricarda {
  --haze: #edeae3;
  --lilac: #bface3;
  --plum: #2b2340;
  --violet: #4a3a78;
  background:
    radial-gradient(circle at calc(100% - 2.25rem) 2.25rem, var(--lilac) 0 0.55rem, transparent 0.6rem),
    radial-gradient(circle at 2.5rem calc(100% - 2.25rem), var(--lilac) 0 0.4rem, transparent 0.45rem),
    var(--haze);
  color: var(--plum);
  border-radius: 2.25rem;
}

.ricarda > img {
  border-radius: 50%;
}

.ricarda h3 {
  font-weight: 500;
  letter-spacing: -0.01em;
}

.ricarda a {
  color: var(--violet);
}

.channels {
  list-style: none;
  margin: 0;
  padding: 0;
}

.channels li + li {
  border-top: 1px solid rgb(43 35 64 / 0.14);
}

.channels a {
  display: grid;
  grid-template-columns: 5rem 1fr auto;
  gap: 0 var(--space-s);
  align-items: baseline;
  padding: 0.6rem 0;
  text-decoration: none;
}

/* The first and last rows sit flush, so the panel keeps the same inner margin as Pirumi's. */
.channels li:first-child a {
  padding-top: 0;
}

.channels li:last-child a {
  padding-bottom: 0;
}

/* The channel name gets an underline on hover only, like the Pirumi link. */
.channels a:hover .name {
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.channels .platform {
  font-size: 0.875rem;
  color: rgb(43 35 64 / 0.72);
}

.channels .name {
  font-weight: 600;
}

.channels .note {
  font-size: 0.875rem;
  color: rgb(43 35 64 / 0.72);
  text-align: right;
}

/* ---------- Company facts ---------- */

.facts {
  margin: 0;
}

.facts > div {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 0 1.5rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
}

.facts > div:last-child {
  border-bottom: 1px solid var(--rule);
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
}

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

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: var(--space-xl);
  font-size: 0.9375rem;
  color: var(--muted);
}

.foot nav {
  display: flex;
  gap: 1.5rem;
}

.foot nav a {
  color: var(--ink);
}

.foot p {
  margin: 0;
}

/* ---------- Legal pages ---------- */

.top {
  display: flex;
  margin: 0 0 var(--space-l);
}

.home {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  font-stretch: 125%;
}

.home svg {
  width: 2.25rem;
  height: auto;
  fill: currentColor;
}

.doc h1 {
  margin: 0 0 var(--space-xs);
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  font-weight: 760;
  font-stretch: 125%;
  line-height: 1.1;
  letter-spacing: -0.012em;
}

.doc .meta {
  margin: 0 0 var(--space-l);
  color: var(--muted);
}

.doc h1 + p:not(.meta) {
  margin-top: var(--space-m);
}

.doc a {
  overflow-wrap: anywhere;
}

.doc h2 {
  margin: var(--space-l) 0 var(--space-s);
}

.doc p,
.doc ul {
  margin: 0 0 var(--space-s);
  max-width: 64ch;
}

.doc ul {
  padding-left: 1.25rem;
}

.doc li + li {
  margin-top: 0.35rem;
}

.doc .facts {
  margin: var(--space-s) 0 var(--space-m);
}

/* ---------- Small screens ---------- */

@media (max-width: 34rem) {
  body {
    font-size: 1rem;
  }

  .brand {
    grid-template-columns: 1fr;
  }

  .brand > img {
    margin-bottom: var(--space-s);
  }

  .brand h3 {
    margin-top: 0;
  }

  /* Without the picture column the lower dot would sit on the channel list. */
  .ricarda {
    background:
      radial-gradient(circle at calc(100% - 2.25rem) 2.25rem, var(--lilac) 0 0.55rem, transparent 0.6rem),
      var(--haze);
  }

  .channels a {
    grid-template-columns: 1fr auto;
  }

  .channels .platform {
    grid-column: 1 / -1;
  }

  .facts > div {
    grid-template-columns: 1fr;
  }
}

/* Windows high contrast drops backgrounds, so the panels keep an outline. */
@media (forced-colors: active) {
  .brand {
    border: 1px solid CanvasText;
  }
}

@media print {
  .foot nav,
  .skip {
    display: none;
  }

  .brand {
    break-inside: avoid;
  }

  .pirumi,
  .ricarda {
    background: none;
    color: #000;
    border: 1px solid #000;
  }
}
