/*
 * https://github.com/ziqq/mailchecker
 * Copyright (C) 2026 Anton Ustinoff
 * https://github.com/ziqq/mailchecker/blob/main/LICENSE
 *
 * Shared presentation for the public homepage and privacy policy.
 */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-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-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  color-scheme: light dark;
  --background: #fff;
  --surface: #f5f5f5;
  --text: #0a0a0a;
  --muted: #626262;
  --border: #e5e5e5;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
  background: var(--background);
  color: var(--text);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --surface: #171717;
    --text: #fafafa;
    --muted: #a3a3a3;
    --border: #303030;
  }
}

* {
  box-sizing: border-box;
}

body {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 3px solid #4f8cff;
  outline-offset: 5px;
}

.site-header,
nav,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header {
  flex-wrap: wrap;
  min-height: 100px;
  border-bottom: 1px solid var(--border);
}

.wordmark {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.06em;
  text-decoration: none;
}

nav {
  flex-wrap: wrap;
  font-size: 14px;
}

.locale-picker {
  appearance: none;
  max-width: 100%;
  min-height: 40px;
  padding: 6px 44px 6px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-size: 16px;
  background-repeat: no-repeat;
  color: var(--text);
  font: inherit;
}

.locale-picker:focus-visible {
  outline: 3px solid #4f8cff;
  outline-offset: 3px;
}

.site-preference {
  max-width: 800px;
  margin: 0 auto 48px;
  color: var(--muted);
  font-size: 14px;
}

.hero {
  max-width: 760px;
  padding: 76px 0 44px;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  line-height: 1.12;
  letter-spacing: -0.045em;
}

h1 {
  margin: 18px 0 26px;
  font-size: clamp(48px, 8vw, 92px);
}

h2 {
  font-size: 27px;
}

p {
  margin: 16px 0;
}

.lead {
  font-size: 24px;
  line-height: 1.45;
}

.notice {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: 14px;
}

.button {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 22px;
  border-radius: 10px;
  background: var(--text);
  color: var(--background);
  font-weight: 600;
  text-decoration: none;
}

.preview {
  margin: 0;
}

.preview img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
}

figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 52px 0;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.features p {
  color: var(--muted);
}

.data-use {
  max-width: 760px;
  margin-bottom: 64px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--muted);
  font-size: 13px;
}

.policy {
  max-width: 800px;
  margin: 56px auto 64px;
  overflow-wrap: anywhere;
}

.policy h1 {
  font-size: clamp(40px, 7vw, 64px);
}

.policy:lang(ru) h1 {
  font-size: clamp(32px, 7vw, 64px);
}

.policy h2 {
  margin-top: 40px;
}

.policy li {
  margin: 12px 0;
}

.policy code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--surface);
  font-size: 0.88em;
}

@media (max-width: 620px) {
  body {
    padding: 0 20px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
  }

  nav {
    gap: 12px;
  }

  .hero {
    padding: 24px 0 28px;
  }

  .hero .eyebrow {
    margin-top: 0;
  }

  .hero h1 {
    margin: 14px 0 18px;
  }

  .lead {
    font-size: 21px;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 36px 0;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
}
