/* /assets/css/styles.css */

:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --muted-strong: #475569;
  --line: #dfe5ef;
  --accent: #2563eb;
  --accent-2: #0f9f6e;
  --accent-3: #b45309;
  --nav-bg: #050505;
  --card-bg: #ffffff;
  --max-width: 1120px;
  --page-gutter: 20px;
  --radius: 8px;
  --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
}

img {
  display: block;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

main {
  flex: 1 0 auto;
}

.container,
.site-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.site-container {
  padding-top: 0;
  padding-bottom: 58px;
}

.section {
  padding: 34px 0;
}

.section.compact {
  padding: 24px 0;
}

.section-title {
  margin: 0 0 14px;
  color: var(--text);
  font-size: clamp(1.35rem, 1.9vw, 1.9rem);
  line-height: 1.18;
  font-weight: 850;
  letter-spacing: 0;
}

.section-subtitle {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 800;
}

.lead {
  color: var(--muted-strong);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.7;
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 14px;
  padding: 7px 10px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  background: #eef5ff;
  color: #1e40af;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn,
.btn-open,
.btn-share,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.btn-primary,
.btn-open {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.btn-primary:hover,
.btn-open:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn-secondary,
.btn-ghost {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid var(--line);
}

.btn-secondary:hover,
.btn-ghost:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  transform: translateY(-1px);
}

.btn-share {
  background: #f8fafc;
  color: #334155;
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn-share:hover {
  background: #eef2f7;
  color: #0f172a;
  transform: translateY(-1px);
}

.btn-share.copied {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.btn:focus-visible,
.btn-open:focus-visible,
.btn-share:focus-visible,
.btn-secondary:focus-visible,
.btn-ghost:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 3px;
}

.btn:focus:not(:focus-visible),
.btn-open:focus:not(:focus-visible),
.btn-share:focus:not(:focus-visible),
.btn-secondary:focus:not(:focus-visible),
.btn-ghost:focus:not(:focus-visible) {
  outline: none;
}

@media (hover: none) and (pointer: coarse) {
  .btn:hover,
  .btn-open:hover,
  .btn-share:hover,
  .btn-secondary:hover,
  .btn-ghost:hover {
    transform: none;
  }

  .btn:active,
  .btn-open:active,
  .btn-share:active,
  .btn-secondary:active,
  .btn-ghost:active {
    transform: scale(0.985);
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .site-container {
    padding-bottom: 42px;
  }

  .section {
    padding: 24px 0;
  }

  .section.compact {
    padding: 18px 0;
  }

  .lead {
    line-height: 1.58;
  }
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.center {
  text-align: center;
}

.text-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

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

.cookie-notice[hidden] {
  display: none !important;
}

.cookie-notice {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 2400;
  width: min(760px, calc(100% - 32px));
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.cookie-notice.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.cookie-notice__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 12px 12px 16px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.cookie-notice p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.92rem;
  line-height: 1.45;
}

.cookie-notice__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-notice__link,
.cookie-notice__accept {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.cookie-notice__link {
  border: 1px solid var(--line);
  background: #ffffff;
  color: #0f172a;
}

.cookie-notice__accept {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.cookie-notice__link:hover,
.cookie-notice__accept:hover {
  transform: translateY(-1px);
}

.cookie-notice__link:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.cookie-notice__accept:hover {
  background: #1d4ed8;
}

.cookie-notice__link:focus-visible,
.cookie-notice__accept:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .grid.cols-4,
  .grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  :root {
    --page-gutter: 16px;
  }

  .site-container {
    padding-bottom: 40px;
  }

  .section {
    padding: 26px 0;
  }

  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .btn,
  .btn-open,
  .btn-share,
  .btn-secondary,
  .btn-ghost {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .cookie-notice {
    width: min(100% - 24px, 520px);
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .cookie-notice__inner {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 13px;
  }

  .cookie-notice__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
