/* ── Reset & tokens ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-primary:  #0052cc;
  --blue-hover:    #0747a6;
  --blue-light:    #deebff;
  --sidebar-dark:  #253858;
  --sidebar-hover: #2e4877;
  --text-primary:  #172b4d;
  --text-secondary:#6b778c;
  --border:        #dfe1e6;
  --bg-light:      #f4f5f7;
  --bg-page:       #fafbfc;
  --white:         #ffffff;
  --green:         #36b37e;
  --red:           #de350b;
  --yellow:        #ff991f;
  --radius:        4px;
  --shadow-sm:     0 1px 3px rgba(23,43,77,.12);
  --shadow-md:     0 4px 16px rgba(23,43,77,.16);
}

html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.5;
}

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

/* ── Shared nav ───────────────────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--blue-primary);
  text-decoration: none;
}

.nav-logo svg { flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: .9rem;
  font-weight: 500;
  transition: color .15s;
}
.nav-links a:hover { color: var(--text-primary); text-decoration: none; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .5rem 1.25rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .15s, color .15s, box-shadow .15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--blue-primary);
  color: var(--white);
}
.btn-primary:hover { background: var(--blue-hover); text-decoration: none; color: var(--white); }

.btn-secondary {
  background: var(--white);
  color: var(--blue-primary);
  border: 2px solid var(--blue-primary);
}
.btn-secondary:hover { background: var(--blue-light); text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: .5rem 1rem;
}
.btn-ghost:hover { background: var(--bg-light); color: var(--text-primary); text-decoration: none; }

.btn-lg { padding: .75rem 2rem; font-size: 1rem; }

/* "Coming soon" placeholder — replaces active CTA buttons */
.btn-coming-soon {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem 1.25rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-light);
  border: 2px dashed var(--border);
  cursor: default;
  user-select: none;
}
.btn-coming-soon::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  flex-shrink: 0;
}
.btn-coming-soon-lg { padding: .75rem 2rem; font-size: 1rem; }
.btn-coming-soon-inverted {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.35);
  color: rgba(255,255,255,.85);
}
.btn-coming-soon-inverted::before { background: #ffe066; }

/* Microsoft sign-in button */
.btn-microsoft {
  background: var(--white);
  color: var(--text-primary);
  border: 1px solid #8c8c8c;
  padding: .65rem 1.5rem;
  font-size: .95rem;
  font-weight: 600;
  width: 100%;
  max-width: 300px;
  box-shadow: var(--shadow-sm);
}
.btn-microsoft:hover {
  background: #f0f0f0;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}
.btn-microsoft svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 5rem 2rem 4rem;
  background: linear-gradient(160deg, #ebf2ff 0%, var(--bg-page) 60%);
}

.hero-eyebrow {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue-primary);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .3rem .8rem;
  border-radius: 99px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  max-width: 700px;
  margin-bottom: 1.25rem;
}

.hero h1 span { color: var(--blue-primary); }

.hero p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* ── Feature grid ─────────────────────────────────────────────────── */
.section { padding: 4rem 2rem; max-width: 1100px; margin: 0 auto; }
.section-title {
  text-align: center;
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.section-sub {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

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

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.feature-card:hover { box-shadow: var(--shadow-md); }

.feature-icon {
  width: 48px; height: 48px;
  background: var(--blue-light);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  color: var(--blue-primary);
}

.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.feature-card p  { color: var(--text-secondary); font-size: .9rem; line-height: 1.6; }

/* ── How it works ─────────────────────────────────────────────────── */
.how-section { background: var(--bg-light); padding: 4rem 2rem; }
.how-inner   { max-width: 900px; margin: 0 auto; }

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

.step { display: flex; flex-direction: column; align-items: flex-start; }

.step-num {
  width: 40px; height: 40px;
  background: var(--blue-primary);
  color: var(--white);
  border-radius: 50%;
  font-weight: 700;
  font-size: .95rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.step h4 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.step p  { color: var(--text-secondary); font-size: .88rem; line-height: 1.6; }

/* ── Systems logos strip ──────────────────────────────────────────── */
.systems-strip {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
}

.systems-strip p {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.systems-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem 3rem;
}

.system-badge {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: .02em;
  opacity: .7;
}

/* ── Footer ───────────────────────────────────────────────────────── */
.site-footer {
  background: var(--sidebar-dark);
  color: rgba(255,255,255,.6);
  padding: 2.5rem 2rem;
  text-align: center;
  font-size: .85rem;
}
.site-footer a { color: rgba(255,255,255,.75); }
.site-footer a:hover { color: var(--white); }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* ── Centred card layout (used by /acme, /acme/create, 404) ──────── */
.page-centred {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  padding: 2rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  padding: 2.5rem 2.75rem;
  width: 100%;
  max-width: 480px;
  text-align: center;
}

.card-logo { margin-bottom: 1.5rem; }
.card h1 { font-size: 1.35rem; font-weight: 700; margin-bottom: .75rem; }
.card p  { color: var(--text-secondary); font-size: .93rem; line-height: 1.65; margin-bottom: 1.5rem; }

.card-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.card-small { font-size: .8rem; color: var(--text-secondary); margin-top: 1.25rem; }

/* hint card variant */
.card-hint { border-top: 4px solid var(--yellow); }
.hint-icon { font-size: 2.5rem; margin-bottom: 1rem; }

/* 404 card variant */
.card-404 { border-top: 4px solid var(--red); }
.error-code { font-size: 5rem; font-weight: 900; color: var(--border); line-height: 1; margin-bottom: .5rem; }
.card-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* ── JIRA-style layout ────────────────────────────────────────────── */
.jira-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg-light);
}

/* Sidebar */
.jira-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--sidebar-dark);
  color: rgba(255,255,255,.85);
  display: flex;
  flex-direction: column;
  padding: 0;
}

.sidebar-project {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.project-icon {
  width: 36px; height: 36px;
  background: var(--blue-primary);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  font-weight: 800;
  color: var(--white);
  flex-shrink: 0;
}

.project-name { font-size: .85rem; font-weight: 600; line-height: 1.3; }
.project-type { font-size: .75rem; color: rgba(255,255,255,.45); }

.sidebar-nav { flex: 1; padding: .75rem 0; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem 1.25rem;
  font-size: .875rem;
  color: rgba(255,255,255,.75);
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.sidebar-nav a:hover {
  background: var(--sidebar-hover);
  color: var(--white);
  text-decoration: none;
}
.sidebar-nav a.active {
  background: rgba(255,255,255,.1);
  color: var(--white);
  border-left-color: var(--blue-primary);
}

.sidebar-nav a svg { flex-shrink: 0; opacity: .7; }
.sidebar-nav a.active svg { opacity: 1; }

/* Main area */
.jira-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.jira-topbar {
  height: 52px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.75rem;
  gap: .5rem;
  font-size: .85rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.jira-topbar a { color: var(--text-secondary); }
.jira-topbar a:hover { color: var(--blue-primary); }
.jira-topbar .sep { color: var(--border); }
.jira-topbar .current { color: var(--text-primary); font-weight: 600; }

.jira-content {
  flex: 1;
  padding: 2rem 2.5rem;
  max-width: 900px;
}

.jira-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.75rem;
  color: var(--text-primary);
}

/* Form */
.form-section { margin-bottom: 1.5rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .35rem;
}

.form-label .required { color: var(--red); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: .55rem .75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--text-primary);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(0,82,204,.15);
}
.form-control:disabled {
  background: var(--bg-light);
  color: var(--text-secondary);
  cursor: not-allowed;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
  line-height: 1.5;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b778c' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.25rem;
}

/* Description toolbar */
.desc-toolbar {
  display: flex;
  gap: 2px;
  padding: .35rem .5rem;
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
}

.desc-toolbar button {
  background: none;
  border: none;
  padding: .25rem .4rem;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 3px;
  font-size: .8rem;
  font-weight: 700;
}
.desc-toolbar button:hover { background: var(--border); color: var(--text-primary); }
.desc-toolbar .sep { width: 1px; background: var(--border); margin: 2px 4px; }

.desc-textarea { border-top-left-radius: 0; border-top-right-radius: 0; }

/* Priority badges */
.priority-indicator {
  display: inline-flex; align-items: center; gap: .4rem;
}
.p-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.p-low      { background: #36b37e; }
.p-medium   { background: #ff991f; }
.p-high     { background: #ff5630; }
.p-critical { background: #bf2600; }

/* Form footer */
.form-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

.btn-cancel {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  padding: .5rem .75rem;
  border-radius: var(--radius);
}
.btn-cancel:hover { background: var(--bg-light); color: var(--text-primary); }
