/* ============================================================
   Islomov Odilhon Rustamovich — Legal Documents Hub
   Global Stylesheet
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --color-bg: #f8f9fb;
  --color-surface: #ffffff;
  --color-text: #1a1a2e;
  --color-text-secondary: #64748b;
  --color-border: #e2e8f0;
  --color-accent: #6366f1;
  --color-accent-light: #eef2ff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 16px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(0, 0, 0, 0.06);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 960px;
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #4f46e5;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Site Header ---------- */
.site-header {
  padding: 3rem 0 1.5rem;
  text-align: center;
}

.site-header__logo {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.site-header__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.site-header__subtitle {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---------- Project Cards Grid ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr));
  gap: 1.75rem;
  padding: 2.5rem 0 4rem;
}

/* ---------- Project Card ---------- */
.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  transition: box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.project-card__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.project-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  color: #fff;
  font-weight: 700;
  overflow: hidden;
}

.project-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.project-card__description {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  flex-grow: 1;
}

.project-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  border: 1.5px solid transparent;
}

.project-card__link--primary {
  background: var(--color-accent);
  color: #fff;
}

.project-card__link--primary:hover {
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.project-card__link--secondary {
  background: var(--color-accent-light);
  color: var(--color-accent);
  border-color: var(--color-border);
}

.project-card__link--secondary:hover {
  background: #dde3fe;
  color: #4f46e5;
}

.project-card__link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---------- Site Footer ---------- */
.site-footer {
  margin-top: auto;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  padding: 2rem 1rem;
  border-top: 1px solid var(--color-border);
}

.site-footer a {
  color: var(--color-text-secondary);
  font-weight: 500;
}

.site-footer a:hover {
  color: var(--color-accent);
}

/* ---------- Sub-page styles (Privacy / Terms pages) ---------- */

/* Breadcrumb / Back nav */
.page-nav {
  padding: 1rem 0;
}

.page-nav__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition);
}

.page-nav__back:hover {
  color: var(--color-accent);
}

.page-nav__back svg {
  width: 18px;
  height: 18px;
}

/* Page hero */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}

.page-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  color: #fff;
}

.page-hero__title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.page-hero__project {
  font-size: 1rem;
  color: var(--color-text-secondary);
}

.page-hero__effective {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-top: 1rem;
}

/* Document body */
.document {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.document .highlight {
  background: #f0f4ff;
  border-left: 4px solid var(--color-accent);
  padding: 1.15rem 1.35rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.95rem;
  line-height: 1.65;
}

.document .warning {
  background: #fff7ed;
  border-left: 4px solid #ea580c;
  padding: 1.15rem 1.35rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.95rem;
  line-height: 1.65;
}

.document h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--color-border);
  color: var(--color-text);
}

.document h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

.document p,
.document li {
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.document ul,
.document ol {
  padding-left: 1.5rem;
}

.document table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.document th,
.document td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
}

.document th {
  background: var(--color-bg);
  font-weight: 600;
}

.document code {
  background: var(--color-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.88em;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .site-header {
    padding: 2rem 0 1rem;
  }

  .projects-grid {
    padding: 1.5rem 0 3rem;
    gap: 1.25rem;
  }

  .project-card {
    padding: 1.5rem;
  }

  .project-card__links {
    flex-direction: column;
  }

  .project-card__link {
    justify-content: center;
  }

  .page-hero {
    padding: 1.5rem 0 1rem;
  }

  .document {
    padding: 0 1rem 3rem;
  }

  .document table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
