/* ==========================================================================
   DAM_DAROM — TYUMEN LANDING PAGE STYLESHEET
   Stage 7C: Refined Visual Polish, Desktop Grid & Reduced Card Overuse
   Mobile-first, accessible, semantic, lightweight CSS
   ========================================================================== */

/* --- Custom Properties / Design Tokens --- */
:root {
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Colors (Light, calm, trustworthy civic palette) */
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-subtle: #f1f5f9;
  --color-border: #e2e8f0;
  --color-border-hover: #cbd5e1;

  --color-text-primary: #0f172a;
  --color-text-secondary: #334155;
  --color-text-muted: #64748b;

  --color-accent: #0369a1;
  --color-accent-hover: #075985;
  --color-accent-active: #0c4a6e;
  --color-accent-subtle: #e0f2fe;
  --color-accent-text: #0369a1;

  /* Typography Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.375rem;

  /* Layout & Spacing (Moderately expanded for balanced desktop presentation) */
  --container-max-width: 1140px;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2.25rem;
  --spacing-2xl: 3.5rem;
  --spacing-3xl: 4.5rem;

  /* Radius & Soft Elevation */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 2px 6px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-hero-img: 0 12px 32px -8px rgba(15, 23, 42, 0.09), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-sticky: 0 -4px 14px rgba(15, 23, 42, 0.07);

  /* Touch & Focus */
  --min-touch-target: 48px;
  --btn-height: 52px;
  --focus-ring: 2px solid var(--color-accent);
  --focus-offset: 2px;
}

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

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

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text-secondary);
  line-height: 1.6;
  font-size: var(--text-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  /* Reserve space for sticky mobile bottom CTA */
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

/* --- Accessibility Skip Link --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--spacing-md);
  background: var(--color-accent);
  color: #ffffff;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: var(--spacing-md);
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
}

@media (min-width: 640px) {
  .container {
    padding-left: var(--spacing-xl);
    padding-right: var(--spacing-xl);
  }
}

/* --- Header & Navigation --- */
.site-header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  text-decoration: none;
  color: var(--color-text-primary);
}

/* Confident brand typography (+20-25% visual weight) */
.brand-name {
  font-size: 1.375rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  line-height: 1.2;
}

/* Refined city pill */
.brand-badge {
  font-size: 0.8125rem;
  font-weight: 600;
  background-color: var(--color-surface-subtle);
  color: var(--color-text-secondary);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  letter-spacing: -0.01em;
}

/* Breadcrumbs (Secondary context) */
.breadcrumbs {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.breadcrumbs ol {
  display: flex;
  list-style: none;
  gap: var(--spacing-xs);
  align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: var(--spacing-xs);
  color: var(--color-border);
}

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

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs [aria-current="page"] {
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* --- Main Layout & Section Rhythm --- */
.site-main {
  flex: 1;
  padding-top: var(--spacing-xl);
  padding-bottom: var(--spacing-3xl);
  display: flex;
  flex-direction: column;
  gap: 3.25rem;
}

@media (min-width: 768px) {
  .site-main {
    padding-top: 2.75rem;
    gap: 4.25rem;
  }
}

/* --- Hero Section (Refined Composition & Integrated Image) --- */
.hero-section {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem var(--spacing-md);
  box-shadow: var(--shadow-subtle);
}

@media (min-width: 640px) {
  .hero-section {
    padding: 2.5rem var(--spacing-xl);
  }
}

@media (min-width: 900px) {
  .hero-section {
    padding: 3.25rem 3rem;
  }
}

.hero-grid {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

/* Two-column desktop grid with 1.4-1.6x larger illustration */
@media (min-width: 860px) {
  .hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.75rem;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .hero-grid {
    gap: 3.5rem;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
}

/* H1 visually optimized for ~2 lines on desktop without copy changes */
.hero-title {
  font-size: clamp(1.75rem, 2.2vw + 0.5rem, 2.35rem);
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1.24;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}

@media (min-width: 860px) {
  .hero-title {
    max-width: 22ch;
  }
}

.hero-lead {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xl);
  line-height: 1.65;
}

@media (min-width: 640px) {
  .hero-lead {
    font-size: 1.0625rem;
    max-width: 48ch;
  }
}

.hero-cta-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  align-items: flex-start;
}

/* Hero Media & Integrated Image */
.hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hero-media picture {
  display: contents;
}

.hero-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hero-img);
  border: none;
  display: block;
}

/* Mobile: prevent illustration from dominating first screen */
@media (max-width: 767px) {
  .hero-media {
    max-width: 320px;
    margin: 0 auto;
  }
  
  .hero-image {
    max-height: 240px;
    object-fit: contain;
  }
}

/* --- Major Content Sections (Reduced Card Overuse) --- */
/* Enclosing card borders removed; clean vertical rhythm & subtle dividers used */
.content-section {
  background-color: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  padding-top: 2.75rem;
  border-top: 1px solid var(--color-border);
}

@media (min-width: 768px) {
  .content-section {
    padding-top: 3.5rem;
  }
}

.section-title {
  font-size: var(--text-xl);
  font-weight: 750;
  color: var(--color-text-primary);
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin-bottom: 1.125rem;
}

@media (min-width: 640px) {
  .section-title {
    font-size: 1.65rem;
  }
}

@media (min-width: 768px) {
  .section-title {
    font-size: 1.75rem;
  }
}

.section-intro {
  margin-bottom: var(--spacing-lg);
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
  line-height: 1.65;
  max-width: 68ch;
}

.section-closing {
  margin-top: var(--spacing-lg);
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 68ch;
}

/* --- Ordered List Steps (Donor Section) --- */
.steps-list {
  list-style: none;
  counter-reset: step-counter;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  max-width: 72ch;
}

.steps-list li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 2.75rem;
  font-size: 1rem;
  line-height: 1.6;
}

.steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.85rem;
  height: 1.85rem;
  background-color: var(--color-accent-subtle);
  border: 1px solid #bae6fd;
  color: var(--color-accent-text);
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps-list li strong {
  color: var(--color-text-primary);
}

/* --- Unordered Bullet Lists --- */
.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 70ch;
}

.bullet-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

.bullet-list li::before {
  content: "•";
  position: absolute;
  left: 0.35rem;
  color: var(--color-accent);
  font-weight: bold;
  font-size: 1.25rem;
  line-height: 1.2;
}

/* Paragraph spacing inside prose blocks */
.prose {
  max-width: 70ch;
}

.prose p {
  font-size: 1.0625rem;
  line-height: 1.65;
}

.prose p:not(:last-child) {
  margin-bottom: var(--spacing-md);
}

/* --- Category Examples (Balanced 2-Column Grid, Harmonious Heights) --- */
.categories-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
  margin-bottom: var(--spacing-lg);
  max-width: 840px;
}

.categories-list li {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.125rem 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .categories-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .categories-list li {
    min-height: 5.25rem;
  }
}

.categories-list li:hover {
  border-color: var(--color-border-hover);
  box-shadow: 0 4px 8px -1px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.categories-list + .section-closing {
  max-width: 840px;
}

/* --- Contextual Repeat Block (Channel Section) --- */
.channel-box {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg) var(--spacing-md);
  margin-top: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--spacing-md);
  box-shadow: var(--shadow-card);
}

@media (min-width: 640px) {
  .channel-box {
    padding: 1.75rem 2rem;
  }
}

/* --- Buttons & CTAs (Polished, Taller, Modern Rounded) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--btn-height);
  padding: 0.875rem 1.85rem;
  font-size: 1.0625rem;
  font-weight: 650;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  text-align: center;
  line-height: 1.25;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
  width: 100%;
}

@media (min-width: 640px) {
  .btn-primary {
    width: auto;
    min-width: 290px;
  }
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -2px rgba(3, 105, 161, 0.25);
}

.btn-primary:active {
  background-color: var(--color-accent-active);
  transform: translateY(0);
  box-shadow: none;
}

.btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

/* --- FAQ Accordion (Card Treatment Preserved & Enhanced) --- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 840px;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  border-color: var(--color-border-hover);
}

.faq-item[open] {
  border-color: #cbd5e1;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 1.125rem 1.35rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text-primary);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color 0.15s ease;
}

.faq-question::-webkit-details-marker {
  display: none;
}

/* Polished plus indicator with balanced alignment */
.faq-question::after {
  content: "+";
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-left: var(--spacing-md);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background-color: var(--color-surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background-color 0.15s ease, transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
  content: "−";
  background-color: var(--color-accent-subtle);
  color: var(--color-accent-text);
}

.faq-question:hover {
  background-color: var(--color-surface-subtle);
}

.faq-question:focus-visible {
  outline: var(--focus-ring);
  outline-offset: -2px;
}

.faq-answer {
  padding: 0 1.35rem 1.25rem 1.35rem;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  border-top: 1px solid var(--color-surface-subtle);
  padding-top: 0.875rem;
}

/* --- Footer (Finished & Compact) --- */
.site-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-project {
  font-size: 1.0625rem;
  font-weight: 750;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

.footer-nav {
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-disclaimer {
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--color-text-muted);
  max-width: 75ch;
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8125rem; /* ~13px */
  color: var(--color-text-muted);
  padding-top: 0.5rem;
}

.footer-legal-link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
}

.footer-legal-link:hover {
  text-decoration: underline;
  color: var(--color-accent-hover);
}

.footer-meta-sep {
  color: var(--color-text-muted);
  user-select: none;
}

.footer-meta-current {
  color: var(--color-text-secondary);
}

.brand-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
}

/* --- Legal Information Page (/legal/) --- */
.legal-container {
  max-width: 820px;
  padding-top: var(--spacing-xl);
  padding-bottom: 3.5rem;
}

.legal-header {
  margin-bottom: var(--spacing-xl);
}

.legal-title {
  font-size: clamp(1.75rem, 2vw + 1rem, 2.25rem);
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.legal-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .legal-card {
    padding: 1.25rem 1.25rem;
  }
}

.legal-subtitle {
  font-size: 1.25rem;
  font-weight: 750;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.75rem;
  margin-bottom: 0.25rem;
}

.legal-entity {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--color-text-primary);
}

.legal-entity strong {
  font-weight: 700;
  color: var(--color-text-primary);
}

.legal-props {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.legal-location {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.legal-email-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
  border-top: 1px solid var(--color-border);
  padding-top: 1.25rem;
}

.legal-label {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

.legal-email-link {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
  overflow-wrap: break-word;
}

.legal-email-link:hover {
  color: var(--color-accent-hover);
}

.legal-back-nav {
  margin-top: var(--spacing-xl);
}

.legal-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9375rem;
  font-weight: 550;
  color: var(--color-accent);
  text-decoration: none;
}

.legal-back-link:hover {
  text-decoration: underline;
  color: var(--color-accent-hover);
}

/* --- Mobile Sticky Bottom CTA --- */
.sticky-mobile-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-sm) var(--spacing-md);
  padding-bottom: calc(var(--spacing-sm) + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow-sticky);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .sticky-mobile-cta {
    display: none;
  }
}

.sticky-mobile-cta .btn {
  width: 100%;
  max-width: 480px;
  font-size: var(--text-sm);
  min-height: 48px;
  padding: 0.65rem 1rem;
}

/* --- Reduced Motion Friendly --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
