:root {
  --ink: #172033;
  --muted: #5d6780;
  --line: rgba(23, 32, 51, 0.12);
  --surface: #ffffff;
  --soft: #f5f7fb;
  --aqua: #12b7a7;
  --blue: #2866f6;
  --rose: #ef4e7b;
  --gold: #f7b32b;
  --green: #33b36b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; gap: 10px; align-items: center; font-weight: 900; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--aqua));
  box-shadow: 0 12px 24px rgba(40, 102, 246, 0.28);
}
nav { display: flex; gap: 18px; justify-content: center; font-weight: 700; color: var(--muted); }
nav a:hover, .langs a:hover { color: var(--blue); }
.langs { display: flex; gap: 10px; color: var(--muted); font-size: 0.9rem; }

.hero {
  min-height: min(760px, calc(100vh - 72px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  padding: clamp(42px, 8vw, 92px) clamp(20px, 5vw, 72px) 56px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 14%, rgba(18,183,167,.18), transparent 28%),
    linear-gradient(135deg, #fdfefe 0%, #edf4ff 48%, #fff7e8 100%);
}
.kicker { color: var(--blue); font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
h1 { font-size: clamp(2.3rem, 6vw, 5.6rem); line-height: .96; margin: 0 0 22px; letter-spacing: 0; }
.hero p { max-width: 740px; color: var(--muted); font-size: clamp(1.06rem, 2vw, 1.32rem); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 900;
  cursor: pointer;
}
.button.primary { color: white; background: var(--blue); border-color: var(--blue); box-shadow: 0 14px 30px rgba(40, 102, 246, .24); }
.button.secondary { background: white; color: var(--ink); }
.muted { color: var(--muted); font-size: .94rem; }

.hero-visual { position: relative; min-height: 520px; display: grid; place-items: center; }
.phone {
  width: min(310px, 76vw);
  aspect-ratio: 9 / 17;
  border-radius: 36px;
  padding: 22px;
  background: #111827;
  box-shadow: 0 36px 80px rgba(23, 32, 51, .34);
}
.phone-top { width: 96px; height: 14px; border-radius: 20px; background: #273244; margin: 0 auto 34px; }
.message { height: 54px; border-radius: 16px; margin: 18px 0; }
.message.one { width: 82%; background: linear-gradient(135deg, var(--aqua), var(--green)); }
.message.two { width: 64%; margin-inline-start: auto; background: linear-gradient(135deg, var(--blue), #7856ff); }
.message.three { width: 76%; background: linear-gradient(135deg, var(--gold), var(--rose)); }
.dock { height: 86px; border-radius: 22px; margin-top: 42px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); }
.status-panel {
  position: absolute;
  right: 2%;
  bottom: 9%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 18px;
  min-width: 210px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 18px 48px rgba(23,32,51,.18);
  color: var(--muted);
}
.status-panel strong { color: var(--ink); }

.section { padding: 72px clamp(20px, 5vw, 72px); }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 24px; }
h2 { font-size: clamp(1.8rem, 3vw, 3rem); margin: 0; letter-spacing: 0; }
.feature-grid, .post-grid, .screens-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.feature-card, .post-card, .admin-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 12px 34px rgba(23,32,51,.06);
}
.feature-icon { width: 48px; height: 48px; color: var(--blue); }
.feature-icon svg { width: 100%; height: 100%; }
.feature-card p, .post-card p, .email-band p { color: var(--muted); }
.color-band { background: #111827; color: white; }
.screenshot { margin: 0; }
.shot-frame {
  min-height: 240px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1f2937, #2563eb 55%, #14b8a6);
  border: 1px solid rgba(255,255,255,.16);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.shot-frame img { width: 100%; height: 100%; object-fit: cover; }
figcaption { margin-top: 10px; color: rgba(255,255,255,.78); }
.post-card time, .article time { color: var(--rose); font-weight: 800; }
.email-band { background: linear-gradient(135deg, #e7fff9, #fff5db); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.article-wrap, .admin-wrap { padding: 56px clamp(20px, 5vw, 72px); }
.article, .admin-card { max-width: 980px; margin: 0 auto; }
.article .lead { font-size: 1.2rem; color: var(--muted); }
.admin-wrap.wide .admin-card { max-width: 1180px; }
.admin-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 800; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  font: inherit;
  background: white;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.error { color: #b42318; background: #fff0ed; border: 1px solid #ffd4cc; padding: 12px; border-radius: 8px; }
.notice { color: #067647; background: #ecfdf3; border: 1px solid #abefc6; padding: 12px; border-radius: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: start; padding: 10px; border-bottom: 1px solid var(--line); }

.webmail-wrap {
  min-height: calc(100vh - 150px);
  padding: clamp(16px, 3vw, 34px);
  background:
    linear-gradient(135deg, rgba(40,102,246,.08), rgba(18,183,167,.08)),
    var(--soft);
}
.webmail-app {
  display: grid;
  grid-template-columns: 260px minmax(330px, 430px) minmax(0, 1fr);
  min-height: 76vh;
  max-width: 1640px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 70px rgba(23,32,51,.12);
}
.mail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  color: white;
  background: linear-gradient(180deg, #172033, #25385f 62%, #146b70);
}
.mail-account { display: flex; gap: 12px; align-items: center; min-width: 0; }
.mail-account p { margin: 0; color: rgba(255,255,255,.72); font-size: .82rem; }
.mail-account strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), var(--rose));
  font-weight: 900;
}
.mail-compose { width: 100%; border: 0; background: linear-gradient(135deg, var(--blue), var(--aqua)); }
.mail-sidebar-title { color: rgba(255,255,255,.72); font-weight: 900; font-size: .82rem; text-transform: uppercase; }
.mail-folders { display: grid; gap: 6px; justify-content: stretch; }
.mail-folder {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,.82);
}
.mail-folder:hover, .mail-folder.active { background: rgba(255,255,255,.14); color: white; }
.full-width { width: 100%; margin-top: auto; background: rgba(255,255,255,.1); color: white; border-color: rgba(255,255,255,.2); }
.mail-list-pane {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  min-width: 0;
  border-inline-end: 1px solid var(--line);
  background: #f8fafc;
}
.mail-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.mail-toolbar h1 { margin: 0; font-size: 1.45rem; line-height: 1.1; }
.mail-toolbar p { margin: 4px 0 0; color: var(--muted); }
.button.compact { min-height: 38px; padding: 0 12px; font-size: .9rem; }
.mail-search { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.mail-list { overflow: auto; }
.mail-row {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: white;
}
.mail-row:hover, .mail-row.active { background: #eef6ff; }
.mail-row.unread strong::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-inline-end: 7px;
  border-radius: 999px;
  background: var(--blue);
}
.mail-row-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.mail-row-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row-head span, .mail-row-meta { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.mail-row p { margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mail-reader { min-width: 0; overflow: auto; background: white; }
.mail-reader-content { padding: clamp(22px, 4vw, 48px); }
.mail-reader-head { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 24px; }
.mail-reader-head h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); }
.mail-reader-head dl { display: grid; gap: 8px; margin: 18px 0 0; }
.mail-reader-head dl div { display: grid; grid-template-columns: 70px 1fr; gap: 12px; }
.mail-reader-head dt { color: var(--muted); font-weight: 900; }
.mail-reader-head dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.mail-body { max-width: 880px; font-size: 1.02rem; }
.mail-empty-state, .mail-empty-list {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 260px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}
.mail-empty-state { min-height: 100%; }
.mail-empty-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--aqua));
  font-size: 2rem;
}
.compose-panel { padding: clamp(20px, 4vw, 40px); }
.compose-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; }
.compose-head h2 { font-size: 1.7rem; }

.site-footer {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 28px clamp(20px, 5vw, 72px);
  color: var(--muted);
  background: white;
  border-top: 1px solid var(--line);
}

@media (max-width: 920px) {
  .site-header { grid-template-columns: 1fr; }
  nav { justify-content: start; flex-wrap: wrap; }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 420px; }
  .feature-grid, .post-grid, .screens-grid, .form-grid { grid-template-columns: 1fr; }
  .webmail-app { grid-template-columns: 1fr; }
  .mail-sidebar { border-radius: 0; }
  .mail-list-pane { border-inline-end: 0; }
}
