/* Shared styles for the legal pages of the «Я читаю» app.
   Fonts and colours follow the main site (rebus-tailwind-twentythree theme). */

@font-face {
  font-display: swap;
  font-family: DRAguScript3XLight;
  font-weight: 300;
  src: url(/fonts/DRAguScript3XLight.woff2) format('woff2');
}

@font-face {
  font-display: swap;
  font-family: DRAguScript6Med;
  font-weight: 500;
  src: url(/fonts/DRAguScript6Med.woff2) format('woff2');
}

/* Open Sans is served from our own server, so the pages ask nobody else for
   anything and no consent banner is needed. One variable file per alphabet. */
@font-face {
  font-display: swap;
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 800;
  src: url(/fonts/open-sans-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-display: swap;
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 800;
  src: url(/fonts/open-sans-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F,
    U+FE2E-FE2F;
}

@font-face {
  font-display: swap;
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 800;
  src: url(/fonts/open-sans-latin.woff2) format('woff2');
  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-display: swap;
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 800;
  src: url(/fonts/open-sans-latin-ext.woff2) format('woff2');
  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;
}

:root {
  --accent: #e05937;
  --accent-light: #ffae2c;
  --text: #1f2937;
  --link: #111827;
  --highlight: #98ebff;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #f9fafb;
  --content: 960px;
}

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

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

body {
  margin: 0;
  font-family: 'Open Sans', Arial, sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: #fff;
}

h1,
h2,
h3 {
  font-family: DRAguScript3XLight, 'Open Sans', Arial, sans-serif;
  font-weight: 300;
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: 2.6rem;
  margin: 0 0 0.4rem;
}

h2 {
  font-size: 1.7rem;
  margin: 2.6rem 0 0.8rem;
}

h3 {
  font-size: 1.25rem;
  margin: 1.8rem 0 0.5rem;
}

p,
li {
  margin: 0 0 1rem;
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Links match the main site: dark and underlined, going black on hover. */
a {
  color: var(--link);
  text-decoration: underline;
}

a:hover {
  color: #000;
}

.bar {
  height: 6px;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent-light) 100%);
}

.wrap {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.site-header img {
  display: block;
  width: 220px;
  max-width: 60vw;
  height: auto;
}

/* Needs the class too, otherwise .wrap wins and the top padding is lost. */
main.wrap {
  padding-top: 4.5rem;
  padding-bottom: 3.5rem;
}

.lead {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

/* The same pastel panel the main site uses to set a block apart. */
.callout {
  background: var(--highlight);
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  margin: 1.5rem 0;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  margin-right: 1.25rem;
}

.hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 1.5rem 0 2.5rem;
}

.hero-text {
  flex: 1 1 40%;
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.5;
}

.hero-word {
  font-family: DRAguScript6Med, 'Open Sans', Arial, sans-serif;
  font-weight: 500;
  font-size: 1.5rem;
}

.hero-picture {
  flex: 1 1 60%;
  min-width: 0;
}

.hero-picture img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 600px) {
  .hero {
    flex-direction: column-reverse;
    gap: 1rem;
  }

  .hero-text,
  .hero-picture {
    flex: none;
    width: 100%;
  }
}

.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}

.cards li {
  margin: 0;
}

.cards a {
  display: block;
  height: 100%;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
}

.cards a:hover {
  border-color: var(--accent);
  color: var(--text);
}

.cards strong {
  display: block;
  font-family: DRAguScript6Med, 'Open Sans', Arial, sans-serif;
  font-weight: 500;
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.cards span {
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.4rem;
  }
}
