/* Kupaly — design tokens */
:root {
  --color-light: #FAFAFF;
  --color-primary: #4B0082;
  --color-electric-violet: #8A2BE2;
  --color-deep-night: #1A1E2A;
  --color-text: #1A1E2A;
  --color-text-muted: #5C6370;
  --color-border: #E4E4EA;
  --color-card-muted: #F4F4F8;
  --color-white: #FFFFFF;
  --radius-standard: 5px;
  --radius-muted: 8px;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --max-width: 1120px;
  --section-padding: clamp(3rem, 6vw, 5rem);
}

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

html {
  scroll-behavior: smooth;
}

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

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* Typography */
.section-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-electric-violet);
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

h1, h2, h3 {
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  color: var(--color-primary);
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  color: var(--color-primary);
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

p {
  color: var(--color-text-muted);
}

/* Layout */
.container {
  width: min(var(--max-width), calc(100% - 2rem));
  margin-inline: auto;
}

section {
  padding-block: var(--section-padding);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-standard);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: #3d0069;
  box-shadow: 0 4px 14px rgba(75, 0, 130, 0.3);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-card-muted);
}

.btn-violet {
  background: var(--color-electric-violet);
  color: var(--color-white);
}

.btn-violet:hover {
  background: #7620c4;
  box-shadow: 0 4px 14px rgba(138, 43, 226, 0.35);
}

.text-link {
  font-weight: 500;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.text-link:hover {
  color: var(--color-electric-violet);
}

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

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary);
}

.nav-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.nav-links a.btn-primary,
.nav-links a.btn-primary:hover {
  color: var(--color-white);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.625rem;
  min-width: 44px;
  min-height: 44px;
  color: var(--color-primary);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* Hero */
.hero {
  padding-block: clamp(2.5rem, 5vw, 4rem) var(--section-padding);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-mascot {
  display: flex;
  justify-content: center;
}

.hero-mascot img {
  width: min(100%, 340px);
  height: auto;
}

.hero-content .subtitle {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.0625rem;
  margin-bottom: 2rem;
  max-width: 32rem;
}

.preview-callout {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-primary);
  background: rgba(138, 43, 226, 0.08);
  border: 1px solid rgba(138, 43, 226, 0.2);
  border-radius: var(--radius-muted);
  padding: 0.625rem 1rem;
  margin-bottom: 1.25rem;
  max-width: 32rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

/* Feature bar */
.feature-bar {
  padding-block: 2.5rem;
  border-block: 1px solid var(--color-border);
}

.feature-bar-grid {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.feature-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.feature-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-item h3 {
  color: var(--color-text);
  font-size: 1rem;
}

.feature-item p {
  font-size: 0.875rem;
}

/* Week with Kupaly */
.week-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.week-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-muted);
  padding: 1.75rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.week-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(75, 0, 130, 0.08);
  border-radius: var(--radius-standard);
  color: var(--color-primary);
}

.week-card-icon svg {
  width: 22px;
  height: 22px;
}

.week-card-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-electric-violet);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.week-card h3 {
  margin-bottom: 0.375rem;
}

.week-card p {
  font-size: 0.9375rem;
}

/* Workbench */
.workbench-intro {
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

.workbench-intro p {
  font-size: 1.0625rem;
  margin-top: 0.75rem;
}

.workbench-mockup {
  border-radius: var(--radius-muted);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: 0 20px 60px rgba(26, 30, 42, 0.12);
  background: var(--color-deep-night);
  max-width: 100%;
}

.mockup-window-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: #12151E;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.mockup-panes {
  display: grid;
  grid-template-columns: 180px 1fr 280px;
  min-height: 380px;
}

.mockup-pane {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1rem;
  overflow: hidden;
}

.mockup-pane:last-child {
  border-right: none;
}

.mockup-pane-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.875rem;
}

/* Team pane */
.team-member {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-standard);
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
}

.team-member.active {
  background: rgba(138, 43, 226, 0.2);
  color: white;
}

.team-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8A2BE2, #4B0082);
  flex-shrink: 0;
  font-size: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34D399;
  margin-left: auto;
}

/* Assistant pane */
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-bubble {
  max-width: 85%;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.chat-bubble.assistant {
  background: rgba(138, 43, 226, 0.25);
  color: rgba(255, 255, 255, 0.9);
  align-self: flex-start;
}

.chat-bubble.user {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  align-self: flex-end;
}

.chat-input {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-input-fake {
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-standard);
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.3);
}

/* Rota pane */
.rota-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 0.75rem;
}

.rota-day {
  text-align: center;
  font-size: 0.625rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

.rota-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rota-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0.5rem;
  align-items: center;
}

.rota-name {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rota-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  height: 22px;
}

.rota-bar {
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
}

.rota-bar.filled {
  background: linear-gradient(180deg, #2DD4BF, #14B8A6);
}

.rota-bar.partial {
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.5), rgba(20, 184, 166, 0.5));
}

/* UK shift work */
.uk-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.uk-card {
  background: var(--color-card-muted);
  border-radius: var(--radius-muted);
  padding: 1.5rem;
}

.uk-card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.uk-card-icon svg {
  width: 24px;
  height: 24px;
}

.uk-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.uk-card p {
  font-size: 0.875rem;
}

/* Comparison table — mobile section, visible on all */
.comparison {
  background: var(--color-white);
}

.comparison-table {
  margin-top: 2rem;
  border-radius: var(--radius-muted);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.comparison-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.comparison-row.header {
  font-weight: 600;
  font-size: 0.9375rem;
}

.comparison-cell {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--color-border);
}

.comparison-cell:first-child {
  background: var(--color-card-muted);
  color: var(--color-text-muted);
  border-right: 1px solid var(--color-border);
}

.comparison-cell:last-child {
  background: rgba(138, 43, 226, 0.06);
  color: var(--color-text);
}

.comparison-row:last-child .comparison-cell {
  border-bottom: none;
}

.comparison-row.header .comparison-cell {
  padding-block: 1.125rem;
  border-bottom: 1px solid var(--color-border);
}

.comparison-row.header .comparison-cell:first-child {
  color: var(--color-text-muted);
}

.comparison-row.header .comparison-cell:last-child {
  color: var(--color-primary);
}

/* FAQ Accordion */
.faq-list {
  margin-top: 2rem;
  max-width: 720px;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: 0.875rem 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
}

.faq-question svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  transition: transform 0.25s;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 200px;
  padding-bottom: 1.25rem;
}

.faq-answer p {
  font-size: 0.9375rem;
}

/* CTA Footer section */
.cta-section {
  background: linear-gradient(135deg, rgba(75, 0, 130, 0.06), rgba(138, 43, 226, 0.08));
  text-align: center;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.cta-mascot {
  width: 120px;
  height: auto;
}

.cta-section h2 {
  max-width: 28rem;
}

.cta-section p {
  font-size: 1.0625rem;
  max-width: 32rem;
}

/* Dark hero variant */
.hero-dark {
  background: var(--color-deep-night);
  color: var(--color-white);
}

.hero-dark h1,
.hero-dark .section-label {
  color: var(--color-white);
}

.hero-dark .section-label {
  color: var(--color-electric-violet);
}

.hero-dark .subtitle {
  color: rgba(255, 255, 255, 0.9);
}

.hero-dark p {
  color: rgba(255, 255, 255, 0.65);
}

.hero-dark .text-link {
  color: var(--color-electric-violet);
}

.hero-dark-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-dark-grid .hero-mascot {
  order: 2;
}

.hero-dark-grid .hero-content {
  order: 1;
}

/* Site footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: center;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* Company block */
.company-section {
  padding-block: 2.5rem;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
}

.company-section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.company-section p {
  font-size: 0.9375rem;
  max-width: 36rem;
}

.company-section p + p {
  margin-top: 0.5rem;
}

.company-section a {
  color: var(--color-primary);
  font-weight: 500;
}

.company-section a:hover {
  color: var(--color-electric-violet);
}

/* Legal pages */
.legal-page {
  padding-block: clamp(2rem, 4vw, 3rem) var(--section-padding);
}

.legal-content {
  max-width: 48rem;
}

.legal-content h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 1rem;
}

.legal-version {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-primary);
  background: rgba(138, 43, 226, 0.08);
  border: 1px solid rgba(138, 43, 226, 0.2);
  border-radius: var(--radius-muted);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.legal-version code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(75, 0, 130, 0.08);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
}

.legal-content h2 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-content h3 {
  font-size: 1.0625rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.legal-content p,
.legal-content li {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.legal-content p + p {
  margin-top: 0.75rem;
}

.legal-content ul,
.legal-content ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.legal-content ol {
  list-style: decimal;
}

.legal-content li + li {
  margin-top: 0.375rem;
}

.legal-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block: 2rem;
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 1rem;
  font-size: 0.875rem;
}

.legal-content th,
.legal-content td {
  border: 1px solid var(--color-border);
  padding: 0.625rem 0.875rem;
  text-align: left;
  vertical-align: top;
}

.legal-content th {
  background: var(--color-card-muted);
  font-weight: 600;
  color: var(--color-text);
}

.legal-content td {
  color: var(--color-text-muted);
}

.legal-content a {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--color-electric-violet);
}

.legal-content em {
  font-style: italic;
  color: var(--color-text-muted);
}

.nav-links-legal a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.nav-links-legal a:hover {
  color: var(--color-primary);
}

/* Section headings */
.section-header {
  margin-bottom: 0.5rem;
}

.section-header p {
  margin-top: 0.75rem;
  font-size: 1.0625rem;
  max-width: 36rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-grid,
  .hero-dark-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-mascot {
    order: -1;
  }

  .hero-mascot img {
    width: min(240px, 65vw);
  }

  .hero-content p,
  .preview-callout,
  .hero-ctas,
  .workbench-intro {
    margin-inline: auto;
  }

  .preview-callout {
    display: block;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-dark-grid .hero-mascot {
    order: -1;
  }

  .hero-dark-grid .hero-content {
    order: 0;
  }

  .feature-bar-grid {
    flex-direction: column;
    gap: 1.75rem;
  }

  .feature-item {
    flex: none;
    width: 100%;
    align-items: center;
    text-align: center;
  }

  .week-grid {
    grid-template-columns: 1fr;
  }

  .uk-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .workbench-mockup {
    width: 100%;
  }

  .mockup-panes {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .mockup-pane-team,
  .mockup-pane-rota {
    display: none;
  }

  .mockup-pane-assistant {
    min-height: 280px;
    display: flex;
    flex-direction: column;
  }

  .mockup-pane {
    min-width: 0;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem 1rem 1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links .btn {
    margin-top: 0.75rem;
    width: 100%;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav {
    position: relative;
  }

  .uk-cards {
    grid-template-columns: 1fr;
  }

  .comparison-row {
    grid-template-columns: 1fr;
  }

  .comparison-cell:first-child {
    border-right: none;
    border-bottom: none;
    font-weight: 600;
    font-size: 0.8125rem;
    padding-bottom: 0.25rem;
    background: var(--color-card-muted);
  }

  .comparison-cell:last-child {
    padding-top: 0.25rem;
  }

  .comparison-row.header {
    display: none;
  }
}

@media (max-width: 480px) {
  :root {
    --section-padding: clamp(2.25rem, 8vw, 3rem);
  }

  .container {
    width: min(var(--max-width), calc(100% - 1.5rem));
  }

  .hero {
    padding-block: clamp(1.75rem, 6vw, 2.5rem) var(--section-padding);
  }

  .hero-mascot img {
    width: min(200px, 58vw);
  }

  .hero-content p {
    font-size: 1rem;
  }

  .preview-callout {
    font-size: 0.875rem;
    padding: 0.5rem 0.875rem;
  }

  .feature-bar {
    padding-block: 2rem;
  }

  .week-card {
    padding: 1.25rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .mockup-pane-assistant {
    min-height: 240px;
    padding: 0.875rem;
  }

  .chat-bubble {
    font-size: 0.75rem;
  }

  .cta-mascot {
    width: 96px;
  }

  .footer-links {
    gap: 0.75rem 1.25rem;
  }
}
