/* ==========================================================================
   Koshalta — Universal styles
   ========================================================================== */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at top, #1e1e2f, #0b0b12);
  color: #ffffff;
  min-height: 100vh;
}

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

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  animation: fadeUp 1s ease forwards;
}

.container--narrow {
  max-width: 640px;
  padding: 2rem;
  text-align: center;
}

.container--narrow.body-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Logo & brand
   -------------------------------------------------------------------------- */

.logo,
.logo-wrap {
  width: 64px;
  height: auto;
  margin-bottom: 1.5rem;
  opacity: 0.9;
  filter: brightness(1.2) contrast(1.1);
}

.logo-wrap {
  width: 56px;
  margin-bottom: 1rem;
  opacity: 0.95;
}

.logo-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

.brand {
  font-size: 0.9rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 1.2rem;
}

.brand--small {
  font-size: 0.85rem;
  opacity: 0.55;
  margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1 {
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

h1.page-title--large {
  font-size: clamp(3rem, 7vw, 4.5rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.35rem;
  margin-top: 3rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
}

h2.section--first { margin-top: 3.5rem; margin-bottom: 1rem; }

h3 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

p {
  font-size: 1.05rem;
  line-height: 1.7;
  opacity: 0.88;
  margin: 0 0 1rem 0;
}

.lead {
  font-size: 1.15rem;
  line-height: 1.7;
  opacity: 0.9;
  margin-bottom: 2.5rem;
  max-width: 720px;
}

ul {
  margin: 0.5rem 0 1rem 1.25rem;
  padding: 0;
  opacity: 0.88;
}

ul.max-width {
  margin-left: 1.2rem;
  max-width: 760px;
  opacity: 0.85;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

ul.max-width li { margin-bottom: 0.6rem; }

/* --------------------------------------------------------------------------
   Footer & links
   -------------------------------------------------------------------------- */

.footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  opacity: 0.45;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer--no-border { border-top: none; padding-top: 0; }
.footer--space { margin-top: 5rem; }
.footer--center { text-align: center; padding-bottom: 2rem; }

.footer a {
  color: inherit;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.footer a:hover { opacity: 1; }

/* --------------------------------------------------------------------------
   Cards & grid
   -------------------------------------------------------------------------- */

.card {
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 1.8rem;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(10px);
  border-left: 4px solid rgba(108, 242, 194, 0.5);
}

.card p {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.card p:last-child { margin-bottom: 0; }

.card .how-to {
  margin-top: 0.75rem;
  padding-left: 0.25rem;
}

.card .how-to strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.card ul { margin-bottom: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* --------------------------------------------------------------------------
   Home page — form & CTA
   -------------------------------------------------------------------------- */

body.home-page {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

body.home-page .container {
  max-width: 640px;
  padding: 2rem;
  text-align: center;
}

body.home-page .logo { width: 64px; margin-bottom: 1.5rem; }
body.home-page .brand { margin-bottom: 1.2rem; }
body.home-page h1 { font-size: clamp(3rem, 7vw, 4.5rem); margin-bottom: 1rem; }
body.home-page p { font-size: 1.1rem; margin-bottom: 2.5rem; }
body.home-page .footer { margin-top: 3rem; font-size: 0.85rem; }

  padding: 0.95rem 1rem;
  border-radius: 10px;
  border: none;
  outline: none;
  font-size: 1rem;
  min-width: 240px;
}

button {
  padding: 0.95rem 1.5rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #6cf2c2, #4dd2ff);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(77,210,255,0.35);
}

/* --------------------------------------------------------------------------
   About page — content width
   -------------------------------------------------------------------------- */

p.max-width { max-width: 760px; }

/* About page */
body.about-page .logo { width: 48px; margin-bottom: 1rem; }
body.about-page .brand { font-size: 0.85rem; opacity: 0.55; margin-bottom: 1rem; }
body.about-page h1 { font-size: clamp(2.8rem, 6vw, 3.6rem); margin-bottom: 2rem; }
body.about-page h2 { margin-top: 3.5rem; margin-bottom: 1rem; }
body.about-page p { max-width: 760px; }
body.about-page ul { margin-left: 1.2rem; max-width: 760px; }
body.about-page .footer { margin-top: 5rem; font-size: 0.8rem; border-top: none; padding-top: 0; }

/* --------------------------------------------------------------------------
   Tasks page
   -------------------------------------------------------------------------- */

body.tasks-page { padding: 2rem; overflow-x: hidden; }
body.tasks-page .container { padding: 0; }

.header {
  text-align: center;
  margin-bottom: 3rem;
  padding-top: 2rem;
}

.tasks-page .logo { width: 64px; margin-bottom: 1.5rem; }

.intro {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.intro h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  margin-top: 0;
  color: #6cf2c2;
}

.intro p {
  font-size: 1rem;
  opacity: 0.85;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.guidelines {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.guidelines li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  opacity: 0.85;
  line-height: 1.6;
}

.guidelines li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #4dd2ff;
}

.task {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.task:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(77,210,255,0.15);
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.task-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: #6cf2c2;
}

.task-meta { display: flex; gap: 1rem; flex-wrap: wrap; }

.badge {
  background: rgba(108, 242, 194, 0.15);
  color: #6cf2c2;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.time-badge {
  background: rgba(77, 210, 255, 0.15);
  color: #4dd2ff;
}

.task-content p {
  font-size: 1rem;
  opacity: 0.85;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.section { margin-top: 1.5rem; }

.section-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #4dd2ff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.section-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  opacity: 0.85;
  line-height: 1.6;
  font-size: 0.95rem;
}

.section-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #6cf2c2;
  font-weight: bold;
}

@media (max-width: 768px) {
  body.tasks-page { padding: 1rem; }
  .task-header { flex-direction: column; }
  .task-meta { width: 100%; }
}

body.brief-page .container { max-width: 860px; padding: 3rem 2rem 5rem; }

/* --------------------------------------------------------------------------
   Brief page — TL;DR, screenshots, sections
   -------------------------------------------------------------------------- */

.capsule {
  display: inline-block;
  background: rgba(108, 242, 194, 0.12);
  color: #6cf2c2;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

hr.section-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin: 2.5rem 0;
}

.role-section { margin-top: 1.5rem; }
.role-section h3 { margin-top: 1.25rem; }

.tldr {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.tldr-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.6rem;
}

.tldr p { margin: 0.35rem 0; font-size: 1rem; }

.screenshot-figure {
  margin: 1.5rem 0 2rem 0;
  max-width: 100%;
}

.screenshot-figure img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  display: block;
  background: rgba(0,0,0,0.2);
}

.figcaption {
  font-size: 0.95rem;
  opacity: 0.88;
  margin-top: 0.6rem;
  margin-bottom: 0.25rem;
  line-height: 1.5;
}

.annotation {
  font-size: 0.85rem;
  opacity: 0.7;
  font-style: italic;
  margin-top: 0.25rem;
}

.figcaption code {
  background: rgba(255,255,255,0.12);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2rem 0;
}

.screenshot-grid .screenshot-figure { margin: 0; }

/* --------------------------------------------------------------------------
   Print (brief / PDF export)
   -------------------------------------------------------------------------- */

@media print {
  body {
    background: #fff !important;
    color: #1a1a1a !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .container { padding: 1rem 0; }
  .brand, .brand--small { color: #444 !important; opacity: 1; }
  h1, h2, h3 { color: #1a1a1a !important; }
  .lead, p, li, .card p, .card li, .card .how-to strong,
  .task-content p, .intro p, .section-list li, .guidelines li {
    color: #333 !important;
    opacity: 1 !important;
  }
  .card {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6;
    border-left: 4px solid #0d6efd;
    break-inside: avoid;
  }
  .capsule {
    background: #e7f1ff !important;
    color: #0d6efd !important;
  }
  .footer {
    border-top-color: #dee2e6;
    color: #666 !important;
    opacity: 1;
  }
  .logo, .logo-wrap { opacity: 1; filter: none; }
  .logo-wrap .book-front, .logo-wrap .book-back, .logo-wrap .spine-line { stroke: #495057; }
  .logo-wrap .eye { stroke: #0d6efd; }
  .logo-wrap .core { fill: #495057; }
  .page-break { page-break-before: always; }
  hr.section-divider { border-top-color: #dee2e6; }
  .tldr {
    background: #f0f4f8 !important;
    border-color: #dee2e6 !important;
  }
  .tldr-label, .tldr p { color: #333 !important; opacity: 1; }
  .screenshot-figure img { border-color: #dee2e6; }
  .figcaption, .annotation { color: #444 !important; opacity: 1; }
  .figcaption code { background: #e9ecef !important; color: #333; }
  .task, .intro { border-color: #dee2e6; background: #f8f9fa !important; }
  .task-title, .intro h2 { color: #0d6efd !important; }
  .badge, .time-badge { background: #e7f1ff !important; color: #0d6efd !important; }
}

/* --------------------------------------------------------------------------
   Animation
   -------------------------------------------------------------------------- */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
