/* =====================================================
   Millarum — Documentation Website Styles
   Jira Light Theme
   ===================================================== */

/* --- Design Tokens --- */
:root {
  --color-primary:       #0C66E4; /* Jira Primary Blue */
  --color-primary-dark:  #0052CC;
  --color-primary-light: #0065FF;
  --color-secondary:     #00B8D9;
  --color-success:       #1F845A;
  --color-warning:       #E26D00;
  --color-danger:        #CA3521;
  --color-text:          #172B4D; /* Jira N800 text */
  --color-text-subtle:   #626F86; /* Jira N200 subtle text */
  --color-bg:            #F4F5F7; /* Jira N10 page bg */
  --color-surface:       #FFFFFF; /* White card surface */
  --color-surface-raised:#FAFBFC; /* Jira N20 raised surface */
  --color-sidebar:       #FAFBFC; /* Sidebar bg */
  --color-header:        #FFFFFF; /* Header bg */
  --color-border:        #DFE1E6; /* Jira N40 border */
  --sidebar-width:       260px;
  --header-height:       56px;
  --content-max-width:   860px;
  --radius:              8px;
  --shadow-sm:           0 1px 3px rgba(9, 30, 66, 0.08);
  --shadow-md:           0 4px 16px rgba(9, 30, 66, 0.12);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

/* ==============================
   MAIN MENU HEADER (nav-wrapper)
   ============================== */
.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(9, 30, 66, 0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
  flex-shrink: 0;
}

.nav-logo-image {
  display: block;
  width: 138px;
  max-width: 100%;
  height: auto;
  filter: none;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color-text-subtle);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
  font-weight: 600;
}

.nav-cta a {
  background: var(--color-primary);
  color: #ffffff !important;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 1px 2px rgba(9, 30, 66, 0.15);
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav-cta a:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.2s ease;
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 16px 24px;
    box-shadow: 0 4px 12px rgba(9, 30, 66, 0.1);
  }
  .nav-links.open { display: flex; }
}

/* ==============================
   PRODUCT SVG ICONS
   ============================== */
.product-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  flex-shrink: 0;
  display: inline-block;
  margin-right: 8px;
}

.product-title-icon {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  flex-shrink: 0;
  display: inline-block;
  margin-right: 10px;
}

/* ==============================
   LAYOUT
   ============================== */
.layout {
  display: flex;
  min-height: 100vh;
  padding-top: 0;
}

/* ==============================
   SIDEBAR (Hidden)
   ============================== */
.sidebar {
  display: none !important;
}

/* ==============================
   MAIN CONTENT
   ============================== */
.main-content {
  margin: 0 auto;
  flex: 1;
  min-width: 0;
  max-width: var(--content-max-width);
  padding: 40px 20px 80px;
}

.content-wrap {
  width: 100%;
}

/* ==============================
   CONDENSED DOCUMENTATION HERO CARD
   (Refined card container design)
   ============================== */
.card.doc-hero-card,
.doc-hero-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  margin-bottom: 28px;
  min-height: auto !important;
  position: relative;
  z-index: 1;
}

.doc-hero-card::before,
.doc-hero-card::after {
  display: none !important;
}

.doc-hero-content {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.doc-hero-content .resource-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-subtle);
}

.doc-hero-content .resource-tag {
  background: #E9F2FF;
  color: var(--color-primary);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.doc-hero-content h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--color-text);
  margin: 0;
  line-height: 1.25;
}

.doc-hero-content p {
  font-size: 15px;
  color: var(--color-text-subtle);
  line-height: 1.6;
  margin: 0;
}

.doc-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.doc-hero-badge {
  background: #E9F2FF;
  border: 1px solid rgba(12, 102, 228, 0.2);
  color: var(--color-primary);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
}

.doc-hero-media {
  background: var(--color-surface-raised);
  border-left: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.doc-hero-illustration {
  max-width: 100%;
  max-height: 200px;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(9, 30, 66, 0.08);
  background: #ffffff;
  padding: 12px;
  border: 1px solid var(--color-border);
}

@media (max-width: 840px) {
  .doc-hero-card {
    grid-template-columns: 1fr;
  }
  .doc-hero-content {
    padding: 28px 24px;
  }
  .doc-hero-media {
    border-left: none;
    border-top: 1px solid var(--color-border);
    padding: 24px;
  }
}

/* ==============================
   CONTENT CARD
   ============================== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 36px 40px;
  margin-bottom: 24px;
}

/* ==============================
   BREADCRUMB
   ============================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-subtle);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--color-text-subtle); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb .sep { color: var(--color-border); font-size: 16px; }

/* ==============================
   PAGE HEADER
   ============================== */
.page-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}
.page-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.25;
  margin-bottom: 6px;
  color: var(--color-text);
}
.page-header .subtitle {
  font-size: 16px;
  color: var(--color-text-subtle);
  margin: 0;
}

/* ==============================
   TYPOGRAPHY
   ============================== */
h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--color-text);
  padding-top: 4px;
}
h2:first-child { margin-top: 0; }

h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 24px 0 8px;
  color: var(--color-text);
}
h3:first-child { margin-top: 0; }

p {
  color: var(--color-text);
  margin-bottom: 14px;
  line-height: 1.7;
  font-size: 15px;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--color-primary-dark); }

ul, ol {
  padding-left: 24px;
  margin-bottom: 14px;
}
li {
  margin-bottom: 7px;
  line-height: 1.65;
  font-size: 15px;
  color: var(--color-text);
}
strong { font-weight: 700; color: var(--color-text); }

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 32px 0;
}

/* ==============================
   TABLES
   ============================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
thead th {
  background: #FAFBFC;
  color: var(--color-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 10px 16px;
  text-align: left;
  border-bottom: 2px solid var(--color-border);
}
tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  color: var(--color-text);
  line-height: 1.55;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) td { background: var(--color-surface-raised); }

/* ==============================
   CALLOUT BOXES
   ============================== */
.callout {
  border-left: 4px solid;
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0;
  font-size: 14px;
}
.callout-info    { background: #E9F2FF; border-color: var(--color-primary); }
.callout-warning { background: #FFF7ED; border-color: var(--color-warning); }
.callout-tip     { background: #E6F4EA; border-color: var(--color-success); }
.callout-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: block;
}
.callout-info    .callout-label { color: var(--color-primary); }
.callout-warning .callout-label { color: var(--color-warning); }
.callout-tip     .callout-label { color: var(--color-success); }
.callout p { margin: 0; line-height: 1.55; font-size: 14px; }
.callout-info    p { color: var(--color-text); }
.callout-warning p { color: var(--color-text); }
.callout-tip     p { color: var(--color-text); }

/* ==============================
   WIDGET CARDS GRID
   ============================== */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 16px;
  margin: 20px 0 28px;
}
.widget-card {
  display: block;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.12s;
}
.widget-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  text-decoration: none;
}
.widget-card-icon { font-size: 28px; margin-bottom: 10px; display: block; }
.widget-card h3 { font-size: 15px; margin: 0 0 6px; color: var(--color-primary); }
.widget-card p { font-size: 13px; color: var(--color-text-subtle); margin: 0; line-height: 1.5; }

/* ==============================
   STEPS
   ============================== */
.steps {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  counter-reset: step-counter;
}
.steps li {
  counter-increment: step-counter;
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
  align-items: flex-start;
  font-size: 15px;
}
.steps li::before {
  content: counter(step-counter);
  background: var(--color-primary);
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.steps li .step-body { flex: 1; }
.steps li .step-body strong { display: block; margin-bottom: 4px; color: var(--color-text); }
.steps li .step-body p { margin: 0; font-size: 14px; color: var(--color-text-subtle); }

/* ==============================
   SCREENSHOTS
   ============================== */
.screenshot {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: block;
  margin: 16px 0 8px;
}
.screenshot-wrap { margin-bottom: 28px; }
.caption {
  font-size: 12px;
  color: var(--color-text-subtle);
  text-align: center;
  margin-top: 6px;
  font-style: italic;
}

/* ==============================
   BADGES
   ============================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.badge-blue   { background: #E9F2FF; color: var(--color-primary); }
.badge-green  { background: #E6F4EA; color: var(--color-success); }
.badge-purple { background: #EAE6FF; color: #403294; }

/* ==============================
   CODE
   ============================== */
code {
  background: #EAE6FF;
  color: #403294;
  border-radius: 3px;
  padding: 2px 6px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
}

pre {
  background: #172B4D;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow: auto;
  margin: 16px 0;
  color: #DEE4EA;
}
pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: #DEE4EA;
}

/* ==============================
   PAGE FOOTER / NAV
   ============================== */
.page-nav {
  max-width: var(--content-max-width);
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.page-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  transition: border-color 0.15s, background 0.15s;
}
.page-nav a:hover { border-color: var(--color-primary); background: #E9F2FF; text-decoration: none; }
.page-nav .spacer { flex: 1; }

.site-footer {
  max-width: var(--content-max-width);
  margin-top: 20px;
  font-size: 12px;
  color: var(--color-text-subtle);
  text-align: center;
  padding-bottom: 20px;
}
.site-footer a { color: var(--color-text-subtle); }
.site-footer a:hover { color: var(--color-primary); }

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 24px 20px 60px; }
  .hero { padding: 32px 24px; }
  .hero h1 { font-size: 24px; }
  .card { padding: 24px 20px; }
  table { display: block; overflow-x: auto; }
  .widget-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .widget-grid { grid-template-columns: 1fr; }
  .page-nav { flex-direction: column; align-items: stretch; }
}

/* ==============================
   SCROLL & LOADING REVEAL ANIMATIONS
   ============================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-32px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(32px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.reveal-container {
  opacity: 0;
  transition: opacity 0.15s ease;
}
.reveal-container.revealed {
  opacity: 1;
}

.reveal-container.reveal-up .reveal-item {
  animation: fadeInUp 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.reveal-container.reveal-left .reveal-item {
  animation: fadeInLeft 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.reveal-container.reveal-right .reveal-item {
  animation: fadeInRight 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.reveal-item:nth-child(1) { animation-delay: 0.05s; }
.reveal-item:nth-child(2) { animation-delay: 0.15s; }
.reveal-item:nth-child(3) { animation-delay: 0.25s; }
.reveal-item:nth-child(4) { animation-delay: 0.35s; }
.reveal-item:nth-child(5) { animation-delay: 0.45s; }
.reveal-item:nth-child(6) { animation-delay: 0.55s; }
.reveal-item:nth-child(7) { animation-delay: 0.65s; }
.reveal-item:nth-child(8) { animation-delay: 0.75s; }
.reveal-item:nth-child(9) { animation-delay: 0.85s; }
.reveal-item:nth-child(10) { animation-delay: 0.95s; }
.reveal-item:nth-child(11) { animation-delay: 1.05s; }
.reveal-item:nth-child(12) { animation-delay: 1.15s; }

