/* algoritmauzmani.com — clean red & white identity.
   Light, high-contrast, professional. A single brand red is the only accent;
   backgrounds are white / soft neutral. Transitions are subtle and purposeful
   (no glow, no auto-playing gradients, no showy transforms). */

:root {
  --bg: #ffffff;
  --bg-2: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #fafafb;
  --border: #e4e7ec;
  --border-strong: #d5d9e0;
  --text: #16181d;
  --muted: #5b6472;
  --accent: #e11d2a;
  --accent-2: #e11d2a;
  --accent-strong: #c11824;
  --accent-soft: #fdecec;
  --accent-grad: linear-gradient(120deg, #e11d2a 0%, #c11824 100%);
  --danger: #d32f2f;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 6px 18px -8px rgba(16, 24, 40, 0.2);
  --shadow-lift: 0 8px 22px -12px rgba(16, 24, 40, 0.28);
  --radius: 14px;
  --radius-sm: 10px;
  --wrap: 1120px;
  --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-text { font-size: 1.06rem; }
.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav a { color: var(--muted); font-weight: 600; font-size: 0.95rem; transition: color 0.15s ease; }
.site-nav a:hover { color: var(--accent); }
.lang-toggle {
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 6px 14px;
  font-family: var(--mono); font-size: 0.82rem; color: var(--text) !important;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent) !important; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 48px 0 40px; }
.hero-inner { position: relative; z-index: 2; max-width: 780px; }
.hero-kicker {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 0.76rem; color: var(--accent); margin: 0 0 12px;
}
.hero-title {
  font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.08; margin: 0 0 14px;
  font-weight: 800; letter-spacing: -0.02em; color: var(--text);
}
.hero-lead { font-size: 1.06rem; line-height: 1.5; color: var(--muted); margin: 0 0 20px; max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-glow {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(16, 24, 40, 0.05) 1px, transparent 0);
  background-size: 24px 24px;
  mask-image: radial-gradient(620px 380px at 86% 12%, #000 8%, transparent 72%);
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 0.98rem;
  border: 1px solid transparent; transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Sections */
section { padding: 40px 0; }
.section-title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0 0 6px; letter-spacing: -0.01em; }
.section-lead { color: var(--muted); margin: 0 0 4px; }
.mod-icon { display: block; }

/* Value grid */
.value-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin-top: 18px; }
.value-card {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.value-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.value-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px; margin-bottom: 12px;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--border);
}
.value-icon svg { width: 21px; height: 21px; }
.value-card h3 { margin: 0 0 6px; font-size: 1.06rem; }
.value-card p { margin: 0; color: var(--muted); font-size: 0.96rem; }

/* Modules */
.module-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin-top: 18px; }
.module-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.module-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.module-card.is-soon { background: var(--bg-2); box-shadow: none; }
.module-card.is-soon:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: none; }
.module-card.is-soon .module-title,
.module-card.is-soon .module-desc { color: var(--muted); }
.module-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.module-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--border);
}
.module-icon svg { width: 21px; height: 21px; }
.module-title { margin: 0 0 5px; font-size: 1.08rem; }
.module-desc { margin: 0; color: var(--muted); font-size: 0.95rem; }
.pill {
  font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 700; color: #fff; border: 1px solid transparent; border-radius: 999px;
  padding: 4px 10px; background: var(--accent);
}

/* Demo tutorials (illustrative previews — no links) */
.demo-flag {
  display: inline-block; font-family: var(--mono); text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 0.68rem; font-weight: 700; color: var(--muted);
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 12px; margin: 0 0 12px;
}
.demo-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); margin-top: 18px; }
.demo-card {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.demo-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.demo-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.demo-title { margin: 0 0 5px; font-size: 1.04rem; }
.demo-desc { margin: 0 0 14px; color: var(--muted); font-size: 0.93rem; }
.demo-meta { margin: auto 0 0; color: var(--muted); font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.01em; }
.badge-level {
  font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.07em;
  font-weight: 700; border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px;
}
.badge-beginner { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-soft); }
.badge-intermediate { color: var(--text); background: var(--bg-2); border-color: var(--border-strong); }
.tag-demo {
  font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.07em;
  font-weight: 700; color: var(--muted); background: var(--panel);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 8px;
}

/* How */
.how-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.how-steps li {
  position: relative; display: flex; gap: 13px; align-items: flex-start;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
}
/* connector arrow between steps (desktop) */
.how-steps li:not(:last-child)::after {
  content: ""; position: absolute; right: -11px; top: 50%; z-index: 2;
  width: 8px; height: 8px; transform: translateY(-50%) rotate(45deg);
  border-top: 2px solid var(--border-strong); border-right: 2px solid var(--border-strong);
}
.how-steps h3 { margin: 0 0 4px; font-size: 1.04rem; }
.how-steps p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.step-n {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 999px; display: inline-flex;
  align-items: center; justify-content: center; font-family: var(--mono); font-weight: 700;
  font-size: 1.12rem; color: #fff; background: var(--accent);
  box-shadow: 0 2px 6px -1px rgba(225, 29, 42, 0.45);
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 40px 0 28px; }
.footer-inner {
  display: grid; gap: 28px 40px;
  grid-template-columns: 1.6fr 1fr 1fr;
  align-items: start;
}
.footer-brand .brand-text { font-weight: 700; font-size: 1.06rem; }
.footer-brand p { margin: 8px 0 0; color: var(--muted); max-width: 42ch; font-size: 0.95rem; }
.footer-col h4 {
  margin: 0 0 12px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-col a {
  color: var(--muted); font-size: 0.95rem; transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--accent); }
.footer-col .is-soon-link {
  display: inline-flex; align-items: baseline; gap: 7px; color: var(--muted); font-size: 0.95rem;
}
.footer-col .soon-tag {
  font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.07em;
  font-weight: 700; color: var(--muted); background: var(--panel);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 7px;
}
.footer-bottom {
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border);
}
.footer-copy { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* Responsive */
@media (max-width: 900px) {
  .value-grid, .module-grid, .demo-grid, .how-steps { grid-template-columns: repeat(2, 1fr); }
  .how-steps li:not(:last-child)::after { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  section { padding: 34px 0; }
  .value-grid, .module-grid, .demo-grid, .how-steps { grid-template-columns: 1fr; }
  .hero { padding: 32px 0 28px; }
  .site-nav { gap: 12px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-brand { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
