/* =========================================
   Dyph — Global Stylesheet
   ========================================= */

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

:root {
  --accent:       #4a90e2;
  --accent-dark:  #3478c5;
  --success:      #2ecc71;
  --danger:       #d14343;

  --bg:           #fafaf8;
  --card:         #ffffff;
  --input-bg:     #f6f6f6;
  --hover-bg:     #f0f0f0;

  --text:         #1c1c1c;
  --text-2:       #4a4a4a;
  --placeholder:  #b0b0b0;
  --border:       #e3e3e3;

  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.06);
  --shadow-md:    0 2px 8px rgba(0,0,0,.08), 0 8px 32px rgba(0,0,0,.08);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.125rem; }
p  { color: var(--text-2); }

.text-accent { color: var(--accent); }
.text-muted  { color: var(--placeholder); font-size: .875rem; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,250,248,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.nav__logo-icon {
  width: 32px;
  height: 32px;
  background: var(--text);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: -.05em;
}

.nav__logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-2);
  transition: background .15s, color .15s;
}

.nav__link:hover    { background: var(--hover-bg); color: var(--text); }
.nav__link.active   { color: var(--text); font-weight: 600; }

.nav__cta {
  background: var(--text);
  color: var(--bg) !important;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: .875rem;
  font-weight: 600;
  transition: opacity .15s;
}
.nav__cta:hover { opacity: .82; background: var(--text); }

.nav__mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav__mobile-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s;
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 80px;
  text-align: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 24px;
}
.hero__badge .dot {
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
}

.hero h1 { margin-bottom: 20px; max-width: 760px; margin-left: auto; margin-right: auto; }

.hero__sub {
  font-size: 1.125rem;
  max-width: 540px;
  margin: 0 auto 36px;
  color: var(--text-2);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .15s, transform .1s;
  text-decoration: none;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px rgba(74,144,226,.35);
}

.btn-dark {
  background: var(--text);
  color: var(--bg);
}

.btn-ghost {
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ukraine {
  background: #1a56db;
  color: #fff;
}
.btn-ukraine-red {
  background: #e53935;
  color: #fff;
}

/* ---------- App Preview placeholder ---------- */
.app-preview {
  margin: 64px auto 0;
  max-width: 860px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.app-preview__bar {
  background: var(--input-bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-preview__dot {
  width: 11px; height: 11px;
  border-radius: 50%;
}

.app-preview__inner {
  /* Placeholder for screenshot */
  height: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--placeholder);
  font-size: .875rem;
  background: linear-gradient(160deg, #f9f9f7 0%, #f0f0ee 100%);
}
.app-preview__inner svg { opacity: .35; }

/* Actual screenshot container */
.app-preview__screenshot {
  height: 440px;
  overflow: hidden;
  position: relative;
}
.app-preview__screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* ---------- Feature grid ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow .2s, transform .2s;
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-card__icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.25rem;
}

.feature-card h3 { margin-bottom: 8px; font-size: 1rem; }
.feature-card p  { font-size: .875rem; line-height: 1.6; }

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  counter-reset: step;
}

.step {
  text-align: center;
  padding: 32px 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  position: relative;
}

.step__num {
  display: inline-flex;
  width: 36px; height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .875rem;
  margin-bottom: 16px;
}

.step h3 { margin-bottom: 8px; font-size: .9375rem; }
.step p   { font-size: .84rem; }

/* ---------- Section headings ---------- */
.section-heading {
  text-align: center;
  margin-bottom: 48px;
}
.section-heading h2 { margin-bottom: 10px; }
.section-heading p  { max-width: 480px; margin: 0 auto; font-size: .9375rem; }

/* ---------- Model list strip ---------- */
.models-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 32px;
}
.model-tag {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-2);
}
.model-tag.highlight {
  background: #ebf3fd;
  border-color: #bdd8f7;
  color: var(--accent);
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: var(--text);
  border-radius: 20px;
  padding: 56px 40px;
  text-align: center;
  color: var(--bg);
}
.cta-banner h2 { color: var(--bg); margin-bottom: 12px; }
.cta-banner p  { color: rgba(250,250,248,.6); max-width: 420px; margin: 0 auto 28px; }

/* ---------- Ukraine Banner ---------- */
.ukraine-banner {
  background: linear-gradient(135deg, #1a56db 0%, #1340b0 100%);
  border-radius: 20px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  color: #fff;
}
.ukraine-banner h3 { font-size: 1.25rem; color: #fff; margin-bottom: 6px; }
.ukraine-banner p  { color: rgba(255,255,255,.75); font-size: .875rem; max-width: 420px; }

.ukraine-flag {
  font-size: 2rem;
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__left { display: flex; align-items: center; gap: 10px; }
.footer__name { font-weight: 700; font-size: .9rem; }
.footer__copy  { font-size: .8rem; color: var(--placeholder); }

.footer__links {
  display: flex;
  gap: 20px;
}
.footer__links a {
  font-size: .84rem;
  color: var(--text-2);
  transition: color .15s;
}
.footer__links a:hover { color: var(--text); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}
.page-hero h1 { margin-bottom: 10px; }
.page-hero p  { max-width: 540px; font-size: 1rem; }

/* ---------- Card ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* ---------- Empty / Placeholder state ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  gap: 12px;
  color: var(--placeholder);
}
.empty-state svg { opacity: .4; margin-bottom: 8px; }
.empty-state h3  { font-size: 1.125rem; color: var(--text-2); }
.empty-state p   { font-size: .875rem; max-width: 320px; }

/* ---------- Ukraine page specific ---------- */
.org-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.org-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.org-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.org-card__logo {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--input-bg);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.org-card__name { font-size: 1rem; font-weight: 700; }

.org-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 16px;
}
.org-tag {
  font-size: .75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid;
}
.org-tag-blue  { background: #ebf3fd; border-color: #bdd8f7; color: #1a56db; }
.org-tag-green { background: #edfaf3; border-color: #a8edca; color: #1a8a4d; }
.org-tag-red   { background: #fef2f2; border-color: #f9bdbd; color: #d14343; }

.org-card p { font-size: .875rem; line-height: 1.65; margin-bottom: 20px; }

.org-stats {
  display: flex;
  gap: 24px;
  margin: 16px 0;
}
.org-stat-value { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.org-stat-label { font-size: .75rem; color: var(--placeholder); }

.org-card .btn { width: 100%; justify-content: center; }

.trust-note {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 12px;
}
.trust-note__icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 2px; }
.trust-note p { font-size: .84rem; line-height: 1.6; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.contact-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: box-shadow .2s;
}
.contact-item:hover { box-shadow: var(--shadow-md); }
.contact-item__icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.contact-item h3 { font-size: .9375rem; }
.contact-item p  { font-size: .84rem; }
.contact-item a  { color: var(--accent); font-size: .875rem; font-weight: 500; }

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  .nav__links { display: none; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    gap: 2px;
    z-index: 99;
  }
  .nav__mobile-toggle { display: flex; }
  .nav { position: sticky; }

  .hero { padding: 56px 0 48px; }
  .section { padding: 56px 0; }

  .ukraine-banner { flex-direction: column; text-align: center; }
  .cta-banner { padding: 40px 24px; }

  .footer__inner { flex-direction: column; align-items: flex-start; }
}
