/* =========================================================================
   SmashX legal pages — terms.html, privacy.html
   Шрифты, цвета и градиенты — из landing styles.css (SF Pro, чёрный фон,
   оранжевый section-gradient на заголовках). Layout — обычный поток
   с max-width контейнером (никакой абсолютной геометрии — это текстовая
   страница, не дизайн-макет).
   ========================================================================= */


/* @font-face — SF Pro (дублируем чтобы legal страницы работали автономно) */

@font-face {
  font-family: "SF Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("SF Pro Text"), local("SFProText-Regular"),
       url("../fonts/SFPro-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "SF Pro";
  font-style: normal;
  font-weight: 510;
  font-display: swap;
  src: local("SF Pro Text Medium"), local("SFProText-Medium"),
       url("../fonts/SFPro-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "SF Pro";
  font-style: normal;
  font-weight: 590;
  font-display: swap;
  src: local("SF Pro Text Semibold"), local("SFProText-Semibold"),
       url("../fonts/SFPro-Semibold.woff2") format("woff2");
}


/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, ol, li { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }


/* Tokens — синхронизированы с landing styles.css */
:root {
  --font-family: "SF Pro", -apple-system, BlinkMacSystemFont, "SF Pro Display",
                 "SF Pro Text", system-ui, "Helvetica Neue", Arial, sans-serif;
  --color-bg: #000000;
  --color-text: #ffffff;
  --color-text-90: rgba(255, 255, 255, 0.9);
  --color-text-80: rgba(255, 255, 255, 0.8);
  --color-text-60: rgba(255, 255, 255, 0.6);
  --color-border: rgba(255, 255, 255, 0.07);
  --gradient-section: linear-gradient(
    -89deg,
    rgb(255, 178, 131) 2.676%,
    rgb(241, 165, 117) 19.86%,
    rgb(241, 165, 117) 98.527%
  );
}


/* Base */
html, body {
  background: var(--color-bg);
  color: var(--color-text-80);
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


/* Header */
.legal-header {
  border-bottom: 1px solid var(--color-border);
  background: rgba(16, 16, 16, 0.5);
  backdrop-filter: blur(13.5px);
  -webkit-backdrop-filter: blur(13.5px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.legal-header__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.legal-header__logo img { height: 22px; width: auto; }
.legal-header__back {
  font-weight: 510;
  font-size: 15px;
  color: var(--color-text-80);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .15s;
}
.legal-header__back:hover { color: rgb(241, 165, 117); }
.legal-header__back svg { width: 16px; height: 16px; }


/* Main content */
.legal-main {
  flex: 1;
  padding: clamp(32px, 6vw, 60px) clamp(16px, 4vw, 40px) clamp(48px, 8vw, 80px);
}
.legal-container {
  max-width: 820px;
  margin: 0 auto;
}

.legal-title {
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  line-height: 1.15;
  font-weight: 590;
  letter-spacing: -0.5px;
  background-image: var(--gradient-section);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 14px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}
.legal-subtitle {
  color: var(--color-text-60);
  font-style: italic;
  font-size: 16px;
  margin-bottom: 40px;
}

.legal-section {
  margin-top: 36px;
}
.legal-section__title {
  font-weight: 590;
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 16px;
  letter-spacing: -0.2px;
  word-wrap: break-word;
}
.legal-section p {
  margin-top: 12px;
  color: var(--color-text-80);
}
.legal-section p:first-child { margin-top: 0; }
.legal-section ul {
  margin-top: 12px;
  padding-left: 22px;
  list-style: disc;
  color: var(--color-text-80);
}
.legal-section ul li { margin-top: 6px; }
.legal-section ul li::marker { color: rgb(241, 165, 117); }

.legal-section a {
  color: rgb(241, 165, 117);
  border-bottom: 1px solid rgba(241, 165, 117, 0.4);
  transition: border-color .15s;
}
.legal-section a:hover { border-bottom-color: rgb(241, 165, 117); }


/* Footer */
.legal-footer {
  border-top: 1px solid var(--color-border);
  padding: 24px clamp(16px, 4vw, 40px);
  color: var(--color-text-60);
  font-size: 14px;
}
.legal-footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.legal-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.legal-footer__links a:hover { color: rgb(241, 165, 117); }


/* =========================================================================
   Match deep-link fallback page (match.html) — centered CTA + store badges.
   ========================================================================= */

/* Store badges — copied self-contained from landing styles.css
   (icon urls resolve identically relative to /assets/css/). */
.store-badges {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0;
}
.store-badge {
  position: relative;
  display: inline-block;
  height: 48px;
  overflow: hidden;
  flex-shrink: 0;
}
.store-badge .b {
  position: absolute;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.store-badge--appstore  { width: 144px; }
.store-badge--appstore  .b-outline { inset: 0; background-image: url("../icons/badge-appstore-outline.svg"); }
.store-badge--appstore  .b-apple   { top: 21.8%;  left: 8.33%;  right: 76.86%; bottom: 23.76%; background-image: url("../icons/badge-appstore-apple.svg"); }
.store-badge--appstore  .b-name    { top: 44.68%; left: 28.77%; right: 8.5%;   bottom: 16.27%; background-image: url("../icons/badge-appstore-name.svg"); }
.store-badge--appstore  .b-caption { top: 21.43%; left: 29.54%; right: 28.12%; bottom: 59.17%; background-image: url("../icons/badge-appstore-caption.svg"); }

.store-badge--googleplay { width: 162px; }
.store-badge--googleplay .b-outline { inset: 0;                                background-image: url("../icons/badge-googleplay-outline.svg"); }
.store-badge--googleplay .b-content { top: 17.13%; left: 30.63%; right: 28.72%; bottom: 64.31%; background-image: url("../icons/badge-googleplay-content.svg"); }

/* Centered content */
.match-main { display: flex; align-items: center; justify-content: center; }
.match-cta {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(24px, 5vw, 40px);
}
.match-cta__title {
  font-family: var(--font-family);
  font-weight: 590;
  font-size: clamp(1.5rem, 5vw, 3rem);
  line-height: 1.15;
  color: var(--color-text);
  overflow-wrap: break-word;
}
.match-cta__help {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  line-height: 1.4;
  color: var(--color-text-80);
}
.match-cta__help a {
  color: rgb(241, 165, 117);
  border-bottom: 1px solid rgba(241, 165, 117, 0.4);
}

/* Ambient brand glow — pure gradients painted as the page's own background
   (fixed layers get hidden behind legal.css's opaque body#000). Can't cause
   layout overflow. Scoped to the match page; legal doc pages stay flat black. */
.match-page {
  background:
    radial-gradient(ellipse 100% 70% at 50% 118%, rgba(251, 81, 6, 0.32),  transparent 62%),
    radial-gradient(ellipse 90% 55% at 50% -16%,  rgba(250, 176, 34, 0.22), transparent 60%),
    radial-gradient(ellipse 55% 50% at 8% 82%,    rgba(250, 176, 34, 0.20), transparent 68%),
    #000;
  background-attachment: fixed;
}
