:root {
  --bg-0: #ffffff;
  --bg-1: #f5f9ff;
  --bg-2: #eef5ff;
  --bg-3: #e6f0ff;
  --bg-4: #dce9ff;
  --bg-final: #f5f9ff;
  --text: rgba(0, 0, 0, 0.88);
  --text-muted: rgba(0, 0, 0, 0.6);
  --accent: #1677ff;
  --accent-hover: #4096ff;
  --accent-active: #0958d9;
  --border: #d9d9d9;

  --card-1: #e6f4ff;
  --card-2: #e8f5e9;
  --card-3: #eef2ff;
  --card-4: #fff1e6;
  --card-5: #e0f7fa;
  --card-6: #f0f5ff;

  --brand-gradient: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
  --brand-text: #ffffff;
  --nav-bg: #ffffff;
  --strip-bg: #f0f5ff;

  --topbar-h: 116px;
  --sidebar-w: 96px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg-0);
  line-height: 1.65;
}

main {
  padding-top: var(--topbar-h);
  padding-left: var(--sidebar-w);
  transition: padding-top 0.2s ease;
}

.screen {
  position: relative;
  min-height: calc(100vh - var(--topbar-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5em 6vw;
  transition: background 0.4s ease;
  overflow: hidden;
}
.screen[hidden] {
  display: none;
}
.screen::before,
.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bg-photo, url("assets/warehouse-photo.jpg"));
  background-size: cover;
  background-position: center;
  pointer-events: none;
  z-index: 0;
}
.screen::before {
  filter: grayscale(100%) brightness(1.35) contrast(0.7) blur(0.5px);
}
.screen::after {
  filter: grayscale(100%) invert(100%) blur(20px) brightness(1.05) contrast(0.75);
  mix-blend-mode: color-dodge;
  opacity: 0.7;
}
.screen > .content {
  position: relative;
  z-index: 1;
}

.screen-0 { background: var(--bg-0); --bg-photo: url("assets/bg-intro.jpg"); }
#postulate-1 { background: var(--bg-1); --bg-photo: url("assets/bg-chaos.jpg"); }
#postulate-2 { background: var(--bg-2); --bg-photo: url("assets/bg-documents.jpg"); }
#postulate-3 { background: var(--bg-3); --bg-photo: url("assets/bg-operations.jpg"); }
#postulate-4 { background: var(--bg-4); --bg-photo: url("assets/bg-checklist.jpg"); }
.screen-concept { background: var(--bg-final); --bg-photo: url("assets/bg-concept.jpg"); }
.screen-features { background: var(--bg-2); align-items: flex-start; --bg-photo: url("assets/bg-features.jpg"); }
.screen-final { background: var(--bg-final); --bg-photo: url("assets/bg-final.jpg"); }
.screen-demo { background: var(--bg-0); }

.content {
  max-width: 920px;
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 2.6em 3.4em;
}

.screen-0 p,
.screen-final p,
.postulate p {
  font-size: 1.15rem;
  color: var(--text);
  margin: 0 0 1.3em 0;
}

.screen-0 p:first-of-type,
.screen-final p:first-of-type {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--text);
}

.thesis {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.9em 0;
}

.checklist {
  padding-left: 1.3em;
  font-size: 1.1rem;
}
.checklist li {
  margin-bottom: 0.7em;
}

.continue-link {
  display: inline-block;
  margin-top: 1.5em;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.05rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.continue-link:hover {
  border-bottom-color: var(--accent);
}

.placeholder-note {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cta {
  display: inline-block;
  margin-top: 0.6em;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.8em 1.6em;
  border-radius: 6px;
  font-size: 1.05rem;
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.35);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.cta:hover {
  opacity: 0.9;
  box-shadow: 0 6px 16px rgba(22, 119, 255, 0.42);
  transform: translateY(-1px);
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}

.brand-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  background: linear-gradient(90deg, #f2f2f2 0%, #d9d9d9 50%, #f2f2f2 100%);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 0.4em 1em;
  border-bottom: 1px solid var(--border);
}
.brand-bar-icon {
  width: 30px;
  height: 30px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5em;
  padding: 0.45em 1.4em;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 640px) {
  .site-nav {
    flex-wrap: wrap;
    row-gap: 0.6em;
  }
  .site-nav-links {
    flex: 1 1 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    order: 3;
  }

  :root { --sidebar-w: 40px; }
}

.site-nav-logo {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  color: var(--text);
  flex: 0 0 auto;
}
.site-nav-logo .logo-dot {
  color: var(--accent);
}
.site-nav-logo-icon {
  width: 28px;
  height: 28px;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 0.3em;
  flex: 1 1 auto;
  justify-content: center;
}
.site-nav-btn,
.site-nav-cta {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.85rem;
  background: transparent;
  border: 1px solid transparent;
  padding: 0.35em 0.9em;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav-btn:hover,
.site-nav-cta:hover {
  background: var(--bg-1);
  color: var(--accent);
}

.site-nav-cta {
  flex: 0 0 auto;
}

.site-nav-lang {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  font-family: inherit;
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.35em 0.9em;
  border-radius: 999px;
  cursor: pointer;
  margin-right: 0.6em;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.site-nav-lang:hover {
  background: var(--bg-1);
  color: var(--accent);
  border-color: var(--accent);
}

.site-nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.site-nav-dropdown-btn {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-family: inherit;
  line-height: normal;
  margin: 0;
}

.site-nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
  padding: 0.4em;
  display: flex;
  flex-direction: column;
  min-width: 160px;
  z-index: 20;
}

.site-nav-dropdown-menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55em 0.8em;
  border-radius: 6px;
  white-space: nowrap;
}

.site-nav-dropdown-menu a:hover {
  background: var(--bg-1);
  color: var(--accent);
}


.thumb-strip {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 8px;
  overflow-y: auto;
  background: var(--strip-bg);
  border-right: 1px solid var(--border);
  transition: top 0.2s ease;
  z-index: 9;
}

.thumb {
  flex: 0 0 auto;
  width: 64px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
  transition: transform 0.15s ease;
}
.thumb:hover {
  transform: translateY(-4px);
}
.thumb:hover .thumb-swatch {
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.thumb-swatch {
  width: 64px;
  height: 56px;
  border: 1px solid var(--border);
  border-radius: 5px;
  --tone: var(--card-1);
  background: var(--tone);
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: box-shadow 0.15s ease, outline-color 0.15s ease;
}
.thumb.active .thumb-swatch {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.thumb.active .thumb-title {
  color: var(--accent);
}
.thumb.tone-1 .thumb-swatch { --tone: var(--card-1); }
.thumb.tone-2 .thumb-swatch { --tone: var(--card-2); }
.thumb.tone-3 .thumb-swatch { --tone: var(--card-3); }
.thumb.tone-4 .thumb-swatch { --tone: var(--card-4); }
.thumb.tone-5 .thumb-swatch { --tone: var(--card-5); }
.thumb.tone-6 .thumb-swatch { --tone: var(--card-6); }

.thumb-preview {
  width: 640px;
  transform: scale(0.1);
  transform-origin: top left;
  padding: 18px;
  pointer-events: none;
  opacity: 0.55;
}
.thumb-preview .thesis {
  font-size: 2.1rem;
  opacity: 0.9;
}
.thumb-preview .self-check,
.thumb-preview .continue-link,
.thumb-preview .deck {
  display: none;
}

.thumb-title {
  flex: 0 0 auto;
  width: 76px;
  font-size: 0.68rem;
  line-height: 1.25;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 640px) {
  .thumb-strip { padding: 12px 6px; gap: 10px; counter-reset: thumbnum; }
  .thumb { width: 28px; counter-increment: thumbnum; }
  .thumb-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .thumb-swatch::after {
    content: counter(thumbnum);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text);
  }
  .thumb-preview { display: none; }
  .thumb-title { display: none; }
}

.quiet-exit {
  position: fixed;
  bottom: 1.2em;
  right: 1.2em;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  z-index: 10;
  opacity: 0.75;
}
.quiet-exit:hover {
  opacity: 1;
}

.content-wide {
  max-width: 1180px;
}

.features-intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2em;
}

.deck {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 1.5em 0 2.5em 0;
}

.card {
  --tilt: 0deg;
  --tone: var(--card-1);
  flex: 1 1 250px;
  max-width: 300px;
  background: var(--tone);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.4em 1.5em;
  margin: 0 -14px 22px 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transform: rotate(var(--tilt));
  transition: transform 0.2s ease, box-shadow 0.2s ease, z-index 0s;
  position: relative;
  cursor: default;
}

.card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  z-index: 5;
}

.card-clickable {
  cursor: pointer;
}
.card-clickable::after {
  content: "→";
  display: inline-block;
  margin-left: 0.3em;
  opacity: 0;
  color: var(--accent);
  transition: opacity 0.15s ease;
}
.card:hover .card-clickable::after {
  opacity: 1;
}

.card-modal-box {
  max-width: 680px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.screen-modal-backdrop.card-modal-backdrop {
  background: transparent;
}

.card h3 {
  margin: 0 0 0.5em 0;
  font-size: 1.05rem;
  color: var(--text);
}

.card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.card.c1  { --tilt: -1.5deg; --tone: var(--card-1); }
.card.c2  { --tilt: 1deg;    --tone: var(--card-2); }
.card.c3  { --tilt: -0.8deg; --tone: var(--card-3); }
.card.c4  { --tilt: 1.6deg;  --tone: var(--card-4); }
.card.c5  { --tilt: -1.2deg; --tone: var(--card-5); }
.card.c6  { --tilt: 0.7deg;  --tone: var(--card-6); }
.card.c7  { --tilt: -1.8deg; --tone: var(--card-2); }
.card.c8  { --tilt: 1.3deg;  --tone: var(--card-4); }
.card.c9  { --tilt: -0.6deg; --tone: var(--card-1); }
.card.c10 { --tilt: 1.9deg;  --tone: var(--card-5); }
.card.c11 { --tilt: -1deg;   --tone: var(--card-6); }
.card.c12 { --tilt: 0.9deg;  --tone: var(--card-3); }
.card.c13 { --tilt: -1.4deg; --tone: var(--card-4); }
.card.c14 { --tilt: 1.1deg;  --tone: var(--card-2); }
.card.c15 { --tilt: -0.9deg; --tone: var(--card-5); }
.card.c16 { --tilt: 1.4deg;  --tone: var(--card-1); }

@media (max-width: 700px) {
  .deck {
    flex-direction: column;
    align-items: stretch;
  }
  .card {
    max-width: none;
    margin: 0 0 14px 0;
  }
}

@media (max-width: 600px) {
  .thesis { font-size: 1.5rem; }
  .screen-0 p, .screen-final p, .postulate p { font-size: 1.05rem; }
  .content { padding: 1.8em 1.6em; border-radius: 10px; }
}

.medal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.8em 1.4em;
  margin-top: 1.8em;
}

.medal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7em;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.medal img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.medal:hover img {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 10px 24px rgba(22, 119, 255, 0.25);
}

.medal-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 700px) {
  .medal-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 460px) {
  .medal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.demo-invite {
  margin-top: 2.4em;
  padding-top: 2em;
  border-top: 1px solid var(--border);
  text-align: center;
}

.demo-creds {
  margin: 0.7em 0 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.demo-creds strong {
  font-family: var(--font-display);
  color: var(--text);
}

.screen-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
}
.screen-modal[hidden] {
  display: none;
}

.screen-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 25, 35, 0.6);
}

.screen-modal-box {
  position: relative;
  background: #ffffff;
  border-radius: 14px;
  max-width: 900px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  padding: 1.6em;
}

.screen-modal-close {
  position: absolute;
  top: 0.6em;
  right: 0.7em;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}
.screen-modal-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.screen-modal-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}

.screen-modal-text {
  margin-top: 1.2em;
}
.screen-modal-text h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 0.4em 0;
}
.screen-modal-text p {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0;
  line-height: 1.55;
}
.screen-modal-text p + p {
  margin-top: 0.9em;
}
.screen-modal-text h4 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--accent);
  margin: 1.3em 0 0.5em 0;
}
.screen-modal-text h4:first-child {
  margin-top: 0;
}

.card-modal-doc-links {
  display: flex;
  gap: 0.6em;
  flex-wrap: wrap;
  margin-top: 1.3em;
}
.card-modal-doc-link {
  display: inline-block;
  padding: 0.5em 1em;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.card-modal-doc-link:hover {
  background: var(--accent);
  color: #fff;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
}
.contact-modal[hidden] { display: none; }
.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 25, 35, 0.6);
}
.contact-modal-box {
  position: relative;
  background: #ffffff;
  border-radius: 14px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  padding: 2em 2.2em;
}
.contact-modal-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 0.4em 0;
}
.contact-modal-intro {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1.4em 0;
  line-height: 1.5;
}
#contactForm {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}
#contactForm label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.6em;
}
#contactForm input,
#contactForm textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.6em 0.8em;
  border: 1px solid var(--border);
  border-radius: 6px;
  resize: vertical;
}
#contactForm input:focus,
#contactForm textarea:focus {
  outline: none;
  border-color: var(--accent);
}
#contactForm .cta {
  margin-top: 1.2em;
  border: none;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
