/* ==========================================================================
   PROCESA Pilot 07 — «Личный ИИ-ассистент: один день с настроенным ИИ».
   Эстетика Calm Planner: тёплая бумага, шалфейный акцент, мягкие скругления,
   тихие тени. Nunito — текст, Prata (italic) — акценты в заголовках и цифрах.
   ========================================================================== */

:root {
  --bg: #FAF7F2;
  --card: #FFFFFF;
  --ink: #3D3A34;
  --mut: #8A857B;
  --sage: #5F7A6A;
  --sage-deep: #4A6355;
  --sage-soft: #EDF1EC;
  --line: #E9E2D6;
  --tint: #F6F2EA;
  --tint-soft: #FBF9F4;
  --shadow: 0 1px 2px rgba(61, 58, 52, 0.04), 0 10px 30px rgba(61, 58, 52, 0.07);
  --r: 14px;
  --r-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- шапка ---------- */

.pilot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 36px;
  border-bottom: 1px solid var(--line);
}

.pilot-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--ink);
}

.pilot-brand .mark { color: var(--sage); display: inline-flex; }
.pilot-brand em { font-style: normal; color: var(--sage); }

.pilot-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--mut);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
}

/* ---------- каркас ---------- */

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 44px 36px 0;
}

.pilot-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
}

.pilot-kicker b { color: var(--mut); font-weight: 800; }

.pilot-title {
  margin-top: 14px;
  font-size: clamp(30px, 4.2vw, 44px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.01em;
  max-width: 21ch;
}

.pilot-title em {
  font-family: 'Prata', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--sage-deep);
  font-size: 1.05em;
}

.pilot-lead {
  margin-top: 16px;
  max-width: 62ch;
  font-size: 17px;
  color: var(--mut);
}

.pilot-lead b { color: var(--ink); font-weight: 700; }

/* ---------- карточка дня ---------- */

.app-card {
  margin-top: 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
  flex-wrap: wrap;
  padding: 22px 28px 20px;
}

.dh-left { min-width: 240px; }

.day-label {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
}

.day-sub {
  margin-top: 5px;
  font-size: 14px;
  color: var(--mut);
}

.dh-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-left: auto;
}

.timer { text-align: right; }

.timer-val {
  font-family: 'Prata', Georgia, serif;
  font-style: italic;
  font-size: 38px;
  line-height: 1;
  color: var(--sage-deep);
}

.timer-cap {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mut);
}

/* переключатель */

.switch-box {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.switch-box .sw-label {
  font-size: 14px;
  font-weight: 700;
  max-width: 11ch;
  line-height: 1.3;
}

.switch {
  position: relative;
  width: 52px;
  height: 30px;
  flex: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.sw-track {
  position: absolute;
  inset: 0;
  background: #E4DDCF;
  border-radius: 999px;
  transition: background 0.25s ease;
}

.sw-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(61, 58, 52, 0.25);
  transition: transform 0.25s ease;
}

.switch input:checked ~ .sw-track { background: var(--sage); }
.switch input:checked ~ .sw-knob { transform: translateX(22px); }
.switch input:focus-visible ~ .sw-track { outline: 2px solid var(--sage); outline-offset: 2px; }

/* прогресс дня */

.day-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 28px 20px;
}

.track {
  flex: 1;
  height: 6px;
  background: var(--tint);
  border-radius: 999px;
  overflow: hidden;
}

.fill {
  height: 100%;
  width: 100%;
  background: #CFC6B4;
  border-radius: 999px;
  transition: width 0.6s ease, background 0.4s ease;
}

.fill.low { background: var(--sage); }

.day-bar-note {
  font-size: 12px;
  font-weight: 600;
  color: var(--mut);
  white-space: nowrap;
}

/* ---------- задачи ---------- */

.task-list { padding: 4px 20px 22px; }

.task + .task { margin-top: 4px; }

.task-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 4px 18px;
  align-items: start;
  padding: 13px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.18s ease;
}

.task-row:hover { background: var(--tint-soft); }
.task.open .task-row { background: var(--tint-soft); }

.t-time {
  padding-top: 3px;
  font-size: 13px;
  font-weight: 800;
  color: var(--mut);
  font-variant-numeric: tabular-nums;
}

.t-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.t-title { font-size: 15.5px; font-weight: 700; line-height: 1.35; }

.t-detail { font-size: 13.5px; color: var(--mut); line-height: 1.4; }

.t-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding-top: 1px;
}

.t-min {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--mut);
  background: var(--tint);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}

.t-min.done {
  color: var(--sage-deep);
  background: var(--sage-soft);
}

.t-min.done svg { flex: none; }

.t-who { font-size: 11.5px; font-weight: 700; color: var(--sage); white-space: nowrap; }

/* закрытая задача — спокойная отметка слева от времени */

.task.done .task-row { background: transparent; }
.task.done .task-row:hover { background: var(--tint-soft); }
.task.done .t-time { color: #B9B2A4; }

/* ---------- раскрытая задача ---------- */

.task-detail {
  margin: 2px 14px 14px 80px;
}

.result-card,
.manual-card {
  background: var(--tint-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 16px 18px;
}

.result-card { border-left: 3px solid var(--sage); }

.r-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.r-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage-deep);
  background: var(--sage-soft);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.r-label { font-size: 15px; font-weight: 800; }

.r-items {
  margin: 12px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  line-height: 1.5;
}

.r-note {
  margin-top: 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--mut);
}

.m-head { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mut); }

.m-steps {
  margin: 10px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.m-note {
  margin-top: 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--mut);
}

/* ---------- итог дня ---------- */

.day-summary {
  display: none;
  margin: 0 20px 22px;
  padding: 18px 22px;
  background: var(--sage-soft);
  border-radius: var(--r-sm);
  align-items: center;
  gap: 20px;
}

.day-summary.show { display: flex; }

.s-num {
  font-family: 'Prata', Georgia, serif;
  font-style: italic;
  font-size: 34px;
  line-height: 1;
  color: var(--sage-deep);
  white-space: nowrap;
}

.s-text { font-size: 14px; line-height: 1.55; color: var(--ink); }

/* ---------- секции ---------- */

.section { margin-top: 52px; }

.section-head h2 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.005em;
}

.section-head .sub {
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--mut);
  max-width: 70ch;
}

/* ассистенты */

.a-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.a-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.a-icon { color: var(--sage); }

.a-name { font-size: 15.5px; font-weight: 800; }

.a-desc { font-size: 13.5px; line-height: 1.5; color: var(--mut); flex: 1; }

.a-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--sage-deep);
  background: var(--sage-soft);
  border-radius: 999px;
  padding: 4px 11px;
}

.a-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
}

/* промпты */

.p-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.p-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.p-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.p-title { font-size: 15.5px; font-weight: 800; }

.p-use { margin-top: 3px; font-size: 12.5px; color: var(--mut); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--sage-deep);
  background: transparent;
  border: 1px solid var(--sage);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.copy-btn:hover { background: var(--sage-soft); }
.copy-btn:active { transform: translateY(1px); }

.p-text {
  background: var(--tint-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 13px 15px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
  flex: 1;
}

/* ---------- плашка услуги ---------- */

.cta {
  margin: 52px 0 0;
  background: var(--sage-deep);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  color: #F4F2EB;
  padding: 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-title { font-size: 20px; font-weight: 800; }

.cta-sub {
  margin-top: 6px;
  font-size: 14px;
  color: rgba(244, 242, 235, 0.78);
  max-width: 52ch;
}

.cta-prices {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13.5px;
  font-weight: 700;
}

.cta-prices span { white-space: nowrap; }

.cta-prices i {
  font-style: normal;
  color: rgba(244, 242, 235, 0.55);
  font-weight: 600;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  color: var(--sage-deep);
  font-size: 14.5px;
  font-weight: 800;
  text-decoration: none;
  border-radius: 999px;
  padding: 14px 26px;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* ---------- подвал ---------- */

.footer-note {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  padding: 20px 36px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--mut);
  letter-spacing: 0.04em;
}

.footer-note b { font-weight: 800; color: var(--ink); letter-spacing: 0.12em; }

/* ---------- тост ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: var(--bg);
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(61, 58, 52, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- адаптив ---------- */

@media (max-width: 1020px) {
  .a-grid { grid-template-columns: repeat(2, 1fr); }
  .day-head { align-items: flex-start; }
  .dh-right { margin-left: 0; }
}

@media (max-width: 720px) {
  .wrap { padding: 32px 18px 0; }
  .pilot-header { padding: 16px 18px; }
  .footer-note { padding: 18px 18px 26px; }
  .a-grid, .p-grid { grid-template-columns: 1fr; }
  .task-row { grid-template-columns: 44px 1fr; }
  .t-side { grid-column: 2; flex-direction: row; align-items: center; }
  .task-detail { margin-left: 14px; }
  .day-summary { flex-direction: column; align-items: flex-start; gap: 8px; }
  .timer { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
