/* ShepTone site — design tokens and components from docs/Website-Design-Brief.md
   (Violet theme, Theme.swift). Landing design: "ShepTone Landing B". */

:root {
  --bg: #F5F3FB;
  --ink: #26223A;
  --ink-72: rgba(38, 34, 58, 0.72);
  --ink-55: rgba(38, 34, 58, 0.55);
  --ink-12: rgba(38, 34, 58, 0.12);
  --ink-08: rgba(38, 34, 58, 0.08);
  --accent: #8566ED;
  --accent-2: #6185F2;
  --accent-10: rgba(133, 102, 237, 0.10);
  --success: #4CC785;
  --white-85: rgba(255, 255, 255, 0.85);
  --white-72: rgba(255, 255, 255, 0.72);
  --white-55: rgba(255, 255, 255, 0.55);
  --white-25: rgba(255, 255, 255, 0.25);
  --white-12: rgba(255, 255, 255, 0.12);
  --grad-btn: linear-gradient(90deg, #6185F2, #8566ED);
  --grad-violet: linear-gradient(135deg, #7D73C7 0%, #9E8FDB 52%, #C7BDEB 100%);
  --r-card: 18px;
  --r-sm: 12px;
  --r-field: 8px;
  --shadow-card: 0 8px 14px rgba(38, 34, 58, 0.05);
  --shadow-deep: 0 8px 14px rgba(0, 0, 0, 0.12);
  --shadow-btn: 0 5px 10px rgba(133, 102, 237, 0.35);
  --font: -apple-system, "SF Pro Display", "SF Pro Text", Inter, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

@keyframes breathe {
  0%, 100% { transform: scale(0.85); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
  .glow { animation: none !important; }
}

summary::-webkit-details-marker { display: none; }

/* ---- Layout ---- */

.wrap { max-width: 1000px; margin: 0 auto; padding: 22px 22px 42px; display: flex; flex-direction: column; gap: 56px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }

.section { display: flex; flex-direction: column; gap: 18px; }
.section-head { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--ink-12); padding-bottom: 10px; }
.section-head .num { font-size: 11px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.section-head h2 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }

/* ---- Landing header ---- */

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(245, 243, 251, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--ink-08);
}
.site-header .inner {
  max-width: 1000px; margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; }
.brand img { width: 32px; height: 32px; display: block; }
.brand span { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.site-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-nav a { font-size: 12px; font-weight: 600; color: var(--ink-72); }
.site-nav a:hover { color: var(--accent); }

/* ---- Buttons (hierarchy per brief §3.4/3.5: one primary per block) ---- */

.btn-primary {
  display: block; text-align: center;
  font-size: 14px; font-weight: 600; color: #FFFFFF;
  background: var(--grad-btn);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px; padding: 11px 18px;
  box-shadow: var(--shadow-btn);
  cursor: pointer; font-family: inherit;
  transition: transform 0.12s ease;
}
.btn-primary:hover { color: #FFFFFF; }
.btn-primary:active { transform: scale(0.97); }

.btn-primary-compact { display: inline-block; font-size: 12px; padding: 7px 14px; }

.btn-secondary {
  display: block; text-align: center;
  font-size: 13px; font-weight: 600; color: var(--accent);
  background: #FFFFFF;
  border: 1px solid rgba(133, 102, 237, 0.18);
  border-radius: 999px; padding: 10px 16px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.06);
  cursor: pointer; font-family: inherit;
}

.btn-on-violet {
  display: block; text-align: center;
  font-size: 13px; font-weight: 600; color: var(--accent);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(133, 102, 237, 0.18);
  border-radius: 999px; padding: 10px 16px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.10);
}

.pill-link {
  font-size: 11.5px; font-weight: 600; color: var(--accent);
  background: rgba(255, 255, 255, 0.88);
  padding: 4px 10px; border-radius: 999px;
}

.chip {
  font-size: 10px; font-weight: 600; color: var(--ink-72);
  background: var(--accent-10); border-radius: 999px; padding: 5px 10px;
}
.chip-on-violet { color: #FFFFFF; background: var(--white-12); }
.lang-chip { font-size: 12px; font-weight: 600; background: var(--accent-10); border-radius: 999px; padding: 7px 12px; }

/* ---- Cards ---- */

.card {
  background: #FFFFFF; border: 1px solid var(--ink-08);
  border-radius: var(--r-card); box-shadow: var(--shadow-card);
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.card-plain { box-shadow: none; }
.card-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent); }
.card h3 { margin: 0; font-size: 18px; font-weight: 700; }
.card p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-72); }

.glass {
  background: var(--white-12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--white-25);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-deep);
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
}

/* ---- Violet gradient panel / pages ---- */

.violet-panel {
  border-radius: var(--r-card);
  background: var(--grad-violet);
  color: #FFFFFF; padding: 30px;
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: var(--shadow-deep);
  position: relative; overflow: hidden;
}

.violet-page {
  min-height: 100vh;
  background: var(--grad-violet);
  background-attachment: fixed;
  color: #FFFFFF;
  padding: 22px 22px 42px;
}
.violet-page a { color: #FFFFFF; }
.violet-page .pill-link,
.violet-page .btn-on-violet { color: var(--accent); }
.violet-page .pill-link:hover,
.violet-page .btn-on-violet:hover { color: var(--accent-2); }

.gradient-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gradient-footer { border-top: 1px solid var(--white-25); padding-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }

.glow {
  position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.35); filter: blur(24px);
  animation: breathe 2.2s ease-in-out infinite; pointer-events: none;
}

/* ---- Grids ---- */

.grid-auto-270 { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.grid-auto-230 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.grid-auto-290 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }

/* ---- FAQ ---- */

.faq details {
  background: #FFFFFF; border: 1px solid var(--ink-08);
  border-radius: var(--r-sm); padding: 12px 14px;
}
.faq summary { font-size: 13px; font-weight: 600; cursor: pointer; list-style: none; }
.faq details p { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-72); }
.faq { display: flex; flex-direction: column; gap: 6px; }

code { font-family: var(--mono); }

/* ---- Landing footer ---- */

.site-footer {
  display: flex; flex-wrap: wrap; gap: 14px;
  justify-content: space-between; align-items: center;
  border-top: 1px solid var(--ink-12); padding-top: 18px;
}
.site-footer .note { font-size: 11.5px; color: var(--ink-55); }
.site-footer a { font-size: 11.5px; font-weight: 600; }
.site-footer .links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---- Price cards ---- */

.price-card { position: relative; }
.price-card .amount { font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.price-card .term { font-size: 12px; color: var(--ink-72); }
.price-card .rule { height: 1px; background: var(--ink-12); }
.price-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.price-card .fine { margin: 0; font-size: 11.5px; color: var(--ink-55); text-align: center; }
.price-featured { border: 1px solid rgba(133, 102, 237, 0.45); box-shadow: 0 8px 14px rgba(133, 102, 237, 0.18); }
/* Promo: old price struck through next to the current one */
.amount-old {
  font-size: 26px; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: var(--ink-55);
  text-decoration: line-through; text-decoration-thickness: 2px;
}
.violet-page .amount-old { color: var(--white-55); }
.price-badge {
  position: absolute; top: -9px; right: 14px;
  font-size: 10px; font-weight: 600; color: #FFFFFF;
  background: var(--grad-btn); border-radius: 999px; padding: 4px 10px;
}

/* ---- App-UI mocks (styled after the real app: PopoverView.swift / Theme.swift;
       replace with real screenshots when taken — brief §8) ---- */

/* Menu-bar popover replica */
.pop {
  width: 340px; max-width: 100%;
  border-radius: var(--r-card); padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
  color: #FFFFFF; text-align: left;
  background: linear-gradient(160deg, #9187D8 0%, #7D73C7 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
.pop-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.pop-head img { width: 24px; height: 24px; display: block; border-radius: 7px; }
.pop-head .name { font-size: 15px; font-weight: 700; }
.pop-chip {
  margin-left: auto; display: flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 600;
  background: var(--white-12); border-radius: 999px; padding: 4px 9px;
}
.pop-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); display: block; }
.pop-action {
  display: flex; align-items: center; gap: 9px;
  background: var(--white-12); border-radius: var(--r-sm); padding: 11px 12px;
}
.pop-action svg { flex: none; }
.pop-action b { font-size: 13.5px; font-weight: 600; }
.pop-key { margin-left: auto; font-size: 10.5px; color: var(--white-72); text-align: right; flex: none; }
.pop-meta { display: flex; align-items: center; gap: 8px; padding: 5px 6px; }
.pop-meta .lbl { font-size: 12.5px; font-weight: 600; display: flex; flex-direction: column; gap: 2px; }
.pop-meta .lbl small { font-size: 10.5px; font-weight: 400; color: var(--white-72); }
.pop-meta .val {
  margin-left: auto; display: flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 700;
}
.pop-meta .val svg { color: var(--white-72); }
.pop-toggle {
  margin-left: auto; width: 34px; height: 20px; flex: none;
  border-radius: 999px; background: var(--accent); padding: 2px;
  display: flex; justify-content: flex-end;
}
.pop-toggle i { width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.pop-last {
  background: var(--white-12); border-radius: 10px; padding: 10px 12px;
  font-size: 11.5px; line-height: 1.5; color: var(--white-85);
}
.pop-foot { display: flex; align-items: center; gap: 12px; padding: 4px 4px 0; font-size: 11.5px; font-weight: 600; }
.pop-foot .pill { background: rgba(255, 255, 255, 0.92); color: var(--accent); border-radius: 999px; padding: 4px 12px; }
.pop-foot .item { color: var(--white-72); }
.pop-foot .quit { margin-left: auto; color: var(--white-55); }

/* Transcript window replica (violet glass, like the app's windows) */
.mock {
  border-radius: var(--r-sm);
  background: linear-gradient(160deg, #9187D8 0%, #7D73C7 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  overflow: hidden; color: #FFFFFF;
  display: flex; flex-direction: column;
}
.mock-titlebar {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px; background: rgba(255, 255, 255, 0.10);
  border-bottom: 1px solid var(--white-25);
}
.mock-titlebar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.28); }
.mock-titlebar span { font-size: 11px; font-weight: 600; color: var(--white-72); margin-left: 4px; }
.mock-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.mock-line { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; line-height: 1.45; }
.mock-line .t { font-family: var(--mono); font-size: 10.5px; color: var(--white-55); flex: none; }
.mock-line .s { font-weight: 700; color: #FFFFFF; flex: none; }
.mock-line .x { color: var(--white-85); }
.mock .chip { color: #FFFFFF; background: var(--white-12); border: 1px solid var(--white-25); }

/* ---- Comparison tables ---- */

.compare-scroll { overflow-x: auto; border-radius: var(--r-card); }
.compare-table {
  width: 100%; min-width: 560px; border-collapse: separate; border-spacing: 0;
  background: #FFFFFF; border: 1px solid var(--ink-08);
  border-radius: var(--r-card); box-shadow: var(--shadow-card);
  font-size: 12.5px;
}
.compare-table th, .compare-table td {
  padding: 10px 12px; text-align: center; border-bottom: 1px solid var(--ink-08);
}
.compare-table tr:last-child th, .compare-table tr:last-child td { border-bottom: none; }
.compare-table thead th { font-size: 11.5px; font-weight: 600; color: var(--ink-72); }
.compare-table th[scope="row"], .compare-table td:first-child {
  text-align: left; font-weight: 600; color: var(--ink); font-size: 12.5px;
}
.compare-table .col-shep { background: var(--accent-10); font-weight: 600; }
.compare-table thead .col-shep { color: var(--accent); font-weight: 700; }
.compare-table .yes { color: var(--success); font-weight: 700; }
.compare-table .no { color: var(--ink-55); }
.compare-table .note { display: block; font-size: 10.5px; font-weight: 400; color: var(--ink-55); margin-top: 2px; }

/* ---- Language switcher ---- */

.lang-switch { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lang-switch a, .lang-switch span {
  font-size: 11px; font-weight: 600; border-radius: 999px; padding: 4px 10px;
}
.lang-switch a { color: var(--ink-72); background: var(--accent-10); }
.lang-switch a:hover { color: var(--accent); }
.lang-switch span { color: #FFFFFF; background: var(--grad-btn); }
.violet-page .lang-switch a { color: var(--accent); background: rgba(255, 255, 255, 0.88); }
.violet-page .lang-switch span { color: #FFFFFF; background: var(--white-12); border: 1px solid var(--white-25); }

/* ---- Long-form content (compare page) ---- */

.prose { display: flex; flex-direction: column; gap: 12px; max-width: 46em; }
.prose p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-72); }
.prose h2 { margin: 14px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.prose h3 { margin: 8px 0 0; font-size: 16px; font-weight: 700; }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.6; color: var(--ink-72); }

/* ---- Forms ---- */

.field {
  font-size: 14px; font-family: inherit; color: var(--ink);
  background: #FFFFFF; border: 1px solid var(--ink-12);
  border-radius: var(--r-field); padding: 11px 12px; width: 100%;
}
.field:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

/* ---- Responsive ---- */

.hero h1 { margin: 0; font-size: 52px; line-height: 1.02; font-weight: 700; letter-spacing: -0.03em; text-wrap: balance; }
@media (max-width: 640px) {
  .hero h1 { font-size: 36px; }
  .site-nav .nav-link { display: none; }
  .violet-panel { padding: 20px; }
}

/* ---- Hero: split layout (text left on one axis, product visual right) ---- */
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 28px;
  align-items: center;
  padding-top: 26px;
}
.hero-copy { display: flex; flex-direction: column; gap: 16px; }
.hero.hero-split h1 { font-size: clamp(34px, 4.6vw, 46px); }
@media (max-width: 840px) {
  .hero-split { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hero-copy .hero-cta { max-width: none; }
}
