/* Ydalenka site shell — cohesive landing / portal chrome */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Source+Serif+4:opsz,wght@8..60,500;8..60,600&display=swap');

:root {
  --ink: #10233f;
  --ink-soft: #3d5270;
  --muted: #6b7f99;
  --line: #d5e0ee;
  --paper: #f3f7fb;
  --white: #ffffff;
  --brand: #1a4f8c;
  --brand-2: #2f7fd1;
  --accent: #0e9f6e;
  --danger: #c23b3b;
  --shadow: 0 18px 50px rgba(16, 35, 63, 0.12);
  --radius: 16px;
  --nav-h: 72px;
  --font: 'Manrope', 'Segoe UI', sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.site {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #d8e8f8 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #cfe4d8 0%, transparent 50%),
    linear-gradient(180deg, #eef4fa 0%, var(--paper) 40%, #e8eef6 100%);
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* ----- Nav ----- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  backdrop-filter: blur(14px);
  background: rgba(243, 247, 251, 0.86);
  border-bottom: 1px solid rgba(213, 224, 238, 0.9);
}

.site-nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none !important;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand span { line-height: 1.1; }
.brand small {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--brand);
  background: rgba(47, 127, 209, 0.1);
  text-decoration: none;
}

.nav-links .nav-cta {
  background: var(--brand);
  color: #fff !important;
  padding: 10px 16px;
}

.nav-links .nav-cta:hover {
  background: #143f73;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.85);
  color: var(--ink);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

/* ----- Hero ----- */
.hero-screen {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  align-items: center;
  padding: 48px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero-copy p.lead {
  margin: 0 0 28px;
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 34ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(26, 79, 140, 0.28);
}
.btn-primary:hover { background: #143f73; }
.btn-ghost {
  background: rgba(255,255,255,0.7);
  color: var(--brand);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: #fff; }

.version-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(14, 159, 110, 0.1);
  color: #0b6b4a;
  font-size: 0.88rem;
  font-weight: 700;
}

.version-pill[data-state="loading"] { color: var(--muted); background: rgba(107,127,153,.12); }
.version-pill[data-state="error"] { color: var(--danger); background: rgba(194,59,59,.1); }

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.7);
}

.hero-visual::after {
  content: '';
  position: absolute;
  inset: 18% -8% -10% 30%;
  background: radial-gradient(circle at 50% 50%, rgba(47,127,209,.22), transparent 70%);
  z-index: -1;
}

/* ----- Sections ----- */
.section {
  padding: 72px 0;
}

.section-head {
  margin-bottom: 28px;
  max-width: 40rem;
}

.section-head h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: 1.05rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature {
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  min-height: 160px;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.feature p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: 0.96rem;
}

.feature .ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  background: rgba(47,127,209,0.12);
  color: var(--brand);
  font-weight: 800;
}

.shots {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

.shot {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.shot img { width: 100%; }
.shot figcaption {
  padding: 14px 16px 16px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.shot--tall { grid-row: span 2; align-self: stretch; }
.shot--tall img { height: calc(100% - 54px); object-fit: cover; }

/* ----- Downloads ----- */
.download-panel {
  background: #10233f;
  color: #e8f0fa;
  border-radius: 24px;
  padding: 36px;
  box-shadow: var(--shadow);
}

.download-panel h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 2rem;
  color: #fff;
}

.download-panel .sub {
  margin: 0 0 24px;
  color: #9db4d0;
}

.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.dl-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
}

.dl-card h3 { margin: 0; font-size: 1.05rem; color: #fff; }
.dl-card p { margin: 0; color: #9db4d0; font-size: 0.9rem; line-height: 1.45; flex: 1; }
.dl-card .meta { font-size: 0.82rem; color: #7f98b6; font-family: ui-monospace, Consolas, monospace; }
.dl-card .btn { width: 100%; }
.dl-card.is-disabled { opacity: 0.55; }
.dl-card.is-disabled .btn { pointer-events: none; background: #3a4d68; box-shadow: none; }

.utilities-panel { margin-top: 22px; }
.util-feats {
  margin: 0;
  padding: 0 0 0 18px;
  color: #b7c9de;
  font-size: 0.82rem;
  line-height: 1.45;
}
.util-feats li { margin: 0 0 4px; }
.dl-card[data-util] { min-height: 280px; }
.util-help {
  display: block;
  text-align: center;
  color: #9ec5f5;
  font-size: 0.88rem;
  text-decoration: none;
}
.util-help:hover { text-decoration: underline; color: #c5defa; }

.howto {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.howto li {
  list-style: none;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 14px;
  color: #c5d6ea;
  font-size: 0.92rem;
  line-height: 1.45;
}

.howto strong { color: #fff; display: block; margin-bottom: 4px; }

/* ----- Web version ----- */
.web-panel {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 36px;
  align-items: center;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px;
  box-shadow: var(--shadow);
}

.web-points {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.web-points li {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(47, 127, 209, 0.06);
  border: 1px solid rgba(47, 127, 209, 0.12);
  color: var(--ink-soft);
  line-height: 1.5;
  font-size: 0.96rem;
}

.web-points strong { color: var(--ink); }

.web-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.web-visual {
  margin: 0;
}

.web-visual img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.web-visual figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

/* ----- Footer ----- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.55);
  padding: 28px 0 36px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  justify-content: space-between;
  align-items: center;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer a {
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover { color: var(--brand); }

.site-counters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}
.site-counters[hidden] { display: none; }
.site-counters span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.site-counters b {
  color: var(--ink);
  font-weight: 800;
}

.site-main {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

body.site .container.site-panel,
body.site .site-panel.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
  flex: 1;
}

body.site .auth.site-auth,
body.site .auth {
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

body.site .auth .auth-lead {
  margin: -4px 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

body.site .card {
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(16,35,63,0.08);
}

body.site .btn,
body.site .auth button {
  background: var(--brand);
}
body.site .auth button:hover,
body.site .btn:hover { background: #143f73; }

.page-card.site-card,
.site-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
  max-width: 820px;
  margin: 0 auto;
}

.cabinet-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
}
.cabinet-head .eyebrow {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.cabinet-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}
.cabinet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.cabinet-stat {
  background: rgba(47,127,209,0.06);
  border: 1px solid rgba(47,127,209,0.12);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cabinet-stat .big {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
}
.cabinet-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.cabinet-pay {
  margin-top: 22px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.cabinet-pay__head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.cabinet-pay h3 { margin: 0; }

body.site .page-card table,
.site-card table {
  width: 100%;
  border-collapse: collapse;
}
body.site .page-card th,
body.site .page-card td,
.site-card th,
.site-card td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

body.site .plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
body.site .plan-card {
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
}
body.site .plan-card.featured {
  border-color: var(--brand-2);
  box-shadow: 0 14px 36px rgba(26,79,140,0.18);
}
body.site .payment-form {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body.site .payment-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

body.site .btn-ghost {
  background: rgba(255,255,255,0.7) !important;
  color: var(--brand) !important;
  border: 1px solid var(--line);
}
body.site .btn-ghost:hover { background: #fff !important; }

@media (max-width: 960px) {
  .hero-grid,
  .feature-grid,
  .dl-grid,
  .util-grid,
  .howto,
  .shots,
  .web-panel,
  .cabinet-grid { grid-template-columns: 1fr 1fr; }
  .shot--tall { grid-row: auto; }
  .shot--tall img { height: auto; }
  .hero-screen { min-height: auto; padding-top: 28px; }
  .site-nav { height: auto; }
  .site-nav__inner {
    flex-wrap: wrap;
    padding: 10px 0;
    height: auto;
    gap: 8px;
  }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 4px 0 8px;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    padding: 10px 12px;
    font-size: 0.95rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.55);
  }
  .nav-links .nav-cta { text-align: center; }
}
@media (max-width: 560px) {
  .cabinet-grid,
  .hero-grid,
  .feature-grid,
  .dl-grid,
  .util-grid,
  .howto,
  .shots,
  .web-panel { grid-template-columns: 1fr; }
}
